|
@@ -1,23 +1,20 @@
|
|
|
<div class="d-flex" id="appointment-confirmation">
|
|
|
- <div class="flex-grow-1">
|
|
|
- @if($appointment->status === 'CREATED' && !$appointment->latest_confirmation_request_at && !$appointment->latest_confirmation_decision_at)
|
|
|
+ <div class="flex-grow-1"> {{-- ALIX overhaul --}}
|
|
|
+ @if($appointment->status === 'PENDING' && !$appointment->latest_confirmation_request_at && !$appointment->latest_confirmation_decision_at)
|
|
|
<b class="text-warning-mellow">Not requested yet</b>
|
|
|
<div>
|
|
|
@include('app.patient.partials.appointment-request-confirmation', ['label' => 'Request Confirmation'])
|
|
|
</div>
|
|
|
@endif
|
|
|
@if($appointment->latest_confirmation_decision_at)
|
|
|
- @if($appointment->status === 'CONFIRMED')
|
|
|
+ @if($appointment->latestConfirmationDecision->accepted_or_rejected_or_waived === 'ACCEPTED')
|
|
|
<div class="text-nowrap">
|
|
|
- <b class="text-success">{{ucwords($appointment->status)}}</b>
|
|
|
+ <b class="text-success">{{ucwords($appointment->latestConfirmationDecision->accepted_or_rejected_or_waived)}}</b>
|
|
|
<span class="text-secondary ml-1">on {{friendlier_date_time(convertToTimezone($appointment->latest_confirmation_decision_at, 'US/Eastern'))}}</span>
|
|
|
</div>
|
|
|
- <div>
|
|
|
- @include('app.patient.partials.appointment-request-confirmation', ['label' => 'Re-request Confirmation'])
|
|
|
- </div>
|
|
|
- @elseif($appointment->status === 'REJECTED')
|
|
|
+ @elseif($appointment->latestConfirmationDecision->accepted_or_rejected_or_waived === 'REJECTED')
|
|
|
<div class="text-nowrap">
|
|
|
- <b class="text-warning-mellow">{{ucwords($appointment->status)}}</b>
|
|
|
+ <b class="text-warning-mellow">{{ucwords($appointment->latestConfirmationDecision->accepted_or_rejected_or_waived)}}</b>
|
|
|
<span class="text-secondary ml-1">on {{friendlier_date_time(convertToTimezone($appointment->latest_confirmation_decision_at, 'US/Eastern'))}}</span>
|
|
|
</div>
|
|
|
<div>
|
|
@@ -25,18 +22,30 @@
|
|
|
Re-schedule
|
|
|
</a>
|
|
|
</div>
|
|
|
+ @elseif($appointment->latestConfirmationDecision->accepted_or_rejected_or_waived === 'WAIVED')
|
|
|
+ <div class="text-nowrap">
|
|
|
+ <b class="text-warning-mellow">{{ucwords($appointment->latestConfirmationDecision->accepted_or_rejected_or_waived)}}</b>
|
|
|
+ <span class="text-secondary ml-1">on {{friendlier_date_time(convertToTimezone($appointment->latest_confirmation_decision_at, 'US/Eastern'))}}</span>
|
|
|
+ </div>
|
|
|
@endif
|
|
|
- @if($appointment->latestConfirmationDecision)
|
|
|
+ @if($appointment->latestConfirmationDecision && $appointment->latestConfirmationDecision->memo)
|
|
|
<div class="my-1 border text-sm px-2 py-1 bg-white max-width-300px">
|
|
|
- <b>Client feedback:</b><br>
|
|
|
- {{$appointment->latestConfirmationDecision->memo}}
|
|
|
+ <span>Client feedback:</span>
|
|
|
+ <span class="pl-2">{{ $appointment->latestConfirmationDecision->memo }}</span>
|
|
|
</div>
|
|
|
@endif
|
|
|
- @elseif($appointment->latest_confirmation_request_at) {{-- requested but not confirmed yet --}}
|
|
|
+ @endif
|
|
|
+ @if($appointment->latest_confirmation_request_at) {{-- requested but not confirmed yet --}}
|
|
|
<div class="text-nowrap">
|
|
|
<b class="text-primary">Requested</b>
|
|
|
<span class="text-secondary ml-1">on {{friendlier_date_time(convertToTimezone($appointment->latest_confirmation_request_at, 'US/Eastern'))}}</span>
|
|
|
</div>
|
|
|
+ @if($appointment->is_request_pending)
|
|
|
+ <div class="text-sm">
|
|
|
+ <i class="fa fa-exclamation-triangle text-warning-mellow"></i>
|
|
|
+ Request Pending
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
<div>
|
|
|
@include('app.patient.partials.appointment-request-confirmation', ['label' => 'Re-request Confirmation'])
|
|
|
</div>
|