From 3883c67d9618a266fa602cb58f7a83bc114faa39 Mon Sep 17 00:00:00 2001 From: FrederikBaerentsen Date: Fri, 12 Apr 2024 14:46:20 +0200 Subject: [PATCH] Added missing feature to minifigs --- templates/bootstrap_table.html | 70 ++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/templates/bootstrap_table.html b/templates/bootstrap_table.html index 9fd1e41..e421c28 100644 --- a/templates/bootstrap_table.html +++ b/templates/bootstrap_table.html @@ -70,6 +70,76 @@ +

Minifigs

+ +{% for fig in minifigs_file.figs %} + +

{{ fig.name}}

+ +X {{ fig.quantity }} + +
+ + + + + + + + + + + {% for part in fig.parts %} + + + + + + {% for i in json_file['unit'] %} + + + {% endfor %} + + {% endfor %} + +
IDNameTotal Qty
{{ part.part_num }}{{ part.name }}{{ part.quantity * fig.quantity }} +
+ {% set ns = namespace(count='') %} + +
+ + + + + + + {% for j in json_file['unit'][loop.index0]['bricks']['missing'] %} + {% if j['brick']['ID'] == part.part_num and j['brick']['color_name'] == part.color_name %} + + + {% endif %} + {% endfor %} +
+ + {{ ns.count }} + + +
+
+
+
+
+ + + +{% endfor %} + + + + +