-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reopening an authorization with previous stages gives a choice
- Loading branch information
1 parent
afb021a
commit 13f7cde
Showing
14 changed files
with
157 additions
and
11 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
app/assets/stylesheets/components/reopen_authorizations.css
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,18 @@ | ||
.reopen-stage-buttons-container { | ||
width: 100%; | ||
display: flex; | ||
align-items: flex-start; | ||
} | ||
|
||
.reopen-stage-buttons { | ||
flex: 1; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
} | ||
|
||
.reopen-stage-cancel { | ||
display: flex; | ||
align-items: flex-end; | ||
height: 100%; | ||
} |
18 changes: 18 additions & 0 deletions
18
app/interactors/transition_authorization_request_to_stage_of_authorization.rb
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,18 @@ | ||
class TransitionAuthorizationRequestToStageOfAuthorization < ApplicationInteractor | ||
def call | ||
context.fail! unless context.authorization.reopenable? | ||
|
||
return if context.authorization_request.is_a? context.authorization.authorization_request_class.constantize | ||
|
||
transition_to_authorization_stage | ||
end | ||
|
||
private | ||
|
||
def transition_to_authorization_stage | ||
context.authorization_request.update!( | ||
type: context.authorization.authorization_request_class.to_s, | ||
form_uid: context.authorization.form_uid, | ||
) | ||
end | ||
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 |
---|---|---|
|
@@ -58,7 +58,7 @@ def name_with_stage | |
end | ||
|
||
def reopenable? | ||
!next_stage? | ||
true | ||
end | ||
|
||
def instructors | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -463,8 +463,14 @@ fr: | |
invalid_request: | | ||
Attention, vous réouvrez une demande qui possède des données invalides ou manquantes, vous pourrez avoir | ||
des erreurs inattendues, si c'était le cas merci de contacter le support | ||
warning_for_stages: | ||
title: Vos mises à jour peuvent concerner votre habilitation bac à sable | ||
content: "Pour savoir si les mises à jour que vous désirez effectuer nécessitent de passer d'abord par une mise à jour de l'habilitation bac à sable, contactez le fournisseur de données : <br /><a class=\"fr-link\" target=\"_blank\" href=\"mailto:[email protected]\">[email protected]</a>" | ||
cancel: Annuler | ||
reopen: Mettre à jour l'habilitation | ||
reopen_to_stage: | ||
sandbox: Mettre à jour l'habilitation bac à sable | ||
production: Mettre à jour l'habilitation de production | ||
create: | ||
success: | ||
title: L'habilitation %{name} a bien été réouverte | ||
|
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