-
Notifications
You must be signed in to change notification settings - Fork 4
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
Check dir role on da generation #1224
Conversation
pskl
commented
Nov 19, 2024
•
edited
Loading
edited
- check that current user is dir before re-issuing
- add reissue checkbox
- hide reissue form with accordion
@@ -29,13 +29,10 @@ def attributive_decisions_download_button | |||
) | |||
end | |||
|
|||
def attributive_decisions_reissue_button | |||
def attributive_decisions_reissue_generation_form | |||
return unless current_establishment.with_attributive_decisions?(selected_school_year) |
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.
Quel est l'intérêt de garder cette condition alors qu'on l'a déjà dans la '_attributive_decisions_panel.html.haml' ?
@@ -13,8 +13,8 @@ | |||
%p Les décisions d'attribution sont en train d'être éditées, veuillez rafraichir la page dans quelques minutes. Vous pouvez commencer à remplir des coordonnées bancaires ou des PFMPs pendant ce temps. | |||
- else |
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.
Ce n'est pas mieux d'avoir la condition "current_user.director?" en faisant un "elsif" plutôt que de dupliquer la condition ?
@@ -13,8 +13,8 @@ | |||
%p Les décisions d'attribution sont en train d'être éditées, veuillez rafraichir la page dans quelques minutes. Vous pouvez commencer à remplir des coordonnées bancaires ou des PFMPs pendant ce temps. | |||
- else | |||
.buttons-group | |||
- if current_establishment.missing_attributive_decisions?(selected_school_year) | |||
- if current_establishment.missing_attributive_decisions?(selected_school_year) && current_user.director? | |||
= attributive_decisions_generation_form | |||
= attributive_decisions_download_button | |||
- if current_establishment.with_attributive_decisions?(selected_school_year) && current_user.director? |
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.
Renommer 'with_attributive_decisions?' par 'some_attributive_decisions?' ne serait pas mieux ?