@extends('admin.layouts.layout') @include('admin.components.date-time-picker') @section('content')
@php // Hydrate primary inspector (prefer is_primary=1) from existing schedule if present $__primaryInspectorId = ''; $__primaryInspectorName = ''; $__primaryInspectorAvatar = asset('images/no-profile.jpg'); $lockedDisplayTime = ''; if(isset($schedule) && $schedule->id){ $attached = $schedule->scheduleInspectors()->with('inspector')->get(); if($attached->count()){ $primaryRow = $attached->firstWhere('is_primary', 1) ?: $attached->sortBy('id')->first(); if($primaryRow){ $__primaryInspectorId = $primaryRow->inspector_id; if($primaryRow->inspector){ $__primaryInspectorName = trim(($primaryRow->inspector->first_name ?? '') . ' ' . ($primaryRow->inspector->last_name ?? '')) ?: 'Inspector'; $avatarData = $primaryRow->inspector->avatar ?? null; if(is_array($avatarData) && !empty($avatarData['thumb'])){ $__primaryInspectorAvatar = $avatarData['thumb']; } elseif(is_array($avatarData) && !empty($avatarData['original'])) { $__primaryInspectorAvatar = $avatarData['original']; } // Compute locked display time (12h) if start_time available if(!empty($schedule->start_time)) { $t = $schedule->start_time; if(preg_match('/^\d{2}:\d{2}$/',$t)) { $t .= ':00'; } if(preg_match('/^\d{2}:\d{2}:\d{2}$/',$t)) { [$h,$m] = explode(':',$t); $hInt = (int)$h; $ampm = $hInt>=12?'PM':'AM'; $hInt = $hInt % 12; if($hInt===0) $hInt=12; $lockedDisplayTime = $hInt.':'.$m.' '.$ampm; } } } } } } @endphp

Language

@php($prefLang = $schedule->preferred_language ?? '')

Schedule Date & Time

@if(!session('tenant_id'))
@else @endif
@php($__today = date('Y-m-d')) @php( $__prefillDateIso = isset($schedule->scheduled_date) ? $schedule->scheduled_date->format('Y-m-d') : ($prefilledDate ?? '') ) scheduled_date) && $schedule->scheduled_date->format('Y-m-d') >= $__today)) min="{{ $__today }}" @endif @if(isset($schedule) && isset($schedule->scheduled_date)) readonly @endif required>
Select date to load availability...
No slot selected.

Property Details

Property Images

Browse / Drag & Drop

You can select multiple images (JPEG / PNG up to 5MB each)
@if(isset($scheduleImages) && $scheduleImages->count()) @foreach($scheduleImages as $img) @php($fileData = \App\Models\Masters\File::file($img)) @php($imgPath = $img->cdn->cdn_root . $img->location . '/' . $img->file_name)
Image
@endforeach @endif
@if(isset($scheduleImages) && $scheduleImages->count()) @foreach($scheduleImages as $img) @endforeach @endif

Additaional Details

@php($authUser = Auth::user()) @php($roles = $authUser? $authUser->roles->pluck('slug')->toArray(): []) @php($isCustomerRole = in_array('customer',$roles)) @php($forceOwner = $isCustomerRole) @php($enteredByVal = $forceOwner ? '4' : ($schedule->entered_by ?? '')) @if($forceOwner)
Property owner
@else @endif
@php($heardVal = $schedule->referral_source ?? '') @php($heardOptions = ['Realtor','Friend/Family','Google','Social Media'])
occupied_status) && $schedule->occupied_status=='yes') ? 'checked' : '' }}> Yes occupied_status) && $schedule->occupied_status=='no') ? 'checked' : '' }}> No occupied_status) && $schedule->occupied_status=='unsure') ? 'checked' : '' }}> Unsure
utilities_status) && $schedule->utilities_status=='yes') ? 'checked' : '' }}> Yes utilities_status) && $schedule->utilities_status=='no') ? 'checked' : '' }}> No utilities_status) && $schedule->utilities_status=='unsure') ? 'checked' : '' }}> Unsure

Services

@if(isset($schedule) && $schedule && $schedule->services->count()) @foreach($schedule->services as $ss) @endforeach @else @endif
Service Description Duration Fee Type Fee Unit / Qty / Details Action
{{ $ss->service->service_name ?? 'Service' }} {{ Str::limit($ss->service->description ?? '',250) }} {{ $ss->service?->duration ? $ss->service?->duration.' mins' : '' }} {{ $ss->service->fee_type ?? '' }} $ {{ number_format($ss->service_fee ?? ($ss->service->fee ?? $ss->service->base_fee ?? 0), 2) }} @php($units = null) @if($feeType === 'Multihouse') @php($units = $ss->service->serviceFees()->whereNotNull('unit')->get()) @php($prefill = $units->first()?->unit) @elseif($feeType === 'Condo') @elseif($feeType === 'Quotation') @else @endif
No service added
@push('page_script') @php($placeApiKey = \Config::get('settings.address_auto_populate_key')) @endpush @push('page_css') @endpush @endsection