@extends('layouts.main') @section('content')
@if ($errors->any())
@endif @if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif
{{-- ================= AVAILABILITY ================= --}}
{{-- Header --}}
Availability Management
{{-- Add Availability --}}
@csrf
{{-- ✅ Doctor Select --}}
{{-- Session Type Select --}}

{{-- List --}}
Availability List
@forelse($availabilities as $item) @empty @endforelse
ID Doctor Date Time Slot Status Action
{{ $item->id }} {{ $item->doctor?->first_name ?? $item->consultant?->name ?? 'N/A' }} @if($item->sessionType)
Session: {{ $item->sessionType->name }} (₹{{ $item->sessionType->fees }}) @endif
{{ \Carbon\Carbon::parse($item->available_date)->format('d M Y') }} {{ date('h:i A', strtotime($item->start_time)) }} - {{ date('h:i A', strtotime($item->end_time)) }} {{ $item->slot_duration_minutes }} Min @if($item->is_active) Active @else Inactive @endif
@csrf @method('DELETE')
No Availability Added
@if(false) {{-- ================= BOOKINGS ================= --}}
{{-- Header --}}
Booking Management
{{-- Add Booking --}}
@csrf

{{-- List --}}
Booking List
@forelse($bookings as $booking) @empty @endforelse
ID User Date Time Amount Status Action
{{ $booking->id }} {{ $booking->user->name ?? $booking->user->first_name ?? '-' }} {{ \Carbon\Carbon::parse($booking->appointment_date)->format('d M Y') }} {{ date('h:i A', strtotime($booking->start_time)) }} - {{ date('h:i A', strtotime($booking->end_time)) }} ₹ {{ $booking->amount }} {{ ucfirst($booking->booking_status) }}
@csrf @method('DELETE')
No Data
@endif
@endsection