@extends('layouts.app') @section('title', __('app.complaint.technician_index.title') . ' - PMMS') @section('content')

{{ __('app.complaint.technician_index.heading') }}

{{-- requirements.md ยง46 - Search, Filter, Sorting, Pagination --}}
{{ __('app.complaint.technician_index.reset') }}
@php $sortLink = fn ($col) => route('technician.complaints.index', array_merge(request()->query(), [ 'sort' => $col, 'direction' => (request('sort') === $col && request('direction') === 'asc') ? 'desc' : 'asc', ])); @endphp {{-- Permintaan tambahan pengguna - Ketua Juruteknik boleh tick berbilang aduan PENDING_FINAL_VERIFICATION terus dari senarai ini dan sahkan akhir sekaligus (bukan satu-satu dari Complaint Detail). Seluruh table + modal preview dibalut SATU
supaya butang "Confirm" dalam modal boleh submit terus. --}} @if ($canBulkFinalVerify) @csrf @endif
@if ($canBulkFinalVerify) @endif @forelse ($complaints as $complaint) @if ($canBulkFinalVerify) @endif @empty @endforelse
{{ __('app.complaint.technician_index.table.no') }} {{ __('app.complaint.technician_index.table.title') }} {{ __('app.complaint.technician_index.table.tenant') }} {{ __('app.complaint.technician_index.table.project') }} {{ __('app.complaint.technician_index.table.unit') }} {{ __('app.complaint.technician_index.table.submitted_date') }} {{ __('app.complaint.technician_index.table.work_orders') }} {{ __('app.complaint.technician_index.table.overall_status') }} {{ __('app.complaint.technician_index.table.last_updated') }}
@if ($complaint->status === 'PENDING_FINAL_VERIFICATION') @endif {{ $complaint->complaint_no }} {{ $complaint->title }} {{ $complaint->tenant?->name ?? __('app.complaint.technician_index.vacant_unit') }} {{ $complaint->project->project_name }} {{ $complaint->unit->unit_no }} {{ $complaint->submitted_at->format('d/m/Y H:i') }} {{ $complaint->work_orders_count }} {{ $complaint->status }} {{ $complaint->updated_at->format('d/m/Y H:i') }}
{{ __('app.complaint.technician_index.empty') }}
{{ $complaints->links() }} @if ($canBulkFinalVerify)
{{ __('app.complaint.technician_index.bulk_final_verify.page_only_hint') }}
{{-- Preview sebelum commit ke database - permintaan tambahan pengguna. --}}
@endif @endsection