@extends('layouts.yellow') @section('content')
@if(session('success'))
{{ session('success') }}
@endif

{{ __('recurring-appointments.patient') }} & {{ __('recurring-appointments.doctor') }}

{{ __('recurring-appointments.patient') }}
{{ $recurringAppointment->patient->firstname }} {{ $recurringAppointment->patient->lastname }}
{{ __('recurring-appointments.doctor') }}
{{ $recurringAppointment->doctor->name }}
{{ __('recurring-appointments.especiality') }}
{{ $recurringAppointment->especialityRelation->name }}

{{ __('recurring-appointments.scheduleSettings') }}

{{ __('recurring-appointments.daysInterval') }}
{{ $recurringAppointment->days_interval }} {{ __('recurring-appointments.days') }}
{{ __('recurring-appointments.reminderDays') }}
{{ $recurringAppointment->reminder_days }} {{ __('recurring-appointments.days') }}
{{ __('recurring-appointments.autoSchedule') }}
{{ $recurringAppointment->auto_schedule ? __('recurring-appointments.yes') : __('recurring-appointments.no') }}
{{ __('recurring-appointments.status') }}
{{ $recurringAppointment->is_active ? __('recurring-appointments.active') : __('recurring-appointments.inactive') }}

{{ __('recurring-appointments.nextAppointment') }}

@php $daysUntil = \Carbon\Carbon::now()->startOfDay()->diffInDays(\Carbon\Carbon::parse($recurringAppointment->next_appointment_date)->startOfDay(), false); $isPast = \Carbon\Carbon::parse($recurringAppointment->next_appointment_date)->isPast(); $isClose = $daysUntil <= $recurringAppointment->reminder_days && !$isPast; @endphp
{{ \Carbon\Carbon::parse($recurringAppointment->next_appointment_date)->format('d/m/Y') }}
{{ __('recurring-appointments.timeRemaining') }}
{{ \Carbon\Carbon::parse($recurringAppointment->next_appointment_date)->diffForHumans() }} @if(!$isPast) ({{ $daysUntil }} {{ __('recurring-appointments.days') }}) @endif
{{ __('recurring-appointments.notificationStatus') }}
{{ $recurringAppointment->notification_sent ? __('recurring-appointments.notificationSent') : __('recurring-appointments.notificationPending') }}
{{ __('recurring-appointments.originalDate') }}
{{ \Carbon\Carbon::parse($recurringAppointment->originalAppointment->date)->format('d/m/Y H:i') }}

{{ __('recurring-appointments.description') }}

@if($recurringAppointment->description)
{{ $recurringAppointment->description }}
@else

{{ __('recurring-appointments.noDescription') }}

@endif
{{ __('recurring-appointments.back') }} {{ __('recurring-appointments.edit') }}
@csrf @method('DELETE')
@endsection