generated from betagouv/rails-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- [x] Remove support banner - [x] Change db constraint to have multiple active ribs (1 per etab) - [x] Rewrite validator_spec using stubbing to avoid the factory shenanigans - [x] Make etab presence mandatory on Rib - [x] Make sure another etab cant modify or archive other etab's ribs - [x] Make display of classes rib dependent on current establishment - [x] Make student show of rib dependent on current establishment - [x] Fix tests - [x] Fix mandate rib option display
- Loading branch information
Showing
54 changed files
with
377 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,28 @@ | ||
%section.fr-pb-3w | ||
%h2.fr-h4 Coordonnées bancaires | ||
|
||
- if @student.rib.nil? | ||
- if @student.rib(current_establishment).nil? | ||
%p Aucune coordonnée bancaire enregistrée pour le moment. | ||
|
||
= button_to "Saisir les coordonnées bancaires", new_student_rib_path(@student), class: 'fr-btn', disabled: [email protected]_classes_in_establishment?(current_establishment), method: :get | ||
- else | ||
%ul | ||
%li | ||
Titulaire du compte : | ||
%span= @student.rib.name | ||
%span= @student.rib(current_establishment).name | ||
%li | ||
IBAN : | ||
%code= @student.rib.iban | ||
%code= @student.rib(current_establishment).iban | ||
%li | ||
BIC : | ||
%code= @student.rib.bic | ||
%code= @student.rib(current_establishment).bic | ||
|
||
.fr-col-md-7 | ||
- if @student.rib.readonly? | ||
- if @student.rib(current_establishment).readonly? | ||
= dsfr_alert(type: :warning, size: :sm, classes: 'fr-my-3w') do | ||
%p Ces coordonnées bancaires ne sont pas modifiables car elles sont actuellement utilisées dans une ou plusieurs requêtes de paiement. | ||
|
||
.fr-btns-group.fr-btns-group--inline | ||
%li= button_to "Modifier les coordonnées bancaires", edit_student_rib_path(@student, @student.rib), class: 'fr-btn fr-btn--secondary', disabled: @student.rib.readonly?, method: :get | ||
%li= button_to "Supprimer les coordonnées bancaires", confirm_deletion_student_rib_path(@student, @student.rib), class: 'fr-btn fr-btn--secondary', disabled: @student.rib.readonly?, method: :get | ||
%li= button_to "Modifier les coordonnées bancaires", edit_student_rib_path(@student, @student.rib(current_establishment)), class: 'fr-btn fr-btn--secondary', disabled: @student.rib(current_establishment).readonly?, method: :get | ||
%li= button_to "Supprimer les coordonnées bancaires", confirm_deletion_student_rib_path(@student, @student.rib(current_establishment)), class: 'fr-btn fr-btn--secondary', disabled: @student.rib(current_establishment).readonly?, method: :get | ||
|
||
= render partial: 'pfmps/pfmp_student_table', locals: { schoolings: @schoolings } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module Aplypro | ||
VERSION = "1.18.3" | ||
VERSION = "1.19.0" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class UpdateRibUniqueIndex < ActiveRecord::Migration[7.2] | ||
def change | ||
remove_index :ribs, name: "one_active_rib_per_student" | ||
|
||
add_index :ribs, [:student_id, :establishment_id], | ||
name: "one_active_rib_per_student_per_establishment", | ||
unique: true, | ||
where: "archived_at IS NULL" | ||
end | ||
end |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.