Replace entire repo content with correct code from /root/shahikitchen-website/

This commit is contained in:
root
2026-06-29 16:22:09 +00:00
parent 57cc67d2d3
commit 50e3a34895
723 changed files with 20055 additions and 26101 deletions
+26
View File
@@ -0,0 +1,26 @@
/**
* Extended dish detail data for the menu detail modal.
* All sweets category items use the detail modal on /menu.
*/
/** Category id whose items show the detail modal instead of inline description */
export const DETAIL_MODAL_CATEGORY_ID = 'sweets';
/** Per-dish ingredient lists shown in the detail modal (add as provided) */
export const dishIngredients: Record<string, string[]> = {
'badam-barfi': [
'Almonds (badam)',
'Full-cream milk',
'Sugar',
'Ghee',
'Cardamom',
],
};
export function hasDishDetailModal(_dishId: string, categoryId?: string): boolean {
return categoryId === DETAIL_MODAL_CATEGORY_ID;
}
export function getDishIngredients(dishId: string): string[] {
return dishIngredients[dishId] ?? [];
}
+27
View File
@@ -0,0 +1,27 @@
export type MenuPricingMode = 'standard' | 'weight';
export interface MenuItem {
id: string;
name: string;
description?: string;
price: number;
image?: string;
video?: string;
isVegetarian?: boolean;
/** Weight-based sweets: 90 kr / ½ kg, 179 kr / kg (kulfi stays standard). */
pricing?: MenuPricingMode;
pricePerHalfKg?: number;
pricePerKg?: number;
}
export interface MenuCategory {
id: string;
name: string;
items: MenuItem[];
}
export interface MenuFilter {
categoryId?: string;
searchQuery?: string;
vegetarianOnly?: boolean;
}
+8
View File
@@ -0,0 +1,8 @@
import type { MenuCategory, MenuItem } from './entities';
/** Port: menu data access (implemented by infrastructure). */
export interface MenuRepository {
getCategories(): MenuCategory[];
getAllItems(): MenuItem[];
findItemById(id: string): MenuItem | undefined;
}