| |
| |
| |
| |
|
|
| import { Restaurant, Menu, Category, Product, ProductOption, ProductOptionItem, Table, QRCode, Order, OrderItem, Subscription, User } from '@/types/database'; |
|
|
| export const demoUser: User = { |
| id: 'user-1', |
| email: 'demo@scanmenu.app', |
| full_name: 'Alex Rivera', |
| avatar_url: undefined, |
| role: 'owner', |
| created_at: '2025-01-15T10:00:00Z', |
| updated_at: '2025-03-20T14:30:00Z', |
| }; |
|
|
| export const demoRestaurant: Restaurant = { |
| id: 'rest-1', |
| owner_id: 'user-1', |
| name: 'The Garden Kitchen', |
| slug: 'the-garden-kitchen', |
| description: 'Farm-to-table dining with seasonal menus, craft cocktails, and a lush garden terrace. Experience the freshest ingredients in every dish.', |
| logo_url: undefined, |
| cover_image_url: undefined, |
| address: '742 Evergreen Terrace, San Francisco, CA 94102', |
| phone: '+1 (415) 555-0123', |
| email: 'hello@gardenkitchen.com', |
| website: 'https://gardenkitchen.com', |
| currency: 'USD', |
| timezone: 'America/Los_Angeles', |
| is_active: true, |
| opening_hours: { |
| monday: { open: '11:00', close: '22:00' }, |
| tuesday: { open: '11:00', close: '22:00' }, |
| wednesday: { open: '11:00', close: '22:00' }, |
| thursday: { open: '11:00', close: '23:00' }, |
| friday: { open: '11:00', close: '23:30' }, |
| saturday: { open: '10:00', close: '23:30' }, |
| sunday: { open: '10:00', close: '21:00' }, |
| }, |
| theme_color: '#10b981', |
| created_at: '2025-01-15T10:00:00Z', |
| updated_at: '2025-03-20T14:30:00Z', |
| }; |
|
|
| export const demoMenu: Menu = { |
| id: 'menu-1', |
| restaurant_id: 'rest-1', |
| name: 'Main Menu', |
| description: 'Our full dining menu', |
| is_active: true, |
| sort_order: 0, |
| created_at: '2025-01-15T10:00:00Z', |
| updated_at: '2025-03-20T14:30:00Z', |
| }; |
|
|
| export const demoCategories: Category[] = [ |
| { id: 'cat-1', menu_id: 'menu-1', restaurant_id: 'rest-1', name: 'Starters', description: 'Light bites to begin your meal', image_url: undefined, is_active: true, sort_order: 0, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| { id: 'cat-2', menu_id: 'menu-1', restaurant_id: 'rest-1', name: 'Mains', description: 'Hearty entrees and signature dishes', image_url: undefined, is_active: true, sort_order: 1, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| { id: 'cat-3', menu_id: 'menu-1', restaurant_id: 'rest-1', name: 'Pasta & Risotto', description: 'Fresh handmade pasta and creamy risottos', image_url: undefined, is_active: true, sort_order: 2, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| { id: 'cat-4', menu_id: 'menu-1', restaurant_id: 'rest-1', name: 'Burgers & Sandwiches', description: 'Gourmet burgers and artisan sandwiches', image_url: undefined, is_active: true, sort_order: 3, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| { id: 'cat-5', menu_id: 'menu-1', restaurant_id: 'rest-1', name: 'Desserts', description: 'Sweet endings to your meal', image_url: undefined, is_active: true, sort_order: 4, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| { id: 'cat-6', menu_id: 'menu-1', restaurant_id: 'rest-1', name: 'Drinks', description: 'Cocktails, wines, and refreshments', image_url: undefined, is_active: true, sort_order: 5, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| ]; |
|
|
| export const demoProducts: Product[] = [ |
| |
| { id: 'prod-1', category_id: 'cat-1', restaurant_id: 'rest-1', name: 'Truffle Burrata', description: 'Creamy burrata with black truffle, heirloom tomatoes, basil oil & sourdough crostini', price: 16.50, image_url: undefined, is_available: true, is_featured: true, preparation_time: 10, calories: 320, allergens: ['dairy', 'gluten'], tags: ['vegetarian', 'popular'], sort_order: 0, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| { id: 'prod-2', category_id: 'cat-1', restaurant_id: 'rest-1', name: 'Tuna Tartare', description: 'Sashimi-grade tuna, avocado mousse, yuzu ponzu, sesame tuile', price: 18.00, image_url: undefined, is_available: true, is_featured: false, preparation_time: 12, calories: 280, allergens: ['fish', 'sesame'], tags: ['gluten-free'], sort_order: 1, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| { id: 'prod-3', category_id: 'cat-1', restaurant_id: 'rest-1', name: 'Crispy Calamari', description: 'Lightly breaded calamari, lemon aioli, marinara, fresh herbs', price: 14.00, image_url: undefined, is_available: true, is_featured: false, preparation_time: 8, calories: 410, allergens: ['shellfish', 'gluten'], tags: [], sort_order: 2, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| { id: 'prod-4', category_id: 'cat-1', restaurant_id: 'rest-1', name: 'Garden Soup', description: 'Seasonal vegetable soup with herbs from our garden, served with warm bread', price: 9.50, image_url: undefined, is_available: true, is_featured: false, preparation_time: 5, calories: 180, allergens: ['gluten'], tags: ['vegan', 'healthy'], sort_order: 3, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| |
| { id: 'prod-5', category_id: 'cat-2', restaurant_id: 'rest-1', name: 'Grilled Ribeye Steak', description: '12oz prime ribeye, roasted garlic butter, truffle fries, grilled asparagus', price: 42.00, image_url: undefined, is_available: true, is_featured: true, preparation_time: 25, calories: 780, allergens: ['dairy'], tags: ['signature', 'popular'], sort_order: 0, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| { id: 'prod-6', category_id: 'cat-2', restaurant_id: 'rest-1', name: 'Pan-Seared Salmon', description: 'Atlantic salmon, lemon dill sauce, quinoa pilaf, roasted vegetables', price: 32.00, image_url: undefined, is_available: true, is_featured: true, preparation_time: 20, calories: 520, allergens: ['fish'], tags: ['healthy', 'gluten-free'], sort_order: 1, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| { id: 'prod-7', category_id: 'cat-2', restaurant_id: 'rest-1', name: 'Herb-Roasted Chicken', description: 'Free-range chicken, herb jus, mashed potatoes, seasonal greens', price: 28.00, image_url: undefined, is_available: true, is_featured: false, preparation_time: 22, calories: 620, allergens: ['dairy'], tags: [], sort_order: 2, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| { id: 'prod-8', category_id: 'cat-2', restaurant_id: 'rest-1', name: 'Mushroom Wellington', description: 'Wild mushroom & spinach Wellington, red wine reduction, roasted roots', price: 26.00, image_url: undefined, is_available: true, is_featured: false, preparation_time: 25, calories: 480, allergens: ['gluten', 'dairy'], tags: ['vegetarian'], sort_order: 3, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| |
| { id: 'prod-9', category_id: 'cat-3', restaurant_id: 'rest-1', name: 'Lobster Linguine', description: 'Fresh linguine, butter-poached lobster, cherry tomatoes, white wine & chili', price: 36.00, image_url: undefined, is_available: true, is_featured: true, preparation_time: 18, calories: 580, allergens: ['shellfish', 'gluten', 'dairy'], tags: ['signature'], sort_order: 0, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| { id: 'prod-10', category_id: 'cat-3', restaurant_id: 'rest-1', name: 'Wild Mushroom Risotto', description: 'Arborio rice, porcini & chanterelle mushrooms, truffle oil, parmesan', price: 24.00, image_url: undefined, is_available: true, is_featured: false, preparation_time: 20, calories: 460, allergens: ['dairy'], tags: ['vegetarian', 'gluten-free'], sort_order: 1, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| { id: 'prod-11', category_id: 'cat-3', restaurant_id: 'rest-1', name: 'Carbonara', description: 'Spaghetti, guanciale, pecorino romano, black pepper, egg yolk', price: 20.00, image_url: undefined, is_available: true, is_featured: false, preparation_time: 15, calories: 520, allergens: ['gluten', 'dairy', 'egg'], tags: ['classic'], sort_order: 2, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| |
| { id: 'prod-12', category_id: 'cat-4', restaurant_id: 'rest-1', name: 'Garden Smash Burger', description: 'Double smashed patty, aged cheddar, caramelized onions, secret sauce, brioche bun', price: 19.00, image_url: undefined, is_available: true, is_featured: true, preparation_time: 15, calories: 720, allergens: ['gluten', 'dairy'], tags: ['popular', 'signature'], sort_order: 0, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| { id: 'prod-13', category_id: 'cat-4', restaurant_id: 'rest-1', name: 'Crispy Chicken Sandwich', description: 'Buttermilk fried chicken, slaw, pickles, spicy mayo, potato bun', price: 17.00, image_url: undefined, is_available: true, is_featured: false, preparation_time: 12, calories: 650, allergens: ['gluten', 'dairy', 'egg'], tags: [], sort_order: 1, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| { id: 'prod-14', category_id: 'cat-4', restaurant_id: 'rest-1', name: 'Grilled Veggie Wrap', description: 'Roasted vegetables, hummus, feta, arugula, sun-dried tomato wrap', price: 15.00, image_url: undefined, is_available: true, is_featured: false, preparation_time: 10, calories: 380, allergens: ['gluten', 'dairy'], tags: ['vegetarian'], sort_order: 2, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| |
| { id: 'prod-15', category_id: 'cat-5', restaurant_id: 'rest-1', name: 'Chocolate Lava Cake', description: 'Warm molten chocolate cake, vanilla bean ice cream, raspberry coulis', price: 14.00, image_url: undefined, is_available: true, is_featured: true, preparation_time: 15, calories: 480, allergens: ['gluten', 'dairy', 'egg'], tags: ['popular'], sort_order: 0, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| { id: 'prod-16', category_id: 'cat-5', restaurant_id: 'rest-1', name: 'Crème Brûlée', description: 'Classic vanilla custard, caramelized sugar, fresh berries', price: 12.00, image_url: undefined, is_available: true, is_featured: false, preparation_time: 5, calories: 340, allergens: ['dairy', 'egg'], tags: ['classic'], sort_order: 1, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| { id: 'prod-17', category_id: 'cat-5', restaurant_id: 'rest-1', name: 'Tiramisu', description: 'Espresso-soaked ladyfingers, mascarpone cream, cocoa dusting', price: 13.00, image_url: undefined, is_available: true, is_featured: false, preparation_time: 5, calories: 380, allergens: ['gluten', 'dairy', 'egg'], tags: [], sort_order: 2, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| |
| { id: 'prod-18', category_id: 'cat-6', restaurant_id: 'rest-1', name: 'Garden Spritz', description: 'Aperol, elderflower, prosecco, fresh herbs, soda', price: 14.00, image_url: undefined, is_available: true, is_featured: true, preparation_time: 3, calories: 180, allergens: [], tags: ['signature', 'cocktail'], sort_order: 0, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| { id: 'prod-19', category_id: 'cat-6', restaurant_id: 'rest-1', name: 'Espresso Martini', description: 'Vodka, Kahlúa, fresh espresso, coffee beans', price: 15.00, image_url: undefined, is_available: true, is_featured: false, preparation_time: 3, calories: 220, allergens: [], tags: ['cocktail'], sort_order: 1, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| { id: 'prod-20', category_id: 'cat-6', restaurant_id: 'rest-1', name: 'Fresh Lemonade', description: 'House-made lemonade with mint, ginger, and a hint of lavender', price: 6.00, image_url: undefined, is_available: true, is_featured: false, preparation_time: 2, calories: 120, allergens: [], tags: ['non-alcoholic'], sort_order: 2, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| { id: 'prod-21', category_id: 'cat-6', restaurant_id: 'rest-1', name: 'House Red Wine', description: 'Cabernet Sauvignon, Napa Valley — rich, full-bodied with dark fruit notes', price: 12.00, image_url: undefined, is_available: true, is_featured: false, preparation_time: 1, calories: 125, allergens: ['sulfites'], tags: ['wine'], sort_order: 3, created_at: '2025-01-15T10:00:00Z', updated_at: '2025-01-15T10:00:00Z' }, |
| ]; |
|
|
| export const demoProductOptions: ProductOption[] = [ |
| { id: 'opt-1', product_id: 'prod-5', name: 'Doneness', type: 'single', required: true, sort_order: 0 }, |
| { id: 'opt-2', product_id: 'prod-12', name: 'Side', type: 'single', required: true, sort_order: 0 }, |
| { id: 'opt-3', product_id: 'prod-12', name: 'Add-ons', type: 'multiple', required: false, max_selections: 3, sort_order: 1 }, |
| ]; |
|
|
| export const demoOptionItems: ProductOptionItem[] = [ |
| |
| { id: 'optitem-1', option_id: 'opt-1', name: 'Rare', price_modifier: 0, is_default: false, sort_order: 0 }, |
| { id: 'optitem-2', option_id: 'opt-1', name: 'Medium Rare', price_modifier: 0, is_default: true, sort_order: 1 }, |
| { id: 'optitem-3', option_id: 'opt-1', name: 'Medium', price_modifier: 0, is_default: false, sort_order: 2 }, |
| { id: 'optitem-4', option_id: 'opt-1', name: 'Medium Well', price_modifier: 0, is_default: false, sort_order: 3 }, |
| { id: 'optitem-5', option_id: 'opt-1', name: 'Well Done', price_modifier: 0, is_default: false, sort_order: 4 }, |
| |
| { id: 'optitem-6', option_id: 'opt-2', name: 'Regular Fries', price_modifier: 0, is_default: true, sort_order: 0 }, |
| { id: 'optitem-7', option_id: 'opt-2', name: 'Sweet Potato Fries', price_modifier: 2.00, is_default: false, sort_order: 1 }, |
| { id: 'optitem-8', option_id: 'opt-2', name: 'Side Salad', price_modifier: 1.50, is_default: false, sort_order: 2 }, |
| { id: 'optitem-9', option_id: 'opt-2', name: 'Onion Rings', price_modifier: 2.50, is_default: false, sort_order: 3 }, |
| |
| { id: 'optitem-10', option_id: 'opt-3', name: 'Extra Patty', price_modifier: 5.00, is_default: false, sort_order: 0 }, |
| { id: 'optitem-11', option_id: 'opt-3', name: 'Bacon', price_modifier: 3.00, is_default: false, sort_order: 1 }, |
| { id: 'optitem-12', option_id: 'opt-3', name: 'Avocado', price_modifier: 2.50, is_default: false, sort_order: 2 }, |
| { id: 'optitem-13', option_id: 'opt-3', name: 'Fried Egg', price_modifier: 2.00, is_default: false, sort_order: 3 }, |
| ]; |
|
|
| export const demoTables: Table[] = [ |
| { id: 'table-1', restaurant_id: 'rest-1', number: '1', name: 'Window Seat', capacity: 2, is_active: true, created_at: '2025-01-15T10:00:00Z' }, |
| { id: 'table-2', restaurant_id: 'rest-1', number: '2', name: 'Corner Booth', capacity: 4, is_active: true, created_at: '2025-01-15T10:00:00Z' }, |
| { id: 'table-3', restaurant_id: 'rest-1', number: '3', name: 'Garden Table', capacity: 6, is_active: true, created_at: '2025-01-15T10:00:00Z' }, |
| { id: 'table-4', restaurant_id: 'rest-1', number: '4', name: 'Bar Counter', capacity: 2, is_active: true, created_at: '2025-01-15T10:00:00Z' }, |
| { id: 'table-5', restaurant_id: 'rest-1', number: '5', name: 'Private Room', capacity: 8, is_active: true, created_at: '2025-01-15T10:00:00Z' }, |
| { id: 'table-6', restaurant_id: 'rest-1', number: '6', name: 'Terrace A', capacity: 4, is_active: true, created_at: '2025-01-15T10:00:00Z' }, |
| { id: 'table-7', restaurant_id: 'rest-1', number: '7', name: 'Terrace B', capacity: 4, is_active: true, created_at: '2025-01-15T10:00:00Z' }, |
| { id: 'table-8', restaurant_id: 'rest-1', number: '8', name: 'High Top', capacity: 2, is_active: false, created_at: '2025-01-15T10:00:00Z' }, |
| ]; |
|
|
| export const demoQRCodes: QRCode[] = [ |
| { id: 'qr-1', restaurant_id: 'rest-1', table_id: 'table-1', label: 'Table 1 - Window Seat', url: '/restaurant/the-garden-kitchen?table=1', scans: 142, is_active: true, created_at: '2025-01-15T10:00:00Z' }, |
| { id: 'qr-2', restaurant_id: 'rest-1', table_id: 'table-2', label: 'Table 2 - Corner Booth', url: '/restaurant/the-garden-kitchen?table=2', scans: 98, is_active: true, created_at: '2025-01-15T10:00:00Z' }, |
| { id: 'qr-3', restaurant_id: 'rest-1', table_id: 'table-3', label: 'Table 3 - Garden Table', url: '/restaurant/the-garden-kitchen?table=3', scans: 256, is_active: true, created_at: '2025-01-15T10:00:00Z' }, |
| { id: 'qr-4', restaurant_id: 'rest-1', table_id: 'table-4', label: 'Table 4 - Bar Counter', url: '/restaurant/the-garden-kitchen?table=4', scans: 67, is_active: true, created_at: '2025-01-15T10:00:00Z' }, |
| { id: 'qr-5', restaurant_id: 'rest-1', table_id: 'table-5', label: 'Table 5 - Private Room', url: '/restaurant/the-garden-kitchen?table=5', scans: 34, is_active: true, created_at: '2025-01-15T10:00:00Z' }, |
| { id: 'qr-6', restaurant_id: 'rest-1', label: 'General - Takeaway', url: '/restaurant/the-garden-kitchen?type=takeaway', scans: 523, is_active: true, created_at: '2025-01-15T10:00:00Z' }, |
| { id: 'qr-7', restaurant_id: 'rest-1', label: 'General - Delivery', url: '/restaurant/the-garden-kitchen?type=delivery', scans: 891, is_active: true, created_at: '2025-01-15T10:00:00Z' }, |
| ]; |
|
|
| export const demoOrders: Order[] = [ |
| { id: 'ord-1', restaurant_id: 'rest-1', customer_name: 'Sarah Chen', customer_phone: '+1 555-0101', order_type: 'dine_in', table_number: '3', status: 'preparing', subtotal: 68.50, tax: 5.48, total: 73.98, notes: 'No peanuts please', created_at: new Date(Date.now() - 15 * 60000).toISOString(), updated_at: new Date(Date.now() - 5 * 60000).toISOString() }, |
| { id: 'ord-2', restaurant_id: 'rest-1', customer_name: 'Mike Johnson', customer_phone: '+1 555-0102', order_type: 'takeaway', status: 'ready', subtotal: 38.00, tax: 3.04, total: 41.04, created_at: new Date(Date.now() - 30 * 60000).toISOString(), updated_at: new Date(Date.now() - 2 * 60000).toISOString() }, |
| { id: 'ord-3', restaurant_id: 'rest-1', customer_name: 'Emily Davis', customer_phone: '+1 555-0103', customer_email: 'emily@email.com', order_type: 'delivery', status: 'confirmed', subtotal: 52.00, tax: 4.16, total: 56.16, delivery_address: '123 Oak Street, Apt 4B', created_at: new Date(Date.now() - 8 * 60000).toISOString(), updated_at: new Date(Date.now() - 6 * 60000).toISOString() }, |
| { id: 'ord-4', restaurant_id: 'rest-1', customer_name: 'James Wilson', order_type: 'dine_in', table_number: '1', status: 'pending', subtotal: 94.00, tax: 7.52, total: 101.52, created_at: new Date(Date.now() - 2 * 60000).toISOString(), updated_at: new Date(Date.now() - 2 * 60000).toISOString() }, |
| { id: 'ord-5', restaurant_id: 'rest-1', customer_name: 'Lisa Park', order_type: 'dine_in', table_number: '5', status: 'delivered', subtotal: 126.00, tax: 10.08, total: 136.08, created_at: new Date(Date.now() - 90 * 60000).toISOString(), updated_at: new Date(Date.now() - 45 * 60000).toISOString() }, |
| { id: 'ord-6', restaurant_id: 'rest-1', customer_name: 'Tom Baker', order_type: 'takeaway', status: 'delivered', subtotal: 32.00, tax: 2.56, total: 34.56, created_at: new Date(Date.now() - 120 * 60000).toISOString(), updated_at: new Date(Date.now() - 100 * 60000).toISOString() }, |
| ]; |
|
|
| export const demoOrderItems: OrderItem[] = [ |
| { id: 'oi-1', order_id: 'ord-1', product_id: 'prod-1', product_name: 'Truffle Burrata', quantity: 1, unit_price: 16.50, total_price: 16.50 }, |
| { id: 'oi-2', order_id: 'ord-1', product_id: 'prod-5', product_name: 'Grilled Ribeye Steak', quantity: 1, unit_price: 42.00, total_price: 42.00, options: { Doneness: 'Medium Rare' } }, |
| { id: 'oi-3', order_id: 'ord-1', product_id: 'prod-20', product_name: 'Fresh Lemonade', quantity: 2, unit_price: 6.00, total_price: 12.00 }, |
| { id: 'oi-4', order_id: 'ord-2', product_id: 'prod-12', product_name: 'Garden Smash Burger', quantity: 2, unit_price: 19.00, total_price: 38.00, options: { Side: 'Regular Fries' } }, |
| { id: 'oi-5', order_id: 'ord-3', product_id: 'prod-6', product_name: 'Pan-Seared Salmon', quantity: 1, unit_price: 32.00, total_price: 32.00 }, |
| { id: 'oi-6', order_id: 'ord-3', product_id: 'prod-11', product_name: 'Carbonara', quantity: 1, unit_price: 20.00, total_price: 20.00 }, |
| { id: 'oi-7', order_id: 'ord-4', product_id: 'prod-5', product_name: 'Grilled Ribeye Steak', quantity: 2, unit_price: 42.00, total_price: 84.00 }, |
| { id: 'oi-8', order_id: 'ord-4', product_id: 'prod-20', product_name: 'Fresh Lemonade', quantity: 1, unit_price: 6.00, total_price: 6.00 }, |
| { id: 'oi-9', order_id: 'ord-4', product_id: 'prod-16', product_name: 'Crème Brûlée', quantity: 1, unit_price: 12.00, total_price: 12.00 }, |
| ]; |
|
|
| export const demoSubscription: Subscription = { |
| id: 'sub-1', |
| restaurant_id: 'rest-1', |
| stripe_customer_id: 'cus_demo123', |
| stripe_subscription_id: 'sub_demo123', |
| tier: 'pro', |
| status: 'active', |
| current_period_start: '2025-03-01T00:00:00Z', |
| current_period_end: '2025-04-01T00:00:00Z', |
| created_at: '2025-01-15T10:00:00Z', |
| updated_at: '2025-03-01T00:00:00Z', |
| }; |
|
|
| |
| export function generateDailyRevenue(days: number = 30) { |
| const data = []; |
| for (let i = days - 1; i >= 0; i--) { |
| const date = new Date(); |
| date.setDate(date.getDate() - i); |
| const base = 800 + Math.random() * 1200; |
| const dayOfWeek = date.getDay(); |
| const weekendBoost = (dayOfWeek === 5 || dayOfWeek === 6) ? 1.4 : 1; |
| data.push({ |
| date: date.toISOString().split('T')[0], |
| revenue: Math.round(base * weekendBoost * 100) / 100, |
| orders: Math.round((base * weekendBoost) / 35), |
| }); |
| } |
| return data; |
| } |
|
|
| export function generatePopularItems() { |
| return [ |
| { name: 'Garden Smash Burger', orders: 186, revenue: 3534 }, |
| { name: 'Grilled Ribeye Steak', orders: 142, revenue: 5964 }, |
| { name: 'Lobster Linguine', orders: 128, revenue: 4608 }, |
| { name: 'Pan-Seared Salmon', orders: 119, revenue: 3808 }, |
| { name: 'Chocolate Lava Cake', orders: 98, revenue: 1372 }, |
| { name: 'Truffle Burrata', orders: 94, revenue: 1551 }, |
| { name: 'Garden Spritz', orders: 87, revenue: 1218 }, |
| { name: 'Carbonara', orders: 82, revenue: 1640 }, |
| ]; |
| } |
|
|
| export function generateOrdersByType() { |
| return [ |
| { type: 'Dine In', count: 456, percentage: 52 }, |
| { type: 'Takeaway', count: 234, percentage: 27 }, |
| { type: 'Delivery', count: 183, percentage: 21 }, |
| ]; |
| } |
|
|
| export function generateHourlyOrders() { |
| const hours = []; |
| for (let h = 10; h <= 22; h++) { |
| const lunchPeak = h >= 12 && h <= 14 ? 2.2 : 1; |
| const dinnerPeak = h >= 18 && h <= 21 ? 2.8 : 1; |
| hours.push({ |
| hour: `${h}:00`, |
| orders: Math.round((3 + Math.random() * 5) * Math.max(lunchPeak, dinnerPeak)), |
| }); |
| } |
| return hours; |
| } |
|
|