@extends('layouts/contentLayoutMaster') @section('title', 'Repair & Maintenance Plans') @section('vendor-style') @endsection @section('page-style') @endsection @section('content') {{-- Add Dispatch Point --}} Preventive Report : {{$report->code ? $report->code : 'N/A'}} @if ($message = Session::get('success')) {{ $message }} @endif @if ($errorMessage = Session::get('errorMessage')) {{ $errorMessage }} @endif {{-- @csrf @method('PUT') --}} Visit Plan : {{$location->visitPlan ? $location->visitPlan->code : 'N/A'}} Created By : {{$location->createdBy ? $location->createdBy->name : 'N/A'}} Location Name : {{$location->name ? $location->name : 'N/A'}} Location Type : @switch($location->type) @case('user') User @break @case('plant') Plant @break @case('building') Plant Building @break @case('plant_mcc') Plant CP @break @case('ao') Area Office @break @case('dp') Dispatch Point @break @case('mcc') Collection Center @break @case('ao_building') AO Building @break @default N/A @endswitch Location : View on Map Date : {{$report->date ? $report->date : 'N/A'}} @foreach ( $report->assets as $index => $asset ) @php $assetDetails = $assetsMap[$asset['asset_id']] ?? null; @endphp {{ $index + 1 }} - @if($assetDetails) {{ $assetDetails->name }} ( {{ $assetDetails->code }} ) @else Asset Info Not Found (ID: {{ $asset['asset_id'] }}) @endif Sr. Question Answer @foreach($asset['questions'] as $qIndex => $question) {{ $qIndex + 1 }} {{ $question['question'] }} {{ $question['answer'] }} @endforeach @endforeach {{-- Create Visit Plan --}} {{-- --}} @endsection @section('vendor-script') @endsection @section('page-script') {{-- --}} @endsection