@php $company = $company ?? \App\Models\Company::first(); $establishment = $establishment ?? null; $records = $records ?? collect(); $date = $date ?? now()->format('Y-m-d'); $doctor = $doctor ?? null; $specialty = $specialty ?? null; $paperHeight = $paper_height ?? 1200; @endphp Agenda del Dia @include('print.partials.ticket_header', [ 'company' => $company ?? null, 'establishment' => $establishment ?? null, 'title' => 'AGENDA DEL DIA', 'code' => 'FECHA: ' . \Carbon\Carbon::parse($date)->format('d-m-Y'), 'header_font_size' => '12px', 'title_font_size' => '12px', 'code_font_size' => '12px', ])
@if($doctor)
ODONTOLOGO/A: {{ $doctor->name }}
@endif @if($specialty)
ESPECIALIDAD: {{ $specialty->description ?: $specialty->name }}
@endif
CITAS PROGRAMADAS
@forelse($records as $row) @php $patientName = $row->patient->name ?? '-'; $phone = trim((string) ($row->patient->telephone ?? '')); $medicName = $row->doctor->name ?? '-'; $specName = ''; if ($row->doctor && $row->doctor->specialty) { $specName = $row->doctor->specialty->description ?: $row->doctor->specialty->name; } $reason = trim(strip_tags((string) ($row->reason_consultation ?? ''))); $time = trim((string) ($row->time ?? '')); @endphp
{{ $time !== '' ? $time : '--:--' }} — {{ $patientName }}
@if(!$doctor)
Dr(a): {{ $medicName }}
@endif @if(!$specialty && $specName !== '')
Esp.: {{ $specName }}
@endif
Estado: {{ $row->state ?? '-' }}
@if($phone !== '')
Tel.: {{ $phone }}
@endif @if($reason !== '')
Motivo: {{ $reason }}
@endif
@empty
No hay citas para los filtros seleccionados.
@endforelse
TOTAL CITAS: {{ $records->count() }}