@extends('admin.layouts.app') @section('title','Service Bookings') @section('content') @php $hasFullAccess = auth('admin')->check() || (auth('staff')->check() && strcasecmp(auth('staff')->user()->designation?->name ?? '', 'Super Admin') === 0); @endphp @if(session('success'))
{{ session('success') }}
@endif @if($errors->any())
{{ $errors->first() }}
@endif
@foreach($bookings as $key => $booking) @endforeach
S.No Booking No Quotation Customer Service Date Service Time Technician Status Action
{{ $key + 1 }} {{ $booking->booking_no }} {{ $booking->quotation->quotation_number ?? '-' }} {{ $booking->customer->customer_name ?? '-' }} {{ $booking->service_date ? \Carbon\Carbon::parse($booking->service_date)->format('d-m-Y') : '-' }} {{ $booking->service_time ? \Carbon\Carbon::parse($booking->service_time)->format('h:i A') : '-' }} {{ $booking->latestAssignment->technician->technician_name ?? '-' }} {{ $booking->service_status }}
@if($hasFullAccess && !$booking->latestAssignment) @endif @if($hasFullAccess)
@csrf @method('DELETE')
@endif
@endsection