diff --git a/app.py b/app.py
index 9e1d302..b4bf980 100644
--- a/app.py
+++ b/app.py
@@ -312,8 +312,17 @@ def missing():
@app.route('/minifigs',methods=['POST','GET'])
def minifigs():
+ conn = sqlite3.connect('app.db')
+ cursor = conn.cursor()
+ cursor.execute('SELECT fig_num, name, SUM(quantity) AS total_quantity FROM minifigures GROUP BY fig_num, name;')
- return 0
+ results = cursor.fetchall()
+ missing_list = [list(i) for i in results]
+ cursor.close()
+ conn.close()
+
+
+ return render_template('minifigs.html',missing_list=missing_list)
@app.route('/create',methods=['POST','GET'])
def create():
diff --git a/templates/minifigs.html b/templates/minifigs.html
new file mode 100644
index 0000000..8852437
--- /dev/null
+++ b/templates/minifigs.html
@@ -0,0 +1,176 @@
+
+
+
+
+
+ Set Overview
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+ fig_num |
+ Name |
+ total_quantity |
+
+
+
+ {% for brick in missing_list %}
+
+
+ |
+ {{ brick[0] }} |
+ {{ brick[1] }} |
+ {{ brick[2] }} |
+
+ {% endfor %}
+
+
+
+
+
+
+
+
×
+
+
+
+
+
+
+
+
diff --git a/templates/missing.html b/templates/missing.html
new file mode 100644
index 0000000..c53f89a
--- /dev/null
+++ b/templates/missing.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+ Set Overview
+
+
+
+
+
+
+
+
+
+
+
+ id |
+ part_num |
+ color_id |
+ element_id |
+ total_quantity |
+
+
+
+ {% for brick in missing_list %}
+
+ {{ brick[0] }} |
+ {{ brick[1] }} |
+ {{ brick[2] }} |
+ {{ brick[3] }} |
+ {{ brick[4] }} |
+
+ {% endfor %}
+
+
+
+
+
+
+