summaryrefslogtreecommitdiffstats
path: root/app/templates/shopping_list.html
diff options
context:
space:
mode:
authorKen D'Ambrosio <ken@claude>2026-05-25 01:02:59 +0000
committerKen D'Ambrosio <ken@claude>2026-05-25 01:02:59 +0000
commitacfd92ed803e75bd02e291556bba48579add784d (patch)
tree383eb38674da810fccdd89a9102ad84a1b9b75c7 /app/templates/shopping_list.html
parentb5f0c3ee2c3060dd9821d42f4e1bcbb87cbbee10 (diff)
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 <noreply@anthropic.com>
Diffstat (limited to 'app/templates/shopping_list.html')
-rw-r--r--app/templates/shopping_list.html11
1 files changed, 10 insertions, 1 deletions
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 %}&nbsp;ยท&nbsp; {{ checked }}/{{ total }} checked{% endif %}
</p>
+ {% if member_count and member_count > 1 %}
+ <p class="text-muted small mb-0"><i class="bi bi-people me-1"></i>Combined from {{ member_count }} household members' plans</p>
+ {% endif %}
</div>
<div class="d-flex gap-2 align-items-center">
<a href="/shopping-list?week={{ prev_week }}" class="btn btn-outline-secondary btn-sm"><i class="bi bi-chevron-left"></i></a>
@@ -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';