Call this endpoint when restaurant opens for business.
async function openRestaurant() { // Open restaurant await setRestaurantStatus(restaurantId, 'open'); // Update UI showOpenStatus(); // Enable order acceptance enableOrderProcessing(); // Log event console.log('Restaurant opened at', new Date());}
After Break Period
Reopen after lunch break or temporary closure.
async function endBreak() { await setRestaurantStatus(restaurantId, 'open'); notifyStaff('Restaurant is now accepting orders');}
Manual Override
Staff can manually open restaurant from POS.
async function handleOpenButton() { if (confirm('Open restaurant for orders?')) { await setRestaurantStatus(restaurantId, 'open'); showSuccessMessage('Restaurant is now open'); }}
Scheduled Opening
Automatically open at scheduled time.
// Open at 11:00 AM dailyscheduleDaily('11:00', async () => { await setRestaurantStatus(restaurantId, 'open');});