@if($lead->time_slots->count() > 0)

Appointments

@foreach($lead->time_slots as $apo) {!! $apo->getWhatWhen() !!} Edit
@endforeach
@endif

Installation state

@if(config('enum.install_states')[$lead->install_state] == 'unavailable')
Unavailable (can only be booked by staff)
@elseif(config('enum.install_states')[$lead->install_state] == 'available')
Awaiting booking
@elseif(config('enum.install_states')[$lead->install_state] == 'booked')
Installation booked @if(!empty($lead->getInstallBooking())) @if(!empty($lead->getInstallBooking()->staff->first())) With {!! $lead->getInstallBooking()->staff->first()->user->name !!}. @endif Edit
{!! $lead->getInstallBooking()->getWhenLine() !!} @endif
@elseif(config('enum.install_states')[$lead->install_state] == 'installed_dry')
Installed (dry)
@elseif(config('enum.install_states')[$lead->install_state] == 'installed_live')
Installed (live)
@endif Book install or Book appointment

Emailing install slots available will set this customers install state to ‘available’/‘dry_available’ and send them a link to a page where they can select from available install / survey slots.

{!! Form::model($lead, ['route' => ['lead.update', $lead->id], 'id' => 'customer_mac_form', 'class' => 'my-3' ]) !!} @method('PATCH')
Update installation state
{!! Form::text('gpon_sn', null, [ 'placeholder' => 'GPON S/N', 'class' => 'form-control', 'maxlength' => 18]) !!}
Status: {!! Form::select('install_state', config('enum.install_states'), null) !!}
Installed date
@if(empty($lead->install_date)) {!! Form::datetimeLocal('install_date', null, ['id' => 'install_date_input']) !!} @else {!! Form::datetimeLocal('install_date', $lead->install_date->format('Y-m-d\TH:m')) !!} @endif
{!! Form::close() !!}
@if(config('enum.install_states')[$lead->install_state] != 'installed_live')
!warning this customer is not set to live, we probably dont need to request the GPON SN.
@endif