@section('heading', 'Laporan Kinerja Teknisi') @extends('layouts.app') @section('content')

Laporan Kinerja Teknisi

Filter Laporan

{{$services->count()}}

Total Service

{{$services->where('status', 'selesai')->count()}}

Selesai

{{$technicianStats->count()}}

Jumlah Teknisi

Rp {{number_format($services->where('status', 'selesai')->sum('total_cost') / 1000, 0)}}K

Total Pendapatan

Grafik Kinerja Teknisi

Statistik Per Teknisi

@foreach($technicianStats as $stat) @endforeach
Teknisi Total Service Selesai Dalam Proses Dibatalkan Success Rate Avg. Durasi Total Pendapatan
{{$stat['technician_name']}} {{$stat['total_services']}} {{$stat['completed']}} {{$stat['in_progress']}} {{$stat['cancelled']}} {{$stat['success_rate']}}% {{$stat['avg_duration_days']}} hari Rp {{number_format($stat['total_revenue'], 0, ',', '.')}}
TOTAL {{$technicianStats->sum('total_services')}} {{$technicianStats->sum('completed')}} {{$technicianStats->sum('in_progress')}} {{$technicianStats->sum('cancelled')}} - - Rp {{number_format($technicianStats->sum('total_revenue'), 0, ',', '.')}}

Detail Service

@foreach($services as $service) @endforeach
No. Service Tanggal Customer Device Teknisi Status Durasi Total
{{$service->service_number}} {{$service->service_date->format('d/m/Y')}} {{$service->customer->name}} {{$service->device_brand}} {{$service->device_model}} {{$service->technician->name ?? '-'}} @php $badgeClass = match($service->status) { 'selesai' => 'success', 'dibatalkan' => 'danger', 'siap diambil' => 'primary', default => 'warning' }; @endphp {{ucwords($service->status)}} @if($service->completed_at) {{$service->service_date->diffInDays($service->completed_at)}} hari @else {{$service->service_date->diffInDays(now())}} hari (berjalan) @endif Rp {{number_format($service->total_cost, 0, ',', '.')}}
@endsection @push('scripts') @endpush