refactor(dossier): handle discard by admin and super admin
This commit is contained in:
parent
b408811c5a
commit
ad4be3c482
4 changed files with 34 additions and 27 deletions
|
@ -140,9 +140,6 @@ module Instructeurs
|
|||
|
||||
def repasser_en_instruction
|
||||
begin
|
||||
if dossier.hidden_by_user_at.present?
|
||||
dossier.update!(hidden_by_user_at: nil)
|
||||
end
|
||||
flash.notice = "Le dossier #{dossier.id} a été repassé en instruction."
|
||||
dossier.repasser_en_instruction!(instructeur: current_instructeur)
|
||||
rescue AASM::InvalidTransition => e
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue