diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-01-31 21:23:56 -1000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-01-31 21:23:56 -1000 |
| commit | f9127d5272042f4980ece8b39a47613f95eeaf8e (patch) | |
| tree | e111cc6f85b0cd23dd7e705b0390d1154fbc13ee /internal/handlers/handlers.go | |
| parent | cbb0b53de1d06918c142171fd084f14f03798bc1 (diff) | |
Fix timeline calendar view and shopping UI bugs (#56, #65-73)
- #56: Add overflow-hidden to card/panel classes to prevent content overflow
- #65: Fix Google Tasks not showing by including tasks without due dates
- #66: Add no-cache headers to prevent stale template responses
- #67: Increase dropdown z-index to 100 for proper layering
- #69: Implement calendar-style Today section with hourly grid (6am-10pm),
duration-based event heights, and compact overdue/all-day section
- #70: Only reset shopping-mode form on successful submission
- #71: Remove checkboxes from shopping tab (only show in shopping mode)
- #72: Add inline add-item input at end of each store section
- #73: Add Grouped/Flat view toggle for shopping list
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'internal/handlers/handlers.go')
| -rw-r--r-- | internal/handlers/handlers.go | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go index 0e5edcc..bba12ad 100644 --- a/internal/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -1230,7 +1230,11 @@ func mealTypeOrder(mealType string) int { func (h *Handler) HandleTabShopping(w http.ResponseWriter, r *http.Request) { ctx := r.Context() stores := h.aggregateShoppingLists(ctx) - HTMLResponse(w, h.templates, "shopping-tab", struct{ Stores []models.ShoppingStore }{stores}) + grouped := r.URL.Query().Get("grouped") != "false" // Default to grouped + HTMLResponse(w, h.templates, "shopping-tab", struct { + Stores []models.ShoppingStore + Grouped bool + }{stores, grouped}) } // HandleShoppingQuickAdd adds a user shopping item @@ -1285,7 +1289,10 @@ func (h *Handler) HandleShoppingQuickAdd(w http.ResponseWriter, r *http.Request) } // Return refreshed shopping tab - HTMLResponse(w, h.templates, "shopping-tab", struct{ Stores []models.ShoppingStore }{allStores}) + HTMLResponse(w, h.templates, "shopping-tab", struct { + Stores []models.ShoppingStore + Grouped bool + }{allStores, true}) } // HandleShoppingToggle toggles a shopping item's checked state @@ -1323,7 +1330,10 @@ func (h *Handler) HandleShoppingToggle(w http.ResponseWriter, r *http.Request) { // Return refreshed shopping tab stores := h.aggregateShoppingLists(r.Context()) - HTMLResponse(w, h.templates, "shopping-tab", struct{ Stores []models.ShoppingStore }{stores}) + HTMLResponse(w, h.templates, "shopping-tab", struct { + Stores []models.ShoppingStore + Grouped bool + }{stores, true}) } // HandleShoppingMode renders the focused shopping mode for a single store |
