@extends('layouts.app') @section('page-pretitle', __('Support')) @section('page-title', __('Complaint Form')) @section('content')
@if ($errors->any()) @endif @if (session('success')) @endif

{{ __('Search Filter') }}

@include('asset.entries') {{-- @if(auth()->user()->role === 'admin') --}} {{-- @endif --}}
@if(auth()->user()->role === 'admin' && auth()->user()->name === 'Najihah') @endif @forelse($complaints as $index => $complaint) @if(auth()->user()->role === 'admin' && auth()->user()->name === 'Najihah') @endif @empty @endforelse
# MessageSubmitted ByStatus Created At Remarks Actions
{{ $index + 1 }} {!! $complaint->message !!}{{ $complaint->user->name ?? '-' }} @php $statusClasses = [ 'Pending' => ['bg' => 'bg-red-lt', 'text' => 'text-red-lt-fg'], 'Under Review' => ['bg' => 'bg-orange-lt', 'text' => 'text-orange-lt-fg'], 'In Progress' => ['bg' => 'bg-yellow-lt', 'text' => 'text-yellow-lt-fg'], 'Completed' => ['bg' => 'bg-green-lt', 'text' => 'text-green-lt-fg'], 'Rejected' => ['bg' => 'bg-red-lt', 'text' => 'text-red-lt-fg'], ]; $bgClass = $statusClasses[$complaint->status]['bg'] ?? 'bg-secondary'; $textClass = $statusClasses[$complaint->status]['text'] ?? 'text-dark'; @endphp {{ $complaint->status }} {{ $complaint->created_at->format('d M Y ( h:i A )') }} {{ $complaint->remarks ?? '-' }} @if((auth()->user()->role === 'admin' && (auth()->user()->name === 'Najihah')) || ($complaint->user_id === auth()->id() && $complaint->status === 'Pending')) @else - @endif
No complaints submitted yet.
@if ($complaints->hasPages()) @endif
@endsection @section('script') @endsection