{{-- resources/views/admin/bookings/index.blade.php --}} @extends('admin.layouts.app') @section('title', $pageTitle ?? 'الحجوزات') @push('styles') @endpush @section('content') @php $c = $cols ?? []; $F = $filters ?? []; @endphp
| # | @if(!empty($c['reference']))المرجع | @endif @if(!empty($c['customer_name']))العميل | @endif @if(empty($c['customer_name']) && !empty($c['email']))الإيميل | @endif @if(!empty($c['phone']))الهاتف | @endif @if(!empty($c['amount']))المبلغ | @endif @if(!empty($c['payment_status']))الدفع | @endif @if(!empty($c['status']))الحالة | @endif @if(!empty($c['booking_date']) || !empty($c['created_at']))التاريخ | @endifإجراءات |
|---|---|---|---|---|---|---|---|---|---|
| {{ $row->{$c['id'] ?? 'id'} ?? '—' }} | @if(!empty($c['reference'])){{ $row->{$c['reference']} }} | @endif @if(!empty($c['customer_name'])){{ $row->{$c['customer_name']} }} | @elseif(!empty($c['email'])){{ $row->{$c['email']} }} | @endif @if(!empty($c['phone'])){{ $row->{$c['phone']} }} | @endif @if(!empty($c['amount'])){{ number_format((float)($row->{$c['amount']} ?? 0), 2) }} | @endif @if(!empty($c['payment_status'])) @php $pv = $row->{$c['payment_status']} ?? null; $paid = in_array((string)$pv, ['1','true','paid','Paid','PAID'], true); $pTxt = $paid ? 'مدفوع' : ( ($pv==='pending'||$pv==='Pending') ? 'قيد الانتظار' : (in_array((string)$pv,['0','false','unpaid'],'true')?'غير مدفوع':(string)$pv) ); $pCls = $paid ? 'bg-success' : ( ($pv==='pending'||$pv==='Pending') ? 'bg-warning text-dark' : 'bg-danger'); @endphp{{ $pTxt }} | @endif @if(!empty($c['status'])) @php $sv = (string)($row->{$c['status']} ?? ''); $sCls = str_contains(strtolower($sv),'confirm') ? 'bg-info' : (str_contains(strtolower($sv),'cancel') ? 'bg-danger' : (str_contains(strtolower($sv),'pend') ? 'bg-warning text-dark' : 'badge-soft')); @endphp{{ $sv !== '' ? $sv : '—' }} | @endif @php $dateCol = $c['booking_date'] ?? $c['created_at'] ?? null; @endphp @if($dateCol){{ optional($row->{$dateCol} ?? null)->format('Y-m-d') ?? (is_string($row->{$dateCol} ?? null) ? \Illuminate\Support\Str::substr($row->{$dateCol},0,10) : '—') }} | @endif@if(!empty($c['status']) || !empty($c['payment_status'])) @endif |
| لا توجد نتائج حالياً. | |||||||||