From 9c3541d8d0ecc34dbf2aedc58934c4e3b8b58dce Mon Sep 17 00:00:00 2001 From: Gwildor Sok Date: Tue, 21 May 2024 16:07:26 +0200 Subject: [PATCH] [SCOUT] Add membership type to list and export for contacts --- src/Controller/Admin/MemberCrud.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Controller/Admin/MemberCrud.php b/src/Controller/Admin/MemberCrud.php index 36a8ca8..0fa0a7a 100644 --- a/src/Controller/Admin/MemberCrud.php +++ b/src/Controller/Admin/MemberCrud.php @@ -93,6 +93,7 @@ public function export(AdminContext $adminContext): BinaryFileResponse $sheet->setCellValue('Q1', 'Mollie CID'); $sheet->setCellValue('R1', 'Mollie SID'); $sheet->setCellValue('S1', 'Privacybeleid geaccepteerd'); + $sheet->setCellValue('T1', 'Lidmaatschapstype'); $contributionPeriodNames = [ Member::PERIOD_MONTHLY => 'Maandelijks', @@ -146,6 +147,7 @@ public function export(AdminContext $adminContext): BinaryFileResponse $sheet->setCellValue('Q'. $i, $member->getMollieCustomerId()); $sheet->setCellValue('R'. $i, $member->getMollieSubscriptionId()); $sheet->setCellValue('S'. $i, $member->getAcceptUsePersonalInformation() ? 'Ja' : 'Nee'); + $sheet->setCellValue('T'. $i, $member->getCurrentMembershipStatus() ? $member->getCurrentMembershipStatus()->getName() : ''); $i++; } @@ -191,14 +193,10 @@ public function configureFields(string $pageName): iterable ->setFormat(DateTimeField::FORMAT_SHORT) ->hideOnIndex(), TextField::new('comments', 'Extra informatie'), + AssociationField::new('currentMembershipStatus', 'Lidmaatschapstype'), + AssociationField::new('division', 'Afdeling') ); - if ($isAdmin) { - $fields[] = AssociationField::new('currentMembershipStatus', 'Lidmaatschapstype'); - } - - $fields[] = AssociationField::new('division', 'Afdeling'); - if ($isAdmin) { $fields[] = BooleanField::new('isAdmin', 'Toegang tot administratie') ->hideOnIndex();