diff --git a/app/Exports/AgendaRegistrationExport.php b/app/Exports/AgendaRegistrationExport.php index 767d8e1d..08e4bcd9 100644 --- a/app/Exports/AgendaRegistrationExport.php +++ b/app/Exports/AgendaRegistrationExport.php @@ -18,12 +18,12 @@ class AgendaRegistrationExport implements FromCollection, WithTitle, WithHeading /** * @var AgendaApplicationFormService */ - private $agendaApplicationFormService; + private AgendaApplicationFormService $agendaApplicationFormService; /** * @var AgendaItem */ - private $agendaItem; + private AgendaItem $agendaItem; /** * AgendaRegistrationExport constructor. @@ -64,8 +64,10 @@ public function headings(): array 'Street', 'House number', 'City', + 'Zip code', 'Email address', 'Phone number', + 'Date of birth', ]; $formQuestions = []; diff --git a/app/Services/AgendaApplicationFormService.php b/app/Services/AgendaApplicationFormService.php index 2a1f97c7..04113b56 100644 --- a/app/Services/AgendaApplicationFormService.php +++ b/app/Services/AgendaApplicationFormService.php @@ -131,8 +131,10 @@ public function getExportData(AgendaItem $agendaItem): Collection "street", "houseNumber", "city", + "zipcode", "email", "phonenumber", + "birthDay", ); $selectedElements = array_merge($selectedElements, $users["customfields"]); @@ -142,6 +144,10 @@ public function getExportData(AgendaItem $agendaItem): Collection foreach ($selectedElements as $element) { $userline[$element] = $user[$element]; } + + //format birthday to not include the time of day + $userline["birthDay"] = substr($userline["birthDay"], 0, 10); + array_push($activeUsers, $userline); }