@php $appointmentCustomers = $customers->map(function ($customer) { return [ 'id' => $customer->id, 'customer_number' => $customer->customer_number, 'name' => $customer->name, 'email' => $customer->email, 'phone' => $customer->phone, 'address' => $customer->address, 'emirate' => $customer->emirate, 'pets' => $customer->pets->map(function ($pet) { return [ 'id' => $pet->id, 'name' => $pet->name, 'species' => $pet->species, 'breed' => $pet->breed, 'gender' => $pet->gender, 'dob' => $pet->dob, 'weight_kg' => $pet->weight_kg, 'size_category' => $pet->size_category, 'neutered_spayed' => $pet->neutered_spayed, 'vaccination_status' => $pet->vaccination_status, 'special_instructions' => $pet->special_instructions, 'photo' => $pet->photo, 'photo_url' => $pet->photo ? Storage::disk('public')->url($pet->photo) : null, 'document_paths' => $pet->document_paths ?? [], 'vaccinations' => $pet->vaccinations->map(fn ($vaccination) => [ 'id' => $vaccination->id, 'name' => $vaccination->vaccine_name, 'given' => optional($vaccination->date_administered)->format('Y-m-d'), 'expiry' => optional($vaccination->next_due_date)->format('Y-m-d'), ])->values(), ]; })->values(), ]; })->values(); $appointmentServices = $categories->flatMap(function ($category) { return $category->services->map(fn ($service) => [ 'id' => $service->id, 'category_id' => $category->id, 'category_name' => $category->name, 'name' => $service->name, 'base_price' => (float) $service->base_price, 'duration_minutes' => $service->duration_minutes, 'buffer_minutes' => $service->buffer_minutes, 'packages' => $service->packages->where('status', 'active')->map(fn ($package) => [ 'id' => $package->id, 'name' => $package->name, 'price' => (float) $package->price, 'sessions_count' => $package->sessions_count, 'duration_minutes' => $package->effective_duration, ])->values(), ]); })->values(); $appointmentStaff = $staffMembers->map(fn ($staff) => [ 'id' => $staff->id, 'name' => $staff->name, 'role' => $staff->roles->first()?->name ?? 'Team member', 'service_ids' => $staff->services->pluck('id')->values(), ])->values(); $appointmentResources = $resources->map(fn ($resource) => [ 'id' => $resource->id, 'name' => $resource->name, 'type' => str($resource->type)->headline()->toString(), ])->values(); $appointmentOldInput = session()->getOldInput(); $appointmentVatRate = (float) config('pawstreet.vat_rate', 5); @endphp

Create Appointment

@if($errors->any()) @endif
Hello, {{ explode(' ', Auth::user()->name)[0] }}
@csrf

Pet Owner Details

Emirates ID Photo

Secondary Contact

Notes

Payment Option

Pet List

active pets linked to this owner

Enter an existing owner's phone number to load their pets.

Pet list will appear here

Enter the owner's name and phone, then choose Add Pet. A new owner will be saved automatically.

No active pets registered for this owner.

Service Details

Enter Details

SpeciesPetSizeServicePackage / SessionsTeam MemberResourceAppointment TimeQTYCostDiscount

Package Add-on

Enter Details

PetAdd On TypeQtyPriceTotal

Products

Enter Details

CategorySearch ProductQTYCostTotal
Subtotal
Discounts
VAT ({{ rtrim(rtrim(number_format($appointmentVatRate, 2), '0'), '.') }}%)
Total

Existing Owner

Add New Pet

Vaccinated?
Neutered or Spayed?

Enter all three fields to save a vaccination record. You can leave all three blank if the owner will provide the certificate later.