when only one role available, autoselect it and continue to dashboard rightaway.#327
when only one role available, autoselect it and continue to dashboard rightaway.#327
Conversation
| private ParticipantRepository $participantRepository, | ||
| private TroopParticipantRepository $troopParticipantRepository, | ||
| private PaymentService $paymentService, | ||
| private UserService $userService, | ||
| private FlashMessagesBySession $flashMessages, | ||
| private TranslatorInterface $translator, | ||
| private Mailer $mailer, | ||
| private SaveFileHandler $saveFileHandler, | ||
| private UploadFileHandler $uploadFileHandler, | ||
| ) { | ||
| private PaymentService $paymentService, | ||
| private UserService $userService, | ||
| private FlashMessagesBySession $flashMessages, | ||
| private TranslatorInterface $translator, | ||
| private Mailer $mailer, | ||
| private SaveFileHandler $saveFileHandler, | ||
| private UploadFileHandler $uploadFileHandler, | ||
| ) | ||
| { |
There was a problem hiding this comment.
zbytečně přidaný whitespace, není potřeba
|
|
||
| if ($event->eventType->enforceActiveSkautisMembership() | ||
| && $participant->getUserButNotNull()->loginType === UserLoginType::Skautis | ||
| && !(bool)$participant->getUserButNotNull()->skautisHasMembership) { |
There was a problem hiding this comment.
komplikované přetypování, stačilo by porovnat s true třeba
| && !(bool)$participant->getUserButNotNull()->skautisHasMembership) { | |
| && $participant->getUserButNotNull()->skautisHasMembership !== true) { |
| ): AbstractContentArbiter | ||
| { |
There was a problem hiding this comment.
zbytečně přidaný whitespace, není potřeba
| if ( | ||
| $user->loginType === UserLoginType::Skautis && | ||
| !$this->skautisService->isUserLoggedIn() |
There was a problem hiding this comment.
Je tu bummer s tím, že se to nemusí použít jen na Korbo a je potřeba, aby to fungovalo i s eventy, kde je na přihlášení použitý email místo skautisu. Ale vlastně by to mělo jít celé smazat a mělo by to fungovat i s tím myslím
| $user->loginType === UserLoginType::Skautis && | ||
| !$this->skautisService->isUserLoggedIn() | ||
| ) { | ||
| $this->flashMessages->error('flash.error.skautisUserNotLoggedIn'); | ||
| return $this->redirect($request, $response, 'landing'); |
There was a problem hiding this comment.
Potřeba zachovat přepoužitelnost i pro eventy, kde se přihlašuješ mailem. Smazal bych a bude fungovat OK myslím
|
|
||
| if ($user->loginType === UserLoginType::Skautis) { | ||
| $this->skautisService->prefillDataFromSkautis($participant); | ||
| } |
There was a problem hiding this comment.
Toto mega dává smysl. Nejradši bych sem přesunul logiku i z UserController, aby to mohlo být jen jednou
c85d9fb to
f64c6a6
Compare
f64c6a6 to
e03037e
Compare
4d948a5 to
6c3709c
Compare
b6c3333 to
3c8df25
Compare
No description provided.