Files
skeleton-api/app/templates/admin/_scope_import_result.html
T
2026-07-16 20:15:35 -03:00

42 lines
1.0 KiB
HTML

{% if error %}
<div class="card">
<p style="color:var(--color-danger,#c00)">{{ error }}</p>
</div>
{% elif result %}
<div class="card">
<h2>Import result</h2>
<p>
<strong>{{ result.created }}</strong> created,
<strong>{{ result.updated }}</strong> updated,
<strong>{{ result.skipped }}</strong> skipped,
<strong>{{ result.errors }}</strong> errors
({{ result.total }} rows).
</p>
{% set flagged = result.rows | selectattr("messages") | list %}
{% if flagged %}
<table class="table">
<thead>
<tr><th>Row</th><th>Product #</th><th>Status</th><th>Messages</th></tr>
</thead>
<tbody>
{% for r in flagged %}
<tr>
<td>{{ r.row }}</td>
<td>{{ r.product_number or "—" }}</td>
<td>{{ r.status }}</td>
<td>
<ul style="margin:0">
{% for m in r.messages %}<li>{{ m }}</li>{% endfor %}
</ul>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p class="muted">All rows imported cleanly.</p>
{% endif %}
</div>
{% endif %}