Clean up
This commit is contained in:
parent
431fb8ce0e
commit
7dd5977fd3
@ -51,7 +51,30 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
<button class="js-modal-trigger" data-target="modal-js-example" id="modal-js">
|
||||||
|
</button>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="modal" id="modal-js-example">
|
||||||
|
<div class="modal-background"></div>
|
||||||
|
<div class="modal-card">
|
||||||
|
<header class="modal-card-head">
|
||||||
|
<p class="modal-card-title">Cannot add set!</p>
|
||||||
|
<button class="delete" aria-label="close"></button>
|
||||||
|
</header>
|
||||||
|
<section class="modal-card-body">
|
||||||
|
Set number does not exists:
|
||||||
|
<br>
|
||||||
|
<b id="error-code"></b>
|
||||||
|
</section>
|
||||||
|
<footer class="modal-card-foot">
|
||||||
|
<div class="buttons">
|
||||||
|
<button class="button is-primary">OK</button>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
<table id="data" class="table">
|
<table id="data" class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th ></th>
|
||||||
<th >id</th>
|
<th >id</th>
|
||||||
<th >part_num</th>
|
<th >part_num</th>
|
||||||
<th >color_id</th>
|
<th >color_id</th>
|
||||||
@ -52,11 +53,16 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{% for brick in missing_list %}
|
{% for brick in missing_list %}
|
||||||
<tr>
|
<tr>
|
||||||
|
{% if brick[4] == 'nil' %}
|
||||||
|
<td><img src="{{ '/static/none.jpg' }}" class="lightbox-trigger" style="height: 50px; width: 50px;margin:0;padding: 0;" loading="lazy"></td>
|
||||||
|
{% else %}
|
||||||
|
<td><img src="{{ '/static/parts/' + brick[4] + '.jpg' }}" class="lightbox-trigger" style="height: 50px; width: 50px;margin:0;padding: 0;" loading="lazy"></td>
|
||||||
|
{% endif %}
|
||||||
<td>{{ brick[0] }}</td>
|
<td>{{ brick[0] }}</td>
|
||||||
<td>{{ brick[1] }}</td>
|
<td>{{ brick[1] }}</td>
|
||||||
<td>{{ brick[2] }}</td>
|
<td>{{ brick[2] }}</td>
|
||||||
<td>{{ brick[3] }}</td>
|
<td>{{ brick[3] }}</td>
|
||||||
<td>{{ brick[4] }}</td>
|
<td>{{ brick[5] }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="center-table" >
|
<div class="center-table" >
|
||||||
<table id="data" class="table">
|
<table id="data" class="table">
|
||||||
<thead>
|
<thead>
|
||||||
@ -16,7 +15,6 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{% for brick in inventory_list %}
|
{% for brick in inventory_list %}
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
{% if brick[5] == 'nil' %}
|
{% if brick[5] == 'nil' %}
|
||||||
<td><img src="{{ '/static/none.jpg' }}" class="lightbox-trigger" alt="{{ brick[3] }}" style="height: 50px; width: 50px;margin:0;padding: 0;" loading="lazy"></td>
|
<td><img src="{{ '/static/none.jpg' }}" class="lightbox-trigger" alt="{{ brick[3] }}" style="height: 50px; width: 50px;margin:0;padding: 0;" loading="lazy"></td>
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -34,6 +32,7 @@
|
|||||||
<input type="hidden" id="id" value="{{ brick[1] }}">
|
<input type="hidden" id="id" value="{{ brick[1] }}">
|
||||||
<input type="hidden" id="part_num" value="{{ brick[2] }}">
|
<input type="hidden" id="part_num" value="{{ brick[2] }}">
|
||||||
<input type="hidden" id="color_id" value="{{ brick[6] }}">
|
<input type="hidden" id="color_id" value="{{ brick[6] }}">
|
||||||
|
<input type="hidden" id="part_img_url_id" value="{{ brick[5] }}">
|
||||||
<input type="hidden" id="element_id" value="{{ brick[10] }}">
|
<input type="hidden" id="element_id" value="{{ brick[10] }}">
|
||||||
<input type="hidden" id="u_id" value="{{ brick[11] }}">
|
<input type="hidden" id="u_id" value="{{ brick[11] }}">
|
||||||
|
|
||||||
@ -41,9 +40,8 @@
|
|||||||
<div class='inputField'>
|
<div class='inputField'>
|
||||||
|
|
||||||
{% for missing in missing_list %}
|
{% for missing in missing_list %}
|
||||||
|
{% if missing[1] == brick[1] and missing[2] == brick[2] and missing[4] == brick[6] and (missing[6] == brick[10] or missing[6] == 'brick[10]' or missing[6] == 'None') %}
|
||||||
{% if missing[1] == brick[1] and missing[2] == brick[2] and missing[3] == brick[6] and (missing[5] == brick[10] or missing[5] == 'brick[10]' or missing[5] == 'None') %}
|
{% set ns.count = missing[5] %}
|
||||||
{% set ns.count = missing[4] %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<input type="tel" style="text-align:center;font-size: 16px;" id="missing" value="{{ ns.count }}" pattern="\d+">
|
<input type="tel" style="text-align:center;font-size: 16px;" id="missing" value="{{ ns.count }}" pattern="\d+">
|
||||||
@ -111,14 +109,15 @@
|
|||||||
<input type="hidden" id="id" value="{{ part[1] }}">
|
<input type="hidden" id="id" value="{{ part[1] }}">
|
||||||
<input type="hidden" id="part_num" value="{{ part[2] }}">
|
<input type="hidden" id="part_num" value="{{ part[2] }}">
|
||||||
<input type="hidden" id="color_id" value="{{ part[6] }}">
|
<input type="hidden" id="color_id" value="{{ part[6] }}">
|
||||||
|
<input type="hidden" id="part_img_url_id" value="{{ part[5] }}">
|
||||||
<input type="hidden" id="element_id" value="{{ part[10] }}">
|
<input type="hidden" id="element_id" value="{{ part[10] }}">
|
||||||
<input type="hidden" id="u_id" value="{{ part[11] }}">
|
<input type="hidden" id="u_id" value="{{ part[11] }}">
|
||||||
|
|
||||||
|
|
||||||
<div class='inputField'>
|
<div class='inputField'>
|
||||||
{% for missing in missing_list %}
|
{% for missing in missing_list %}
|
||||||
{% if missing[1] == part[1] and missing[2] == part[2] and missing[3] == part[6] and (missing[5] == part[10] or missing[5] == 'part[10]' or missing[5] == 'None') %}
|
{% if missing[1] == part[1] and missing[2] == part[2] and missing[4] == part[6] and (missing[6] == part[10] or missing[6] == 'part[10]' or missing[6] == 'None') %}
|
||||||
{% set ns.count = missing[4] %}
|
{% set ns.count = missing[5] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<input type="tel" style="text-align:center;font-size: 16px;" id="missing" value="{{ ns.count }}" pattern="\d+">
|
<input type="tel" style="text-align:center;font-size: 16px;" id="missing" value="{{ ns.count }}" pattern="\d+">
|
||||||
@ -246,9 +245,10 @@ $("body").on("submit", "#number-form", function (event) {
|
|||||||
id = $(this)[0][1].value;
|
id = $(this)[0][1].value;
|
||||||
part_num = $(this)[0][2].value;
|
part_num = $(this)[0][2].value;
|
||||||
color_id = $(this)[0][3].value;
|
color_id = $(this)[0][3].value;
|
||||||
element_id = $(this)[0][4].value;
|
part_img_url_id = $(this)[0][4].value;
|
||||||
u_id = $(this)[0][5].value;
|
element_id = $(this)[0][5].value;
|
||||||
missing = $(this)[0][6].value
|
u_id = $(this)[0][6].value;
|
||||||
|
missing = $(this)[0][7].value
|
||||||
|
|
||||||
// console.log('set_num: ' + set_num);
|
// console.log('set_num: ' + set_num);
|
||||||
// console.log('id: ' + id);
|
// console.log('id: ' + id);
|
||||||
@ -265,6 +265,7 @@ $("body").on("submit", "#number-form", function (event) {
|
|||||||
'set_num': set_num,
|
'set_num': set_num,
|
||||||
'id': id,
|
'id': id,
|
||||||
'part_num': part_num,
|
'part_num': part_num,
|
||||||
|
'part_img_url_id': part_img_url_id,
|
||||||
'color_id': color_id,
|
'color_id': color_id,
|
||||||
'element_id': element_id,
|
'element_id': element_id,
|
||||||
'u_id': u_id,
|
'u_id': u_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user