BFF Endpoints (6 new):
- POST/PUT/DELETE categories — full CRUD with shop ownership validation
- GET orders/{id} — order detail with items
- PUT orders/{id}/cancel — cancel non-completed orders (status=6)
- PUT shops/{id} — update name, phone, email, hours
- GET reports/revenue — daily/weekly/monthly revenue aggregation
PosDataService (8 new methods):
- CreateCategory, UpdateCategory, DeleteCategory
- GetOrderDetail, CancelOrder
- UpdateShop
- GetRevenueReport
ShopPage UI (222 lines):
- Menu tab: categories table with add/edit/delete
- Finance tab: expandable order rows with items + cancel button
- Overview tab: shop info edit form
- Reports tab: period selector (Ngày/Tuần/Tháng) + revenue table
1001 B
1001 B
Plan — POS Feature Implementation
Updated: 2026-03-03 21:01
Strategy
- Use Claude CLI subagent for heavy BFF + service code
- Parallel edits where possible
- Commit after each phase
- Deploy + verify after Phase A
Current: Phase A — POS Core
A1: Categories CRUD
- BFF: POST/PUT/DELETE categories (existing GET works)
- PosDataService: CreateCategory, UpdateCategory, DeleteCategory
- ShopPage: Add/Edit/Delete buttons on category section (or in menu tab)
A2: Order Management
- BFF: GET order/{id} details, PUT order/{id}/cancel
- PosDataService: GetOrderDetailAsync, CancelOrderAsync
- ShopPage finance tab: expand order rows → view items, cancel button
A3: Shop Update
- BFF: PUT shop/{id} (name, address, hours, phone)
- PosDataService: UpdateShopAsync
- ShopPage overview: edit shop info form
A4: Basic Reports
- BFF: GET reports/revenue?period=day|week|month
- ShopPage reports tab: revenue table with totals