@extends('layouts/contentLayoutMaster') @section('title', 'Corrective Maintenance Cost Estimation') @section('vendor-style') {{-- vendor css files --}} @endsection @section('content')

Corrective Maintenance Cost Estimation {{ "(" . $estimations->code . ")" }} {{ $WorkFlowApproval->status == 1 ? 'Approved' : ($WorkFlowApproval->status == 3 ? 'Rejected' : ($WorkFlowApproval->status == 4 ? 'Reverted' : 'Pending')) }}

{{-- --}} @if ($is_curr_user_on_curr_step) @else @endif
Corrective Code : {{$corrective->code ? $corrective->code : 'N/A'}}
Asset Code : {{$corrective->asset ? $corrective->asset->code : 'N/A'}}
Asset Name : {{$corrective->asset ? $corrective->asset->name : 'N/A'}}
Facility Code : {{$corrective->facility ? $corrective->facility->code : 'N/A'}}
Facility Name : {{$corrective->facility ? $corrective->facility->name : 'N/A'}}
Facility Type : @switch($corrective->type) @case('user') User @break @case('plant') Plant @break @case('building') Plant Building @break @case('plant_mcc') Plant Collection Point @break @case('ao') Area Office @break @case('dp') Dispatch Point @break @case('mcc') Collection Center @break @case('ao_building') Area Office Building @break @default N/A @endswitch
Remarks : {{$corrective->remarks ? $corrective->remarks : 'N/A'}}
Fault Type : {{$corrective->faultType ? $corrective->faultType->name : 'N/A'}}
Created By : {{$corrective->createdBy ? $corrective->createdBy->name . ' ('.$estimations->createdBy->user_name.')' : 'N/A'}}
Date : {{$corrective->date ? $corrective->date . ' ' . $corrective->time : 'N/A'}}
Assigned EST : {{$corrective->est ? $corrective->est->name : 'N/A'}}
@php function getStatusBadge($status) { if ($status == 1) { return 'Completed'; } elseif ($status == 2) { return 'Assigned'; } elseif ($status == 0) { return 'Pending'; } else { return 'N/A'; } } @endphp Status : {!! getStatusBadge($corrective->status) !!}
@if($corrective->costEstimations && $corrective->costEstimations != null)

Cost Estimations

{{-- @foreach ($estimations as $cost) --}} {{--
{{ $estimations->code }}
--}} @if(!empty($estimations->item_estimations)) @foreach ($estimations->item_estimations as $item) @endforeach
Reason Amount
{{ $item['reason'] }} {{ $item['amount'] }}
@endif {{-- @endforeach --}}
@endif
@endsection @section('vendor-script') {{-- vendor files table data --}} @endsection @section('page-script') @endsection