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

Semaine type : nouvelle entité PeriodPositionFreeLog pour stocker l'historique des créneaux fixes #840

Merged
merged 7 commits into from
May 14, 2023

Conversation

raphodn
Copy link
Member

@raphodn raphodn commented May 3, 2023

Quoi ?

Calquer le fonctionnement de ShiftFreeLog, mais ici pour les postes types des créneaux fixes.

  • nouvelle entité PeriodPositionFreeLog
  • envoyer un event PeriodPositionFreedEvent lorsque un poste type est libéré
  • nouveau controlleur PeriodPositionFreeLogController qui affiche la liste de tous les postes types libérés (ordonné par plus récent + filtre basique)

Reste à faire (autre PR) :

  • besoin de gérer les épiceries qui n'utilisent pas use_fly_and_fixed ?
  • commande pour initialiser avec l'historique des créneaux passés ? (on a l'info si fixe ou pas par exemple)
    • quid de la qualité/fiabilité de ces données ?
    • quid des créneaux types qui ont peut-être changés entre temps...

Pourquoi ?

Pour garder un historique des postes types

  • permettre au membre de savoir ce qu'il avait précédemment
  • permettre de revenir en arrière en cas de fausse manip

Captures d'écran

Image
Admin Screenshot from 2023-05-04 14-38-46
Liste des postes types annulés Screenshot from 2023-05-04 14-38-35

@raphodn raphodn marked this pull request as ready for review May 4, 2023 12:43
@raphodn raphodn requested review from petitalb and symartin May 4, 2023 12:43
@raphodn raphodn self-assigned this May 4, 2023
* @ORM\ManyToOne(targetEntity="PeriodPosition", cascade={"remove"})
* @ORM\JoinColumn(referencedColumnName="id", onDelete="CASCADE")
*/
private $periodPosition;
Copy link
Member Author

Choose a reason for hiding this comment

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

je me pose la question si c'est une bonne idée de faire une relation ici, vs stocker un string. si la periodPosition change (par exemple on change l'horaire du créneau, ou pire on la supprime), alors on perd l'info...

Copy link
Member Author

Choose a reason for hiding this comment

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

j'ai opté pour rajouter un champ supplémentaire "periodPositionString" : 2942501

@raphodn raphodn changed the title Nouvelle entité PeriodPositionFreeLog pour stocker l'historique des créneaux fixes Semaine type : nouvelle entité PeriodPositionFreeLog pour stocker l'historique des créneaux fixes May 5, 2023
@raphodn raphodn force-pushed the raphodn/period-position-free-log-entity branch from 2942501 to 9e5f612 Compare May 6, 2023 16:57
@raphodn raphodn force-pushed the raphodn/period-position-free-log-entity branch from 9e5f612 to e344e0e Compare May 14, 2023 17:08
@raphodn raphodn force-pushed the raphodn/period-position-free-log-entity branch from 53ca356 to 63b06cf Compare May 14, 2023 17:32
@raphodn raphodn merged commit 9bba6bd into master May 14, 2023
@raphodn raphodn deleted the raphodn/period-position-free-log-entity branch May 14, 2023 17:33
raphodn added a commit that referenced this pull request May 15, 2023
@raphodn raphodn linked an issue Oct 18, 2023 that may be closed by this pull request
2 tasks
OursDesCavernes pushed a commit to Les400Coop/gestion-compte that referenced this pull request Jan 20, 2024
…istorique des créneaux fixes (elefan-grenoble#840)

* New entity PeriodPositionFreeLog

* PeriodPositionFreeForm

* Dispatch PeriodPositionFreedEvent

* Add PeriodPositionFreeLogController with listAction

* Add PeriodPositionFreeLog.bookedTime field

* Add PeriodPositionFreeLog.periodPositionString field

* Fixes
OursDesCavernes pushed a commit to Les400Coop/gestion-compte that referenced this pull request Jan 20, 2024
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.

Semaine type : garder une trâce des créneaux fixes passés d'un membre
2 participants