fix: avoid Jinja dict items collision in employee card

This commit is contained in:
Anton
2026-04-29 11:34:46 +03:00
parent 26db5832fd
commit af87fa8af3
7 changed files with 12 additions and 9 deletions

View File

@@ -59,7 +59,7 @@ def employee_detail_payload(employee: Employee) -> dict[str, Any]:
"emails": _clean_list(contacts.get("emails")),
"phones": _clean_list(contacts.get("phones")),
"address": contacts.get("address"),
"items": _normalize_contact_items(contacts.get("items")),
"contact_items": _normalize_contact_items(contacts.get("items")),
},
"external_ids": _normalize_external_ids(data.get("external_ids")),
"sections": [_normalize_section(section) for section in _as_list(data.get("sections"))],

View File

@@ -62,12 +62,12 @@
<dt class="employee-card__meta-label">Адрес</dt>
<dd class="employee-card__meta-value">{{ employee_view.contacts.address or "Не указано" }}</dd>
</div>
{% if employee_view.contacts.items %}
{% if employee_view.contacts.contact_items %}
<div class="employee-card__meta-item employee-card__meta-item--wide">
<dt class="employee-card__meta-label">Прочее</dt>
<dd class="employee-card__meta-value">
<ul class="employee-card__list">
{% for item in employee_view.contacts.items %}
{% for item in employee_view.contacts.contact_items %}
<li class="employee-card__list-item">{{ item }}</li>
{% endfor %}
</ul>

View File

@@ -1,3 +1,3 @@
APP_VERSION = "0.2.3"
FRONTEND_VERSION = "0.2.3"
BACKEND_VERSION = "0.2.3"
APP_VERSION = "0.2.4"
FRONTEND_VERSION = "0.2.4"
BACKEND_VERSION = "0.2.4"