diff --git a/.scratchpad/context.md b/.scratchpad/context.md index aeeff7a5..898a0a36 100644 --- a/.scratchpad/context.md +++ b/.scratchpad/context.md @@ -1,5 +1,5 @@ # Scratchpad Context — GoodGo Platform -> Updated: 2026-03-03 14:22 +> Updated: 2026-03-03 20:10 ## Trạng thái hệ thống @@ -10,44 +10,28 @@ - **Queue**: RabbitMQ (rabbitmq-local) - **Storage**: MinIO (minio-local) -### Services (26 .NET microservices) -| Service | Status | Notes | -|---------|--------|-------| -| iam-service-net | ✅ healthy | Auth, Users, Roles | -| merchant-service-net | ✅ healthy | Merchants, Shops, Staff | -| catalog-service-net | ✅ healthy | Products, Categories | -| order-service-net | ✅ healthy | Orders, Order Items | -| booking-service-net | ✅ healthy | Appointments, Resources | -| fnb-engine-net | ✅ healthy | Tables, Sessions | -| inventory-service-net | ✅ healthy | Stock management | -| promotion-service-net | ✅ healthy | Campaigns, Vouchers | -| membership-service-net | ✅ healthy | Members, Levels | -| wallet-service-net | ✅ healthy | Wallets, Transactions | -| chat-service-net | ✅ healthy | Chat, SignalR | -| social-service-net | ✅ healthy | Social features | -| storage-service-net | ✅ healthy | File storage | -| mining-service-net | ✅ healthy | Data mining | -| mission-service-net | ✅ healthy | Gamification | -| ads-*-service-net (5) | ✅ healthy | Ads ecosystem | -| mkt-*-service-net (4) | ✅ healthy | Marketing integrations | - ### Apps | App | Type | Port | Status | |-----|------|------|--------| | web-client-tpos-net | Blazor WASM POS | 3001 | ✅ Running | -| web-client-base-net | Blazor Admin | — | Not deployed locally | -| app-client-base-net | .NET MAUI Mobile | — | Not deployed | -| app-client-base-swift | Swift iOS | — | Not deployed | -| web-docs | Documentation site | — | Not deployed | ## Recent Changes (từ Git log) -1. `d969f3d` — **feat**: Replace hardcoded POS data with API-driven endpoints -2. `fe6e14c` — **feat**: Unify POS with inline payment and tabs (path fix) -3. `15404a8` — **feat**: Unify POS page with tabs and inline payment -4. `617a7ca` — **fix**: Resolve 500 error on GET /api/v1/users endpoint -5. `ad6fe03` — **feat**: Add users management page and enhance roles CRUD -6. `f3bfcc8` — **fix**: Roles API response parsing and property mapping -7. `f353f88` — **feat**: Redesign Home/NotFound pages, localize Dashboard +1. `a791830` — **feat**: Add date filter to order history and payment method display +2. `7562fc1` — **feat**: Add receipt print with thermal 80mm layout +3. `e74527d` — **feat**: Implement POS order creation via BFF API +4. `d969f3d` — **feat**: Replace hardcoded POS data with API-driven endpoints +5. `fe6e14c` — **feat**: Unify POS with inline payment and tabs (path fix) + +## Completed Tasks +- ✅ P1: Order API Create — orders + items persist in DB +- ✅ P1: Print Receipt — thermal 80mm popup with JSInterop +- ✅ P2: Dashboard Real Data — hourly chart, popular items, payment breakdown +- ✅ P2: History Date Filter — today/7d/30d with API reload + +## Next Tasks +- P3: Admin Panel — Products CRUD, Inventory, Staff +- P4: Frontend Apps — web-client-base-net deploy +- P5: Infrastructure — Observability, CI/CD, Tests ## Blockers - Chưa có diff --git a/.scratchpad/plan.md b/.scratchpad/plan.md index ab86c02f..d13c9e11 100644 --- a/.scratchpad/plan.md +++ b/.scratchpad/plan.md @@ -1,25 +1,18 @@ # Task Plan — GoodGo Platform -> Updated: 2026-03-03 14:22 +> Updated: 2026-03-03 20:10 ## ✅ Completed Tasks 1. ~~Admin Users & Roles — CRUD, phân quyền~~ 2. ~~POS Unified page — 3 tabs (Sale, History, Dashboard)~~ 3. ~~POS Inline Payment Flow~~ 4. ~~Replace hardcoded POS data with API endpoints~~ +5. ~~P1: Order API Create — POST /api/bff/pos/orders~~ +6. ~~P1: Print Receipt — Thermal 80mm popup~~ +7. ~~P2: Dashboard Real Data — hourly/popular/payment~~ +8. ~~P2: History Date Filter — today/7d/30d~~ ## Pending Tasks (Ưu tiên cao → thấp) -### 🔴 P1 — POS Core (Hoàn thiện) -- [ ] **Order API Create**: `ConfirmPayment` gọi Order Service API tạo order thật (hiện chỉ lưu in-memory session) -- [ ] **Order Items**: Lưu order_items (product_id, qty, unit_price) khi confirm -- [ ] **Payment Method column**: Add `payment_method` column vào orders table nếu chưa có -- [ ] **Print receipt**: Implement in hóa đơn (hoặc generate PDF) - -### 🟡 P2 — Dashboard Real Data -- [ ] **Hourly chart**: Verify `order_items` + `payment_method` tables exist -- [ ] **Popular items**: Test with real order data -- [ ] **History search/filter**: Implement date range filter (today/7 days/30 days) - ### 🟡 P3 — Admin Panel (web-client-tpos-net) - [ ] **Products CRUD**: Thêm/sửa/xóa products từ Admin - [ ] **Inventory management**: Stock alerts, reorder @@ -27,7 +20,7 @@ - [ ] **Promotions**: Campaign management UI ### 🟢 P4 — Frontend Apps -- [ ] **web-client-base-net**: Deploy locally, kiểm tra +- [x] **web-client-tpos-net**: Deployed locally (port 3001) ✅ - [ ] **app-client-base-swift**: iOS app review - [ ] **web-docs**: Documentation site @@ -37,4 +30,4 @@ - [ ] **Testing**: Unit + Integration tests coverage ## Next Task -> **P1: Order API Create** — Implement `POST /api/bff/orders` endpoint + call from POS ConfirmPayment +> **P3: Products CRUD** — Admin panel thêm/sửa/xóa sản phẩm diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Admin/Shop/ShopPage.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Admin/Shop/ShopPage.razor index c9f3c6be..97b69439 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Admin/Shop/ShopPage.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Admin/Shop/ShopPage.razor @@ -158,7 +158,7 @@ case "products":