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

Membre (coté Admin) : petits refactoring (template pour status_icon, cacher beneficiary_count si pas pertinent) #1053

Merged
merged 3 commits into from
Oct 26, 2023

Conversation

raphodn
Copy link
Member

@raphodn raphodn commented Oct 26, 2023

Modifications apportées :

  • Nouveau template _partial/status_icons.html.twig pour factoriser le code (apparaissait à 3 endroits)
  • Recherche : afficher le filtre beneficiary_count seulement si le paramètre maximum_nb_of_beneficiaries_in_membership est supérieur à 1

@raphodn raphodn force-pushed the raphodn/member-status-icons-template branch from d643a7b to 78b714d Compare October 26, 2023 14:24
@raphodn raphodn self-assigned this Oct 26, 2023
@raphodn raphodn merged commit dc7f8bd into master Oct 26, 2023
1 check passed
@raphodn raphodn deleted the raphodn/member-status-icons-template branch October 26, 2023 14:27

public function __construct(ContainerInterface $container, $use_fly_and_fixed)
public function __construct(ContainerInterface $container)
Copy link
Member Author

Choose a reason for hiding this comment

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

@samueleyre est-ce que c'est une bonne pratique de récupérer les paramètres via le container plutôt que via le services.yml + construct ? Ca clean le code en tout cas je trouve !

Copy link
Collaborator

Choose a reason for hiding this comment

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

De ce que j'ai lu sur le sujet, ce n'est pas trop recommandé pour cette version de symfony, mais je trouve aussi que c'est plus clair.

En symfony 4.1, on peut utiliser le "ParameterBagInterface" pour avoir accès aux paramètres donc je pense que c'est pas une mauvaise chose de ne pas avoir à spécifier tous les paramètres utiles dans service.yml.

OursDesCavernes pushed a commit to Les400Coop/gestion-compte that referenced this pull request Jan 20, 2024
…cacher beneficiary_count si pas pertinent) (elefan-grenoble#1053)

* Member: move status icons to own template

* Member search: hide beneficiary_count if maximum_nb_of_beneficiaries_in_membership=1

* simplify BeneficiaryCanHostValidator
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