implement turbostream back for state change in dossier view

This commit is contained in:
Lisa Durand 2023-02-24 15:48:29 +01:00
parent b03748d3dd
commit 6487e2c27e
8 changed files with 64 additions and 36 deletions

View file

@ -134,7 +134,15 @@ module Instructeurs
end
@dossier = dossier
redirect_back(fallback_location: instructeur_procedure_path(procedure))
respond_to do |format|
format.turbo_stream do
render :change_state
end
format.html do
redirect_back(fallback_location: instructeur_procedure_path(procedure))
end
end
end
def repasser_en_construction
@ -146,7 +154,15 @@ module Instructeurs
end
@dossier = dossier
redirect_back(fallback_location: instructeur_procedure_path(procedure))
respond_to do |format|
format.turbo_stream do
render :change_state
end
format.html do
redirect_back(fallback_location: instructeur_procedure_path(procedure))
end
end
end
def repasser_en_instruction
@ -158,7 +174,15 @@ module Instructeurs
end
@dossier = dossier
redirect_back(fallback_location: instructeur_procedure_path(procedure))
respond_to do |format|
format.turbo_stream do
render :change_state
end
format.html do
redirect_back(fallback_location: instructeur_procedure_path(procedure))
end
end
end
def terminer