-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Différentes corrections de bug liées aux créneaux #579
Conversation
petitalb
commented
Nov 1, 2022
- Fix booker attribute in shift (and remove unnecessary code)
- Allow account with non beneficiaries to book period shift
- Allow to impersonate user without beneficiary
@@ -37,4 +37,19 @@ public function findNonMember() | |||
|
|||
return $qb->getQuery()->getResult(); | |||
} | |||
|
|||
public function findSuperAdminAccount() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
il ne peut y avoir qu'un seul SUPER_ADMIN ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non mais j'en ai besoin que d'un seul, je considère que le 1er compte SUPER_ADMIN c'est un compte robot. Après on pourrait mettre à null ? Mais je trouvais plus jolie de mettre que c'est babar qui a fait la réservation plutôt que null :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Et une fois en prod on arriverait à remplir l'historique ? 😉
@@ -56,6 +56,7 @@ protected function execute(InputInterface $input, OutputInterface $output) | |||
$em = $this->getContainer()->get('doctrine')->getManager(); | |||
$mailer = $this->getContainer()->get('mailer'); | |||
$periodRepository = $em->getRepository('AppBundle:Period'); | |||
$admin = $em->getRepository('AppBundle:User')->findSuperAdminAccount(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -77,7 +77,7 @@ class Shift | |||
private $shifter; | |||
|
|||
/** | |||
* @ORM\ManyToOne(targetEntity="Beneficiary", inversedBy="booked_shifts") | |||
* @ORM\ManyToOne(targetEntity="User") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
après discussion, la question se pose de la différence entre User et Beneficiary...