@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')) }}
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) !!}
Cost Estimations
{{ $estimations->code }}
--}}
@if(!empty($estimations->item_estimations))
@endif
{{-- @endforeach --}}
@foreach ($estimations->item_estimations as $item)
Reason
Amount
@endforeach
{{ $item['reason'] }}
{{ $item['amount'] }}