@php $options = $service_form->attributes->option_section->options ?? []; $options_nature_trouble = $service_form->attributes->nature_trouble->options ?? []; $selections = $service_form->attributes->option_section->selections ?? []; $selections_nature_trouble = $service_form->attributes->nature_trouble->selections ?? []; $othersText = $service_form->attributes->nature_trouble->others_text ?? ''; @endphp
CALL BACK/REPAIR MAINTENANCE REPORT Serial No-: {{$reportbarcode}}
NAME OF BUILDING: @if(isset($property->property_name)) {{$property->property_name}} @endif
ADDRESS: @if(isset($property->full_address)) {{$property->full_address}} @endif
EL/ES/MCPS/DW NO.: @if(isset($machineNumbers)) {{ implode(',', $machineNumbers ?? []) }} @endif
ARRIVAL TIME: {{$actual_start_date}}
COMPLETED TIME: {{$actual_end_date}}

@foreach($options as $option) @endforeach @foreach(array_chunk($options_nature_trouble, 4) as $rowOptions) @foreach($rowOptions as $option) @endforeach {{-- Pad row to always have 4 columns --}} @for($i = count($rowOptions); $i < 4; $i++) @endfor @endforeach
checkbox {{ $option }}
(1) NATURE OF TROUBLE
checkbox {{-- Handle OTHERS case --}} @if(strtoupper($option) === 'OTHERS') OTHERS: {{ $othersText ?: '____________' }} @else {{ $option }} @endif  
(2) SYMPTOM:- @if(isset($service_form->attributes->symptom->value)) {{$service_form->attributes->symptom->value}} @endif
(3) CAUSE:- @if(isset($service_form->attributes->cause->value)) {{$service_form->attributes->cause->value}} @endif
(4) DETAILS OF CORRECTIVE ACTION:- @if(isset($service_form->attributes->corrective_action->value)) {{$service_form->attributes->corrective_action->value}} @endif
(5) REPLACED ITEM:- @if(isset($service_form->attributes->replaced_item->value)) {{$service_form->attributes->replaced_item->value}} @endif
(6) STATUS :- @if(isset($service_form->attributes->status->selection) && $service_form->attributes->status->selection =='Normal') checkbox @else checkbox @endif NORMAL @if(isset($service_form->attributes->status->selection) && $service_form->attributes->status->selection =='Turned - off') checkbox @else checkbox @endif TURNED - OFF
 
(7) ADDITIONAL ACTIONS :- @if(isset($service_form->attributes->status->selection) && $service_form->attributes->additional_action->selection =='Major Repair') checkbox @else checkbox @endif MAJOR REPAIR @if(isset($service_form->attributes->status->selection) && $service_form->attributes->additional_action->selection =='Major Repair') checkbox @else checkbox @endif QUOTATION
(8) SERVICE REPORT:- @if(isset($service_form->attributes->service_report->value)) {{$service_form->attributes->service_report->value}} @endif
(9) REMARKS:- @if(isset($service_form->attributes->remarks->value)) {{$service_form->attributes->remarks->value}} @endif
JOB COMPLETED AND VERIFIED BY:
@if($cs_signature) pdf-header @else pdf-header @endif @if($appcustomerName)
{{$appcustomerName}}

@endif
NAME AND SIGNATURE OF CUSTOMER / REPRESENTATIVE
@if($en_signature) pdf-header @else pdf-header @endif @if($appengineerName)
{{$appengineerName}}

@endif
NAME AND SIGNATURE OF CTE PERSONNEL