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

PFMP Validation constraints + Rebalancing of amounts according to Wage cap #625

Merged
merged 48 commits into from
Apr 5, 2024

Conversation

pskl
Copy link
Collaborator

@pskl pskl commented Mar 26, 2024

Checklist:

  • Prevent PFMP transition to validated unless all previous pfmps are validated
  • Hide Deactivate validate button on a Pfmp#show that cannot be validated
  • Rajouter un petit label pour certifier que la feature est désactivée (Hover sur le bouton)
  • Hide classes or pfmps that cannot be validated on "Paiements" page
  • Modifying one PFMP should update the amount of subsequent pfmps: updating the amount on one pfmp triggers chain updates on follow ups
  • rajouter une checkbox "je certifie que je suis un chef d'établissement" sur la show: check_confirmed_director

Closes #566

@pskl pskl changed the title PFMP Validation constraints WIP: PFMP Validation constraints Mar 27, 2024
@pskl pskl force-pushed the feat/pfpmp-validation-constraint branch from e0806c9 to adfe20d Compare March 27, 2024 14:55
@pskl pskl force-pushed the feat/pfpmp-validation-constraint branch from 30cf3de to 2a1fb65 Compare March 28, 2024 15:51
@pskl pskl force-pushed the feat/pfpmp-validation-constraint branch from 2a1fb65 to 886a3a4 Compare March 28, 2024 15:54
@pskl pskl force-pushed the feat/pfpmp-validation-constraint branch from d5081da to c176673 Compare March 28, 2024 16:14
@JeSuisUnCaillou
Copy link
Collaborator

JeSuisUnCaillou commented Mar 29, 2024

Hide pfmps that can't be validated from the list of student pfmps on student #show

Bizarre qu'on ait noté ça. C'était pas plutôt "Hide Pfmps that can't be validated from the validations show page" ?

En tout cas y'a un truc à faire avec la page validations#show, pour qu'on évite d'y valider des pfmps qui ont des "précédentes" non validées.
Par contre si y'en a genre 3 d'un coup à valider pour un élève, on peut les valider en cascade là.

@pskl pskl requested a review from freesteph April 2, 2024 11:55
app/models/concerns/pfmp_amount_calculator.rb Show resolved Hide resolved
README.md Show resolved Hide resolved
app/models/pfmp.rb Show resolved Hide resolved
app/controllers/validations_controller.rb Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
app/models/concerns/pfmp_amount_calculator.rb Show resolved Hide resolved
app/models/pfmp_state_machine.rb Outdated Show resolved Hide resolved
@pskl pskl requested a review from freesteph April 5, 2024 10:05
= render partial: "shared/confirmed_director"

- else
= button_tag "Valider", disabled: true, class: 'fr-btn fr-btn--secondary', title: "Vous ne pouvez pas valider cette PFMP car les PFMPs précédentes ne sont pas validées"
Copy link
Collaborator

Choose a reason for hiding this comment

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

donc on explique pas à part au survol ?

| État | Nombre de jours | Montant |
| Saisie à valider | 5 | 75 € |
| Saisie à valider | 12| 125 € |

Copy link
Collaborator

Choose a reason for hiding this comment

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

Super mais c'aurait été cool qu'on ait un test qui couvre la partie tricky de l'algo qui est de redistribuer les montants des PFMPs après celle modifiée (là c'est juste la dernière c'est plus facile).

Je vais m'en occuper comme ça tu peux passer à autre chose

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Y'a un scénario à 3 pfmp dans les tests unitaires

Copy link
Collaborator

@freesteph freesteph Apr 5, 2024

Choose a reason for hiding this comment

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

et ? faut faire l'un ou l'autre ?

@pskl pskl merged commit ce5b15a into main Apr 5, 2024
5 checks passed
@pskl pskl deleted the feat/pfpmp-validation-constraint branch April 5, 2024 14:25
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.

Validation d'une PFMP possible uniquement si toutes les pfmps précédemment déclarées sont déjà validées
3 participants