Füge Baugruppen hinzu

This commit is contained in:
Marcel Diegelmann 2025-10-17 12:25:10 +02:00
parent 98b8c5b788
commit 5bd0741fba
128 changed files with 23830 additions and 109 deletions

View file

@ -0,0 +1,74 @@
{% block assembly_bom_entry_collection_widget %}
{% import 'components/collection_type.macro.html.twig' as collection %}
<div {{ collection.controller(form, 'assembly.bom.delete.confirm', 3) }}>
<table class="table table-striped table-bordered table-sm" {{ collection.target() }}>
<thead>
<tr>
<th></th> {# expand button #}
<th>{% trans %}assembly.bom.quantity{% endtrans %}</th>
<th>{% trans %}assembly.bom.partOrAssembly{% endtrans %}</th>
<th>{% trans %}assembly.bom.identifiers{% endtrans %}</th>
<th></th> {# Remove button #}
</tr>
</thead>
<tbody>
{% for entry in form %}
{{ form_widget(entry) }}
{% endfor %}
</tbody>
</table>
<button type="button" class="btn btn-success mb-2" {{ collection.create_btn() }}>
<i class="fas fa-plus-square fa-fw"></i>
{% trans %}assembly.bom.add_entry{% endtrans %}
</button>
</div>
{% endblock %}
{% block assembly_bom_entry_widget %}
{% set target_id = 'expand_row-' ~ form.vars.name %}
{% import 'components/collection_type.macro.html.twig' as collection %}
<tr>
<td>
<button class="btn btn-sm btn-outline-secondary" type="button" data-bs-toggle="collapse" data-bs-target="#{{ target_id }}">
<i class="fa-solid fa-eye"></i>
</button>
</td>
<td>
{{ form_widget(form.quantity) }}
{{ form_errors(form.quantity) }}
</td>
<td style="min-width: 450px;">
{{ form_row(form.part) }}
{{ form_errors(form.part) }}
<div class="text-center mb-2" style="line-height: 1"></div>
{{ form_widget(form.referencedAssembly) }}
{{ form_errors(form.referencedAssembly) }}
</td>
<td style="min-width: 450px;">
{{ form_row(form.name) }}
{{ form_errors(form.name) }}
<div class="text-center mb-2" style="line-height: 1"></div>
{{ form_row(form.designator) }}
{{ form_errors(form.designator) }}
</td>
<td>
<button type="button" class="btn btn-danger lot_btn_delete position-relative" {{ collection.delete_btn() }}>
<i class="fas fa-trash-alt fa-fw"></i>
{{ collection.new_element_indicator(value) }}
</button>
{{ form_errors(form) }}
</td>
</tr>
<tr class="p-0 d-none"></tr>
<tr class="p-0">
<td colspan="5" class="accordion-body collapse" id="{{ target_id }}">
<div class="">
{{ form_row(form.comment) }}
</div>
</td>
</tr>
{% endblock %}