From b16c79c5cb65ac0ef04132a82d463c578d4cf753 Mon Sep 17 00:00:00 2001 From: Arnaud de Mouhy Date: Tue, 15 Oct 2024 22:40:49 +0200 Subject: [PATCH] fix: recurring licensee syncing --- src/Helper/FftaHelper.php | 3 ++- src/Scheduler/Message/SyncFftaLicensees.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Helper/FftaHelper.php b/src/Helper/FftaHelper.php index e50bfcc..c07f7b7 100644 --- a/src/Helper/FftaHelper.php +++ b/src/Helper/FftaHelper.php @@ -3,6 +3,7 @@ namespace App\Helper; use App\DBAL\Types\LicenseeAttachmentType; +use App\DBAL\Types\UserRoleType; use App\Entity\Club; use App\Entity\License; use App\Entity\Licensee; @@ -91,7 +92,7 @@ public function syncLicensees(Club $club, int $season): array } if (!empty($syncResults[SyncReturnValues::CREATED->value]) || !empty($syncResults[SyncReturnValues::UPDATED->value])) { - $managers = $this->userRepository->findByClubAndRole($club, 'ROLE_CLUB_MANAGER', $season); + $managers = $this->userRepository->findByClubAndRole($club, UserRoleType::CLUB_ADMIN, $season); $this->emailHelper->sendLicenseesSyncResults($managers, $syncResults); } diff --git a/src/Scheduler/Message/SyncFftaLicensees.php b/src/Scheduler/Message/SyncFftaLicensees.php index d77c76b..6c3a636 100644 --- a/src/Scheduler/Message/SyncFftaLicensees.php +++ b/src/Scheduler/Message/SyncFftaLicensees.php @@ -6,7 +6,7 @@ class SyncFftaLicensees { public function __construct( private readonly int $id, - private readonly int $clubCode, + private readonly string $clubCode, private readonly int $season ) { } @@ -16,7 +16,7 @@ public function getId(): int return $this->id; } - public function getClubCode(): int + public function getClubCode(): string { return $this->clubCode; }