From ba488b200a4cdef28d52c64590f9fded55ad4971 Mon Sep 17 00:00:00 2001 From: Weitzman Date: Thu, 21 May 2026 10:57:33 -0700 Subject: [PATCH] Add Restocking feature and sidebar composable - Add Restocking view with forecast-driven, budget-aware recommendations - Add useSidebar composable with persistent collapse state and mobile breakpoint support - Add /restocking POST endpoint to server with category-based lead time calculation - Extend mock_data and demand_forecasts with restocking order fixtures - Update App.vue and Orders.vue for sidebar and navigation integration - Add docs/architecture.html - Update CLAUDE.md --- CLAUDE.md | 3 + client/src/App.vue | 363 ++++++++++++----- client/src/api.js | 17 + client/src/composables/useSidebar.js | 67 ++++ client/src/main.js | 2 + client/src/views/Orders.vue | 135 ++++++- client/src/views/Restocking.vue | 376 ++++++++++++++++++ docs/architecture.html | 572 +++++++++++++++++++++++++++ server/data/demand_forecasts.json | 82 ++-- server/main.py | 136 ++++++- server/mock_data.py | 4 + 11 files changed, 1621 insertions(+), 136 deletions(-) create mode 100644 client/src/composables/useSidebar.js create mode 100644 client/src/views/Restocking.vue create mode 100644 docs/architecture.html diff --git a/CLAUDE.md b/CLAUDE.md index d2086efa..0baaab87 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -53,6 +53,9 @@ npm install && npm run dev - `GET /api/demand`, `/api/backlog` - No filters - `GET /api/spending/*` - Summary, monthly, categories, transactions +## Code Style +- Always document non-obvious logic changes with comments + ## Common Issues 1. Use unique keys in v-for (not `index`) - use `sku`, `month`, etc. 2. Validate dates before `.getMonth()` calls diff --git a/client/src/App.vue b/client/src/App.vue index c2da05a5..567f97d7 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -1,42 +1,181 @@