Merge pull request 'fix(tradein): PDF — рабочая ссылка на отчёт + «Есть/Нет» для балкона' (#425) from fix/tradein-pdf-link-balcony into main
All checks were successful
Deploy Trade-In / changes (push) Successful in 5s
Deploy Trade-In / build-frontend (push) Has been skipped
Deploy Trade-In / deploy (push) Successful in 16s
Deploy Trade-In / build-backend (push) Successful in 44s

This commit is contained in:
lekss361 2026-05-22 11:01:50 +00:00
commit 99c19f9fbb

View file

@ -244,7 +244,7 @@ def _build_cover(
rooms_label = "Студия" if rooms == 0 else f"{rooms} комнат" + ("а" if rooms == 1 else "ы" if 2 <= rooms <= 4 else "")
house_label = house_labels.get(house_type, "") if house_type else ""
repair_label = repair_labels.get(repair_state, "Не указано") if repair_state else "Не указано"
balcony_label = "1" if has_balcony else "0" if has_balcony is False else ""
balcony_label = "Есть" if has_balcony else "Нет" if has_balcony is False else ""
# Active market subband — 4-118 days range (как у Брусники).
# Если есть days_on_market в analogs — берём min/max, иначе фиксированно.
@ -269,7 +269,7 @@ def _build_cover(
)
qr_url = _qr_code_data_url(
f"{settings.public_url}/trade-in?id={estimate.estimate_id}", size=3
f"{settings.public_url}?id={estimate.estimate_id}", size=3
)
return f"""
@ -332,7 +332,7 @@ def _build_cover(
</table>
<p style="margin-top:18pt;font-size:8pt;color:#6b7280;border-top:1pt solid #e6e8ec;padding-top:8pt;">
<strong>Этот отчёт онлайн:</strong> {settings.public_url}/trade-in?id={estimate.estimate_id}
<strong>Этот отчёт онлайн:</strong> {settings.public_url}?id={estimate.estimate_id}
</p>
</div>