add justificatif_motivation field to batch operation accepter

This commit is contained in:
Lisa Durand 2022-12-19 15:03:39 +01:00
parent 1bc0609543
commit 59468fe351
4 changed files with 23 additions and 3 deletions

View file

@ -27,7 +27,7 @@ class BatchOperation < ApplicationRecord
has_many :groupe_instructeurs, through: :dossier_operations
belongs_to :instructeur
store_accessor :payload, :motivation
store_accessor :payload, :motivation, :justificatif_motivation
validates :operation, presence: true
@ -73,7 +73,7 @@ class BatchOperation < ApplicationRecord
when BatchOperation.operations.fetch(:passer_en_instruction)
dossier.passer_en_instruction(instructeur: instructeur)
when BatchOperation.operations.fetch(:accepter)
dossier.accepter(instructeur: instructeur, motivation: motivation)
dossier.accepter(instructeur: instructeur, motivation: motivation, justificatif: justificatif_motivation)
end
end