mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-15 22:59:33 +00:00
Merge remote-tracking branch 'origin/feature/create-assemblies' into feature/all-features
# Conflicts: # .env # config/parameters.yaml # docs/configuration.md # migrations/Version20250304081039.php # migrations/Version20250304154507.php # src/Controller/AdminPages/BaseAdminController.php # src/Controller/ProjectController.php # src/Controller/TypeaheadController.php # src/DataTables/AssemblyBomEntriesDataTable.php # src/DataTables/PartsDataTable.php # src/Entity/AssemblySystem/AssemblyBOMEntry.php # src/Entity/Attachments/Attachment.php # src/Entity/Base/AbstractDBElement.php # src/Entity/LogSystem/CollectionElementDeleted.php # src/Entity/Parameters/AbstractParameter.php # src/Form/AssemblySystem/AssemblyBOMEntryType.php # src/Helpers/Assemblies/AssemblyPartAggregator.php # src/Security/Voter/AttachmentVoter.php # src/Services/AssemblySystem/AssemblyBuildHelper.php # src/Services/ImportExportSystem/BOMImporter.php # src/Services/ImportExportSystem/EntityExporter.php # src/Services/Trees/ToolsTreeBuilder.php # src/Services/Trees/TreeViewGenerator.php # src/Settings/BehaviorSettings/AssemblyBomTableColumns.php # src/Settings/BehaviorSettings/TableSettings.php # src/Validator/Constraints/AssemblySystem/AssemblyCycleValidator.php # templates/admin/assembly_admin.html.twig # templates/assemblies/build/_form.html.twig # templates/assemblies/import_bom.html.twig # templates/assemblies/info/_info_card.html.twig # templates/assemblies/info/info.html.twig # templates/components/tree_macros.html.twig # templates/form/collection_types_layout_assembly.html.twig # translations/messages.cs.xlf # translations/messages.da.xlf # translations/messages.de.xlf # translations/messages.el.xlf # translations/messages.en.xlf # translations/messages.es.xlf # translations/messages.fr.xlf # translations/messages.it.xlf # translations/messages.ja.xlf # translations/messages.nl.xlf # translations/messages.pl.xlf # translations/messages.ru.xlf # translations/messages.zh.xlf # translations/validators.cs.xlf # translations/validators.en.xlf
This commit is contained in:
commit
f7ec130010
42 changed files with 1272 additions and 2273 deletions
|
|
@ -3,9 +3,7 @@
|
|||
{# @var entity App\Entity\AssemblySystem\Assembly #}
|
||||
|
||||
{% block card_title %}
|
||||
{% set dataSourceName = get_data_source_name('assembly', 'assembly.caption') %}
|
||||
{% set translatedSource = 'assembly.caption'|trans %}
|
||||
<i class="fas fa-archive fa-fw"></i> {% if dataSourceName != translatedSource %}{{ 'datasource.synonym'|trans({'%name%': translatedSource, '%synonym%': dataSourceName}) }}{% else %}{{ translatedSource }}{% endif %}
|
||||
<i class="fas fa-archive fa-fw"></i> {% trans %}assembly.caption{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block edit_title %}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="bom-tab" data-bs-toggle="tab" data-bs-target="#part-tab-pane"
|
||||
<button class="nav-link" id="part-tab" data-bs-toggle="tab" data-bs-target="#part-tab-pane"
|
||||
type="button" role="tab" aria-controls="part-tab-pane" aria-selected="false">
|
||||
<i class="fa-solid fa-list-check fa-fw"></i>
|
||||
{% trans %}assembly_bom_entry.label{% endtrans %}
|
||||
|
|
@ -106,8 +106,6 @@
|
|||
</div>
|
||||
<div class="tab-pane fade" id="part-tab-pane" role="tabpanel" aria-labelledby="part-tab" tabindex="0">
|
||||
{% include "assemblies/info/_part.html.twig" %}
|
||||
<div class="tab-pane fade" id="bom-tab-pane" role="tabpanel" aria-labelledby="bom-tab" tabindex="0">
|
||||
{% include "assemblies/info/_part.html.twig" %}
|
||||
</div>
|
||||
<div class="tab-pane fade" id="attachments-tab-pane" role="tabpanel" aria-labelledby="attachments-tab" tabindex="0">
|
||||
{% include "assemblies/info/_attachments_info.html.twig" with {"assembly": assembly} %}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,14 @@
|
|||
{% macro sidebar_dropdown() %}
|
||||
{% set currentLocale = app.request.locale %}
|
||||
|
||||
{# Format is [mode, route, label, show_condition] #}
|
||||
{% set data_sources = [
|
||||
['categories', path('tree_category_root'), 'category.labelp', is_granted('@categories.read') and is_granted('@parts.read'), 'category'],
|
||||
['locations', path('tree_location_root'), 'storelocation.labelp', is_granted('@storelocations.read') and is_granted('@parts.read'), 'storagelocation'],
|
||||
['footprints', path('tree_footprint_root'), 'footprint.labelp', is_granted('@footprints.read') and is_granted('@parts.read'), 'footprint'],
|
||||
['manufacturers', path('tree_manufacturer_root'), 'manufacturer.labelp', is_granted('@manufacturers.read') and is_granted('@parts.read'), 'manufacturer'],
|
||||
['suppliers', path('tree_supplier_root'), 'supplier.labelp', is_granted('@suppliers.read') and is_granted('@parts.read'), 'supplier'],
|
||||
['projects', path('tree_device_root'), 'project.labelp', is_granted('@projects.read'), 'project'],
|
||||
['assembly', path('tree_assembly_root'), 'assembly.labelp', is_granted('@assemblies.read'), 'assembly'],
|
||||
['tools', path('tree_tools'), 'tools.label', true, 'tool'],
|
||||
['categories', path('tree_category_root'), 'category.labelp', is_granted('@categories.read') and is_granted('@parts.read')],
|
||||
['locations', path('tree_location_root'), 'storelocation.labelp', is_granted('@storelocations.read') and is_granted('@parts.read')],
|
||||
['footprints', path('tree_footprint_root'), 'footprint.labelp', is_granted('@footprints.read') and is_granted('@parts.read')],
|
||||
['manufacturers', path('tree_manufacturer_root'), 'manufacturer.labelp', is_granted('@manufacturers.read') and is_granted('@parts.read')],
|
||||
['suppliers', path('tree_supplier_root'), 'supplier.labelp', is_granted('@suppliers.read') and is_granted('@parts.read')],
|
||||
['projects', path('tree_device_root'), 'project.labelp', is_granted('@projects.read')],
|
||||
['assembly', path('tree_assembly_root'), 'assembly.labelp', is_granted('@assemblies.read')],
|
||||
['tools', path('tree_tools'), 'tools.label', true],
|
||||
] %}
|
||||
|
||||
<li class="dropdown-header">{% trans %}actions{% endtrans %}</li>
|
||||
|
|
@ -21,9 +19,9 @@
|
|||
|
||||
{% for source in data_sources %}
|
||||
{% if source[3] %} {# show_condition #}
|
||||
<li><button class="tree-btns dropdown-item" data-mode="{{ source[0] }}" data-url="{{ source[1] }}" data-text="{{ get_data_source_name(source[4], source[2]) }}"
|
||||
<li><button class="tree-btns dropdown-item" data-mode="{{ source[0] }}" data-url="{{ source[1] }}" data-text="{{ source[2] | trans }}"
|
||||
{{ stimulus_action('elements/sidebar_tree', 'changeDataSource') }}
|
||||
>{{ get_data_source_name(source[4], source[2]) }}</button></li>
|
||||
>{{ source[2] | trans }}</button></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<th></th> {# expand button #}
|
||||
<th>{% trans %}assembly.bom.quantity{% endtrans %}</th>
|
||||
<th>{% trans %}assembly.bom.partOrAssembly{% endtrans %}</th>
|
||||
<th>{% trans %}assembly.bom.name{% endtrans %}</th>
|
||||
<th>{% trans %}assembly.bom.identifiers{% endtrans %}</th>
|
||||
<th></th> {# Remove button #}
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -41,16 +41,19 @@
|
|||
{{ form_widget(form.quantity) }}
|
||||
{{ form_errors(form.quantity) }}
|
||||
</td>
|
||||
<td style="min-width: 300px;">
|
||||
<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>
|
||||
{{ form_widget(form.name) }}
|
||||
<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() }}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue