@php $publicUrl = static function (?string $path): ?string { if (!$path) { return null; } if (\Illuminate\Support\Str::startsWith($path, ['http://', 'https://', '/'])) { return $path; } return \Illuminate\Support\Facades\Storage::disk('public')->url($path); }; $petPhoto = $publicUrl($pet->photo); $vaccinated = in_array(strtolower((string) $pet->vaccination_status), ['valid', 'up_to_date', 'up to date', 'due_soon'], true) || $pet->vaccinations->contains(fn ($record) => $record->next_due_date?->isFuture()); $serviceRecordCount = $appointmentItems->count() + $serviceOrders->count() + $groomingSessions->count(); @endphp
@if($petPhoto) {{ $pet->name }} @else
{{ strtoupper(substr($pet->name, 0, 1)) }}
@endif

{{ $pet->name }}

{{ $vaccinated ? 'Vaccinated' : 'Vaccination not current' }} @unless($pet->active) Inactive pet profile @endunless

{{ $pet->species }} · {{ $pet->breed ?: 'Breed not recorded' }} · Owner: {{ $pet->customer->name }}

{{ $pet->customer->phone }}{{ $pet->customer->email ? ' · '.$pet->customer->email : '' }}

Service records

{{ $serviceRecordCount }}

Booked services

{{ $appointmentItems->count() }}

Vaccinations

{{ $pet->vaccinations->count() }}

Grooming sessions

{{ $groomingSessions->count() }}

Complete Pet Profile

@foreach([ 'Species' => $pet->species, 'Breed' => $pet->breed, 'Gender' => $pet->gender, 'Date of birth' => $pet->dob ? \Carbon\Carbon::parse($pet->dob)->format('d M Y') : null, 'Weight' => $pet->weight_kg ? $pet->weight_kg.' kg' : null, 'Size' => $pet->size_category, 'Microchip' => $pet->microchip_number, 'Colour / markings' => $pet->colour_markings, 'Neutered / spayed' => $pet->neutered_spayed ? 'Yes' : 'No', ] as $label => $value)
{{ $label }}
{{ $value ?: 'Not recorded' }}
@endforeach
@foreach([ 'Allergies' => $pet->allergies, 'Medical conditions' => $pet->medical_conditions, 'Temperament' => $pet->temperament, 'Behavioural notes' => $pet->behavioural_notes, 'Special instructions' => $pet->special_instructions, ] as $label => $value)

{{ $label }}

{{ $value ?: 'None recorded' }}

@endforeach

Vaccination Records

Saved vaccine names, administration dates and due dates.

{{ str($pet->vaccination_status ?: 'unknown')->headline() }}
@forelse($pet->vaccinations as $vaccination)

{{ $vaccination->vaccine_name }}

Batch: {{ $vaccination->batch_number ?: 'Not recorded' }}

{{ str($vaccination->status)->headline() }}

Given: {{ $vaccination->date_administered?->format('d M Y') ?? '—' }}

Due: {{ $vaccination->next_due_date?->format('d M Y') ?? '—' }}

@if($vaccination->certificate_path) View certificate → @endif
@empty
No vaccination details have been recorded.
@endforelse

Appointment Service History

Every service line booked for {{ $pet->name }}, including staff, operational remarks and photos.

@forelse($appointmentItems as $item) @php $appointment = $item->appointment; $work = $item->workItem; $visitAt = $item->scheduled_at ?: $appointment?->scheduled_date; $products = $appointment?->products?->filter(fn ($product) => !$product->pet_id || (int) $product->pet_id === (int) $pet->id) ?? collect(); @endphp

{{ $item->service?->name ?? 'Service no longer available' }}

@if($item->package) {{ $item->package->name }} @endif

{{ $visitAt?->format('d M Y') ?? 'Date not recorded' }} @if($item->scheduled_at) · {{ $item->scheduled_at->format('H:i') }} @elseif($appointment?->start_time) · {{ substr($appointment->start_time, 0, 5) }} @endif · {{ $appointment?->appointment_number ?? 'Appointment' }}

{{ str($work?->status ?? $appointment?->status ?? 'booked')->headline() }} AED {{ number_format((float) $item->total_price, 2) }}

Assigned staff

{{ $work?->assignedStaff?->name ?? $item->staff?->name ?? 'Unassigned' }}

Category

{{ $item->service?->category?->name ?? 'General service' }}

@if($item->addons->isNotEmpty())

Add-ons

@foreach($item->addons as $addon)

{{ $addon->name }}AED {{ number_format((float) $addon->price, 2) }}

@endforeach
@endif @if($products->isNotEmpty())

Products

@foreach($products as $product)

{{ $product->name }} × {{ $product->quantity }}AED {{ number_format((float) $product->total_price, 2) }}

@endforeach
@endif
@if($work)

Checked in

{{ $work->check_in_at?->format('d M Y H:i') ?? 'Not recorded' }}

{{ $work->check_in_remark ?: 'No check-in remark.' }}

Service started

{{ $work->started_at?->format('d M Y H:i') ?? 'Not started' }}

{{ $work->start_remark ?: 'No start remark.' }}

Finished

{{ $work->finished_at?->format('d M Y H:i') ?? 'Not finished' }}

{{ $work->completion_summary ?: 'No completion summary.' }}

@if($work->before_photo_path || $work->after_photo_path)
@foreach(['Before service' => $work->before_photo_path, 'After service' => $work->after_photo_path] as $label => $path) @if($path) {{ $label }} photo for {{ $pet->name }}

{{ $label }}

@endif @endforeach
@endif
@else
This service has not been checked into the live work queue.
@endif
@empty
No appointment services have been recorded for this pet.
@endforelse

Service & Care Records

Care events saved through grooming, boarding, veterinary, taxi and other service operations.

@forelse($serviceOrders as $order)

{{ $order->service_label }}

{{ str($order->status)->headline() }}

{{ $order->booking_number }} · {{ $order->scheduled_start->format('d M Y H:i') }} · {{ $order->assignedStaff?->name ?? 'Unassigned' }}

AED {{ number_format((float) $order->total_amount, 2) }}

Open service record →
@if($order->notes || $order->care_report)
@if($order->notes)

Notes: {{ $order->notes }}

@endif @if($order->care_report)

Care report: {{ collect($order->care_report)->map(fn ($value, $key) => str($key)->headline().': '.(is_array($value) ? collect($value)->join(', ') : $value))->join(' · ') }}

@endif
@endif
@forelse($order->careLogs as $log)

{{ str($log->care_type)->headline() }} · {{ $log->staff?->name ?? 'System' }}

{{ $log->performed_at?->format('d M Y H:i') }}

{{ $log->notes ?: 'Activity completed.' }}

@if($log->measurements)

{{ collect($log->measurements)->map(fn ($value, $key) => str($key)->headline().': '.$value)->join(' · ') }}

@endif @if($log->photo_paths)
@foreach($log->photo_paths as $path) Care photo @endforeach
@endif
@empty

No care timeline entries for this service.

@endforelse
@empty
No additional service-operation records found.
@endforelse

Grooming Session Records

Previous grooming workflow notes, assessments, checklist completion and photos.

@forelse($groomingSessions as $session)

Grooming Session #{{ $session->id }}

{{ $session->check_in_at?->format('d M Y H:i') ?? $session->created_at->format('d M Y H:i') }} · {{ $session->groomer?->name ?? 'Unassigned' }}

{{ str($session->status)->headline() }}
Started
{{ $session->started_at?->format('d M H:i') ?? '—' }}
Completed
{{ $session->completed_at?->format('d M H:i') ?? '—' }}
@if($session->notes || $session->assessment?->special_notes)
{{ $session->notes ?: $session->assessment->special_notes }}
@endif @if($session->assessment)

Coat: {{ $session->assessment->coat_condition }} · Skin: {{ $session->assessment->skin_condition }} · Behaviour: {{ $session->assessment->behavior }}

@endif @if($session->checklistItems->isNotEmpty())

{{ $session->checklistItems->where('is_completed', true)->count() }}/{{ $session->checklistItems->count() }} checklist tasks completed

@endif @if($session->photos->isNotEmpty())
@foreach($session->photos as $photo) {{ str($photo->photo_type)->headline() }} grooming photo {{ $photo->photo_type }} @endforeach
@endif
@empty
No previous grooming sessions found.
@endforelse