- RestaurantTablet.razor: load tables from DB via GetTablesAsync
- RestaurantMobile.razor: load tables from DB via GetTablesAsync
- TableMap.razor: load tables from DB with shape inference
- TableSelect.razor: load available tables from DB
- TableMergeSplit.razor: load tables for merge/split from DB
- KitchenDisplay.razor: inject DataService, keep demo tickets (needs API)
- WaiterPad.razor: load products/categories from DB
- RestaurantMenuManagement.razor: load products from DB
- OrderHistory.razor: inject DataService, keep demo orders (needs API)
All files follow the RestaurantDesktop pattern with loading/error states.
Co-authored-by: Velik <hongochai10@users.noreply.github.com>
Add bilingual (EN/VI) documentation comments to @code blocks explaining
the intended real data sources for each group:
- Payment (11 files): order context workflow state
- Operations (5 files): shift/cash management API
- Dialogs (8 files): current order/product context
Also add @using WebClientTpos.Client.Services to all 24 files for
future service integration pattern, plus @inject PosDataService
DataService to PendingOrders.razor specifically.
No UI template, CSS, or demo data changes — comments only.
Co-authored-by: Velik <hongochai10@users.noreply.github.com>
- Created BffDataController with 6 read-only endpoints using Dapper
- Created PosDataService client with snake_case JSON deserialization
- Refactored CafeDesktop to load products from catalog_service DB
- Refactored RestaurantDesktop to load tables from fnb_engine DB
- Refactored SpaDesktop to load services from catalog_service DB
- Added Npgsql + Dapper packages to Server project
- Seeded: 4 merchants, 4 shops, 26 products, 12 tables, 4 sessions,
4 resources, 3 appointments across all 4 verticals
Co-authored-by: Velik <hongochai10@users.noreply.github.com>
- CafeDesktop: load products & categories from DataService.GetProductsAsync
and GetCategoriesAsync with cafe shop ID
- RestaurantDesktop: load tables from DataService.GetTablesAsync with
restaurant shop ID, map zones from API data
- KaraokeDesktop: keep mock data, add TODO comment for future FnB engine
rooms endpoint integration
- SpaDesktop: load spa services from DataService.GetProductsAsync with
spa shop ID, map duration from product attributes
- All refactored pages show loading state and error handling
Co-authored-by: Velik <hongochai10@users.noreply.github.com>
- Create PosDataService with typed record DTOs for shops, products,
categories, tables, and appointments
- Register PosDataService as scoped service in Client Program.cs
Co-authored-by: Velik <hongochai10@users.noreply.github.com>
- Add Npgsql 9.0.3 and Dapper 2.1.66 packages to Server project
- Create BffDataController with read-only endpoints:
GET /api/bff/shops
GET /api/bff/shops/{shopId}/products
GET /api/bff/shops/{shopId}/categories
GET /api/bff/shops/{shopId}/tables
GET /api/bff/shops/{shopId}/appointments
GET /api/bff/shops/{shopId}/resources
- Register MVC controllers in Program.cs (AddControllers + MapControllers)
Co-authored-by: Velik <hongochai10@users.noreply.github.com>
Replace manual SymmetricSecurityKey validation with Authority-based OIDC
discovery so tokens are validated against RSA keys published by the IAM
IdentityServer's discovery endpoint.
Services updated:
- CatalogService.API
- OrderService.API
- InventoryService.API
- FnbEngine.API
- BookingService.API
Co-authored-by: Velik <hongochai10@users.noreply.github.com>
Add AddAuthentication(JwtBearerDefaults.AuthenticationScheme) and
AddJwtBearer() service registration before CORS configuration in:
- CatalogService.API
- OrderService.API
- InventoryService.API
- FnbEngine.API
- BookingService.API
Also add Microsoft.AspNetCore.Authentication.JwtBearer v10.0.1 NuGet
package reference to each service's .csproj file.
This fixes the runtime error caused by UseAuthentication() being called
without a registered authentication scheme.
Co-authored-by: Velik <hongochai10@users.noreply.github.com>
Added app.UseAuthentication() and app.UseAuthorization() after
app.UseRouting() in the middleware pipeline for:
- CatalogService.API
- OrderService.API
- InventoryService.API
- FnbEngine.API
- BookingService.API
Co-authored-by: Velik <hongochai10@users.noreply.github.com>
Add POS dialog components in Shared/Dialogs/:
- VoidRefund.razor: Void/refund dialog with order lookup, type selection, reason, manager PIN
- OrderEdit.razor: Edit existing order with qty controls, add items, discount, notes
- OrderCancel.razor: Cancel order confirmation with reason dropdown, refund warning
- SplitBill.razor: Split bill with equal/by-item/custom modes
- StockIn.razor: Quick stock-in with supplier, lot, expiry, recent log
- StockOut.razor: Stock-out with current stock display, reason selection
- StockTransfer.razor: Transfer between branches with product list
- PriceCheck.razor: Price check with hero price, promotions, price history
All files use @layout PosLayout, @inherits PosBase, bilingual comments,
CSS variables, Vietnamese demo data with VND prices.
Co-authored-by: Velik <hongochai10@users.noreply.github.com>
Create shared payment workflow pages in Pages/Pos/Shared/Payment/:
- MethodSelect.razor: payment method selection (Cash, Card, QR, Gift Card)
- CashPayment.razor: cash payment with quick amounts and change calc
- CardPayment.razor: card reader status with tap/swipe/insert
- QrPayment.razor: QR code display with VietQR/MoMo/ZaloPay tabs
- BankTransfer.razor: bank transfer with account info and reference
- GiftCardPayment.razor: gift card code input and balance lookup
- PartialPayment.razor: split payment across multiple methods
- TipEntry.razor: quick tip buttons and custom tip entry
- PaymentPending.razor: payment processing animation
- PaymentSuccess.razor: success confirmation with print/new order
- Receipt.razor: 80mm thermal receipt template
All files follow POS patterns: @layout PosLayout, @inherits PosBase,
bilingual EN/VI comments, CSS variables, demo data with VND currency.
Co-authored-by: Velik <hongochai10@users.noreply.github.com>