mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-14 06:09:33 +00:00
Assemblies einführen
This commit is contained in:
parent
e1418dfdc1
commit
6fa960df42
107 changed files with 14101 additions and 96 deletions
|
|
@ -6,7 +6,7 @@
|
|||
<tr>
|
||||
<th></th> {# expand button #}
|
||||
<th>{% trans %}project.bom.quantity{% endtrans %}</th>
|
||||
<th>{% trans %}project.bom.part{% endtrans %}</th>
|
||||
<th>{% trans %}project.bom.partOrAssembly{% endtrans %}</th>
|
||||
<th>{% trans %}project.bom.name{% endtrans %}</th>
|
||||
<th></th> {# Remove button #}
|
||||
</tr>
|
||||
|
|
@ -41,9 +41,11 @@
|
|||
{{ 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) }}
|
||||
{{ form_widget(form.assembly) }}
|
||||
{{ form_errors(form.assembly) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ form_widget(form.name) }}
|
||||
|
|
|
|||
80
templates/form/collection_types_layout_assembly.html.twig
Normal file
80
templates/form/collection_types_layout_assembly.html.twig
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
{% 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.part{% endtrans %}</th>
|
||||
<th>{% trans %}assembly.bom.name{% 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: 250px;">
|
||||
{{ form_widget(form.part) }}
|
||||
{{ form_errors(form.part) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ form_widget(form.name) }}
|
||||
{{ form_errors(form.name) }}
|
||||
</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.mountnames) }}
|
||||
<div class="row mb-2">
|
||||
<label class="col-form-label col-sm-3">{% trans %}assembly.bom.price{% endtrans %}</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="input-group">
|
||||
{{ form_widget(form.price) }}
|
||||
{{ form_widget(form.priceCurrency) }}
|
||||
</div>
|
||||
{{ form_errors(form.price) }}
|
||||
{{ form_errors(form.priceCurrency) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form_row(form.comment) }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue