fix: improve GBP field cards readability
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
- Translate English day names to Polish abbreviations (Mon→Pon, etc.) - Show all 7 days in grid layout instead of 5 + "..." - Remove technical scoring breakdown formula from reviews card - Add "zdjęć w profilu" suffix to photos count - Show categories as styled badges - Truncate long descriptions at 120 chars Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
bca73f0b4f
commit
6732f5da74
@ -1315,16 +1315,28 @@
|
||||
{% if field_data.value %}
|
||||
<div class="field-value">
|
||||
{% if field_name == 'hours' and field_data.value is mapping and field_data.value.weekday_text %}
|
||||
{# Format opening hours nicely #}
|
||||
{% for day_hours in field_data.value.weekday_text[:5] %}
|
||||
{{ day_hours }}{% if not loop.last %}<br>{% endif %}
|
||||
{# Translate English day names to Polish and show ALL 7 days #}
|
||||
{% set day_pl = {'Monday': 'Pon', 'Tuesday': 'Wt', 'Wednesday': 'Sr', 'Thursday': 'Czw', 'Friday': 'Pt', 'Saturday': 'Sob', 'Sunday': 'Ndz'} %}
|
||||
<div style="display: grid; grid-template-columns: auto 1fr; gap: 2px var(--spacing-sm); font-size: var(--font-size-xs);">
|
||||
{% for day_hours in field_data.value.weekday_text %}
|
||||
{% set parts = day_hours.split(': ', 1) %}
|
||||
<span style="color: var(--text-tertiary); font-weight: 500;">{{ day_pl.get(parts[0], parts[0]) }}</span>
|
||||
<span>{{ parts[1] if parts|length > 1 else day_hours }}</span>
|
||||
{% endfor %}
|
||||
{% if field_data.value.weekday_text|length > 5 %}
|
||||
<br>...
|
||||
{% endif %}
|
||||
</div>
|
||||
{% elif field_name == 'hours' and field_data.value is string and 'weekday_text' in field_data.value %}
|
||||
{# Handle string representation of dict #}
|
||||
<span class="hours-compact">Godziny ustawione</span>
|
||||
{% elif field_name == 'photos' %}
|
||||
{{ field_data.value }} zdjęć w profilu
|
||||
{% elif field_name == 'reviews' %}
|
||||
{{ field_data.value }}
|
||||
{% elif field_name == 'categories' %}
|
||||
{% set cats = field_data.value.split(', ') if field_data.value is string else [field_data.value] %}
|
||||
{% for cat in cats %}
|
||||
<span style="display: inline-block; padding: 1px 6px; margin: 1px; background: #eff6ff; color: #1d4ed8; border-radius: var(--radius-sm); font-size: 11px;">{{ cat }}</span>
|
||||
{% endfor %}
|
||||
{% elif field_name == 'description' %}
|
||||
{{ field_data.value[:120] }}{% if field_data.value|length > 120 %}...{% endif %}
|
||||
{% else %}
|
||||
{{ field_data.value }}
|
||||
{% endif %}
|
||||
@ -1333,14 +1345,11 @@
|
||||
{% if field_name == 'reviews' %}
|
||||
<div class="field-scoring-info reviews-scoring">
|
||||
{% if field_data.score == field_data.max_score %}
|
||||
<span class="scoring-message success">🏆 Doskonale! Masz maksymalną punktację za opinie</span>
|
||||
<span class="scoring-message success">Doskonale! Maksymalna punktacja</span>
|
||||
{% elif field_data.score == 0 %}
|
||||
<span class="scoring-message hint">💡 Poproś zadowolonych klientów o opinie w Google</span>
|
||||
<span class="scoring-message hint">Popros zadowolonych klientow o opinie w Google</span>
|
||||
{% else %}
|
||||
<span class="scoring-message progress">👍 Dobry początek! Zbierz więcej opinii - cel to minimum 5</span>
|
||||
{% endif %}
|
||||
{% if field_data.details and field_data.details.breakdown %}
|
||||
<div class="scoring-breakdown-line">{{ field_data.details.breakdown }}</div>
|
||||
<span class="scoring-message progress">Dobry poczatek! Zbierz wiecej opinii — cel to minimum 5</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user