Skip to content

Commit

Permalink
Afficher l'état de la payment_request dans la page de détail de l'élève
Browse files Browse the repository at this point in the history
  • Loading branch information
tnicolas1 committed Oct 22, 2024
1 parent da3d65e commit e9095f0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
8 changes: 0 additions & 8 deletions app/views/classes/_pfmps_payments_table.html.haml

This file was deleted.

4 changes: 3 additions & 1 deletion app/views/classes/_students_table.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,6 @@
%p= dsfr_badge(status: :error) { "Non saisies" }
= dsfr_link_to "Saisir les coordonnées bancaires", new_student_rib_path(student)
%td
= render partial: "pfmps_payments_table", locals: { schooling: schooling }
- schooling.pfmps.each do |pfmp|
= render partial: "pfmps/pfmp_payments_table", locals: { pfmp: pfmp }
= dsfr_link_to "Ajouter une PFMP individuelle", new_school_year_class_schooling_pfmp_path(selected_school_year, @classe, schooling)
7 changes: 7 additions & 0 deletions app/views/pfmps/_pfmp_payments_table.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- schooling = pfmp.schooling
.fr-grid-row
.fr-col-md-7
= dsfr_link_to pfmp.listing_to_s, school_year_class_schooling_pfmp_path(selected_school_year, schooling.classe, schooling, pfmp), title: "Voir la PFMP #{pfmp.full_dates}"
.fr-col-md-5
-if pfmp.latest_payment_request.present?
= pfmp.latest_payment_request.status_badge
4 changes: 2 additions & 2 deletions app/views/pfmps/_pfmp_student_table.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
%table
%caption Liste des PFMPs de l'élève
%thead
%th{scope: "col"} PFMP
%th{scope: "col"} PFMP et Paiements
%th{scope: "col"} Nombre de jours
%th{scope: "col"} Montant
%tbody
- pfmps.each do |pfmp|
%tr
%td= link_to_if(classe.establishment.eql?(current_establishment), pfmp.listing_to_s.html_safe, school_year_class_schooling_pfmp_path(classe.school_year, classe, schooling, pfmp), title: "Voir la PFMP #{pfmp.full_dates}")
%td= render partial: "pfmps/pfmp_payments_table", locals: { pfmp: pfmp }
%td= pfmp.day_count
%td
%strong= number_to_currency(pfmp.amount)
Expand Down

0 comments on commit e9095f0

Please sign in to comment.