feat(dossier): validate on change and revalidate on input

This commit is contained in:
Paul Chavard 2023-10-26 16:02:23 +02:00
parent c93141d8bb
commit 869d83dda9
26 changed files with 194 additions and 146 deletions

View file

@ -292,9 +292,8 @@ module Instructeurs
if dossier.champs_private_all.any?(&:changed?)
dossier.last_champ_private_updated_at = Time.zone.now
end
if !dossier.save(context: :annotations)
flash.now.alert = dossier.errors.full_messages
end
dossier.save(context: :champs_private_value)
respond_to do |format|
format.turbo_stream do