Add RRO, portal section perms, dislocation presets, and hiring intern flow.

Ship cash-register registry, section-based portal access, configurable dislocation columns, and trial-hire intern accounts with credentials PDF.
This commit is contained in:
2026-08-09 14:58:17 +03:00
parent 237275abd0
commit ae5c1f1848
63 changed files with 5987 additions and 2217 deletions
+65
View File
@@ -0,0 +1,65 @@
{% load i18n %}
{% if column.key == 'pharmacy' %}
<td style="padding:0.75rem 1rem; color:var(--color-foreground);">
<a href="/pharmacies/{{ pharmacy.id }}/" hx-get="/pharmacies/{{ pharmacy.id }}/" hx-target="#main-content" hx-push-url="/pharmacies/{{ pharmacy.id }}/" hx-indicator="#loader"
onclick="event.stopPropagation();" style="font-weight:600; color:var(--color-foreground); text-decoration:none;">№ {{ pharmacy.pharmacy_number }}</a>
<div style="font-size:0.75rem; color:var(--color-muted-foreground); margin-top:0.125rem; max-width:220px; overflow:hidden; text-overflow:ellipsis;">{{ pharmacy.address|default:no_addr_short }}</div>
</td>
{% elif column.key == 'organization' %}
<td style="padding:0.75rem 1rem; color:var(--color-foreground);">{{ pharmacy.organization.name|default:"—" }}</td>
{% elif column.key == 'head' %}
<td style="padding:0.75rem 1rem; color:var(--color-foreground);">
{% if pharmacy.head_pharmacist %}
{{ pharmacy.head_pharmacist.first_name }} {{ pharmacy.head_pharmacist.last_name|default:'' }}
{% else %}
<span style="color:var(--color-warning); font-size:0.8125rem;">{% trans "не назначен" %}</span>
{% endif %}
</td>
{% elif column.key == 'staff' %}
<td style="padding:0.75rem 1rem;">
<div style="display:flex; align-items:center; gap:0.5rem;">
<span style="color:var(--color-foreground); font-weight:500;">{{ pharmacy.staff_count }}</span>
{% if pharmacy.staff_status == 'danger' %}
<span class="badge badge-danger">{% trans "Нехватка" %}</span>
{% elif pharmacy.staff_status == 'warning' %}
<span class="badge badge-warning">{% trans "Внимание" %}</span>
{% else %}
<span class="badge badge-success">{% trans "Норма" %}</span>
{% endif %}
</div>
</td>
{% elif column.key == 'phone' %}
<td style="padding:0.75rem 1rem; color:var(--color-foreground);">
{% if pharmacy.phone %}{{ pharmacy.phone }}{% else %}<span style="color:var(--color-muted-foreground);">-</span>{% endif %}
</td>
{% elif column.key == 'hours' %}
<td style="padding:0.75rem 1rem; color:var(--color-foreground); font-size:0.8125rem;">{{ pharmacy.working_hours }}</td>
{% elif column.key == 'status' %}
<td style="padding:0.75rem 1rem;">
{% if pharmacy.is_active %}
<span class="badge badge-success">{% trans "Активна" %}</span>
{% else %}
<span class="badge badge-danger">{% trans "Неактивна" %}</span>
{% endif %}
</td>
{% elif column.key == 'region' %}
<td style="padding:0.75rem 1rem; color:var(--color-foreground);">{{ pharmacy.location_region.name|default:"—" }}</td>
{% elif column.key == 'category' %}
<td style="padding:0.75rem 1rem; color:var(--color-foreground);">{{ pharmacy.category|default:"—" }}</td>
{% elif column.key == 'curator' %}
<td style="padding:0.75rem 1rem; color:var(--color-foreground);">
{% if pharmacy.curator %}{{ pharmacy.curator.last_name }} {{ pharmacy.curator.first_name }}{% else %}—{% endif %}
</td>
{% elif column.key == 'manager' %}
<td style="padding:0.75rem 1rem; color:var(--color-foreground);">
{% if pharmacy.responsible_manager %}{{ pharmacy.responsible_manager.last_name }} {{ pharmacy.responsible_manager.first_name }}{% else %}—{% endif %}
</td>
{% elif column.key == 'license' %}
<td style="padding:0.75rem 1rem; color:var(--color-foreground); font-size:0.8125rem;">{{ pharmacy.license_number|default:"—" }}</td>
{% elif column.key == 'vat' %}
<td style="padding:0.75rem 1rem; color:var(--color-foreground);">{% if pharmacy.vat_category %}{{ pharmacy.get_vat_category_display }}{% else %}—{% endif %}</td>
{% elif column.key == 'email' %}
<td style="padding:0.75rem 1rem; color:var(--color-foreground); font-size:0.8125rem; overflow-wrap:anywhere;">{{ pharmacy.carbonio_email|default:"—" }}</td>
{% else %}
<td style="padding:0.75rem 1rem;">—</td>
{% endif %}