{{-- resources/views/filament/widgets/store-status-widget.blade.php --}}

Store Status

{{ $this->isStoreOpenNow() ? 'Open Now' : 'Closed Now' }}

Today's Hours

@php $currentDay = strtolower(now()->timezone(config('app.timezone'))->format('l')); $todayHours = \App\Models\StoreHours::where('day_of_week', $currentDay)->first(); @endphp @if($todayHours)
{{ ucfirst($currentDay) }} @if($todayHours->is_closed) Closed @else {{ $todayHours->opening_time ? \Carbon\Carbon::parse($todayHours->opening_time)->format('g:i A') : '?' }} - {{ $todayHours->closing_time ? \Carbon\Carbon::parse($todayHours->closing_time)->format('g:i A') : '?' }} @endif
@else

No hours set for today

@endif

Status

@php $storeStatus = \App\Models\StoreStatus::first(); @endphp @if($storeStatus) @if($storeStatus->is_vacation_mode)
Vacation Mode
@if($storeStatus->vacation_end)

Until {{ $storeStatus->vacation_end->format('M j, Y g:i A') }}

@endif @elseif(!$storeStatus->is_open)
Manually Closed
@if($storeStatus->reopen_at)

Reopens at {{ $storeStatus->reopen_at->format('M j, Y g:i A') }}

@endif @else
Open
@endif @else

Status not configured

@endif
Manage Store Status →