@extends('layouts.app') @section('page-pretitle', __('Support')) @section('page-title', __('Complaint Form')) @section('content')
| # | Message | @if(auth()->user()->role === 'admin' && auth()->user()->name === 'Najihah')Submitted By | @endifStatus | Created At | Remarks | Actions |
|---|---|---|---|---|---|---|
| {{ $index + 1 }} | {!! $complaint->message !!} | @if(auth()->user()->role === 'admin' && auth()->user()->name === 'Najihah'){{ $complaint->user->name ?? '-' }} | @endif@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'))
|
| No complaints submitted yet. | ||||||