{{-- Status narrative: the period's status updates as a human-readable feed, grouped by project, newest first, colored by their green/yellow/red status. Expects: $updatesByProject: array - projectId => status updates (engine output) $summaries: array - project summaries keyed by id (for names) $showProjects: bool $emptyText: string --}} @php $showProjects = $showProjects ?? false; $narrativeColors = ['green' => 'var(--green)', 'yellow' => 'var(--yellow)', 'red' => 'var(--red)']; @endphp @if (count($updatesByProject) === 0)
{{ $emptyText }}
@else
@foreach ($updatesByProject as $projectId => $updates) @if ($showProjects && isset($summaries[$projectId])) {{ $tpl->escape($summaries[$projectId]->name) }} @endif @foreach ($updates as $update)
{{ $tpl->escape(trim(($update->authorFirstname ?? '').' '.($update->authorLastname ?? ''))) }} ยท {{ $update->dateParsed?->formatDateForUser() ?? '' }}
{!! $tpl->escapeMinimal($update->text) !!}
@endforeach @endforeach
@endif