From 557758b188d58a2e00114be21a2e27864db3edea Mon Sep 17 00:00:00 2001 From: Caine Date: Thu, 2 Apr 2026 23:18:01 +0100 Subject: Pantry move/expiry edit + smart shopping list with summary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Move items between fridge↔freezer (freezer→fridge sets +7d or shelf life expiry, fridge→freezer clears expiry) - Inline expiry date editor on fridge items (📅 button) - Smart shopping list now shows recipe gaps (missing required slot ingredients) - Summary card shows breakdown: X staple restocks, Y expiring, Z recipe gaps --- .../kitchen/partials/pantry_expiry_edit.html | 17 ++++ .../templates/kitchen/partials/pantry_table.html | 19 +++- .../templates/kitchen/partials/shopping_list.html | 11 +++ kitchen/templates/kitchen/shopping.html | 5 +- kitchen/urls_htmx.py | 8 +- kitchen/views_htmx.py | 100 ++++++++++++++++++++- 6 files changed, 154 insertions(+), 6 deletions(-) create mode 100644 kitchen/templates/kitchen/partials/pantry_expiry_edit.html (limited to 'kitchen') diff --git a/kitchen/templates/kitchen/partials/pantry_expiry_edit.html b/kitchen/templates/kitchen/partials/pantry_expiry_edit.html new file mode 100644 index 0000000..ca24716 --- /dev/null +++ b/kitchen/templates/kitchen/partials/pantry_expiry_edit.html @@ -0,0 +1,17 @@ + + {{ item.ingredient.name }} + {{ item.quantity|floatformat:0 }} {{ item.unit }} + +
+ + + +
+ + diff --git a/kitchen/templates/kitchen/partials/pantry_table.html b/kitchen/templates/kitchen/partials/pantry_table.html index 507eb17..4a8db02 100644 --- a/kitchen/templates/kitchen/partials/pantry_table.html +++ b/kitchen/templates/kitchen/partials/pantry_table.html @@ -19,8 +19,18 @@ {% else %} {% endif %} + - + +