@extends('layouts.app') @section('page-title', 'General Report: ' . $report->title) @section('page-heading', $report->title) @section('content')
@include('partials.messages')
{{ $report->title }}

County: {{ $report->county->name ?? 'N/A' }}

{{ ucfirst($report->status) }}

Category: {{ ucfirst($report->category) }}

Subcategory: {{ $report->subcategory ? ucfirst(str_replace(['_', '-'], ' ', $report->subcategory)) : 'N/A' }}

@if($report->content)
Content
{!! $report->content !!}
@endif @if($report->summary)
Summary

{{ $report->summary }}

@endif @if($report->recommendations)
Recommendations

{{ $report->recommendations }}

@endif
@if($report->attachments->count())
Attachments ({{ $report->attachments->count() }})
@foreach($report->attachments as $attachment)
{{ $attachment->original_name }} {{ number_format($attachment->file_size / 1048576, 2) }} MB
@endforeach
@endif
Report Details
Created By

{{ $report->creator->name }}

Created At

{{ $report->created_at->format('M d, Y H:i') }}

@if(in_array($report->status, ['approved', 'rejected']))
{{ $report->status === 'approved' ? 'Approved' : 'Rejected' }} By

{{ $report->approver->name ?? 'N/A' }}

{{ $report->status === 'approved' ? 'Approved' : 'Rejected' }} At

{{ $report->approved_at?->format('M d, Y H:i') ?? 'N/A' }}

@if($report->approval_comments)
Decision Comments

{{ $report->approval_comments }}

@endif @endif
@if($report->status !== 'approved') @if($report->created_by === auth()->id() || auth()->user()->hasRole(['Admin', 'Manager'])) Edit Report
@csrf @method('DELETE')
@endif @if($report->status === 'submitted' && $report->can_approve)
@csrf
@endif @endif
@endsection