feat : kavenegar otp added

This commit is contained in:
soroush.asadi
2026-05-29 10:18:47 +03:30
parent 27e61d257e
commit 16cff8730b
22 changed files with 502 additions and 34 deletions
@@ -37,6 +37,7 @@ public static class DemoMenuCatalog
public static IReadOnlyList<CategorySeed> Categories { get; } =
[
new("cat_demo_coffee", "قهوه تخصصی", "Specialty Coffee", "قهوة متخصصة", 0, IconPresetId: "drinks-hot"),
new("cat_demo_drinks", "نوشیدنی گرم", "Hot drinks", "مشروبات ساخنة", 1, IconPresetId: "drinks-hot"),
new("cat_demo_cold", "نوشیدنی سرد", "Cold drinks", "مشروبات باردة", 2, IconPresetId: "drinks-cold"),
new("cat_demo_breakfast", "صبحانه", "Breakfast", "فطور", 3, IconPresetId: "breakfast"),
@@ -47,6 +48,28 @@ public static class DemoMenuCatalog
public static IReadOnlyList<ItemSeed> Items { get; } =
[
// ── Specialty Coffee (20 items) ──────────────────────────────────────
new("item_demo_cf_espresso", "cat_demo_coffee", "اسپرسو", "Espresso", "إسبريسو", "دوبل شات، تازه آسیاب", 65_000, 0, "espresso"),
new("item_demo_cf_doppio", "cat_demo_coffee", "دوپیو", "Doppio", "دوبيو", "دو شات اسپرسو", 80_000, 0, "espresso"),
new("item_demo_cf_ristretto", "cat_demo_coffee", "ریسترتو", "Ristretto", "ريستريتو", "کوتاه و غلیظ", 75_000, 0, "espresso"),
new("item_demo_cf_lungo", "cat_demo_coffee", "لونگو", "Lungo", "لونغو", "اسپرسو کشیده", 70_000, 0, "espresso"),
new("item_demo_cf_americano", "cat_demo_coffee", "آمریکانو", "Americano", "أمريكانو", "اسپرسو و آب داغ", 75_000, 0, "cappuccino"),
new("item_demo_cf_cappuccino", "cat_demo_coffee", "کاپوچینو", "Cappuccino", "كابتشينو", "شیر بخار و فوم", 110_000, 10, "cappuccino"),
new("item_demo_cf_latte", "cat_demo_coffee", "لاته", "Latte", "لاتيه", "شیر بخار گرفته", 120_000, 0, "latte"),
new("item_demo_cf_flat_white", "cat_demo_coffee", "فلت وایت", "Flat White", "فلات وايت", "میکرو فوم نرم", 115_000, 0, "latte"),
new("item_demo_cf_cortado", "cat_demo_coffee", "کورتادو", "Cortado", "كورتادو", "نسبت مساوی قهوه و شیر", 95_000, 0, "espresso"),
new("item_demo_cf_macchiato", "cat_demo_coffee", "ماکیاتو", "Macchiato", "ماكياتو", "اسپرسو با کمی فوم", 90_000, 0, "cappuccino"),
new("item_demo_cf_mocha", "cat_demo_coffee", "موکا", "Mocha", "موكا", "شکلات تلخ و اسپرسو", 135_000, 0, "mocha"),
new("item_demo_cf_affogato", "cat_demo_coffee", "افوگاتو", "Affogato", "أفوغاتو", "اسپرسو روی بستنی وانیل", 140_000, 0, "espresso"),
new("item_demo_cf_cold_brew", "cat_demo_coffee", "کولد برو", "Cold Brew", "كولد برو", "دم ۱۲ ساعته", 140_000, 0, "iced_coffee"),
new("item_demo_cf_iced_latte", "cat_demo_coffee", "آیس لاته", "Iced Latte", "آيس لاتيه", "سرد و خنک", 130_000, 0, "iced_coffee"),
new("item_demo_cf_iced_ameri", "cat_demo_coffee", "آیس آمریکانو", "Iced Americano", "آيس أمريكانو", null, 95_000, 0, "iced_coffee"),
new("item_demo_cf_nitro", "cat_demo_coffee", "نیترو کافی", "Nitro Cold Brew", "نيترو كافي", "با نیتروژن کربن‌دار", 155_000, 0, "iced_coffee"),
new("item_demo_cf_v60", "cat_demo_coffee", "V60", "Pour Over V60", "في 60", "دم‌آوری دستی", 145_000, 0, "espresso"),
new("item_demo_cf_aeropress", "cat_demo_coffee", "ایروپرس", "AeroPress", "إيروبريس", "طعم نرم و کامل", 140_000, 0, "espresso"),
new("item_demo_cf_turkish", "cat_demo_coffee", "قهوه ترک", "Turkish Coffee", "قهوة تركية", "سنتی با هل", 80_000, 0, "espresso"),
new("item_demo_cf_specialty", "cat_demo_coffee", "قهوه تک‌خاستگاه", "Single Origin", "أحادي المنشأ", "هر هفته از منشأ جدید", 165_000, 0, "espresso"),
// Hot drinks
new("item_demo_espresso", "cat_demo_drinks", "اسپرسو", "Espresso", "إسبريسو", "دوبل یا سینگل", 65_000, 0, "espresso"),
new("item_demo_americano", "cat_demo_drinks", "آمریکانو", "Americano", "أمريكانو", null, 75_000, 0, "cappuccino"),
@@ -129,6 +152,10 @@ file static class DemoMenuCategoryKinds
public static MenuItemVisualKind KindFor(string itemId, string food101Class)
{
// All specialty coffee items are drinks
if (itemId.StartsWith("item_demo_cf_", StringComparison.Ordinal))
return MenuItemVisualKind.Drink;
if (itemId.Contains("demo_iced", StringComparison.Ordinal)
|| itemId.Contains("demo_cold", StringComparison.Ordinal)
|| itemId.Contains("demo_lemonade", StringComparison.Ordinal)
@@ -47,7 +47,7 @@ public static class DevelopmentDataSeeder
CafeId = cafe.Id,
BranchId = "branch_demo_main",
Name = "مدیر دمو",
Phone = "09121234567",
Phone = "09212273138",
Role = EmployeeRole.Owner,
BaseSalary = 0
};
@@ -97,10 +97,12 @@ public static class DevelopmentDataSeeder
await SeedDemoOpenShiftsAsync(db, cafe.Id, logger);
var ownerEmp = await db.Employees.FirstOrDefaultAsync(e => e.Id == "emp_demo_owner");
if (ownerEmp is not null && ownerEmp.BranchId is null)
if (ownerEmp is not null)
{
ownerEmp.BranchId = "branch_demo_main";
await db.SaveChangesAsync();
var changed = false;
if (ownerEmp.BranchId is null) { ownerEmp.BranchId = "branch_demo_main"; changed = true; }
if (ownerEmp.Phone != "09212273138") { ownerEmp.Phone = "09212273138"; changed = true; }
if (changed) await db.SaveChangesAsync();
}
await DemoEmployeesSeeder.EnsureEmployeesAsync(db, cafe.Id, logger);