@extends('layouts.app') @section('content')
| # | Mosque | Message | Urgency | Category | Status | SLA Due | Assigned To | Created | Actions |
|---|---|---|---|---|---|---|---|---|---|
| {{ $loop->iteration }} | {{ $ticket->mosque->name }} |
{{ Str::limit($ticket->message, 50) }}
{{-- ✅ (optional) show raiser for admin --}}
@if($isAdmin && $ticket->raiser)
By: {{ $ticket->raiser->name }} @endif |
@php $urgencyColors = [ 'LOW' => 'success', 'NORMAL' => 'info', 'HIGH' => 'warning', 'URGENT' => 'danger' ]; @endphp {{ $urgencies[$ticket->urgency] ?? $ticket->urgency }} | @if($ticket->category) {{ $ticket->category }} @else N/A @endif | @php $statusColors = [ 'OPEN' => 'danger', 'ASSIGNED' => 'warning', 'IN_PROGRESS' => 'primary', 'RESOLVED' => 'info', 'CLOSED' => 'success' ]; @endphp {{-- ✅ make badge clickable only for admin --}} @if($isAdmin) {{ $statuses[$ticket->status] ?? $ticket->status }} @else {{ $statuses[$ticket->status] ?? $ticket->status }} @endif |
@if($ticket->sla_due)
{{ $ticket->sla_due->format('d M Y, h:i A') }}
@if($isOverdue)
Overdue @endif @else Not set @endif |
@if($ticket->assignee) {{ $ticket->assignee->name }} @else Unassigned @endif | {{ $ticket->created_at->format('d M Y') }} |