summaryrefslogtreecommitdiff
path: root/cmd/dashboard
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-01-24 20:12:07 -1000
committerPeter Stone <thepeterstone@gmail.com>2026-01-24 20:12:07 -1000
commitc290113bd1a8af694b648bba4c801e00b049683a (patch)
tree75d066a74d0f3e596d3fbe5bd89f8e2d449ca011 /cmd/dashboard
parentb69d2d5fc8779f43b1ac789605318488efc91361 (diff)
Add Shopping tab combining Trello and PlanToEat lists
- New Shopping tab aggregates items from Trello Shopping board and PlanToEat - Items grouped by store, then by category (for PlanToEat) - Trello list names treated as store names - Replace PlanToEat meals API with web scraping (uses session cookie) - Add error logging for PlanToEat fetch operations - Recipe links now point to cooking view (/recipes/{id}/cook/{event_id}) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'cmd/dashboard')
-rw-r--r--cmd/dashboard/main.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/cmd/dashboard/main.go b/cmd/dashboard/main.go
index 8716db9..ce447ff 100644
--- a/cmd/dashboard/main.go
+++ b/cmd/dashboard/main.go
@@ -84,7 +84,11 @@ func main() {
var planToEatClient api.PlanToEatAPI
if cfg.HasPlanToEat() {
- planToEatClient = api.NewPlanToEatClient(cfg.PlanToEatAPIKey)
+ pteClient := api.NewPlanToEatClient(cfg.PlanToEatAPIKey)
+ if cfg.PlanToEatSession != "" {
+ pteClient.SetSessionCookie(cfg.PlanToEatSession)
+ }
+ planToEatClient = pteClient
}
var googleCalendarClient api.GoogleCalendarAPI
@@ -130,11 +134,14 @@ func main() {
r.Get("/api/tasks", h.HandleGetTasks)
r.Get("/api/meals", h.HandleGetMeals)
r.Get("/api/boards", h.HandleGetBoards)
+ r.Get("/api/shopping", h.HandleGetShoppingList)
// Tab routes for HTMX
r.Get("/tabs/tasks", h.HandleTabTasks)
r.Get("/tabs/planning", h.HandleTabPlanning)
r.Get("/tabs/meals", h.HandleTabMeals)
+ r.Get("/tabs/timeline", h.HandleTimeline)
+ r.Get("/tabs/shopping", h.HandleTabShopping)
r.Post("/tabs/refresh", h.HandleRefreshTab)
// Trello card operations