@extends('layouts.app') @section('page-title', 'Back to Office Report: ' . ($report->project_name ?? 'Report')) @section('page-heading', $report->project_name ?? 'Back to Office Report') @section('content')
@include('partials.messages')
Back to Office Report
{{ ucfirst($report->status) }}
PROJECT NAME

{{ $report->project_name ?? 'N/A' }}


REPORT FIELDS
Date: {{ $report->activity_date?->format('M d, Y') ?? 'N/A' }}
Activity: {{ $report->activity ?? 'N/A' }}
Venue: {{ $report->venue ?? 'N/A' }}

PARTICIPANTS
@foreach(['male' => 'Male', 'female' => 'Female', 'disability' => 'Disability', 'vmgs' => 'VMGs'] as $key => $cat) @for($i=0; $i<3; $i++) @endfor @endforeach
Category 18–35 Years 35–59 Years Above 60 Years Total
{{ $cat }}{{ $report->participants[$key][$i] ?? '' }}{{ $report->participants[$key]['total'] ?? '' }}

NARRATIVE SECTIONS
Introduction:

{!! nl2br(e($report->introduction)) !!}

Objective:

{!! nl2br(e($report->objective)) !!}


BUDGET / EXPENDITURE
@if(isset($report->budget['item']) && is_array($report->budget['item'])) @foreach($report->budget['item'] as $i => $item) @endforeach @endif
Item Planned Actual Variance Comment
{{ $item }} {{ $report->budget['planned'][$i] ?? '' }} {{ $report->budget['actual'][$i] ?? '' }} {{ $report->budget['variance'][$i] ?? '' }} {{ $report->budget['comment'][$i] ?? '' }}
Output:

{!! nl2br(e($report->output)) !!}

Key Highlights:

{!! nl2br(e($report->key_highlights)) !!}

Challenges & Risks:

{!! nl2br(e($report->challenges_and_risks)) !!}

Best Practices:

{!! nl2br(e($report->best_practices)) !!}

Lessons Learnt:

{!! nl2br(e($report->lessons_learnt)) !!}

Recommendations:

{!! nl2br(e($report->recommendations)) !!}

Way Forward:

{!! nl2br(e($report->way_forward)) !!}


@if($report->attachments->count())
Annexes ({{ $report->attachments->count() }})
@foreach($report->attachments as $attachment)
{{ $attachment->original_name }} @if($attachment->attachment_type) {{ ucfirst(str_replace('_', ' ', $attachment->attachment_type)) }} @endif
@endforeach
@endif
Report Info
Created By

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

Created At

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

County

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

@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
@csrf @method('DELETE')
@endif @if($report->status === 'submitted' && $report->can_approve)
@csrf
@endif @endif
@endsection