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

Exemption : filtre dans la liste des membres #709

Merged
merged 4 commits into from
Jan 19, 2023

Conversation

raphodn
Copy link
Member

@raphodn raphodn commented Jan 18, 2023

Quoi ?

Dans la page admin "Liste des membres", pouvoir filtrer par membre exempté

(comment filtrer sur les membres qui ne sont pas exemptés ? plus compliqué, à faire dans une future PR)

Capture d'écran

Screenshot from 2023-01-18 01-34-21

@raphodn raphodn requested a review from petitalb January 18, 2023 00:36
@raphodn raphodn self-assigned this Jan 18, 2023
@raphodn raphodn linked an issue Jan 18, 2023 that may be closed by this pull request
7 tasks
'required' => false,
'choices' => [
'exempté' => "exempted",
// 'Non exempté' => "not_exempted",
Copy link
Collaborator

Choose a reason for hiding this comment

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

C'est normal que ça soit commenté ? Pour les autres filtre équivalent, il y a toujours la version positive et négative. C'est peut-être mieux d'uniformiser ?

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 essayé de l'implémenter sans succès (cf description dans la PR)

Copy link
Member Author

Choose a reason for hiding this comment

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

Car "non exempté" = "0 exemption" OU "X exemptions dont aucune isCurrent"

Copy link
Collaborator

@petitalb petitalb Jan 18, 2023

Choose a reason for hiding this comment

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

Car "non exempté" = "0 exemption" OU "X exemptions dont aucune isCurrent"

Pour moi c'est la 2ème, aucune exemption valide actuellement

Copy link
Member Author

@raphodn raphodn Jan 18, 2023

Choose a reason for hiding this comment

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

Pour moi c'est les 2 ^^ (le OU/OR est à retranscrire en SQL)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Je viens de faire une proposition de modification dans le dernier commit. Je te laisse regarder.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok niquel merci ! c'était plus simple que j'imaginais ^^
(j'ai rajouté un mini commit pour cleanup)

@@ -376,6 +386,10 @@ public function processSearchFormData($form,&$qb) {
$qb = $qb->andWhere('o.frozen = :frozen')
->setParameter('frozen', $form->get('frozen')->getData()-1);
}
if ($form->get('exempted')->getData() == "exempted") {
Copy link
Collaborator

Choose a reason for hiding this comment

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

pourquoi ne pas utiliser un boolean comme les autres filtres ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Les autres filtres utilisent des booléen car ce sont des champs booléen.
Et plus généralement je trouve bizarre de mettre comme choices des 1 et des 2 puis faire -1 par magie...
D'ailleurs si on passe un jour cette page de filtre avec la méthode GET, les paramètres s'afficheront dans l'URL, je préfère du texte explicite que des numéros ^^

Copy link
Collaborator

Choose a reason for hiding this comment

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

Je viens de faire une proposition de modification dans le dernier commit. Je te laisse regarder.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok why not, mais ca ne me parait toujours pas logique de manipuler des 2 et des 1 🤷

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yep je suis d'accord avec ta remarque, faudrait changer partout. La au moins c'est homogène :)

@raphodn raphodn merged commit da3e96c into master Jan 19, 2023
@raphodn raphodn deleted the raphodn/exemption-member-filter branch January 19, 2023 14:01
quot17 pushed a commit to quot17/gestion-compte that referenced this pull request Mar 28, 2023
* Exemption: add filter in Member list

* Implement not exempted filter

Co-authored-by: Albin PETIT <albin.petit@gmail.com>
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