From d53857b7dc6432aa3f79585051359c43c4272a71 Mon Sep 17 00:00:00 2001 From: Wouter Bles Date: Thu, 19 Oct 2023 18:01:10 +0200 Subject: [PATCH] Revert agenda item fix temporarily --- app/Http/Controllers/Api/AgendaController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/AgendaController.php b/app/Http/Controllers/Api/AgendaController.php index 4c9d8a63..dafcd1e9 100644 --- a/app/Http/Controllers/Api/AgendaController.php +++ b/app/Http/Controllers/Api/AgendaController.php @@ -16,6 +16,7 @@ public function getAgenda(Request $request) { $agendaItemQuery = AgendaItem::with([ 'getApplicationForm', + 'getApplicationFormResponses', 'agendaItemCategory', ]); @@ -57,7 +58,6 @@ public function getAgenda(Request $request) ->map(function ($agendaItem) { $agendaApplicationFormService = new AgendaApplicationFormService(); $currentUserSignedUp = false; - $registeredUserIds = []; if ($agendaItem->application_form_id && $agendaItem->canRegister()) { $registeredUserIds = $agendaApplicationFormService->getRegisteredUserIds($agendaItem); @@ -76,7 +76,7 @@ public function getAgenda(Request $request) 'formId' => $agendaItem->getApplicationForm, 'canRegister' => $agendaItem->canRegister(), 'application_form_id' => $agendaItem->application_form_id, - 'amountOfPeopleRegisterd' => count($registeredUserIds), + 'amountOfPeopleRegisterd' => count($agendaItem->getApplicationFormResponses), 'currentUserSignedUp' => $currentUserSignedUp, ]; });