@extends('layouts.app') @section('title', 'Meeting Workflow Audit — '.$audit['summary']['title']) @push('stylesheets') @endpush @section('contents')
@php $summary = $audit['summary'] ?? []; $position = $audit['current_position'] ?? []; $workflowSteps = $audit['workflow_steps'] ?? []; $schemes = $audit['schemes'] ?? []; $meetingReviews = $audit['meeting_reviews'] ?? []; @endphp

Meeting Workflow / Audit

{{ $summary['title'] ?? $meeting->title }}

@if (! empty($summary['reference_id']))

Ref: {{ $summary['reference_id'] }}

@endif

Meeting summary

Status
{{ $summary['status_label'] ?? '—' }}
Type
{{ $summary['meeting_type'] ?? '—' }}
Date
{{ $summary['meeting_date'] ?? '—' }}@if(!empty($summary['start_time'])) {{ $summary['start_time'] }}@endif
Organizer
{{ $summary['organizer_name'] ?? '—' }}
Participants
{{ (int) ($summary['participant_count'] ?? 0) }}

Current workflow position

{{ $position['label'] ?? 'In progress' }}

{{ $position['detail'] ?? '' }}

Workflow steps overview

@foreach ($workflowSteps as $step) @php $stepStatus = (string) ($step['status'] ?? 'pending'); @endphp
{{ $step['label'] ?? '' }} {{ ucfirst(str_replace('_', ' ', $stepStatus)) }}
{{ $step['detail'] ?? '' }}
@endforeach
@if ($schemes === [])
No linked schemes found for this meeting.
@endif @foreach ($schemes as $scheme) @php $mom = $scheme['mom'] ?? []; $chainRows = $mom['chain_rows'] ?? []; $forwardHistory = $mom['forward_history'] ?? []; $timeline = $mom['timeline'] ?? []; $returnRecords = $mom['return_records'] ?? []; $remarks = $mom['remarks'] ?? []; @endphp

{{ $scheme['scheme_title'] ?? 'Scheme' }}

@if (! empty($scheme['section_name']) || ! empty($scheme['department_name']))
@if (! empty($scheme['section_name']))
Section {{ $scheme['section_name'] }}
@endif @if (! empty($scheme['department_name']))
Department {{ $scheme['department_name'] }}
@endif
@endif
Minutes of Meeting
Generation status
@if (! empty($mom['is_generated'])) Generated @if (! empty($mom['generated_at'])) ({{ $mom['generated_at'] }}) @endif @else Not generated @endif
Co-signatory workflow
{{ $mom['workflow_status_label'] ?? '—' }}
Primary signatory
{{ $mom['primary_signer_name'] ?? '—' }}
Co-signatories assigned
{{ (int) ($mom['co_signatory_unique_count'] ?? 0) }} unique · {{ (int) ($mom['co_signatory_chain_steps'] ?? 0) }} chain step(s)
Currently has MoM
@if (! empty($mom['active_co_signatory_name'])) {{ $mom['active_co_signatory_name'] }} @if (! empty($mom['active_co_signatory_position'])) (position #{{ $mom['active_co_signatory_position'] }}) @endif @elseif (! empty($mom['signatures_complete'])) Chain complete @else @endif
@if (! empty($mom['gate_message']))
{{ $mom['gate_message'] }}
@endif
Open MoM @if (! empty($mom['preview_url'])) MoM Preview @endif
@if ($chainRows !== [])
Co-signatory status
    @foreach ($chainRows as $coRow) @php $coStatus = (string) ($coRow['status'] ?? ''); @endphp
  1. {{ $coRow['name'] ?? ('User #'.(int) ($coRow['user_id'] ?? 0)) }} @if ($coStatus === 'signed') Signed @elseif ($coStatus === 'awaiting') Awaiting action @elseif ($coStatus === 'returned') Returned @elseif ($coStatus === 'pending') Pending @else {{ $coRow['status_label'] ?? ucfirst($coStatus) }} @endif
  2. @endforeach
@endif @if ($forwardHistory !== [])
Forwarding history
@foreach ($forwardHistory as $fh) @endforeach
From To Action Position Date / time
{{ $fh['from_name'] ?? '—' }} {{ $fh['to_name'] ?? '—' }} {{ $fh['action_label'] ?? '—' }} @if(!empty($fh['sequence_index']))#{{ $fh['sequence_index'] }}@else—@endif {{ $fh['created_at'] ?? '—' }}
@endif @if ($returnRecords !== [])
Return remarks
@foreach ($returnRecords as $ret)
{{ $ret['name'] ?? 'Co-signatory' }}
{!! $ret['html'] ?? '' !!}
@endforeach @endif @if ($remarks !== [])
Approval / signing remarks
@foreach ($remarks as $rem)
{{ $rem['name'] ?? 'Co-signatory' }}
{!! $rem['html'] ?? '' !!}
@endforeach @endif @if ($timeline !== [])
MoM action timeline
    @foreach ($timeline as $timelineRow)
  • {{ $timelineRow['action'] ?? '' }} — {{ $timelineRow['user_name'] ?? '' }} @if (! empty($timelineRow['created_at'])) ({{ $timelineRow['created_at'] }}) @endif @if (! empty($timelineRow['details']))
    {{ $timelineRow['details'] }}
    @endif @if (! empty($timelineRow['remarks']))
    {!! $timelineRow['remarks'] !!}
    @endif
  • @endforeach
@endif @php $pcDecision = $scheme['pc_decision'] ?? []; @endphp @if (! empty($pcDecision['has_decision']) || ! empty($pcDecision['workflow_label']))
PC-I / PCN decision
@if (! empty($pcDecision['workflow_label']))
Workflow
{{ $pcDecision['workflow_label'] }}
@endif @if (! empty($pcDecision['state_label']))
State
{{ $pcDecision['state_label'] }}
@endif @if (! empty($pcDecision['decision_label']))
Decision
{{ $pcDecision['decision_label'] }}
@endif
@endif @php $schemeReviews = $scheme['pc_form_reviews'] ?? []; @endphp @if ($schemeReviews !== [])
Scheme review actions
    @foreach ($schemeReviews as $review)
  • {{ $review['action'] ?? '' }} — {{ $review['user_name'] ?? '' }} @if (! empty($review['created_at'])) ({{ $review['created_at'] }}) @endif @if (! empty($review['remarks']))
    {{ $review['remarks'] }}
    @endif
  • @endforeach
@endif
@endforeach @if ($meetingReviews !== [])

Meeting-level review & letter actions

    @foreach ($meetingReviews as $review)
  • {{ $review['action'] ?? '' }} — {{ $review['user_name'] ?? '' }} @if (! empty($review['scheme_ref'])) {{ $review['scheme_ref'] }} @endif @if (! empty($review['created_at'])) ({{ $review['created_at'] }}) @endif @if (! empty($review['remarks']))
    {{ $review['remarks'] }}
    @endif
  • @endforeach
@endif
@endsection