@extends('crm.layouts.app') @section('title', 'Enquiry · '.$enquiry->name) @section('content')
← Enquiries

{{ $enquiry->name }}

{{ $enquiry->email }}@if($enquiry->phone) · {{ $enquiry->phone }}@endif · sent {{ $enquiry->created_at->diffForHumans() }}

@if(session('success'))
{{ session('success') }}
@endif @if($errors->any())
@endif

The piece

{{ $enquiry->description }}

@foreach([ 'Placement' => $enquiry->placement, 'Size' => $enquiry->size, 'Style' => $enquiry->style, 'Budget' => $enquiry->budgetRange(), 'Preferred artist' => $enquiry->artist?->name, 'First tattoo' => $enquiry->is_first_tattoo ? 'Yes' : null, ] as $label => $value)
{{ $label }}
{{ $value ?: '—' }}
@endforeach
@if($enquiry->availability_notes)
When they're free
{{ $enquiry->availability_notes }}
@endif
@if(!empty($enquiry->reference_images))

References

@foreach($enquiry->reference_images as $image) Reference @endforeach
@endif
@if($enquiry->status === \App\Models\Enquiry::STATUS_ACCEPTED)

Booked

{{ $enquiry->accepted_slot_at?->format('l j F, g:i A') }}

@if($enquiry->appointment) Open the appointment @endif
@elseif($enquiry->status === \App\Models\Enquiry::STATUS_DECLINED)

Declined

@if($enquiry->decline_reason)

{{ $enquiry->decline_reason }}

@endif
@else @if($enquiry->status === \App\Models\Enquiry::STATUS_OFFERED)

Waiting on the client

    @foreach($enquiry->availableSlots() as $slot)
  • {{ $slot->format('D j M, g:i A') }}
  • @endforeach

Their link

{{ route('enquiry.offer', $enquiry->token) }}
@endif
@csrf

{{ $enquiry->status === \App\Models\Enquiry::STATUS_OFFERED ? 'Offer different times' : 'Offer times' }}

Up to four. A short list is easier to answer than an open calendar.

@for($i = 0; $i < 4; $i++) @endfor
@csrf

Not for us

@endif
@endsection