@extends('layouts.app') @section('title', 'Equipment Management - Blackberry Farm') @section('content')

🚜 Equipment Management

Track farm equipment and maintenance schedules

➕ Add Equipment ← Back to Operations
@if($maintenanceAlerts && $maintenanceAlerts->count() > 0)

⚠️ Maintenance Due Soon

@foreach($maintenanceAlerts as $alert)
{{ $alert->name }} - Due {{ date('M j, Y', strtotime($alert->next_maintenance)) }} @if($alert->location) ({{ $alert->location }}) @endif
@endforeach
@endif @if($stats)
{{ number_format($stats->total_equipment ?? 0) }}
Total Equipment
{{ number_format($stats->active_count ?? 0) }}
Active Units
{{ number_format($stats->maintenance_count ?? 0) }}
In Maintenance
{{ number_format($stats->repair_count ?? 0) }}
Needs Repair
${{ $stats->total_value ? number_format($stats->total_value, 0) : '0' }}
Total Value
@endif
@if (session('success'))
Success! {{ session('success') }}
@endif @if($equipment->count() > 0) @foreach($equipment as $item) @endforeach
Name Type Model/Brand Status Location Hours Used Last Used Next Maintenance Value Actions
{{ $item->name }} @if($item->serial_number)
SN: {{ $item->serial_number }} @endif
{{ str_replace('_', ' ', ucwords($item->type, '_')) }} @if($item->model || $item->brand) {{ $item->model }} @if($item->model && $item->brand)
@endif @if($item->brand) {{ $item->brand }} @endif @else - @endif
{{ ucfirst($item->status) }} {{ $item->location ?? '-' }} {{ $item->total_hours_used ? number_format($item->total_hours_used, 1) . 'h' : '-' }} @if($item->hours_used)
Base: {{ number_format($item->hours_used, 1) }}h @endif
{{ $item->last_used ? date('M j, Y', strtotime($item->last_used)) : 'Never' }} @if($item->next_maintenance) @php $daysUntil = \Carbon\Carbon::parse($item->next_maintenance)->diffInDays(\Carbon\Carbon::now(), false); @endphp @if($daysUntil <= 7) {{ date('M j, Y', strtotime($item->next_maintenance)) }} @else {{ date('M j, Y', strtotime($item->next_maintenance)) }} @endif @else - @endif ${{ $item->current_value ? number_format($item->current_value, 0) : '-' }} View Edit
@if($equipment->hasPages()) @endif @else

No Equipment Recorded Yet

Start tracking farm equipment to manage maintenance and usage.

➕ Add First Equipment
@endif
@endsection