@extends('layouts.app') @section('content')
{{-- ===================== HEADER ===================== --}}

Complaint List

New Complaint
@if(session('success')) @endif {{-- ===================== TOOLBAR: SEARCH + FILTER ===================== --}}
{{-- ===================== TABLE ===================== --}}
@forelse($complaints as $key=>$row) @empty @endforelse
# Date Complainant CNIC Contact District Against Status Complaint Action
{{ $complaints->firstItem()+$key }} {{ $row->created_at->format('d-M-Y') }}
{{ $row->created_at->format('h:i A') }}
{{ $row->complainant_name }} {{ $row->cnic_number }} {{ $row->contact_number }} @if($row->district) {{ $row->district->district_name }} @endif @if($row->complaintType) {{ $row->complaintType->type_name }} @endif
@if($row->complaintAgainst) {{ $row->complaintAgainst->name }} @endif
@if($row->latestStatus) @if($row->latestStatus->status=="Resolved") Resolved @elseif($row->latestStatus->status=="Rejected") Rejected @elseif($row->latestStatus->status=="In Progress") In Progress @else {{ $row->latestStatus->status }} @endif @else Pending @endif {{ Str::limit($row->complaint,100) }}
@if(auth()->user()->role=='coordinator')
@csrf
@endif
No Complaint Found
{{ $complaints->links() }}
{{-- ===================== PAGE-SPECIFIC STYLES ===================== --}} {{-- ===================== PAGE-SPECIFIC SCRIPTS ===================== --}} @endsection