diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-01-24 20:12:07 -1000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-01-24 20:12:07 -1000 |
| commit | c290113bd1a8af694b648bba4c801e00b049683a (patch) | |
| tree | 75d066a74d0f3e596d3fbe5bd89f8e2d449ca011 /internal/models/types.go | |
| parent | b69d2d5fc8779f43b1ac789605318488efc91361 (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 'internal/models/types.go')
| -rw-r--r-- | internal/models/types.go | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/internal/models/types.go b/internal/models/types.go index a604b28..f45e346 100644 --- a/internal/models/types.go +++ b/internal/models/types.go @@ -26,6 +26,39 @@ type Meal struct { RecipeURL string `json:"recipe_url"` } +// ShoppingItem represents an item on the PlanToEat shopping list +type ShoppingItem struct { + ID string `json:"id"` + Name string `json:"name"` + Quantity string `json:"quantity"` + Category string `json:"category"` + Store string `json:"store"` + Checked bool `json:"checked"` +} + +// UnifiedShoppingItem combines Trello cards and PlanToEat items +type UnifiedShoppingItem struct { + ID string `json:"id"` + Name string `json:"name"` + Quantity string `json:"quantity,omitempty"` + Category string `json:"category,omitempty"` + Store string `json:"store"` + Source string `json:"source"` // "trello" or "plantoeat" + Checked bool `json:"checked"` +} + +// ShoppingStore groups items by store +type ShoppingStore struct { + Name string + Categories []ShoppingCategory +} + +// ShoppingCategory groups items within a store +type ShoppingCategory struct { + Name string + Items []UnifiedShoppingItem +} + // List represents a Trello list type List struct { ID string `json:"id"` |
