@php $meeting = $meeting ?? null; $logoUrl = $logoUrl ?? asset('assets/dist/img/gos22.png'); $letterhead = is_array($letterhead ?? null) ? $letterhead : []; $letterheadLines = is_array($letterhead['lines'] ?? null) ? $letterhead['lines'] : [ 'GOVERNMENT OF SINDH', 'PLANNING & DEVELOPMENT BOARD', 'PLANNING & DEVELOPMENT', 'DEPARTMENT', ]; $letterheadSection = (string) ($letterhead['section'] ?? '(Development Section)'); $noticeSubjectText = (string) ($noticeSubjectText ?? 'MINUTES OF MEETING'); $participantsNote = (string) ($participantsNote ?? '(List of participants is attached)'); $scheme = is_array($scheme ?? null) ? $scheme : []; $deliberationsHtml = (string) ($deliberationsHtml ?? ''); if ($deliberationsHtml === '' && is_array($deliberationParagraphs ?? null) && $deliberationParagraphs !== []) { // Backward-compatible fallback for older view callers. $deliberationsHtml = implode('', array_map( static fn ($p) => '

'.$p.'

', $deliberationParagraphs )); } $decisionItems = is_array($decisionItems ?? null) ? $decisionItems : []; $decisionsHtml = (string) ($decisionsHtml ?? ''); $participantsByDepartment = is_array($participantsByDepartment ?? null) ? $participantsByDepartment : []; $participantsListTitle = (string) ($participantsListTitle ?? 'LIST OF PARTICIPANTS'); $footer = is_array($footer ?? null) ? $footer : []; $footerMeta = (string) ($footer['meta_label'] ?? 'Minutes of Meeting'); $cosigners = is_array($footer['cosigners'] ?? null) ? $footer['cosigners'] : []; $adpYearLabel = (string) ($scheme['adp_year_label'] ?? '—'); $adpLines = is_array($scheme['adp_lines'] ?? null) ? $scheme['adp_lines'] : ['—']; $districtLines = is_array($scheme['district_lines'] ?? null) ? $scheme['district_lines'] : []; if ($districtLines === []) { $districtFallback = trim((string) ($scheme['district'] ?? '')); $districtLines = $districtFallback !== '' ? [$districtFallback] : ['—']; } @endphp {{-- Real MOM govt preview/print for meeting {{ $meeting->id ?? '' }}. --}} {{-- Fixed header markup (cloned onto every A4 page) --}} {{-- Fixed footer markup (cloned onto every A4 page) --}} {{-- Footer for participants list page(s): meta only, no co-signatory signatures --}} {{-- Body content source: flows into page bodies --}} @php $circulationLetterHtml = trim((string) ($circulationLetterHtml ?? '')); @endphp @if ($circulationLetterHtml !== '') @include('reports.publish-letter.partials.styles') @include('meeting-workspace.meetings.circulate-letter.partials.styles') @php $hasRoot = str_contains($circulationLetterHtml, 'mec-gov-letter-root'); $hasPage = str_contains($circulationLetterHtml, 'class="page"'); $logoW = (int) config('mec-report-publish-letters.logo_width_px', 75); $logoH = (int) config('mec-report-publish-letters.logo_height_px', 75); @endphp
@if ($hasRoot) {!! $circulationLetterHtml !!} @else
@if ($hasPage) {!! $circulationLetterHtml !!} @else
{!! $circulationLetterHtml !!}
@endif
@endif
@endif