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

Exemptions : filtre basique sur la liste des membres exemptés #726

Merged
merged 5 commits into from
Jan 31, 2023

Conversation

raphodn
Copy link
Member

@raphodn raphodn commented Jan 30, 2023

Quoi ?

Modèle MembershipShiftExemption :

  • template : nouveau filtre en haut : par motif
  • template : renommer "raison" en "motif"
  • modèle : ajout du inversedBy

Modèle ShiftExemption :

  • template : nouvelle colonne "Nombre d'exemptions"
  • modèle : ajout du OneToMany (inverse du ManyToOne du modèle MembershipShiftExemption)
  • modèle : ajout de createdAt

Capture d'écran

Page Image
MembershipShiftExemption Screenshot from 2023-01-30 13-32-18
ShiftExemption Screenshot from 2023-01-31 17-39-13

@raphodn raphodn linked an issue Jan 30, 2023 that may be closed by this pull request
7 tasks
@raphodn raphodn self-assigned this Jan 30, 2023

if ($res['form']->isSubmitted() && $res['form']->isValid()) {
$res["shiftExemption"] = $res["form"]->get("shiftExemption")->getData();
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Faire un $res["filter"]["shiftExemption"]

* @Security("has_role('ROLE_USER_MANAGER')")
*/
public function indexAction(Request $request)
{
$em = $this->getDoctrine()->getManager();
$filter = $this->filterFormFactory($request);
$findByFilter = array();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
$findByFilter = array();
$findByFilter = $filter['filter'];

cf mon autre commentaire

Copy link
Member Author

@raphodn raphodn Jan 31, 2023

Choose a reason for hiding this comment

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

ca ne marche pas 🤔
je vais laisser tel quel, je me suis inspiré des filter form existants sur JobController & PeriodController, tu peux proposer une PR qui refactore tous ces filtres ?
et plus généralement, je ne suis pas fan du code nécessaire pour ces filterForm (on devrait utiliser la méthode GET + j'ai l'impression que c'est très verbeux avec ces if partout...)


if($filter["shiftExemption"]) {
$findByFilter["shiftExemption"] = $filter["shiftExemption"];
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

A supprimer si le filtre est déjà fait au dessus.

cf. Mes autre commentaires

@raphodn raphodn force-pushed the raphodn/membership-shift-exemption-filters branch from ce274be to 18c2fda Compare January 31, 2023 16:27
@raphodn raphodn merged commit ec29705 into master Jan 31, 2023
@raphodn raphodn deleted the raphodn/membership-shift-exemption-filters branch January 31, 2023 16:40
quot17 pushed a commit to quot17/gestion-compte that referenced this pull request Mar 28, 2023
…-grenoble#726)

* Cleanup a bit the template

* Add ShiftExemption.created_at. Add mapping for ManyToOne

* Simple filter form
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.

Mettre en place les exemptions / congés (parentaux et autres)
2 participants