Added a very basic modal on part info page for changing part instock

Related to issue #201
This commit is contained in:
Jan Böhmer 2023-01-01 13:21:50 +01:00
parent 0e020dab74
commit ba4085d882
7 changed files with 488 additions and 4 deletions

View file

@ -1,6 +1,8 @@
{% import "helper.twig" as helper %}
{% import "LabelSystem/dropdown_macro.html.twig" as dropdown %}
{% include "Parts/info/_withdraw_modal.html.twig" %}
<table class="table table-striped table-hover table-responsive-sm">
<thead>
<tr>
@ -8,6 +10,7 @@
<th>{% trans %}part_lots.storage_location{% endtrans %}</th>
<th>{% trans %}part_lots.amount{% endtrans %}</th>
<th></th> {# Tags row #}
<th></th>
<th></th> {# Button row #}
</tr>
</thead>
@ -57,6 +60,26 @@
{% endif %}
</h6>
</td>
<td>
<div class="btn-group" role="group">
<button type="button" class="btn btn-outline-primary" data-bs-toggle="modal" data-bs-target="#withdraw-modal"
data-action="add" data-lot-id="{{ lot.id }}" data-lot-amount="{{ lot.amount }}"
{% if lot.storageLocation and lot.storageLocation.full %}disabled{% endif %}
>
<i class="fa-solid fa-plus fa-fw"></i>
</button>
<button type="button" class="btn btn-outline-primary" data-bs-toggle="modal" data-bs-target="#withdraw-modal"
data-action="remove" data-lot-id="{{ lot.id }}" data-lot-amount="{{ lot.amount }}"
>
<i class="fa-solid fa-minus fa-fw"></i>
</button>
<button type="button" class="btn btn-outline-primary" data-bs-toggle="modal" data-bs-target="#withdraw-modal"
data-action="move" data-lot-id="{{ lot.id }}" data-lot-amount="{{ lot.amount }}"
>
<i class="fa-solid fa-right-left fa-fw"></i>
</button>
</div>
</td>
<td>
{{ dropdown.profile_dropdown('part_lot', lot.id, false) }}
</td>