Commit Graph

3 Commits

Author SHA1 Message Date
Ho Ngoc Hai
aab80fd697 fix(web-client-tpos): add permissions and user_id to CreateStaff INSERT
Fix NOT NULL constraint violations in merchant_staff table:
- Add permissions = 0 (default no permissions)
- Add user_id = Guid.Empty (placeholder until linked)
- Verified: CREATE→UPDATE→DELETE all working
2026-03-03 20:46:49 +07:00
Ho Ngoc Hai
8cba9021d0 feat(web-client-tpos): add product update (PUT) endpoint and edit UI
- Add PUT /api/bff/products/{id} endpoint with ownership validation
- Add UpdateProductAsync to PosDataService
- Add edit button (pencil icon) on each product card
- Form supports edit mode: title/button text changes, pre-fills values
- Add EditProduct and SaveProduct methods in ShopPage.razor
- Full CRUD: Create, Read, Update, Delete all functional
2026-03-03 20:18:09 +07:00
Ho Ngoc Hai
e74527dc8f feat(web-client-tpos): implement POS order creation via BFF API
- Add POST /api/bff/pos/orders endpoint (Dapper, order+items+payment_method)
- Add CreatePosOrderAsync to PosDataService with camelCase JSON serialization
- Wire CafeDesktop ConfirmPayment to API (async, ProductId tracking, fallback)
- Add TryRestoreSessionAsync to POS page init for JWT auth
- Replace Forbid() with Unauthorized() + diagnostic logging
2026-03-03 15:23:12 +07:00