@extends('layouts.app') @section('title', 'Dashboard — Monitoring Alat Berat') @section('content')

Dashboard

Gudang: {{ $warehouse?->name ?? '—' }}
{{-- Ringkasan --}}
{{-- Total kendaraan --}}
Total Kendaraan
{{ $totalEquipment }}
    @forelse ($equipmentBreakdown as $row)
  • {{ $row->name }} ({{ $row->total }})
  • @empty
  • Belum ada pemetaan nama tipe.
  • @endforelse
{{-- Aktif --}}
Kendaraan Aktif
{{ $activeEquipment }}
{{-- Peringatan --}}
Peringatan Aktif
{{ $alertCount }}
    @forelse ($alertItems as $alert)
  • {{ $alert['code'] }} {{ $alert['label'] }}
  • @empty
  • Tidak ada peringatan.
  • @endforelse
{{-- QR Fast Menu --}} @if(in_array(auth()->user()->role, ['operator', 'mekanik']))

QR Code Scanner

Akses cepat pemindaian QR code equipment

@if(auth()->user()->role === 'operator') {{-- Operator: Scan Pre-Start Check --}}
Scan Pre-Start Check
Cek status kendaraan sebelum operasi
{{-- Operator: Equipment Saya --}}
Equipment Saya
Kendaraan yang saya operasikan
@endif @if(auth()->user()->role === 'mekanik') {{-- Mekanik: Scan QR Servis --}}
Scan QR Servis
Mulai / lanjut / tutup perbaikan alat
{{-- Mekanik: Servis Saya --}}
Servis Saya
Perbaikan yang sedang saya tangani
@endif
@endif
{{-- Dalam perbaikan --}}

Dalam Perbaikan ({{ $repairsInProgressCount }})

@if ($repairs->isEmpty())

Belum ada perbaikan yang sedang berjalan.

@else
@foreach ($repairs as $repair) @php $eqCode = $repair->equipment?->code ?? '-'; $title = $repair->mechanic_notes ?? $repair->spare_parts_requested_notes ?? 'Perbaikan sedang berlangsung.'; $title = \Illuminate\Support\Str::limit($title, 140); $dur = $repair->started_at ? (int) $repair->started_at->diffInMinutes(now()) : null; $tag = $repair->spare_parts_requested_notes ? 'Pergantian Spare Part' : 'Perbaikan'; @endphp
Service {{ $tag }} {{ $eqCode }} View Details

{{ $title }}

Lokasi
{{ $repair->location?->name ?? '—' }}
Durasi
{{ $dur !== null ? $dur.' Menit' : '—' }}
Operator
{{ $repair->operator?->name ?? '—' }}
@endforeach
@endif
{{-- Riwayat lokasi --}}

Riwayat Lokasi Alat

@if ($locationHistory->isEmpty())

Belum ada alat dengan lokasi terpasang.

@else
@foreach ($locationHistory as $eq)
{{ $eq->code }}
{{ $eq->location?->name ?? '—' }}
@endforeach
@endif
@endsection