Files
skeleton-api/app/templates/_dashboard_sync_card.html
T

33 lines
1.3 KiB
HTML

<div id="dashboard-sync-card" class="card">
<h2>Data sync</h2>
<dl class="kv">
<dt>Scopes</dt>
<dd>{{ scope_count }}</dd>
<dt>Imported parts skipped</dt>
<dd>{% if can_sync_augmented_parts %}<a href="/admin/augmented-parts/skipped">{{ skipped_count }}</a>{% else %}{{ skipped_count }}{% endif %}</dd>
</dl>
{% if status_message %}<p class="muted">✅ {{ status_message }}</p>{% endif %}
{% if status_error %}<p class="muted">⚠️ {{ status_error }}</p>{% endif %}
{% if can_refresh_odata or can_sync_augmented_parts or can_recompute_fits %}
<div class="dashboard-sync-actions">
{% if can_refresh_odata %}
<form hx-post="/dashboard/refresh-odata" hx-target="#dashboard-sync-card" hx-swap="outerHTML">
<button type="submit" class="btn btn-primary">Refresh from OData</button>
</form>
{% endif %}
{% if can_sync_augmented_parts %}
<form hx-post="/dashboard/sync-augmented-parts" hx-target="#dashboard-sync-card" hx-swap="outerHTML">
<button type="submit" class="btn btn-primary">Sync augmented parts</button>
</form>
{% endif %}
{% if can_recompute_fits %}
<form hx-post="/dashboard/recompute-fits" hx-target="#dashboard-sync-card" hx-swap="outerHTML">
<button type="submit" class="btn btn-primary">Recompute possible fits</button>
</form>
{% endif %}
</div>
{% endif %}
</div>