@extends('layouts.app') @section('title', 'جدول المواعيد') @section('page_title', 'جدول المواعيد') @php $days = ['السبت','الأحد','الإثنين','الثلاثاء','الأربعاء','الخميس','الجمعة']; // Week starts Saturday, ends Friday $fmt12 = function($t) { if (!$t) return ''; [$hh,$mm] = explode(':', $t); $ampm = ((int)$hh) < 12 ? 'صباحًا' : 'مساءً'; $h12 = ((int)$hh) % 12; if ($h12 === 0) { $h12 = 12; } return sprintf('%02d:%s %s', $h12, $mm, $ampm); }; // Build 15-min time options once for the whole page $timeOptions = []; for ($h = 0; $h < 24; $h++) { for ($m = 0; $m < 60; $m += 15) { $timeOptions[] = sprintf('%02d:%02d', $h, $m); } } @endphp @section('content') @if($errors->any())
| اليوم | الوقت | مدة الحجز | الحالة | فترات الراحة | |
|---|---|---|---|---|---|
| {{ $days[$sch->weekday] ?? $sch->weekday }} | {{ $fmt12($sch->start_time) }} - {{ $fmt12($sch->end_time) }} | {{ $sch->slot_minutes }} د | {{ $sch->is_active ? 'مفعل':'متوقف' }} |
@if($sch->breaks->count())
@foreach($sch->breaks as $br)
{{ $fmt12($br->start_time) }} - {{ $fmt12($br->end_time) }}
@endforeach
@else
-
@endif
|
|
| لا توجد جداول بعد | |||||
| التاريخ | الحالة | الوقت | ملاحظة | |
|---|---|---|---|---|
| {{ $ex->date->format('Y-m-d') }} | {{ $ex->is_working ? 'يوم عمل':'إجازة' }} | @if($ex->start_time && $ex->end_time) {{ $fmt12($ex->start_time) }} - {{ $fmt12($ex->end_time) }} @else - @endif | {{ $ex->note }} | |
| لا توجد استثناءات | ||||