From 620d3812d55d0e307eeac0bafdc9d1ea1ef7e904 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 26 Feb 2026 20:46:21 +0000 Subject: [PATCH] refactor: annotate 24 Shared Razor files (Payment/Operations/Dialogs) with data source comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../Pages/Pos/Shared/Dialogs/OrderCancel.razor | 5 +++++ .../Pages/Pos/Shared/Dialogs/OrderEdit.razor | 5 +++++ .../Pages/Pos/Shared/Dialogs/PriceCheck.razor | 5 +++++ .../Pages/Pos/Shared/Dialogs/SplitBill.razor | 5 +++++ .../Pages/Pos/Shared/Dialogs/StockIn.razor | 5 +++++ .../Pages/Pos/Shared/Dialogs/StockOut.razor | 5 +++++ .../Pages/Pos/Shared/Dialogs/StockTransfer.razor | 5 +++++ .../Pages/Pos/Shared/Dialogs/VoidRefund.razor | 5 +++++ .../Pages/Pos/Shared/Operations/CashDrawer.razor | 5 +++++ .../Pages/Pos/Shared/Operations/ClockInOut.razor | 5 +++++ .../Pages/Pos/Shared/Operations/PendingOrders.razor | 6 ++++++ .../Pages/Pos/Shared/Operations/QuickSale.razor | 5 +++++ .../Pages/Pos/Shared/Operations/ShiftManagement.razor | 5 +++++ .../Pages/Pos/Shared/Payment/BankTransfer.razor | 5 +++++ .../Pages/Pos/Shared/Payment/CardPayment.razor | 5 +++++ .../Pages/Pos/Shared/Payment/CashPayment.razor | 5 +++++ .../Pages/Pos/Shared/Payment/GiftCardPayment.razor | 5 +++++ .../Pages/Pos/Shared/Payment/MethodSelect.razor | 5 +++++ .../Pages/Pos/Shared/Payment/PartialPayment.razor | 5 +++++ .../Pages/Pos/Shared/Payment/PaymentPending.razor | 5 +++++ .../Pages/Pos/Shared/Payment/PaymentSuccess.razor | 5 +++++ .../Pages/Pos/Shared/Payment/QrPayment.razor | 5 +++++ .../Pages/Pos/Shared/Payment/Receipt.razor | 5 +++++ .../Pages/Pos/Shared/Payment/TipEntry.razor | 5 +++++ 24 files changed, 121 insertions(+) diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Dialogs/OrderCancel.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Dialogs/OrderCancel.razor index baf4486e..0031c0c8 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Dialogs/OrderCancel.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Dialogs/OrderCancel.razor @@ -5,6 +5,7 @@ @page "/pos/dialog/order-cancel" @layout PosLayout @inherits PosBase +@using WebClientTpos.Client.Services
@* ═══ HEADER ═══ *@ @@ -106,6 +107,10 @@
@code { + // EN: Operational data — requires dedicated shift/cash management API. + // VI: Dữ liệu vận hành — cần API quản lý ca/tiền mặt riêng. + // TODO: Integrate with Merchant Service staff/shift endpoints when available. + // EN: Drawer state / VI: Trạng thái ngăn kéo private bool _drawerOpen = true; private readonly decimal _expectedCash = 2_450_000; diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Operations/ClockInOut.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Operations/ClockInOut.razor index 00e73432..e5332da7 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Operations/ClockInOut.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Operations/ClockInOut.razor @@ -5,6 +5,7 @@ @page "/pos/operations/clock-in-out" @layout PosLayout @inherits PosBase +@using WebClientTpos.Client.Services
@* ═══ HEADER ═══ *@ @@ -85,6 +86,10 @@
@code { + // EN: Operational data — requires dedicated shift/cash management API. + // VI: Dữ liệu vận hành — cần API quản lý ca/tiền mặt riêng. + // TODO: Integrate with Merchant Service staff/shift endpoints when available. + // EN: Staff info / VI: Thông tin nhân viên private readonly string _staffName = "Nguyễn Văn A"; private readonly string _staffRole = "Thu ngân — Cashier"; diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Operations/PendingOrders.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Operations/PendingOrders.razor index b1abb6a8..7a15b916 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Operations/PendingOrders.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Operations/PendingOrders.razor @@ -5,6 +5,8 @@ @page "/pos/operations/pending-orders" @layout PosLayout @inherits PosBase +@using WebClientTpos.Client.Services +@inject PosDataService DataService
@* ═══ HEADER ═══ *@ @@ -105,6 +107,10 @@
@code { + // EN: Operational data — requires dedicated shift/cash management API. + // VI: Dữ liệu vận hành — cần API quản lý ca/tiền mặt riêng. + // TODO: Integrate with Merchant Service staff/shift endpoints when available. + // EN: Status filter / VI: Bộ lọc trạng thái private string _activeStatus = "all"; private readonly List _statusTabs = new() diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Operations/QuickSale.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Operations/QuickSale.razor index fceab6bc..a0ab96cb 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Operations/QuickSale.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Operations/QuickSale.razor @@ -5,6 +5,7 @@ @page "/pos/operations/quick-sale" @layout PosLayout @inherits PosBase +@using WebClientTpos.Client.Services
@* ═══ HEADER ═══ *@ @@ -112,6 +113,10 @@
@code { + // EN: Operational data — requires dedicated shift/cash management API. + // VI: Dữ liệu vận hành — cần API quản lý ca/tiền mặt riêng. + // TODO: Integrate with Merchant Service staff/shift endpoints when available. + // EN: Amount input state / VI: Trạng thái nhập số tiền private string _amountStr = ""; private string _selectedCategory = "Khác"; diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Operations/ShiftManagement.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Operations/ShiftManagement.razor index 9f59d2b2..8f62698a 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Operations/ShiftManagement.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Operations/ShiftManagement.razor @@ -5,6 +5,7 @@ @page "/pos/operations/shift" @layout PosLayout @inherits PosBase +@using WebClientTpos.Client.Services
@* ═══ HEADER ═══ *@ @@ -130,6 +131,10 @@
@code { + // EN: Operational data — requires dedicated shift/cash management API. + // VI: Dữ liệu vận hành — cần API quản lý ca/tiền mặt riêng. + // TODO: Integrate with Merchant Service staff/shift endpoints when available. + // EN: Shift data / VI: Dữ liệu ca private readonly decimal _openingCash = 2_000_000; private readonly int _totalOrders = 15; diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/BankTransfer.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/BankTransfer.razor index 99820116..c24c33f7 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/BankTransfer.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/BankTransfer.razor @@ -5,6 +5,7 @@ @page "/pos/payment/bank-transfer" @layout PosLayout @inherits PosBase +@using WebClientTpos.Client.Services
@* ═══ ORDER TOTAL ═══ *@ @@ -63,6 +64,10 @@ @code { + // EN: Payment workflow state — populated from current order context at runtime. + // VI: Trạng thái thanh toán — được điền từ context đơn hàng hiện tại khi chạy. + // TODO: Integrate with Order Service API when available. + // EN: Demo data / VI: Dữ liệu mẫu private decimal _orderTotal = 285_000; private string _bankName = "Vietcombank"; diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/CardPayment.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/CardPayment.razor index 2926ae3c..393ab30f 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/CardPayment.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/CardPayment.razor @@ -5,6 +5,7 @@ @page "/pos/payment/card" @layout PosLayout @inherits PosBase +@using WebClientTpos.Client.Services
@* ═══ ORDER TOTAL ═══ *@ @@ -60,6 +61,10 @@ @code { + // EN: Payment workflow state — populated from current order context at runtime. + // VI: Trạng thái thanh toán — được điền từ context đơn hàng hiện tại khi chạy. + // TODO: Integrate with Order Service API when available. + // EN: Demo order total / VI: Tổng đơn hàng mẫu private decimal _orderTotal = 285_000; private bool _isProcessing = false; diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/CashPayment.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/CashPayment.razor index 240d775d..a3ad62e5 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/CashPayment.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/CashPayment.razor @@ -5,6 +5,7 @@ @page "/pos/payment/cash" @layout PosLayout @inherits PosBase +@using WebClientTpos.Client.Services
@* ═══ MAIN PANEL ═══ *@ @@ -77,6 +78,10 @@
@code { + // EN: Payment workflow state — populated from current order context at runtime. + // VI: Trạng thái thanh toán — được điền từ context đơn hàng hiện tại khi chạy. + // TODO: Integrate with Order Service API when available. + // EN: Demo order total / VI: Tổng đơn hàng mẫu private decimal _orderTotal = 285_000; private decimal _receivedAmount = 0; diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/GiftCardPayment.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/GiftCardPayment.razor index 311d2412..b6d2645e 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/GiftCardPayment.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/GiftCardPayment.razor @@ -5,6 +5,7 @@ @page "/pos/payment/gift-card" @layout PosLayout @inherits PosBase +@using WebClientTpos.Client.Services
@* ═══ ORDER TOTAL ═══ *@ @@ -89,6 +90,10 @@
@code { + // EN: Payment workflow state — populated from current order context at runtime. + // VI: Trạng thái thanh toán — được điền từ context đơn hàng hiện tại khi chạy. + // TODO: Integrate with Order Service API when available. + // EN: Demo data / VI: Dữ liệu mẫu private decimal _orderTotal = 285_000; private string _cardCode = ""; diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/MethodSelect.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/MethodSelect.razor index 3d3c189f..5d47f98d 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/MethodSelect.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/MethodSelect.razor @@ -5,6 +5,7 @@ @page "/pos/payment/method-select" @layout PosLayout @inherits PosBase +@using WebClientTpos.Client.Services
@* ═══ ORDER TOTAL ═══ *@ @@ -38,6 +39,10 @@
@code { + // EN: Payment workflow state — populated from current order context at runtime. + // VI: Trạng thái thanh toán — được điền từ context đơn hàng hiện tại khi chạy. + // TODO: Integrate with Order Service API when available. + // EN: Demo order total / VI: Tổng đơn hàng mẫu private decimal _orderTotal = 285_000; diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/PartialPayment.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/PartialPayment.razor index 280d6b22..a44cde84 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/PartialPayment.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/PartialPayment.razor @@ -5,6 +5,7 @@ @page "/pos/payment/partial" @layout PosLayout @inherits PosBase +@using WebClientTpos.Client.Services
@* ═══ MAIN PANEL ═══ *@ @@ -98,6 +99,10 @@
@code { + // EN: Payment workflow state — populated from current order context at runtime. + // VI: Trạng thái thanh toán — được điền từ context đơn hàng hiện tại khi chạy. + // TODO: Integrate with Order Service API when available. + // EN: Demo data / VI: Dữ liệu mẫu private decimal _orderTotal = 285_000; diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/PaymentPending.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/PaymentPending.razor index 818f4017..6406d6b7 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/PaymentPending.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/PaymentPending.razor @@ -5,6 +5,7 @@ @page "/pos/payment/pending" @layout PosLayout @inherits PosBase +@using WebClientTpos.Client.Services
@* ═══ PROCESSING ANIMATION ═══ *@ @@ -55,6 +56,10 @@ @code { + // EN: Payment workflow state — populated from current order context at runtime. + // VI: Trạng thái thanh toán — được điền từ context đơn hàng hiện tại khi chạy. + // TODO: Integrate with Order Service API when available. + // EN: Demo data / VI: Dữ liệu mẫu private decimal _orderTotal = 285_000; private string _paymentMethod = "Thẻ (Visa •••• 4242)"; diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/PaymentSuccess.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/PaymentSuccess.razor index d77a8f87..39e033a9 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/PaymentSuccess.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/PaymentSuccess.razor @@ -5,6 +5,7 @@ @page "/pos/payment/success" @layout PosLayout @inherits PosBase +@using WebClientTpos.Client.Services
@* ═══ SUCCESS ANIMATION ═══ *@ @@ -73,6 +74,10 @@ @code { + // EN: Payment workflow state — populated from current order context at runtime. + // VI: Trạng thái thanh toán — được điền từ context đơn hàng hiện tại khi chạy. + // TODO: Integrate with Order Service API when available. + // EN: Demo data / VI: Dữ liệu mẫu private decimal _orderTotal = 285_000; private string _paymentMethod = "Tiền mặt"; diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/QrPayment.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/QrPayment.razor index cd8d04a2..349b3a8d 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/QrPayment.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/QrPayment.razor @@ -5,6 +5,7 @@ @page "/pos/payment/qr" @layout PosLayout @inherits PosBase +@using WebClientTpos.Client.Services
@* ═══ ORDER TOTAL ═══ *@ @@ -65,6 +66,10 @@ @code { + // EN: Payment workflow state — populated from current order context at runtime. + // VI: Trạng thái thanh toán — được điền từ context đơn hàng hiện tại khi chạy. + // TODO: Integrate with Order Service API when available. + // EN: Demo order total / VI: Tổng đơn hàng mẫu private decimal _orderTotal = 285_000; private string _selectedProvider = "VietQR"; diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/Receipt.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/Receipt.razor index 408bb2ce..46685d22 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/Receipt.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/Receipt.razor @@ -5,6 +5,7 @@ @page "/pos/payment/receipt" @layout PosLayout @inherits PosBase +@using WebClientTpos.Client.Services
@* ═══ RECEIPT PAPER ═══ *@ @@ -116,6 +117,10 @@
@code { + // EN: Payment workflow state — populated from current order context at runtime. + // VI: Trạng thái thanh toán — được điền từ context đơn hàng hiện tại khi chạy. + // TODO: Integrate with Order Service API when available. + // EN: Demo receipt data / VI: Dữ liệu hóa đơn mẫu private string _orderNumber = "1042"; private string _orderDate = "15/02/2024"; diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/TipEntry.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/TipEntry.razor index d69439b4..f2f23bf6 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/TipEntry.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Shared/Payment/TipEntry.razor @@ -5,6 +5,7 @@ @page "/pos/payment/tip" @layout PosLayout @inherits PosBase +@using WebClientTpos.Client.Services
@* ═══ SUBTOTAL ═══ *@ @@ -79,6 +80,10 @@
@code { + // EN: Payment workflow state — populated from current order context at runtime. + // VI: Trạng thái thanh toán — được điền từ context đơn hàng hiện tại khi chạy. + // TODO: Integrate with Order Service API when available. + // EN: Demo subtotal / VI: Tạm tính mẫu private decimal _subtotal = 285_000; private decimal _tipAmount = 0;