Reorganizeaza interfata web pe trei principii, fara a atinge backend-ul de trimitere (worker, mapping, idempotency, masina de stari neatinse): - US-001 app/web/labels.py: modul pur stari tehnice -> text uman + clasa CSS - US-002 bara status /_fragments/status: microcopy uman, defalcare blocate, scoped cont - US-003 shell 6 tab-uri (Acasa/Import/Coada/Mapari/Cont/Nomenclator): deep-link ?tab=, panou activ randat server-side, fragmente inactive lazy, ARIA real - US-004 stepper import 4 pasi (pur vizual; hx-target + csrf pastrate) - US-005 Acasa onboarding checklist auto-bifat + colaps + empty states prietenoase Reparat in cursul VERIFY/CLOSE: izolare teste (reset ratelimit._hits in fixturi), regresie avertisment "cont in asteptare de activare" (re-introdus in bara status), culori hardcodate -> variabile paleta. 434 teste pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
62 lines
2.3 KiB
HTML
62 lines
2.3 KiB
HTML
<div id="mapari-section" class="card">
|
|
<h2 style="font-size:15px; margin:0 0 12px;">Mapari de rezolvat</h2>
|
|
|
|
{% if message %}
|
|
<div class="flash">{{ message }}</div>
|
|
{% endif %}
|
|
|
|
{% if not pending %}
|
|
<div class="empty">
|
|
Nicio operatie nemapata — tot ce a venit s-a tradus in coduri RAR.
|
|
<a href="/?tab=import">Importa un fisier nou</a> daca vrei sa adaugi prezentari.
|
|
</div>
|
|
{% else %}
|
|
<p class="muted" style="margin:0 0 12px; font-size:13px;">
|
|
Operatii ROAAUTO necunoscute, blocate in <span class="s-needs_mapping">needs_mapping</span>.
|
|
Alege codul RAR (sugestia fuzzy e preselectata) si salveaza — submission-urile se deblocheaza automat.
|
|
</p>
|
|
|
|
{% for e in pending %}
|
|
{% set top = e.suggestions[0] if e.suggestions else None %}
|
|
{% set preselect = top.cod_prestatie if (top and top.score >= 60) else '' %}
|
|
<form class="maprow" hx-post="/mapari" hx-target="#mapari-section" hx-swap="outerHTML">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token or '' }}">
|
|
<input type="hidden" name="cod_op_service" value="{{ e.cod_op_service }}">
|
|
|
|
<div class="mapcol grow">
|
|
<div><strong>{{ e.cod_op_service }}</strong>
|
|
<span class="pill" title="submission-uri blocate">{{ e.blocked }} blocate</span></div>
|
|
<div class="muted">{{ e.denumire or '(fara denumire)' }}</div>
|
|
{% if e.suggestions %}
|
|
<div class="muted" style="font-size:12px; margin-top:4px;">
|
|
sugestii:
|
|
{% for s in e.suggestions[:3] %}
|
|
<span class="sugg">{{ s.cod_prestatie }} ({{ s.score|round|int }}%)</span>{% if not loop.last %}, {% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="mapcol">
|
|
<select name="cod_prestatie" required>
|
|
<option value="">— alege cod RAR —</option>
|
|
{% for n in nomenclator %}
|
|
<option value="{{ n.cod_prestatie }}" {% if n.cod_prestatie == preselect %}selected{% endif %}>
|
|
{{ n.cod_prestatie }} — {{ n.nume_prestatie }}
|
|
</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<div class="mapcol">
|
|
<label class="chk"><input type="checkbox" name="auto_send" value="true" checked> auto-send</label>
|
|
</div>
|
|
|
|
<div class="mapcol">
|
|
<button type="submit">Salveaza</button>
|
|
</div>
|
|
</form>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</div>
|