Removed spares table
This commit is contained in:
parent
00cdbcd23e
commit
c54111e7a1
@ -70,77 +70,6 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h1>Spares</h1>
|
||||
<div class="center-table">
|
||||
<table id="sdata" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align:center;margin:0px;" class="fixed-width hidden-mobile">ID</th>
|
||||
<th class="fixed-width hidden-mobile">Name</th>
|
||||
<th class="fixed-width">Color</th>
|
||||
<th style="text-align: center;" class="fixed-width">Qty</th>
|
||||
{% for i in json_file['unit'] %}
|
||||
<th style="text-align: center;" class="fixed-width">Missing ({{ loop.index }})</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for brick in inventory_file.results %}
|
||||
{% if brick.is_spare == True %}
|
||||
<tr>
|
||||
{% if brick.element_id == None %}
|
||||
<td><img src="{{ '/static/none.jpg' }}" class="lightbox-trigger" style="height: 50px; width: auto;"></td>
|
||||
{% else %}
|
||||
<td><img src="{{ '/static/parts/' + brick.element_id + '.jpg' }}" class="lightbox-trigger" style="height: 50px; width: auto;"></td>
|
||||
{% endif %}
|
||||
<td style="text-align:center;margin:0px;" class="hidden-mobile">{{ brick.part.part_num }}</td>
|
||||
<td class="hidden-mobile">{{ brick.part.name }}</td>
|
||||
<td>{{ brick.color.name }}</td>
|
||||
<td style="text-align:center;">{{ brick.quantity }}</td>
|
||||
{% for i in json_file['unit'] %}
|
||||
|
||||
<td class="centered-cell">
|
||||
<div class="inputContainer">
|
||||
{% set ns = namespace(count='') %}
|
||||
<form id="number-form" action="/{{ tmp }}" method="post">
|
||||
<input type="hidden" name="numberID" id="numberID" value="{{ tmp }}">
|
||||
<input type="hidden" name="brickpartpart_num" value="{{ brick.part.part_num }}">
|
||||
<input type="hidden" name="count" value="{{ i }}">
|
||||
<input type="hidden" name="index" value="{{ loop.index0 }}">
|
||||
<input type="hidden" name="is_spare" value="{{ brick.is_spare }}">
|
||||
<input type="hidden" name="brickcolor.name" value="{{ brick.color.name }}">
|
||||
{% for j in json_file['unit'][loop.index0]['bricks']['missing'] %}
|
||||
{% if j['brick']['ID'] == brick.part.part_num and j['brick']['color_name'] == brick.color.name %}
|
||||
|
||||
{% if j['brick']['is_spare']|lower == brick.is_spare|lower %}
|
||||
|
||||
{% set ns.count = j['brick']['amount'] %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<div class='inputField'>
|
||||
<input type="tel" style="text-align:center;" id="numberInput" name="numberInput" value="{{ ns.count }}" pattern="\d+">
|
||||
<button class="square-button" type="submit">
|
||||
<img src="/static/save.svg" alt="Save Icon">
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user