@extends('layouts.master') @section('title', 'Senarai Kerja') @section('actions') Kerja Baharu @endsection @section('content')
| # | Pelanggan | Peranti | Status | Kos | Tempoh | Tarikh | |
|---|---|---|---|---|---|---|---|
| {{ $job->job_number }} | {{ $job->device->customer->name ?? '-' }} @php $phone = $job->device->customer->phone ?? null; @endphp @if($phone) @endif | @php $deviceIcons = ['Laptop'=>'device-laptop','Printer'=>'printer','Desktop PC'=>'device-desktop','Tablet'=>'device-tablet','Smartphone'=>'device-mobile','Monitor'=>'monitor','Lain-Lain'=>'question-mark']; $type = $job->device->type ?? ''; @endphp {{ $type }} {{ $job->device->brand ?? '' }} {{ $job->device->model ?? '' }} | @php $colors = ['pending'=>'yellow','diagnosing'=>'blue','awaiting_parts'=>'orange','in_progress'=>'cyan','ready'=>'purple','picked_up'=>'lime','cancelled'=>'red']; $icons = ['pending'=>'clock','diagnosing'=>'search','awaiting_parts'=>'package','in_progress'=>'tool','ready'=>'check','picked_up'=>'truck-delivery','cancelled'=>'x']; $statusLabels = ['pending'=>'Pending','diagnosing'=>'Diagnosing','awaiting_parts'=>'Awaiting Parts','in_progress'=>'In Progress','ready'=>'Ready','picked_up'=>'Selesai','cancelled'=>'Cancelled']; @endphp {{ $statusLabels[$job->status] ?? str_replace('_', ' ', ucfirst($job->status)) }} | @php $totalPaid = $job->payments->sum('amount'); $isFullyPaid = $totalPaid > 0 && $totalPaid >= ($job->total_cost ?? 0); @endphp @if($isFullyPaid) @elseif($totalPaid > 0) @else @endif RM{{ number_format($job->total_cost ?? 0, 2) }} | {{ $job->tempoh }} | {{ $job->created_at->format('d/m/y') }} @if($job->completed_date) -{{ $job->completed_date->format('d/m/y') }} @elseif($job->status === 'cancelled') -{{ $job->completed_date?->format('d/m/y') ?? '-' }} @endif | |
| Tiada repair job | |||||||