diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Admin/Shop/ShopPage.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Admin/Shop/ShopPage.razor
index 47d1b7b4..06afae51 100644
--- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Admin/Shop/ShopPage.razor
+++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Admin/Shop/ShopPage.razor
@@ -706,6 +706,44 @@
break;
+ // ═══ STAFF SCHEDULE (Spa/Beauty — Lịch làm việc) ═══
+ case "schedule":
+ @if (!_staffSchedules.Any())
+ {
+ @RenderEmpty("calendar-clock", "#8B5CF6", "Chưa có lịch làm việc", "Thiết lập lịch ca cho nhân viên")
+ }
+ else
+ {
+
+
@_staffSchedules.Select(s => s.StaffId).Distinct().Count()Nhân viên có lịch
+
@_staffSchedules.CountCa làm việc
+
+
+
+
+
+ | Nhân viên |
+ Vai trò |
+ Thứ |
+ Bắt đầu |
+ Kết thúc |
+
+ @foreach (var s in _staffSchedules.OrderBy(x => x.DayOfWeek).ThenBy(x => x.StartTime))
+ {
+
+ | @(s.EmployeeCode ?? s.StaffId.ToString()[..8]) |
+ @(s.Role ?? "—") |
+ @DayLabel(s.DayOfWeek) |
+ @s.StartTime |
+ @s.EndTime |
+
+ }
+
+
+
+ }
+ break;
+
// ═══ PROMOTIONS (real data) ═══
case "promotions":
@if (!_promotions.Any())
@@ -940,6 +978,9 @@
case "promotions":
_promotions = await DataService.GetPromotionsAsync();
break;
+ case "schedule":
+ _staffSchedules = await DataService.GetStaffSchedulesAsync(_shopGuid);
+ break;
}
}
catch (Exception ex)
@@ -972,6 +1013,7 @@
case "promotions": _sectionTitle = "Khuyến mãi"; _sectionIcon = "tag"; _sectionDescription = "Quản lý chương trình khuyến mãi."; break;
case "settings": _sectionTitle = "Thiết lập"; _sectionIcon = "settings"; _sectionDescription = "Cài đặt cửa hàng."; break;
case "reports": _sectionTitle = "Báo cáo"; _sectionIcon = "bar-chart-2"; _sectionDescription = "Doanh thu, sản phẩm bán chạy."; break;
+ case "schedule": _sectionTitle = "Lịch làm việc"; _sectionIcon = "calendar-clock"; _sectionDescription = "Lịch ca làm việc nhân viên."; break;
default: _sectionTitle = Section ?? "Trang"; _sectionIcon = "layout-dashboard"; _sectionDescription = "Trang đang phát triển."; break;
}
}
@@ -1065,4 +1107,11 @@
}
catch (Exception ex) { _staffFormMessage = $"Lỗi: {ex.Message}"; _staffFormSuccess = false; }
}
+
+ // EN: Day-of-week label / VI: Nhãn ngày trong tuần
+ private static string DayLabel(int dow) => dow switch
+ {
+ 0 => "CN", 1 => "T2", 2 => "T3", 3 => "T4",
+ 4 => "T5", 5 => "T6", 6 => "T7", _ => $"#{dow}"
+ };
}
diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Services/ShopSidebarConfig.cs b/apps/web-client-tpos-net/src/WebClientTpos.Client/Services/ShopSidebarConfig.cs
index bd9c59fa..a5f44fd6 100644
--- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Services/ShopSidebarConfig.cs
+++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Services/ShopSidebarConfig.cs
@@ -80,6 +80,7 @@ public static class ShopSidebarConfig
new("Sản phẩm", "package", "products"),
new("Tài chính", "trending-up", "finance"),
new("Nhân sự", "users", "staff"),
+ new("Lịch làm việc", "calendar-clock", "schedule"),
new("Khách hàng", "heart", "customers"),
new("Khuyến mãi", "tag", "promotions"),
new("Báo cáo", "bar-chart-2", "reports"),
@@ -96,6 +97,7 @@ public static class ShopSidebarConfig
new("Sản phẩm", "package", "products"),
new("Tài chính", "trending-up", "finance"),
new("Nhân sự", "users", "staff"),
+ new("Lịch làm việc", "calendar-clock", "schedule"),
new("Khách hàng", "heart", "customers"),
new("Khuyến mãi", "tag", "promotions"),
new("Báo cáo", "bar-chart-2", "reports"),