Skip to content

Add Restocking tab with budget-aware order recommendations#93

Open
upen7 wants to merge 1 commit into
beck-source:mainfrom
upen7:new_features
Open

Add Restocking tab with budget-aware order recommendations#93
upen7 wants to merge 1 commit into
beck-source:mainfrom
upen7:new_features

Conversation

@upen7

@upen7 upen7 commented May 21, 2026

Copy link
Copy Markdown

Summary

  • Adds a new Restocking tab with a $1K–$100K budget slider that auto-selects demand-forecasted items greedily within budget. Users can adjust quantities, deselect items, and submit an order.
  • Adds three backend endpoints — recommendations (demand × cost), POST/GET restocking orders — with a fixed 7-day delivery lead time.
  • Submitted restocking orders now appear in a new highlighted section at the top of the Orders tab with the estimated delivery date.
  • Adds an interactive architecture page at docs/architecture.html and a Coding Standards note in CLAUDE.md.

Changes

Frontend

  • client/src/views/Restocking.vue — new view (budget slider, recommendations table, place-order flow)
  • client/src/views/Orders.vue — new "Submitted Restocking Orders" section pinned at top
  • client/src/main.js — registers /restocking route
  • client/src/App.vue — adds Restocking nav link
  • client/src/api.js — 3 new client methods

Backend

  • server/main.pyGET /api/restocking/recommendations, POST /api/restocking-orders, GET /api/restocking-orders, Pydantic models, fallback unit-cost map

Docs

  • docs/architecture.html — interactive system architecture page
  • CLAUDE.md — Coding Standards section

Test plan

  • Frontend loads at /restocking
  • Budget slider + number input syncs both directions, clamps to $1K–$100K
  • Recommendations sorted by forecasted demand desc
  • Auto-select picks items greedily within budget
  • Reducing the budget trims overflow selections
  • "Place Order" POSTs and clears the selection with success toast
  • Submitted orders appear at top of Orders tab with 7-day delivery date
  • All 7 nav tabs load without errors (verified via Playwright)

🤖 Generated with Claude Code

- New Restocking view with a $1K-$100K budget slider, demand-forecast-driven
  recommendations (sorted by forecasted demand), and a Place Order button.
  Auto-selects items greedily within the budget and trims selections when
  the budget shrinks.
- Backend: three new endpoints - GET /api/restocking/recommendations enriches
  demand forecasts with unit cost (live inventory cost when available, static
  fallback otherwise) and recommended quantity; POST /api/restocking-orders
  creates an order with a fixed 7-day delivery lead time; GET returns all
  submitted orders newest-first.
- Orders tab now shows a "Submitted Restocking Orders" section at the top
  with delivery date highlighted.
- Adds /restocking route + nav link, an interactive architecture page in
  docs/architecture.html, and a Coding Standards note in CLAUDE.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant