@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @php $statusClass = match ($assetMaintenance->status) { 'Completed' => 'bg-green-100 text-green-700', 'In Progress' => 'bg-blue-100 text-blue-700', 'Scheduled' => 'bg-yellow-100 text-yellow-700', default => 'bg-red-100 text-red-700', }; $isOverdue = $assetMaintenance->service_date?->isPast() && in_array( $assetMaintenance->status, ['Scheduled', 'In Progress'] ); @endphp
← Back to Maintenance
Edit Record
@csrf @method('DELETE')
@if($isOverdue)

Maintenance Overdue

This maintenance was scheduled for {{ $assetMaintenance->service_date?->format('d M Y') }} and has not been completed.

@endif

Status

{{ $assetMaintenance->status }}

Service Date

{{ $assetMaintenance->service_date?->format('d M Y') }}

Maintenance Type

{{ $assetMaintenance->maintenance_type }}

Maintenance Cost

GH₵ {{ number_format($assetMaintenance->cost, 2) }}

Maintenance Work

{{ $assetMaintenance->maintenance_type }}

Work Description

{{ $assetMaintenance->work_description }}

Parts Replaced

@if($assetMaintenance->parts_replaced)
{{ $assetMaintenance->parts_replaced }}
@else
No replaced parts were recorded.
@endif

Additional Notes

@if($assetMaintenance->notes)
{{ $assetMaintenance->notes }}
@else
No additional notes were recorded.
@endif

Cost and Invoice

Maintenance Cost
GH₵ {{ number_format($assetMaintenance->cost, 2) }}
Invoice Number
{{ $assetMaintenance->invoice_number ?: 'Not provided' }}
Service Provider
{{ $assetMaintenance->service_provider ?: 'Not provided' }}
Receipt
@if($assetMaintenance->receipt_path) View Receipt @else No receipt uploaded @endif

Service Schedule

Current Service Date

{{ $assetMaintenance->service_date?->format('d M Y') }}

Next Service Date

{{ $assetMaintenance->next_service_date?->format('d M Y') ?? 'Not scheduled' }}

Asset Information

Asset Code

{{ $assetMaintenance->asset->asset_code }}

Location

{{ $assetMaintenance->asset->location ?: 'Not provided' }}

Current Asset Status

{{ $assetMaintenance->asset->status }}

Record Information

Created

{{ $assetMaintenance->created_at?->format('d M Y, h:i A') }}

Last Updated

{{ $assetMaintenance->updated_at?->format('d M Y, h:i A') }}

Maintenance Tracking

When this record has a next service date, the linked asset record is updated automatically.