refactor(user dossier): mutualize update/update_brouillon

This commit is contained in:
simon lehericey 2022-10-11 10:34:05 +02:00 committed by LeSim
parent 437ac44143
commit 32e01b13ef
2 changed files with 1 additions and 7 deletions

View file

@ -181,7 +181,7 @@ module Users
respond_to do |format| respond_to do |format|
format.html { render :brouillon } format.html { render :brouillon }
format.turbo_stream { render layout: false } format.turbo_stream { render(:update, layout: false) }
end end
end end

View file

@ -1,6 +0,0 @@
- to_shows, to_hides = @dossier.champs.filter(&:conditional?).partition(&:visible?)
- if to_shows.present?
= turbo_stream.show_all(to_shows.map { "##{_1.input_group_id}" }.join(','))
- if to_hides.present?
= turbo_stream.hide_all(to_hides.map { "##{_1.input_group_id}" }.join(','))