From acfd92ed803e75bd02e291556bba48579add784d Mon Sep 17 00:00:00 2001
From: Ken D'Ambrosio
Date: Mon, 25 May 2026 01:02:59 +0000
Subject: Add per-user meal plans and household sharing
Each user now has their own meal plan and shopping list. Users can
form a household (invite by username, owner can remove members) so
that shopping list generation combines all household members' plans.
DB migration preserves existing data assigned to user id=1.
Co-Authored-By: Claude Sonnet 4.6
---
app/templates/shopping_list.html | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
(limited to 'app/templates/shopping_list.html')
diff --git a/app/templates/shopping_list.html b/app/templates/shopping_list.html
index e6cfaaf..8a3a60e 100644
--- a/app/templates/shopping_list.html
+++ b/app/templates/shopping_list.html
@@ -9,6 +9,9 @@
Week of {{ week_start.strftime('%B %d, %Y') }}
{% if total %} ยท {{ checked }}/{{ total }} checked{% endif %}
+ {% if member_count and member_count > 1 %}
+ Combined from {{ member_count }} household members' plans
+ {% endif %}
@@ -145,7 +148,13 @@ async function regenerate() {
if (!res) return;
const data = await res.json();
if (data.success) {
- location.reload();
+ if (data.member_count > 1) {
+ document.getElementById('toastBody').textContent = `Combined from ${data.member_count} members' plans!`;
+ toast.show();
+ setTimeout(() => location.reload(), 1500);
+ } else {
+ location.reload();
+ }
} else {
document.getElementById('toastBody').textContent = data.error || 'No meals planned for this week.';
document.getElementById('toast').className = 'toast align-items-center text-bg-danger border-0';
--
cgit v1.2.3