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
- G5: Staff CRUD — add form (employee code, role, phone, email) + AddStaff method
- G7: Reports enhanced with Top Products table (ranked by price)
- Added MerchantId to ShopInfo record for staff creation
- Staff table shows SĐT column instead of Cửa hàng
- Add MutationObserver to auto-call lucide.createIcons() when Blazor adds DOM nodes
- Pin Lucide CDN to v0.468.0 for stability (was @latest)
- Fix "Hoàn tất thiết lập" button: navigate to /admin/shop/{id}/overview (was non-existent /admin/stores/{id}/settings)
- All sidebar, dashboard, store list, and store create icons now render correctly
- StoreCreate: use vertical names (Cafe/Restaurant/Karaoke/Spa/Beauty)
- StoreCreate: add 5th store type (Thẩm mỹ viện), 3-column grid
- NormalizeVertical: handle Services category for Spa vertical
- Categories now properly distinguish each vertical type
- C1: StoreList shows real per-shop stats (revenue/orders/staff/products) via new BFF endpoint
- C2: RenderEmpty CTA links now route to correct section (finance→/pos, inventory→/menu, etc.)
- C3+M5: ShopOverview right column shows real recent orders instead of always-empty
- C4: AdminSettings expanded from 5 hardcoded services to 11 with icons
- M1-M3: Consolidated duplicate helpers (GetShopIcon, GetStatusBadgeClass, GetStatusLabel) into ShopVerticalHelper
- M2: Added proper error state UI for StoreList data loading failures
- Added GET /api/bff/shops/stats BFF endpoint for aggregated per-shop statistics
P1 Bug Fixes:
- Fix Finance stat spacing (0₫ → 0 ₫)
- Replace 3 empty catch blocks with error state UI + logging
- Make POS button functional (navigate to /pos)
- Add @implements IDisposable to AdminLayout
P2 Code Quality:
- Create ShopVerticalHelper.cs (DRY icon/label/normalize)
- Remove dead overview case from ShopPage.razor
- Delete 15 orphaned admin pages (moved to shop-scope)
- ShopSidebarConfig delegates to ShopVerticalHelper
P3 UX Enhancement:
- Add CTA buttons to all empty states
- Real KPIs in ShopOverview (orders, products, revenue)
- User role from auth token (Admin/Khách)
- Responsive CSS for stat cards, tables, mobile sidebar
- AdminLayout: removed Sản phẩm, Kho hàng, Tài chính, Nhân sự, Khách hàng from admin sidebar
- ShopSidebarConfig: added Finance to all 4 verticals (Café, Restaurant, Karaoke, Spa)
- ShopPage: rewritten with real API data for menu/inventory/finance/staff/customers sections
- Each section filtered by shopId, loads only required data