@extends('dashboard.layout') @section('content')
@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif
@forelse($serviceRequests as $request) @php $contactInfo = $request->contact_info; $servicesData = $request->services_data; $statusColors = [ 'pending' => 'bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-300', 'in_progress' => 'bg-blue-100 dark:bg-blue-900/30 text-blue-800 dark:text-blue-300', 'approved' => 'bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-300', 'cancelled' => 'bg-red-100 dark:bg-red-900/30 text-red-800 dark:text-red-300' ]; $statusIcons = [ 'pending' => 'fa-clock', 'in_progress' => 'fa-spinner', 'approved' => 'fa-check-circle', 'cancelled' => 'fa-times-circle' ]; $statusLabels = [ 'pending' => 'Pending', 'in_progress' => 'In Progress', 'approved' => 'Approved', 'cancelled' => 'Cancelled' ]; @endphp
{{ $contactInfo['name'] ?? 'N/A' }}
ID: {{ $request->id }}
{{ $statusLabels[$request->status] }}
Business:

{{ $request->businessType->name ?? 'N/A' }}

{{ $request->businessModel->name ?? 'N/A' }} • {{ $request->branch->name ?? 'N/A' }}

Package
{{ $request->package_type }}
{{ count($servicesData ?? []) }} services
Price
{{ number_format($request->total_price, 2) }} SR
{{ $contactInfo['email'] ?? 'N/A' }}
@if($contactInfo['phone'] ?? false)
{{ $contactInfo['phone'] }}
@endif
{{ $request->created_at->format('M j, Y') }}
{{ $request->created_at->format('g:i A') }}
@empty

No service requests found

All service requests will appear here

@endforelse
@if($serviceRequests->hasPages())
Page {{ $serviceRequests->currentPage() }} of {{ $serviceRequests->lastPage() }}
@if ($serviceRequests->onFirstPage()) Prev @else Prev @endif @if ($serviceRequests->hasMorePages()) Next @else Next @endif
@endif
Home
@endsection