Projekt BOM-Konfiguration um Assemblies bereinigen.

Assembly BOM-Konfiguration um Projektauswahl erweitern (APS-3, APS-4)
This commit is contained in:
Marcel Diegelmann 2025-06-17 11:28:42 +02:00
parent f79dc3a102
commit df2ce45e4c
53 changed files with 738 additions and 1541 deletions

View file

@ -6,7 +6,7 @@
<tr>
<th></th> {# expand button #}
<th>{% trans %}project.bom.quantity{% endtrans %}</th>
<th>{% trans %}project.bom.partOrAssembly{% endtrans %}</th>
<th>{% trans %}project.bom.part{% endtrans %}</th>
<th>{% trans %}project.bom.name{% endtrans %}</th>
<th></th> {# Remove button #}
</tr>
@ -41,21 +41,9 @@
{{ form_widget(form.quantity) }}
{{ form_errors(form.quantity) }}
</td>
<td style="min-width: 300px;">
{{ form_row(form.part) }}
<td style="min-width: 250px;">
{{ form_widget(form.part) }}
{{ form_errors(form.part) }}
{% if form.vars.value is not null and form.vars.value.project is not null %}
{% set hasAssembly = false %}
{% if is_granted("@assemblies.read") or has_assembly(form.vars.value.project.bomEntries.toArray) %}
<div class="text-center mb-2" style="line-height: 1"></div>
{{ form_widget(form.assembly) }}
{{ form_errors(form.assembly) }}
{% endif %}
{% elseif is_granted("@assemblies.read") %}
{{ form_widget(form.assembly) }}
{{ form_errors(form.assembly) }}
{% endif %}
</td>
<td>
{{ form_widget(form.name) }}

View file

@ -6,7 +6,7 @@
<tr>
<th></th> {# expand button #}
<th>{% trans %}assembly.bom.quantity{% endtrans %}</th>
<th>{% trans %}assembly.bom.part{% endtrans %}</th>
<th>{% trans %}assembly.bom.partOrProject{% endtrans %}</th>
<th>{% trans %}assembly.bom.name{% endtrans %}</th>
<th></th> {# Remove button #}
</tr>
@ -41,9 +41,21 @@
{{ form_widget(form.quantity) }}
{{ form_errors(form.quantity) }}
</td>
<td style="min-width: 250px;">
{{ form_widget(form.part) }}
<td style="min-width: 300px;">
{{ form_row(form.part) }}
{{ form_errors(form.part) }}
{% if form.vars.value is not null and form.vars.value.assembly is not null %}
{% if is_granted("@projects.read") or has_project(form.vars.value.assembly.bomEntries.toArray) %}
<div class="text-center mb-2" style="line-height: 1"></div>
{{ form_widget(form.project) }}
{{ form_errors(form.project) }}
{% endif %}
{% elseif is_granted("@projects.read") %}
<div class="text-center mb-2" style="line-height: 1"></div>
{{ form_widget(form.project) }}
{{ form_errors(form.project) }}
{% endif %}
</td>
<td>
{{ form_widget(form.name) }}