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

Check dir role on da generation #1224

Merged
merged 3 commits into from
Nov 21, 2024
Merged

Check dir role on da generation #1224

merged 3 commits into from
Nov 21, 2024

Conversation

pskl
Copy link
Collaborator

@pskl pskl commented Nov 19, 2024

Screenshot 2024-11-20 at 13 24 49

  • check that current user is dir before re-issuing
  • add reissue checkbox
  • hide reissue form with accordion

@pskl pskl requested a review from tnicolas1 November 20, 2024 12:25
@pskl pskl merged commit 66fc1b3 into main Nov 21, 2024
5 checks passed
@pskl pskl deleted the hotfix/dir-da branch November 21, 2024 13:19
@@ -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)
Copy link
Collaborator

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
Copy link
Collaborator

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?
Copy link
Collaborator

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 ?

@tnicolas1 tnicolas1 linked an issue Nov 21, 2024 that may be closed by this pull request
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.

Empêcher un non directeur d'éditer les décisions d'attribution
2 participants