[fix #3683] Dossier: add repasser_en_instruction!
This commit is contained in:
parent
b79220e711
commit
b2c987ff0d
4 changed files with 34 additions and 0 deletions
|
@ -302,6 +302,14 @@ class Dossier < ApplicationRecord
|
|||
log_dossier_operation(gestionnaire, :repasser_en_construction)
|
||||
end
|
||||
|
||||
def repasser_en_instruction!(gestionnaire)
|
||||
update(state: Dossier.states.fetch(:en_instruction), processed_at: nil, motivation: nil)
|
||||
attestation&.destroy
|
||||
DossierMailer.notify_revert_to_instruction(self).deliver_later
|
||||
|
||||
log_dossier_operation(gestionnaire, :repasser_en_instruction)
|
||||
end
|
||||
|
||||
def accepter!(gestionnaire, motivation, justificatif = nil)
|
||||
self.motivation = motivation
|
||||
self.en_instruction_at ||= Time.zone.now
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue