feat(web-client): fix category mapping for multi-vertical sidebars

- StoreCreate: use vertical names (Cafe/Restaurant/Karaoke/Spa/Beauty)
- StoreCreate: add 5th store type (Thẩm mỹ viện), 3-column grid
- NormalizeVertical: handle Services category for Spa vertical
- Categories now properly distinguish each vertical type
This commit is contained in:
Ho Ngoc Hai
2026-02-28 08:50:08 +07:00
parent fd9173237f
commit 364ba541ea
2 changed files with 12 additions and 8 deletions

View File

@@ -91,7 +91,7 @@
<div class="admin-form-group">
<label class="admin-form-label">Loại hình kinh doanh <span style="color:var(--admin-danger);">*</span></label>
<div style="display:grid;grid-template-columns:1fr 1fr;gap:12px;">
<div style="display:grid;grid-template-columns:repeat(3, 1fr);gap:12px;">
@foreach (var type in _storeTypes)
{
var t = type;
@@ -280,9 +280,10 @@
private readonly StoreType[] _storeTypes = new[]
{
new StoreType("cafe", "Café", "coffee", "#FF5C00", "Quán cà phê, trà sữa"),
new StoreType("restaurant", "Nhà hàng", "utensils", "#3B82F6", "Nhà hàng, quán ăn"),
new StoreType("restaurant", "Nhà hàng / Bar", "utensils", "#3B82F6", "Nhà hàng, quán ăn, bar"),
new StoreType("karaoke", "Karaoke", "mic", "#8B5CF6", "Karaoke, entertainment"),
new StoreType("spa", "Spa", "sparkles", "#EC4899", "Spa, beauty services"),
new StoreType("spa", "Spa", "sparkles", "#EC4899", "Spa, massage, wellness"),
new StoreType("beauty", "Thẩm mỹ viện", "scissors", "#F472B6", "Salon, nail, thẩm mỹ"),
};
private void NextStep()
@@ -344,12 +345,15 @@
// EN: Step 2 — Create the shop
// VI: Bước 2 — Tạo cửa hàng
// EN: Use vertical-specific category values (not generic 'FoodBeverage')
// VI: Dùng category riêng theo ngành hàng (không dùng 'FoodBeverage' chung)
var category = _selectedType switch
{
"cafe" => "FoodBeverage",
"restaurant" => "FoodBeverage",
"karaoke" => "Entertainment",
"spa" => "Beauty",
"cafe" => "Cafe",
"restaurant" => "Restaurant",
"karaoke" => "Karaoke",
"spa" => "Spa",
"beauty" => "Beauty",
_ => "Other"
};

View File

@@ -22,7 +22,7 @@ public static class ShopVerticalHelper
"cafe" or "café" or "coffee" or "foodbeverage" => "cafe",
"restaurant" or "nhà hàng" or "bar" => "restaurant",
"karaoke" or "entertainment" => "karaoke",
"spa" or "beauty" or "salon" => "spa",
"spa" or "services" or "beauty" or "salon" => "spa",
"retail" => "retail",
_ => "default"
};