@php
$stages = [
'consent' => [
'title' => 'Consent Form',
'icon' => 'fa-file-signature',
'description' => 'Complete your digital consent form',
'time' => '7 days before appointment'
],
'confirmation' => [
'title' => 'Confirm Appointment',
'icon' => 'fa-calendar-check',
'description' => 'Confirm your appointment details',
'time' => '1 day before appointment'
],
'checkin' => [
'title' => 'Check-In',
'icon' => 'fa-door-open',
'description' => 'Check in for your appointment',
'time' => 'Day of appointment'
],
'aftercare' => [
'title' => 'Aftercare',
'icon' => 'fa-heart-pulse',
'description' => 'View aftercare instructions',
'time' => 'After appointment'
],
'progress' => [
'title' => 'Progress Photos',
'icon' => 'fa-camera',
'description' => 'Upload healing progress photos',
'time' => '1-2 weeks after'
],
'review' => [
'title' => 'Review',
'icon' => 'fa-star',
'description' => 'Leave a review of your experience',
'time' => '1 month after'
]
];
@endphp
@foreach($stages as $stageKey => $stage)
@php
$isCompleted = $appointmentLink->hasCompletedStage($stageKey);
$isActive = $appointmentLink->current_stage === $stageKey;
$cardClass = $isCompleted ? 'stage-completed' : ($isActive ? 'stage-active' : '');
@endphp
{{ $stage['title'] }}
{{ $stage['time'] }}
@if($isCompleted)
@elseif($isActive)
@endif
{{ $stage['description'] }}
@if($isActive)
Continue
@elseif($isCompleted)
Completed
@if($appointmentLink->{$stageKey . '_at'})
on {{ $appointmentLink->{$stageKey . '_at'}->format('M j, Y') }}
@endif
@else
Coming up
@endif
@endforeach