From 354a03bb2643cb6c09c7e1b061e5c19134660e53 Mon Sep 17 00:00:00 2001 From: bernardhanna Date: Mon, 8 Jun 2026 14:12:24 +0100 Subject: [PATCH] Show grassroots grants status labels for unlaunched hubs. Display "Status: Call not launched" (or cancelled) in hub accordions and fall back to overview text when status messages are empty. Co-authored-by: Cursor --- app/GrassrootsGrantsHub.php | 25 +++++++++++ ..._fix_grassroots_grants_status_messages.php | 45 +++++++++++++++++++ .../seeders/data/grassroots_grants_round1.php | 8 ++-- .../views/static/grassroots-grants.blade.php | 16 +++++-- 4 files changed, 87 insertions(+), 7 deletions(-) create mode 100644 database/migrations/2026_06_08_120000_fix_grassroots_grants_status_messages.php diff --git a/app/GrassrootsGrantsHub.php b/app/GrassrootsGrantsHub.php index a8bbfd3ff..52dc0e80b 100644 --- a/app/GrassrootsGrantsHub.php +++ b/app/GrassrootsGrantsHub.php @@ -65,4 +65,29 @@ public function isStatusOnly(): bool { return in_array($this->hub_status, ['not_launched', 'cancelled'], true); } + + public function statusLabel(): ?string + { + return match ($this->hub_status) { + 'not_launched' => 'Call not launched', + 'cancelled' => 'Cancelled due to low number of applications', + default => null, + }; + } + + public function statusBodyHtml(): string + { + $message = trim(strip_tags((string) ($this->status_message ?? ''), '