Skip to content

Commit

Permalink
[SCOUT] Add membership type to list and export for contacts
Browse files Browse the repository at this point in the history
  • Loading branch information
Gwildor committed May 21, 2024
1 parent 069f8c4 commit 9c3541d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/Controller/Admin/MemberCrud.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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++;
}
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 9c3541d

Please sign in to comment.