mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-11 04:39:33 +00:00
Assembly Konfiguration in BOM ausblenden, wenn bisher keine Zuordnung zu mindestens einem Eintrag stattgefunden hat (Berücksichtigung Rechtekonfiguration)
This commit is contained in:
parent
74ffec32aa
commit
b6f904a7b3
2 changed files with 13 additions and 4 deletions
|
|
@ -27,4 +27,4 @@ class AssemblyTwigExtension extends AbstractExtension
|
|||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,9 +44,18 @@
|
|||
<td style="min-width: 300px;">
|
||||
{{ form_row(form.part) }}
|
||||
{{ form_errors(form.part) }}
|
||||
<div class="text-center mb-2" style="line-height: 1">∨</div>
|
||||
{{ form_widget(form.assembly) }}
|
||||
{{ form_errors(form.assembly) }}
|
||||
|
||||
{% 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) }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue