Skip to content

Commit

Permalink
chore(routing): update turbo stream only if champ used by routing rul…
Browse files Browse the repository at this point in the history
…es has been updated
  • Loading branch information
E-L-T committed Jul 22, 2024
1 parent 2f50866 commit 02f6cd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/users/dossiers/update.turbo_stream.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
= turbo_stream.append('contenu', render(Dossiers::InvalidIneligibiliteRulesComponent.new(dossier: @dossier)))
- else @ineligibilite_rules_is_computable
= turbo_stream.remove(dom_id(@dossier, :ineligibilite_rules_broken))

= turbo_stream.update "contact_information", partial: 'shared/dossiers/update_contact_information', locals: { dossier: @dossier, procedure: @procedure }
- if @dossier.champs.filter(&:used_by_routing_rules?).pluck(:stable_id).any? { |id| params[:dossier][:champs_public_attributes].key?("#{id}") }
= turbo_stream.update "contact_information", partial: 'shared/dossiers/update_contact_information', locals: { dossier: @dossier, procedure: @procedure }

0 comments on commit 02f6cd9

Please sign in to comment.