@extends('crm.layouts.app') @section('title', 'Maintenance Schedule') @section('content')
View and manage equipment maintenance scheduling
{{ session('success') }}
{{ session('error') }}
| Equipment | Type | Scheduled Date | Days Overdue | Assigned To | Actions |
|---|---|---|---|---|---|
|
{{ $log->equipment->equipment_name }}
{{ $log->title ?? $log->maintenance_type }}
|
{{ ucfirst($log->maintenance_type) }} |
{{ $log->scheduled_date->format('M j, Y') }}
{{ $log->scheduled_date->format('g:i A') }}
|
{{ $log->scheduled_date->diffInDays(now()) }} days | {{ $log->assignedTo->name ?? 'Unassigned' }} |
| Equipment | Type | Scheduled Date | Days Until | Assigned To | Actions |
|---|---|---|---|---|---|
|
{{ $log->equipment->equipment_name }}
{{ $log->title ?? $log->maintenance_type }}
|
@php $typeColors = [ 'cleaning' => 'bg-blue-50 text-blue-700 ring-blue-700/10', 'sterilization' => 'bg-green-50 text-green-700 ring-green-600/20', 'calibration' => 'bg-yellow-50 text-yellow-800 ring-yellow-600/20', 'inspection' => 'bg-indigo-50 text-indigo-700 ring-indigo-700/10', 'repair' => 'bg-red-50 text-red-700 ring-red-600/10', 'replacement' => 'bg-gray-50 text-gray-600 ring-gray-500/10' ]; @endphp {{ ucfirst($log->maintenance_type) }} |
{{ $log->scheduled_date->format('M j, Y') }}
{{ $log->scheduled_date->format('g:i A') }}
|
@php $daysUntil = now()->diffInDays($log->scheduled_date, false); $badgeColor = $daysUntil <= 3 ? 'bg-yellow-50 text-yellow-800 ring-yellow-600/20' : ($daysUntil <= 7 ? 'bg-blue-50 text-blue-700 ring-blue-700/10' : 'bg-gray-50 text-gray-600 ring-gray-500/10'); @endphp @if($daysUntil == 0) Today @elseif($daysUntil == 1) Tomorrow @else {{ $daysUntil }} days @endif | {{ $log->assignedTo->name ?? 'Unassigned' }} | |