Same for go back in instruction
This commit is contained in:
parent
5f39d3eac8
commit
768a298c2d
2 changed files with 30 additions and 2 deletions
|
@ -103,8 +103,12 @@ module Gestionnaires
|
|||
end
|
||||
|
||||
def repasser_en_instruction
|
||||
flash.notice = "Le dossier #{dossier.id} a été repassé en instruction."
|
||||
dossier.repasser_en_instruction!(current_gestionnaire)
|
||||
if dossier.en_instruction?
|
||||
flash.notice = 'Le dossier est déjà en instruction.'
|
||||
else
|
||||
flash.notice = "Le dossier #{dossier.id} a été repassé en instruction."
|
||||
dossier.repasser_en_instruction!(current_gestionnaire)
|
||||
end
|
||||
|
||||
render partial: 'state_button_refresh', locals: { dossier: dossier }
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue