-
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
Exemptions : filtre basique sur la liste des membres exemptés #726
Conversation
|
||
if ($res['form']->isSubmitted() && $res['form']->isValid()) { | ||
$res["shiftExemption"] = $res["form"]->get("shiftExemption")->getData(); | ||
} |
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.
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(); |
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.
$findByFilter = array(); | |
$findByFilter = $filter['filter']; |
cf mon autre commentaire
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.
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"]; | ||
} |
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.
A supprimer si le filtre est déjà fait au dessus.
cf. Mes autre commentaires
ce274be
to
18c2fda
Compare
…-grenoble#726) * Cleanup a bit the template * Add ShiftExemption.created_at. Add mapping for ManyToOne * Simple filter form
Quoi ?
Modèle
MembershipShiftExemption
:inversedBy
Modèle
ShiftExemption
:OneToMany
(inverse duManyToOne
du modèle MembershipShiftExemption)createdAt
Capture d'écran