From 9eeee50521b28b4f3e5164c9072eda559d634c6d Mon Sep 17 00:00:00 2001 From: Ashar Fuadi Date: Sat, 3 Aug 2024 10:38:30 +0700 Subject: [PATCH] Append chair info to person stats --- app/Controllers/Statistics.php | 2 +- app/Helpers/committee_helper.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Controllers/Statistics.php b/app/Controllers/Statistics.php index 1edc412..a8a7f07 100644 --- a/app/Controllers/Statistics.php +++ b/app/Controllers/Statistics.php @@ -514,7 +514,7 @@ private function getCommitteeStatistics($committee) { foreach ($committee as $c) { $row = array( linkCompetitionInfo($c['Competition'], $c['CompetitionName']), - getCommitteeTitle($c['Role']), + getCommitteeTitle($c['Role'], $c['Chair'] == 'Y'), ); $table->addRow($row); $rowCount++; diff --git a/app/Helpers/committee_helper.php b/app/Helpers/committee_helper.php index 5839c52..729e573 100644 --- a/app/Helpers/committee_helper.php +++ b/app/Helpers/committee_helper.php @@ -13,8 +13,8 @@ function getCommitteeTitles() { return COMMITTEE_TITLES; } -function getCommitteeTitle($role) { - return COMMITTEE_TITLES[$role]; +function getCommitteeTitle($role, $isChair) { + return COMMITTEE_TITLES[$role] . ($isChair ? ' (Ketua)' : ''); } function getCommitteeRoles() {