Skip to content

Commit

Permalink
Merge pull request #357 from esac-ic/fix-registrations-count
Browse files Browse the repository at this point in the history
Revert agenda item fix temporarily
  • Loading branch information
wouterbles authored Oct 19, 2023
2 parents 8da73b9 + d53857b commit ba7dd79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/Api/AgendaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public function getAgenda(Request $request)
{
$agendaItemQuery = AgendaItem::with([
'getApplicationForm',
'getApplicationFormResponses',
'agendaItemCategory',
]);

Expand Down Expand Up @@ -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);
Expand All @@ -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,
];
});
Expand Down

0 comments on commit ba7dd79

Please sign in to comment.