}
- @if (!_tables.Any())
+ @if (!zoneGroups.Any())
{
- @RenderEmpty("map-pin", "#F59E0B", "Chưa có khu vực nào", "Thêm bàn với khu vực trong phần Quản lý Bàn trước", "grid-3x3", "Quản lý Bàn", $"/admin/shop/{ShopId}/tables")
+ @RenderEmpty("map-pin", "#F59E0B", "Chưa có khu vực nào", "Nhấn 'Thêm khu vực' ở trên để tạo khu vực đầu tiên", "", "", "")
}
else
{
@@ -2800,8 +2814,11 @@
private string? _editingZoneOriginalName;
private string? _zoneFormMessage;
private bool _zoneFormSuccess;
+ private readonly List _customZones = new();
private static readonly string[] _zoneColors = { "#3B82F6", "#A855F7", "#22C55E", "#F59E0B", "#EC4899", "#6366F1" };
private static readonly string[] _zoneIcons = { "building", "crown", "trees", "wine", "coffee", "map-pin" };
+ private List AllZoneNames => _tables.Select(t => t.Zone ?? "Chung").Distinct()
+ .Union(_customZones).Distinct().OrderBy(z => z).ToList();
// Kitchen state
private List _kitchenTickets = new();
private string _kitchenStatusFilter = "all";
@@ -3632,10 +3649,13 @@
}
else
{
- // Add: the zone name will be available when creating tables
- _zoneFormMessage = $"Khu vực '{_newZoneName.Trim()}' đã sẵn sàng. Hãy thêm bàn với khu vực này trong phần Quản lý Bàn."; _zoneFormSuccess = true;
- _newTableZone = _newZoneName.Trim();
+ var zoneName = _newZoneName.Trim();
+ if (!_customZones.Contains(zoneName) && !_tables.Any(t => (t.Zone ?? "Chung") == zoneName))
+ _customZones.Add(zoneName);
+ _zoneFormMessage = $"Đã thêm khu vực '{zoneName}'."; _zoneFormSuccess = true;
+ _newTableZone = zoneName;
_newZoneName = "";
+ _showZoneForm = false;
}
}
diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Restaurant/RestaurantDesktop.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Restaurant/RestaurantDesktop.razor
index d513fc50..19a75035 100644
--- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Restaurant/RestaurantDesktop.razor
+++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Restaurant/RestaurantDesktop.razor
@@ -1,6 +1,6 @@
@*
- EN: Restaurant POS Desktop — Table map grid + order panel with full payment flow.
- VI: POS Nhà hàng Desktop — Lưới sơ đồ bàn + panel đặt món với luồng thanh toán đầy đủ.
+ EN: Restaurant POS Desktop — Table map + dine-in order flow (order → kitchen → add more → pay).
+ VI: POS Nhà hàng Desktop — Sơ đồ bàn + luồng dine-in (gọi món → bếp → gọi thêm → thanh toán).
*@
@page "/pos/{ShopId:guid}/restaurant"
@layout PosLayout
@@ -49,15 +49,30 @@
@foreach (var table in FilteredTables)
{
+ var effectiveStatus = GetEffectiveStatus(table);
+ var hasReservation = GetTableReservation(table) is not null;