@*
EN: Retail POS Mobile — Single column, floating cart button, bottom sheet cart.
VI: POS Bán lẻ Mobile — Một cột, nút giỏ hàng nổi, giỏ hàng dạng sheet dưới.
*@
@page "/pos/{ShopId:guid}/retail/mobile"
@layout PosLayout
@inherits PosBase
@inject WebClientTpos.Client.Services.PosDataService DataService
@* EN: Barcode input / VI: Ô nhập mã vạch *@
@if (_isLoading)
{
Đang tải...
}
else if (_loadError)
{
Không thể tải dữ liệu
}
else
{
@* EN: Category tabs / VI: Tab danh mục *@
@foreach (var cat in _categories)
{
}
@* EN: Product grid / VI: Lưới sản phẩm *@
@foreach (var product in FilteredProducts)
{
AddToCart(product)">
@product.Name
@FormatPrice(product.Price)
}
}
@* EN: Floating cart button / VI: Nút giỏ hàng nổi *@
@if (_cartItems.Any())
{
}
@* EN: Bottom sheet cart / VI: Giỏ hàng dạng sheet dưới *@
@if (_showCart)
{
_showCart = false">
@* EN: Handle bar / VI: Thanh kéo *@
@foreach (var item in _cartItems)
{
@item.Name
@FormatPrice(item.Price)
@item.Qty
}
}
@code {
// EN: Loading state / VI: Trạng thái tải
private bool _isLoading = true;
private bool _loadError;
// EN: Categories / VI: Danh mục
private string[] _categories = { "Tất cả" };
private string _selectedCategory = "Tất cả";
private string _barcodeInput = "";
private bool _showCart;
// EN: Product list from API / VI: Danh sách sản phẩm từ API
private List