diff options
| author | Ken D'Ambrosio <ken@claude> | 2026-05-25 01:14:43 +0000 |
|---|---|---|
| committer | Ken D'Ambrosio <ken@claude> | 2026-05-25 01:14:43 +0000 |
| commit | ab9b1465ec45570938dc7a3eaf3e4c44dc9be0d6 (patch) | |
| tree | 2a4f40bfca6e207487bd4c8b6638609e40ecd1f3 /app/app.py | |
| parent | 468eb57acb02017d622e99d97dc79ab8d2737cc0 (diff) | |
Add week navigation and calendar picker to dashboard
Dashboard now accepts ?week= param like meal-plan and shopping-list.
Header shows prev/next arrows, an <input type="week"> picker, and a
"Today" button when browsing a past/future week. Edit Plan and Shopping
List links carry the current week so they open in sync.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'app/app.py')
| -rw-r--r-- | app/app.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -325,7 +325,7 @@ def logout(): @app.route('/') def index(): - ws = week_start_from_str(None) + ws = week_start_from_str(request.args.get('week')) dates = week_dates(ws) uid = current_user.id if current_user.is_authenticated else 1 db = database.get_db() @@ -345,6 +345,9 @@ def index(): stat_map=stat_map, meal_types=MEAL_TYPES, cuisine_emoji=CUISINE_EMOJI_MAP, today_str=date.today().isoformat(), + prev_week=(ws - timedelta(weeks=1)).isoformat(), + next_week=(ws + timedelta(weeks=1)).isoformat(), + is_current_week=(ws == week_start_from_str(None)), ) |
