Fixed missing bricks table

This commit is contained in:
FrederikBaerentsen 2024-04-19 09:18:18 +02:00
parent 5e03013bef
commit ee4036d8c2
3 changed files with 8 additions and 5 deletions

2
app.py
View File

@ -63,7 +63,7 @@ def new_set(set_num):
total_parts = 4
set_num = set_num
set_num = set_num.replace(" ","")
# add_duplicate = request.form.get('addDuplicate', False) == 'true'
# Do something with the input value and the checkbox value
# print("Input value:", set_num)

View File

@ -272,7 +272,7 @@
<p class="card-footer-item">
<span>
<a class="is-size-6" style="color: #363636;" href="/{{ i[0] }}/{{ i[8] }}">Inv.</a>
<a class="is-size-6" style="color: #363636;" href="/{{ i[0] }}/{{ i[11] }}">Inv.</a>
</span>
</p>
@ -553,7 +553,7 @@ document.addEventListener('DOMContentLoaded', function () {
const themeDropdown = document.getElementById('themeDropdown');
// Retrieve all unique values from the <a> elements
const themes = ['Show all'];
const themes = [];
const themeLinks = document.querySelectorAll('.set_theme');
themeLinks.forEach(function(link) {
const themeId = link.textContent.trim();
@ -562,6 +562,7 @@ document.addEventListener('DOMContentLoaded', function () {
}
});
themes.sort(customSort);
themes.unshift('> Show all <');
// Create options for the dropdown list
themes.forEach(function(theme) {
const option = document.createElement('a');

View File

@ -39,8 +39,10 @@
<div class='inputField'>
{% for missing in missing_list %}
{% if missing[1] == brick[1] and missing[2] == brick[2] and missing[3] == brick[6] and missing[5] == brick[10] %}
{% 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[4] %}
{% endif %}
{% endfor %}
@ -111,7 +113,7 @@
<div class='inputField'>
{% 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]') %}
{% 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') %}
{% set ns.count = missing[4] %}
{% endif %}
{% endfor %}