Skip to content
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

Merged
merged 3 commits into from
Nov 2, 2022

Conversation

petitalb
Copy link
Collaborator

@petitalb 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()
Copy link
Member

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 ?

Copy link
Collaborator Author

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 :)

Copy link
Member

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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@petitalb petitalb merged commit 75b5635 into master Nov 2, 2022
@petitalb petitalb deleted the feature/fix-logging-user branch November 2, 2022 20:20
@@ -77,7 +77,7 @@ class Shift
private $shifter;

/**
* @ORM\ManyToOne(targetEntity="Beneficiary", inversedBy="booked_shifts")
* @ORM\ManyToOne(targetEntity="User")
Copy link
Member

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants