fix(dossier): should refresh dossier footer when removing options from multiselect
This commit is contained in:
parent
dd85a495e0
commit
3a54e44b57
8 changed files with 28 additions and 13 deletions
|
@ -5,8 +5,9 @@ class Champs::OptionsController < ApplicationController
|
|||
|
||||
def remove
|
||||
champ = policy_scope(Champ).includes(:champs).find(params[:champ_id])
|
||||
champ.remove_option([params[:option]].compact)
|
||||
champ.remove_option([params[:option]].compact, true)
|
||||
champs = champ.private? ? champ.dossier.champs_private_all : champ.dossier.champs_public_all
|
||||
@dossier = champ.private? ? nil : champ.dossier
|
||||
@to_show, @to_hide, @to_update = champs_to_turbo_update({ params[:champ_id] => true }, champs)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue