@extends('layouts.app') @section('title', 'Schedule Details') @section('content')
@can('schedules.create') Add Schedule @endcan @can('schedules.view') Calendar View @endcan
{{-- Schedule Summary --}}

User: {{ $schedule->user->name }}

Company: {{ $schedule->company->name }}

Status: {{ $schedule->status ? 'Active' : 'Inactive' }}

Total Slots: {{ $slots->count() }}

Fees: {{ number_format($schedule->fees, 2) }}

Total Fees: {{ number_format($slots->sum('fees'), 2) }}

Schedule Date: {{ $schedule->schedule_date->format('Y-m-d') }}

Per Customer Time: {{ $schedule->per_customer_time }} mins

Morning Location: {{ $schedule->morning_location }}

Evening Location: {{ $schedule->evening_location }}

{{-- Slots Table --}}
Slots
@forelse($slots as $index => $slot) @php $booking = $slot->booking; $rowClass = ''; $actionButton = 'Book'; if($booking){ switch($booking->status){ case 'pending': $rowClass = 'table-warning'; break; case 'confirmed': $rowClass = 'table-success'; break; case 'cancelled': $rowClass = 'table-danger'; break; case 'completed': $rowClass = 'table-info'; break; } $actionButton = 'Booked'; } @endphp @empty @endforelse
# Shift Location Start Time End Time Fees Actions
Shift Location Fees
{{ $index + 1 }} {{ ucfirst($slot->shift) }} {{ $slot->location }} {{ \Carbon\Carbon::parse($slot->start_time)->format('H:i') }} {{ \Carbon\Carbon::parse($slot->end_time)->format('H:i') }} {{ number_format($slot->fees, 2) }} {!! $actionButton !!}
No slots found.
@endsection @section('scripts') @endsection