Cleanup-Logik für Baugruppen und BOM-Einträge im Statistik-Bereich überarbeiten bzw. erweitern

This commit is contained in:
Marcel Diegelmann 2026-02-13 16:34:43 +01:00
parent d67e93064c
commit b08df9b812
35 changed files with 864 additions and 233 deletions

View file

@ -64,10 +64,8 @@
<div class="tab-pane fade" id="assemblies" role="tabpanel" aria-labelledby="assemblies-tab"
{{ stimulus_controller('pages/statistics_assembly', {
url: path('statistics_cleanup_assembly_bom_entries'),
confirmMsg: 'statistics.cleanup_assembly_bom_entries.confirm'|trans,
successMsg: 'statistics.cleanup_assembly_bom_entries.success'|trans,
errorMsg: 'statistics.cleanup_assembly_bom_entries.error'|trans
cleanupBomUrl: path('statistics_cleanup_assembly_bom_entries'),
cleanupPreviewUrl: path('statistics_cleanup_assembly_preview_attachments')
}) }}
>
<table class="table table-striped table-hover">
@ -85,14 +83,25 @@
<tr>
<td>{% trans %}statistics.invalid_part_bom_entries_count{% endtrans %}</td>
<td>
<span {{ stimulus_target('pages/statistics_assembly', 'count') }}>{{ helper.invalidPartBOMEntriesCount }}</span>
<span {{ stimulus_target('pages/statistics_assembly', 'bomCount') }}>{{ helper.invalidPartBOMEntriesCount }}</span>
{% if helper.invalidPartBOMEntriesCount > 0 %}
<button class="btn btn-sm btn-outline-danger ms-2" {{ stimulus_action('pages/statistics_assembly', 'cleanup') }}>
<button type="button" class="btn btn-sm btn-outline-danger ms-2" {{ stimulus_action('pages/statistics_assembly', 'cleanup', 'click') }} {{ stimulus_target('pages/statistics_assembly', 'bomButton') }}>
<i class="fas fa-magic"></i> {% trans %}statistics.cleanup_assembly_bom_entries.button{% endtrans %}
</button>
{% endif %}
</td>
</tr>
<tr>
<td>{% trans %}statistics.invalid_assembly_preview_attachments_count{% endtrans %}</td>
<td>
<span {{ stimulus_target('pages/statistics_assembly', 'previewCount') }}>{{ helper.invalidAssemblyPreviewAttachmentsCount }}</span>
{% if helper.invalidAssemblyPreviewAttachmentsCount > 0 %}
<button type="button" class="btn btn-sm btn-outline-danger ms-2" {{ stimulus_action('pages/statistics_assembly', 'cleanupPreview', 'click') }} {{ stimulus_target('pages/statistics_assembly', 'previewButton') }}>
<i class="fas fa-magic"></i> {% trans %}statistics.cleanup_assembly_preview_attachments.button{% endtrans %}
</button>
{% endif %}
</td>
</tr>
</tbody>
</table>
</div>