refactor: annotate 24 Shared Razor files (Payment/Operations/Dialogs) with data source comments
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>
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
@page "/pos/dialog/order-cancel"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div class="pos-dialog-overlay">
|
||||
<div style="width:100%;max-width:520px;background:var(--pos-bg-elevated);border-radius:16px;
|
||||
@@ -107,6 +108,10 @@
|
||||
</div>
|
||||
|
||||
@code {
|
||||
// EN: Dialog data — populated from current context (selected order/product).
|
||||
// VI: Dữ liệu dialog — được điền từ context hiện tại (đơn hàng/sản phẩm đã chọn).
|
||||
// TODO: Integrate with Order/Catalog/Inventory APIs when DDD Value Object mapping is fixed.
|
||||
|
||||
// EN: Cancel state / VI: Trạng thái hủy
|
||||
private string _selectedReason = "";
|
||||
private string _note = "";
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/dialog/order-edit"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div class="pos-dialog-overlay">
|
||||
<div style="width:100%;max-width:640px;background:var(--pos-bg-elevated);border-radius:16px;
|
||||
@@ -151,6 +152,10 @@
|
||||
</div>
|
||||
|
||||
@code {
|
||||
// EN: Dialog data — populated from current context (selected order/product).
|
||||
// VI: Dữ liệu dialog — được điền từ context hiện tại (đơn hàng/sản phẩm đã chọn).
|
||||
// TODO: Integrate with Order/Catalog/Inventory APIs when DDD Value Object mapping is fixed.
|
||||
|
||||
// EN: Edit state / VI: Trạng thái chỉnh sửa
|
||||
private string _searchTerm = "";
|
||||
private string _discountType = "percent";
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/dialog/price-check"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div class="pos-dialog-overlay">
|
||||
<div style="width:100%;max-width:520px;background:var(--pos-bg-elevated);border-radius:16px;
|
||||
@@ -133,6 +134,10 @@
|
||||
</div>
|
||||
|
||||
@code {
|
||||
// EN: Dialog data — populated from current context (selected order/product).
|
||||
// VI: Dữ liệu dialog — được điền từ context hiện tại (đơn hàng/sản phẩm đã chọn).
|
||||
// TODO: Integrate with Order/Catalog/Inventory APIs when DDD Value Object mapping is fixed.
|
||||
|
||||
// EN: Price check state / VI: Trạng thái kiểm tra giá
|
||||
private string _searchInput = "APL-001";
|
||||
private bool _productFound = true;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/dialog/split-bill"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div class="pos-dialog-overlay">
|
||||
<div style="width:100%;max-width:720px;background:var(--pos-bg-elevated);border-radius:16px;
|
||||
@@ -187,6 +188,10 @@
|
||||
</div>
|
||||
|
||||
@code {
|
||||
// EN: Dialog data — populated from current context (selected order/product).
|
||||
// VI: Dữ liệu dialog — được điền từ context hiện tại (đơn hàng/sản phẩm đã chọn).
|
||||
// TODO: Integrate with Order/Catalog/Inventory APIs when DDD Value Object mapping is fixed.
|
||||
|
||||
// EN: Split state / VI: Trạng thái tách
|
||||
private string _activeMode = "equal";
|
||||
private int _splitCount = 3;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/dialog/stock-in"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div class="pos-dialog-overlay">
|
||||
<div style="width:100%;max-width:600px;background:var(--pos-bg-elevated);border-radius:16px;
|
||||
@@ -151,6 +152,10 @@
|
||||
</div>
|
||||
|
||||
@code {
|
||||
// EN: Dialog data — populated from current context (selected order/product).
|
||||
// VI: Dữ liệu dialog — được điền từ context hiện tại (đơn hàng/sản phẩm đã chọn).
|
||||
// TODO: Integrate with Order/Catalog/Inventory APIs when DDD Value Object mapping is fixed.
|
||||
|
||||
// EN: Stock-in state / VI: Trạng thái nhập kho
|
||||
private string _productSearch = "Cà phê hạt Arabica";
|
||||
private string _selectedProduct = "Cà phê hạt Arabica";
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/dialog/stock-out"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div class="pos-dialog-overlay">
|
||||
<div style="width:100%;max-width:540px;background:var(--pos-bg-elevated);border-radius:16px;
|
||||
@@ -131,6 +132,10 @@
|
||||
</div>
|
||||
|
||||
@code {
|
||||
// EN: Dialog data — populated from current context (selected order/product).
|
||||
// VI: Dữ liệu dialog — được điền từ context hiện tại (đơn hàng/sản phẩm đã chọn).
|
||||
// TODO: Integrate with Order/Catalog/Inventory APIs when DDD Value Object mapping is fixed.
|
||||
|
||||
// EN: Stock-out state / VI: Trạng thái xuất kho
|
||||
private string _productSearch = "Sữa tươi";
|
||||
private string _selectedProduct = "Sữa tươi TH True Milk";
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/dialog/stock-transfer"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div class="pos-dialog-overlay">
|
||||
<div style="width:100%;max-width:680px;background:var(--pos-bg-elevated);border-radius:16px;
|
||||
@@ -152,6 +153,10 @@
|
||||
</div>
|
||||
|
||||
@code {
|
||||
// EN: Dialog data — populated from current context (selected order/product).
|
||||
// VI: Dữ liệu dialog — được điền từ context hiện tại (đơn hàng/sản phẩm đã chọn).
|
||||
// TODO: Integrate with Order/Catalog/Inventory APIs when DDD Value Object mapping is fixed.
|
||||
|
||||
// EN: Transfer state / VI: Trạng thái chuyển kho
|
||||
private string _fromBranch = "Chi nhánh Q1";
|
||||
private string _toBranch = "Chi nhánh Q7";
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/dialog/void-refund"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div class="pos-dialog-overlay">
|
||||
<div style="width:100%;max-width:560px;background:var(--pos-bg-elevated);border-radius:16px;
|
||||
@@ -161,6 +162,10 @@
|
||||
</div>
|
||||
|
||||
@code {
|
||||
// EN: Dialog data — populated from current context (selected order/product).
|
||||
// VI: Dữ liệu dialog — được điền từ context hiện tại (đơn hàng/sản phẩm đã chọn).
|
||||
// TODO: Integrate with Order/Catalog/Inventory APIs when DDD Value Object mapping is fixed.
|
||||
|
||||
// EN: Order lookup state / VI: Trạng thái tra cứu đơn
|
||||
private string _orderNumber = "DH2024-0567";
|
||||
private bool _orderFound = false;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/operations/cash-drawer"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div style="flex:1;display:flex;flex-direction:column;overflow:hidden;">
|
||||
@* ═══ HEADER ═══ *@
|
||||
@@ -106,6 +107,10 @@
|
||||
</div>
|
||||
|
||||
@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;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/operations/clock-in-out"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div style="flex:1;display:flex;flex-direction:column;overflow:hidden;">
|
||||
@* ═══ HEADER ═══ *@
|
||||
@@ -85,6 +86,10 @@
|
||||
</div>
|
||||
|
||||
@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";
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
@page "/pos/operations/pending-orders"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
@inject PosDataService DataService
|
||||
|
||||
<div style="flex:1;display:flex;flex-direction:column;overflow:hidden;">
|
||||
@* ═══ HEADER ═══ *@
|
||||
@@ -105,6 +107,10 @@
|
||||
</div>
|
||||
|
||||
@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<StatusTab> _statusTabs = new()
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/operations/quick-sale"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div style="flex:1;display:flex;flex-direction:column;overflow:hidden;">
|
||||
@* ═══ HEADER ═══ *@
|
||||
@@ -112,6 +113,10 @@
|
||||
</div>
|
||||
|
||||
@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";
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/operations/shift"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div style="flex:1;display:flex;flex-direction:column;overflow:hidden;">
|
||||
@* ═══ HEADER ═══ *@
|
||||
@@ -130,6 +131,10 @@
|
||||
</div>
|
||||
|
||||
@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;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/payment/bank-transfer"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div style="display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:32px;gap:24px;">
|
||||
@* ═══ ORDER TOTAL ═══ *@
|
||||
@@ -63,6 +64,10 @@
|
||||
</style>
|
||||
|
||||
@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";
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/payment/card"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div style="display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:32px;gap:32px;">
|
||||
@* ═══ ORDER TOTAL ═══ *@
|
||||
@@ -60,6 +61,10 @@
|
||||
</style>
|
||||
|
||||
@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;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/payment/cash"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div style="display:flex;height:100%;">
|
||||
@* ═══ MAIN PANEL ═══ *@
|
||||
@@ -77,6 +78,10 @@
|
||||
</div>
|
||||
|
||||
@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;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/payment/gift-card"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div style="display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:32px;gap:24px;">
|
||||
@* ═══ ORDER TOTAL ═══ *@
|
||||
@@ -89,6 +90,10 @@
|
||||
</div>
|
||||
|
||||
@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 = "";
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/payment/method-select"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div style="display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:32px;gap:32px;">
|
||||
@* ═══ ORDER TOTAL ═══ *@
|
||||
@@ -38,6 +39,10 @@
|
||||
</div>
|
||||
|
||||
@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;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/payment/partial"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div style="display:flex;height:100%;">
|
||||
@* ═══ MAIN PANEL ═══ *@
|
||||
@@ -98,6 +99,10 @@
|
||||
</div>
|
||||
|
||||
@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;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/payment/pending"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div style="display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:32px;gap:28px;">
|
||||
@* ═══ PROCESSING ANIMATION ═══ *@
|
||||
@@ -55,6 +56,10 @@
|
||||
</style>
|
||||
|
||||
@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)";
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/payment/success"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div style="display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:32px;gap:24px;">
|
||||
@* ═══ SUCCESS ANIMATION ═══ *@
|
||||
@@ -73,6 +74,10 @@
|
||||
</style>
|
||||
|
||||
@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";
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/payment/qr"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div style="display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:32px;gap:24px;">
|
||||
@* ═══ ORDER TOTAL ═══ *@
|
||||
@@ -65,6 +66,10 @@
|
||||
</style>
|
||||
|
||||
@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";
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/payment/receipt"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div style="display:flex;align-items:flex-start;justify-content:center;height:100%;padding:24px;overflow-y:auto;">
|
||||
@* ═══ RECEIPT PAPER ═══ *@
|
||||
@@ -116,6 +117,10 @@
|
||||
</div>
|
||||
|
||||
@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";
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
@page "/pos/payment/tip"
|
||||
@layout PosLayout
|
||||
@inherits PosBase
|
||||
@using WebClientTpos.Client.Services
|
||||
|
||||
<div style="display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:32px;gap:28px;">
|
||||
@* ═══ SUBTOTAL ═══ *@
|
||||
@@ -79,6 +80,10 @@
|
||||
</div>
|
||||
|
||||
@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;
|
||||
|
||||
Reference in New Issue
Block a user