Skip to content

Commit

Permalink
Merge pull request #192 from roodjong/scout-fix-member-crud-for-conta…
Browse files Browse the repository at this point in the history
…ct-persons

[SCOUT] Fix members page for contact people being broken
  • Loading branch information
Gwildor authored May 21, 2024
2 parents 8731a40 + 9c3541d commit a47bab0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 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
2 changes: 1 addition & 1 deletion src/Entity/Member.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class Member implements UserInterface {
private ?Division $division = null;

/**
* @ORM\ManyToMany(targetEntity="Division", inversedBy="contacts")
* @ORM\ManyToMany(targetEntity="Division", mappedBy="contacts")
*/
private Collection $managed_divisions;

Expand Down

0 comments on commit a47bab0

Please sign in to comment.