Files
pos-system/apps/web-client-tpos-net/src/WebClientTpos.Client/Services/ShopSidebarConfig.cs
Ho Ngoc Hai a6e85d0451 feat(admin): add Staff Schedule UI for Spa/Beauty (S3)
- Add "Lịch làm việc" menu item to Spa & Beauty sidebars
- Add case "schedule": section with stat cards + weekly table
- Display employee code, role, day (T2-CN), start/end time
- Add DayLabel helper for Vietnamese day names
- Add LoadData case + section title config
2026-03-01 04:02:55 +07:00

133 lines
6.2 KiB
C#

// EN: Sidebar menu configuration per shop vertical (Café, Restaurant, Karaoke, Spa).
// VI: Cấu hình menu sidebar theo ngành hàng (Café, Nhà hàng, Karaoke, Spa).
namespace WebClientTpos.Client.Services;
/// <summary>
/// EN: Static config for shop-level sidebar menus per vertical type.
/// VI: Cấu hình tĩnh cho menu sidebar cấp cửa hàng theo loại ngành hàng.
///
/// Mỗi ngành hàng có menu khác nhau:
/// - Café: Menu đồ uống, tồn kho nguyên liệu
/// - Restaurant: Menu món ăn + Bàn + Bếp
/// - Karaoke: Phòng + Menu bar
/// - Spa: Lịch hẹn + Dịch vụ
/// Tất cả đều có: Tài chính, Nhân sự, Khách hàng, Báo cáo
/// </summary>
public static class ShopSidebarConfig
{
public record MenuItem(string Label, string Icon, string Route, bool IsSub = false);
/// <summary>
/// EN: Get sidebar menu items for a specific shop vertical.
/// VI: Lấy danh sách menu sidebar cho ngành hàng cụ thể.
/// </summary>
public static List<MenuItem> GetMenuItems(string? category)
{
var vertical = ShopVerticalHelper.NormalizeVertical(category);
return vertical switch
{
"cafe" => new()
{
new("Tổng quan", "layout-dashboard", "overview"),
new("POS Bán hàng", "monitor", "pos"),
new("Menu & Đồ uống", "coffee", "menu"),
new("Tồn kho", "warehouse", "inventory"),
new("Tài chính", "trending-up", "finance"),
new("Nhân sự", "users", "staff"),
new("Khách hàng", "heart", "customers"),
new("Khuyến mãi", "tag", "promotions"),
new("Báo cáo", "bar-chart-2", "reports"),
new("Thiết lập", "settings", "settings"),
},
"restaurant" => new()
{
new("Tổng quan", "layout-dashboard", "overview"),
new("POS Bán hàng", "monitor", "pos"),
new("Menu & Món ăn", "utensils", "menu"),
new("Bàn / Table", "grid-3x3", "tables"),
new("Bếp (Kitchen)", "flame", "kitchen"),
new("Tồn kho", "warehouse", "inventory"),
new("Tài chính", "trending-up", "finance"),
new("Nhân sự", "users", "staff"),
new("Khách hàng", "heart", "customers"),
new("Khuyến mãi", "tag", "promotions"),
new("Báo cáo", "bar-chart-2", "reports"),
new("Thiết lập", "settings", "settings"),
},
"karaoke" => new()
{
new("Tổng quan", "layout-dashboard", "overview"),
new("POS Bán hàng", "monitor", "pos"),
new("Phòng", "door-open", "rooms"),
new("Menu / Bar", "wine", "menu"),
new("Tồn kho", "warehouse", "inventory"),
new("Tài chính", "trending-up", "finance"),
new("Nhân sự", "users", "staff"),
new("Khách hàng", "heart", "customers"),
new("Khuyến mãi", "tag", "promotions"),
new("Báo cáo", "bar-chart-2", "reports"),
new("Thiết lập", "settings", "settings"),
},
"spa" => new()
{
new("Tổng quan", "layout-dashboard", "overview"),
new("POS Bán hàng", "monitor", "pos"),
new("Lịch hẹn", "calendar", "appointments"),
new("Dịch vụ", "sparkles", "services"),
new("Tài nguyên", "door-open", "resources"),
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"),
new("Thiết lập", "settings", "settings"),
},
"beauty" => new()
{
new("Tổng quan", "layout-dashboard", "overview"),
new("POS Bán hàng", "monitor", "pos"),
new("Lịch hẹn", "calendar", "appointments"),
new("Dịch vụ", "sparkles", "services"),
new("Liệu trình", "clipboard-list", "treatments"),
new("Tài nguyên", "door-open", "resources"),
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"),
new("Thiết lập", "settings", "settings"),
},
_ => new()
{
new("Tổng quan", "layout-dashboard", "overview"),
new("POS Bán hàng", "monitor", "pos"),
new("Sản phẩm", "package", "menu"),
new("Tồn kho", "warehouse", "inventory"),
new("Tài chính", "trending-up", "finance"),
new("Nhân sự", "users", "staff"),
new("Khách hàng", "heart", "customers"),
new("Báo cáo", "bar-chart-2", "reports"),
new("Thiết lập", "settings", "settings"),
},
};
}
/// <summary>
/// EN: Get vertical display name (delegates to ShopVerticalHelper).
/// VI: Lấy tên hiển thị của ngành hàng (ủy quyền cho ShopVerticalHelper).
/// </summary>
public static string GetVerticalLabel(string? category) => ShopVerticalHelper.GetLabel(category);
/// <summary>
/// EN: Get vertical icon (delegates to ShopVerticalHelper).
/// VI: Lấy icon ngành hàng (ủy quyền cho ShopVerticalHelper).
/// </summary>
public static string GetVerticalIcon(string? category) => ShopVerticalHelper.GetIcon(category);
}