{{ __('equipment.title') }}

@if ($flashMessage)

{{ $flashMessage }}

@endif @error('category_id')

{{ $message }}

@enderror @error('equipment_name')

{{ $message }}

@enderror @if ($showForm)
@endif
@foreach ([__('common.code'), __('common.name'), __('common.category'), __('common.brand'), __('common.model'), __('equipment.serial_no'), __('equipment.plate_no'), __('equipment.purchase_date'), __('equipment.purchase_cost'), __('equipment.current_value'), __('equipment.hourly_rate'), __('equipment.daily_rate'), __('common.monthly'), __('common.hire'), __('common.status'), __('common.actions')] as $h) @endforeach @forelse ($rows as $item) @php $statusColors = [ 'Available' => '#22c55e', 'Assigned' => '#3b82f6', 'Under Maintenance' => '#f59e0b', 'Broken' => '#ef4444', 'Retired' => '#6b7280', ]; $badge = $statusColors[$item->status] ?? '#6b7280'; $hire = ($item->ownership_type === 'hired') ? ($item->supplier_name ?: 'Hired') : 'Owned'; @endphp @empty @endforelse
{{ $h }}
{{ $item->equipment_code }} {{ $item->equipment_name }} {{ $item->category_name ?: '-' }} {{ $item->brand ?: '-' }} {{ $item->model ?: '-' }} {{ $item->serial_no ?: '-' }} {{ $item->plate_no ?: '-' }} {{ $item->purchase_date ? substr((string) $item->purchase_date, 0, 10) : '-' }} {{ number_format((float) ($item->purchase_cost ?: 0), 2) }} {{ number_format((float) ($item->current_value ?: 0), 2) }} {{ number_format((float) ($item->hourly_rate ?: 0), 2) }} {{ number_format((float) ($item->daily_rate ?: 0), 2) }} {{ number_format((float) ($item->monthly_rate ?: 0), 2) }} {{ $hire }} {{ $item->status }}
{{ __('common.no_records') }}
{{ $rows->links() }}