@extends('layouts.admin-simple') @section('title', 'Upcoming Maintenance') @section('breadcrumb') @endsection @section('page-title')

Upcoming Maintenance

Scheduled maintenance within the next 30 days

list All Records @can('warehouse.fixed-asset-maintenance.create') add Schedule New @endcan
@endsection @section('content')
scheduleUpcoming Scheduled Maintenance
@forelse($records as $i => $rec) @php $daysUntil = $rec->scheduled_date ? now()->diffInDays($rec->scheduled_date, false) : 0; @endphp @empty @endforelse
#Maintenance #AssetTypeScheduled DateDays UntilPriorityActions
{{ $records->firstItem() + $i }} {{ $rec->maintenance_number }} {{ $rec->fixedAsset ? $rec->fixedAsset->asset_name : '-' }}
{{ $rec->fixedAsset ? $rec->fixedAsset->asset_code : '' }}
{{ ucfirst($rec->maintenance_type) }} {{ $rec->scheduled_date ? $rec->scheduled_date->format('M d, Y') : '-' }} @if($daysUntil <= 3) {{ $daysUntil }} days @elseif($daysUntil <= 7) {{ $daysUntil }} days @else {{ $daysUntil }} days @endif @php $pColors = ['low'=>'secondary','medium'=>'info','high'=>'warning','critical'=>'danger']; @endphp {{ ucfirst($rec->priority ?? 'medium') }} visibility
No upcoming maintenance scheduled.
@if($records->hasPages()) @endif
@endsection