Skip to content

Commit

Permalink
fix(dossier): ineligibilite modal en construction/fork
Browse files Browse the repository at this point in the history
  • Loading branch information
colinux committed Dec 17, 2024
1 parent 1c6d012 commit d8ee89d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
%p= error_message

- if wrapped?
%div{ id: dom_id(@dossier, :ineligibilite_rules_broken) }
#ineligibilite_rules_modal
= modal_content
- else
= modal_content
2 changes: 1 addition & 1 deletion app/views/users/dossiers/update.turbo_stream.haml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= render partial: 'shared/dossiers/update_champs', locals: { to_show: @to_show, to_hide: @to_hide, to_update: @to_update, dossier: @dossier }

- if params[:validate].present? && @dossier.revision.ineligibilite_enabled?
= turbo_stream.update dom_id(@dossier, :ineligibilite_rules_broken), render(Dossiers::InvalidIneligibiliteRulesComponent.new(dossier: @dossier, wrapped: false))
= turbo_stream.update :ineligibilite_rules_modal, render(Dossiers::InvalidIneligibiliteRulesComponent.new(dossier: @dossier, wrapped: false))

- if @update_contact_information
= turbo_stream.update "contact_information", partial: 'shared/dossiers/update_contact_information', locals: { dossier: @dossier, procedure: @dossier.procedure }
2 changes: 1 addition & 1 deletion spec/views/shared/dossiers/_edit.html.haml_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
end

it 'renders broken transitions rules dialog' do
expect(subject).to have_selector("##{ActionView::RecordIdentifier.dom_id(dossier, :ineligibilite_rules_broken)}")
expect(subject).to have_selector("#ineligibilite_rules_modal [data-fr-opened='true']")
end
end
end

0 comments on commit d8ee89d

Please sign in to comment.