Skip to content

Commit

Permalink
make different tests fail
Browse files Browse the repository at this point in the history
  • Loading branch information
goldsteindecoro committed Jan 13, 2025
1 parent 7707eeb commit e2cf081
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 34 deletions.
32 changes: 16 additions & 16 deletions app/controllers/case_contacts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ class CaseContactsController < ApplicationController
after_action :verify_authorized, except: %i[leave]

def index
# authorize CaseContact
#
# @current_organization_groups = current_organization_groups
#
# @filterrific = initialize_filterrific(
# all_case_contacts,
# params[:filterrific],
# select_options: {
# sorted_by: CaseContact.options_for_sorted_by
# }
# ) || return
#
# case_contacts = CaseContact.case_hash_from_cases(@filterrific.find)
# case_contacts = case_contacts.select { |k, _v| k == params[:casa_case_id].to_i } if params[:casa_case_id].present?
#
# @presenter = CaseContactPresenter.new(case_contacts)
authorize CaseContact

@current_organization_groups = current_organization_groups

@filterrific = initialize_filterrific(
all_case_contacts,
params[:filterrific],
select_options: {
sorted_by: CaseContact.options_for_sorted_by
}
) || return

case_contacts = CaseContact.case_hash_from_cases(@filterrific.find)
case_contacts = case_contacts.select { |k, _v| k == params[:casa_case_id].to_i } if params[:casa_case_id].present?

@presenter = CaseContactPresenter.new(case_contacts)
end

def drafts
Expand Down
19 changes: 1 addition & 18 deletions app/views/case_contacts/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -74,24 +74,7 @@
<h3 class="mb-4"><label>Contact types</label></h3>
<div id="contact-type-form" class="">
<div class="row">
<% @current_organization_groups.each do |group| %>
<div class="col-md-4 justify-content-start pb-5">
<h5 class="mb-1"> <%= group.name %> </h5>
<% group.contact_types.each do |contact_type| %>
<div class="form-check checkbox-style">
<%=
f.check_box :contact_type,
{multiple: true, class: "form-check-input case-contact-contact-type filter-input"},
contact_type.id,
nil
%>
<label class="form-check-label" for="filterrific_contact_type_<%= contact_type.id %>">
<%= contact_type.name %>
</label>
</div>
<% end %>
</div>
<% end %>

</div>
</div>
</div>
Expand Down

0 comments on commit e2cf081

Please sign in to comment.