Add shopId and status query params to GET /api/v1/kitchen/tickets.
Joins through Session to resolve shopId since KitchenTicket only
has SessionId. Backward-compatible: without shopId falls back to
existing pending-by-station behavior.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add GET /api/v1/schedules?shopId= to return all staff schedules
for a shop. Existing per-staff endpoint unchanged. BFF needs this
to display all schedules on the admin dashboard.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- GET /api/v1/orders/dashboard — POS dashboard stats (revenue, orders,
items sold, popular items, payment breakdown, hourly revenue, recent orders)
- GET /api/v1/reports/revenue — Revenue report grouped by daily/weekly/monthly
- GET /api/v1/reports/top-products — Top selling products by quantity
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
BFF needs to query inventory transactions by shopId. The existing
endpoint only supported inventoryItemId. Now accepts either shopId
or inventoryItemId as query parameters.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove BFF_DB_HOST/PORT/USER/PASS env vars (no more direct DB access)
- Add 9 {ServiceName}__BaseUrl env vars for HTTP proxy pattern
- BFF now communicates via internal Docker network to microservices
- Replace Dapper/Npgsql direct DB access with HttpClient proxy to microservice APIs
- Create BffHttpClient.cs with AuthForwardingHandler (forwards JWT tokens)
- Register 9 named HttpClients: Merchant, Catalog, Order, Inventory, Membership, Wallet, Promotion, Booking, FnbEngine
- Delete BffDbConnectionFactory.cs and TenantContext.cs (no more direct DB)
- Remove Dapper and Npgsql package references from .csproj
- All 10 controllers are now thin HTTP proxy bridges
- Zero breaking changes: all api/bff/ routes preserved
ShopPage LoadSectionData switch was missing cases for kitchen and recipes sections. Added data fetch calls for GetKitchenTicketsAsync and GetRecipesAsync on section navigation.
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
- 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
- Add filter param (today/week/month) to BFF GetOrders endpoint
- Update PosDataService.GetOrdersAsync with filter parameter
- Wire History tab filter buttons to reload API with date range
- Add payment_method and notes to OrderInfo DTO
- Add MapPaymentMethodLabel helper for Vietnamese labels
- Include payment_method in API order history cards
- Create pos-helpers.js with printPosReceipt JS function
- Add PrintReceipt method to CafeDesktop.razor (thermal receipt HTML)
- Save receipt items/payment data before cart reset
- Register pos-helpers.js in index.html
- Inject IJSRuntime for print popup
- Expand IamApiService with Users CRUD, Role mutations, role assignment methods
- Create UserManagement.razor page at /admin/users with user list + role assignment
- Enhance RolePermissions.razor with create/edit/delete role dialogs
- Add Users nav item to AdminLayout sidebar
- Add localization keys (vi-VN, en-US) for Users navigation
- Prevent 500 errors when wallet_service tables are missing
- Return empty arrays on failure for graceful Finance page display
- Now 7 total BFF endpoints hardened against missing tables
- Customers: add search bar (filter by ID, membership level)
- Customers: membership level displays as badge
- Customers: show count header with search input
- Finance: add date range tabs (7 ngày / 30 ngày / Tất cả)
- Finance: revenue/order stats update based on selected period
- Add "Lịch làm việc" menu item to Spa & Beauty sidebars
- Add case "schedule": section with stat cards + weekly table
- Display employee code, role, day (T2-CN), start/end time
- Add DayLabel helper for Vietnamese day names
- Add LoadData case + section title config
- Subscribe to AuthState.OnChange to refresh user info after login
- Call TryRestoreSessionAsync on first render to restore from localStorage
- Wrap Body in ErrorBoundary with custom UI (replaces red error bar)
- Properly unsubscribe OnChange in Dispose to prevent memory leaks