{{-- resources/views/restaurant/settings/timing.blade.php --}} @extends('layouts.restaurant') @section('title', 'Store Timing Settings') @section('content')
Weekly Operating Hours
@csrf @method('PUT')
Loading...
@php $days = [ 'monday' => 'Monday', 'tuesday' => 'Tuesday', 'wednesday' => 'Wednesday', 'thursday' => 'Thursday', 'friday' => 'Friday', 'saturday' => 'Saturday', 'sunday' => 'Sunday' ]; $weeklyTimings = $restaurant->weekly_timings ?? \App\Models\Restaurant::getDefaultWeeklyTimings(); $today = strtolower(now()->format('l')); @endphp @foreach($days as $dayKey => $dayName) @php $timing = $weeklyTimings[$dayKey] ?? ['is_open' => true, 'open_time' => '09:00', 'close_time' => '22:00', 'break_start' => null, 'break_end' => null]; $isToday = ($dayKey === $today); @endphp @endforeach
Day Status Opening Time Closing Time Break Start Break End Preview
{{ $dayName }} @if($isToday) Today @endif
@if($timing['is_open']) {{ date('h:i A', strtotime($timing['open_time'])) }} - {{ date('h:i A', strtotime($timing['close_time'])) }} @else Closed @endif

Order Processing Settings
auto_accept_orders ? 'checked' : '' }}>
Manual Status Control

{{ $restaurant->is_open ? 'Store is Online' : 'Store is Offline' }}

{{ $restaurant->is_open ? 'Accepting orders from customers' : 'Not accepting orders' }}

@if($restaurant->is_open) @else @endif @if(!$restaurant->is_open && $restaurant->offline_reason)
Last Offline Reason:
{{ $restaurant->offline_reason['reason'] ?? 'N/A' }} @if(isset($restaurant->offline_reason['sub_reason']))
Details: {{ $restaurant->offline_reason['sub_reason'] }} @endif
Time: {{ \Carbon\Carbon::parse($restaurant->offline_reason['set_at'])->format('d M Y h:i A') }}
@endif
Live Status Preview
--:--:--
Today's Schedule
Loading...

@push('styles') @endpush @push('scripts') @endpush @endsection