@extends('layouts.app') @section('title', 'Issue ' . $issue->serial_no) @section('content')

Issue {{ $issue->serial_no }}

Logged on {{ $issue->issue_date->format('d M Y') }} for {{ $issue->school?->name }}

@if(auth()->user() && (auth()->user()->hasRole('Super Admin') || auth()->user()->hasRole('Administrator') || auth()->user()->hasPermission('issues.update'))) Edit Issue @endif Back to List
@include('partials.alerts')
Issue Summary
@php $statusBadges = [ \App\Models\Issue::STATUS_NOT_STARTED => ['class' => 'warning', 'label' => 'Not Started'], \App\Models\Issue::STATUS_ASSIGNED => ['class' => 'info', 'label' => 'Assigned'], \App\Models\Issue::STATUS_IN_PROGRESS => ['class' => 'primary', 'label' => 'In Progress'], \App\Models\Issue::STATUS_COMPLETED => ['class' => 'success', 'label' => 'Completed'], ]; $statusInfo = $statusBadges[$issue->status] ?? ['class' => 'secondary', 'label' => ucfirst(str_replace('_', ' ', $issue->status))]; @endphp {{ $statusInfo['label'] }} {{ $issue->issueType?->name }}
Issue Description

{{ $issue->description }}

@if($issue->assignment_history && count($issue->assignment_history) > 0)
Assignment History
@foreach(array_reverse($issue->assignment_history) as $record)
{{ \Carbon\Carbon::parse($record['assigned_at'])->format('d M Y, H:i') }} Assigned by: {{ $record['assigned_by'] }}
From: {{ $record['old_assignee_name'] }} @if($record['old_department_name'] !== 'Unassigned') ({{ $record['old_department_name'] }}) @endif To: {{ $record['new_assignee_name'] }} ({{ $record['new_department_name'] }})
@if(!empty($record['remarks']))
Remarks:

{{ $record['remarks'] }}

@endif
@endforeach
@endif @if($issue->internal_notes)
Internal Notes:

{{ $issue->internal_notes }}

@endif
Approached By
{{ $issue->approached_by ?? '—' }}
School
{{ $issue->school?->name }}
Department
{{ $issue->department?->name }}
Issue Responder
{{ $issue->responder?->name ?? 'Pending assignment' }}
Assigned To
{{ $issue->assignee?->name ?? 'Pending assignment' }}
Timeline & SLA
Expected Start
{{ optional($issue->expected_start_date)->format('d M Y H:i') ?? 'Not defined' }}
Min SLA: {{ $issue->issueType?->min_resolution_hours }} hours
Expected Due
{{ optional($issue->expected_due_date)->format('d M Y H:i') ?? 'Not defined' }}
Max SLA: {{ $issue->issueType?->max_resolution_hours }} hours
Completed At
{{ optional($issue->completed_at)->format('d M Y H:i') ?? 'Not completed' }}
@if($performance['within_sla'] !== null) {{ $performance['within_sla'] ? 'Completed within SLA' : 'Completed after SLA' }} @endif
Assignment Notified
{{ optional($issue->assignment_notified_at)->format('d M Y H:i') ?? 'Not sent' }}
Notification sent to department and assignees
School Profile

{{ $issue->school?->name }}

{{ $issue->school?->contact_number ?? 'Contact unavailable' }}

  • City: {{ $issue->school?->city ?? '—' }}
  • State: {{ $issue->school?->state ?? '—' }}
  • Email: {{ $issue->school?->contact_email ?? '—' }}
Responder Profiling
Assigned Analyst

{{ $issue->assignee?->name ?? 'Not assigned' }}

Completed issues: {{ $performance['assignee_completed'] }}
Issue Responder

{{ $issue->responder?->name ?? 'Not selected' }}

Completed issues: {{ $performance['responder_completed'] }}
@endsection