Skip to content

Commit e2cf081

Browse files
make different tests fail
1 parent 7707eeb commit e2cf081

File tree

2 files changed

+17
-34
lines changed

2 files changed

+17
-34
lines changed

app/controllers/case_contacts_controller.rb

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ class CaseContactsController < ApplicationController
77
after_action :verify_authorized, except: %i[leave]
88

99
def index
10-
# authorize CaseContact
11-
#
12-
# @current_organization_groups = current_organization_groups
13-
#
14-
# @filterrific = initialize_filterrific(
15-
# all_case_contacts,
16-
# params[:filterrific],
17-
# select_options: {
18-
# sorted_by: CaseContact.options_for_sorted_by
19-
# }
20-
# ) || return
21-
#
22-
# case_contacts = CaseContact.case_hash_from_cases(@filterrific.find)
23-
# case_contacts = case_contacts.select { |k, _v| k == params[:casa_case_id].to_i } if params[:casa_case_id].present?
24-
#
25-
# @presenter = CaseContactPresenter.new(case_contacts)
10+
authorize CaseContact
11+
12+
@current_organization_groups = current_organization_groups
13+
14+
@filterrific = initialize_filterrific(
15+
all_case_contacts,
16+
params[:filterrific],
17+
select_options: {
18+
sorted_by: CaseContact.options_for_sorted_by
19+
}
20+
) || return
21+
22+
case_contacts = CaseContact.case_hash_from_cases(@filterrific.find)
23+
case_contacts = case_contacts.select { |k, _v| k == params[:casa_case_id].to_i } if params[:casa_case_id].present?
24+
25+
@presenter = CaseContactPresenter.new(case_contacts)
2626
end
2727

2828
def drafts

app/views/case_contacts/index.html.erb

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -74,24 +74,7 @@
7474
<h3 class="mb-4"><label>Contact types</label></h3>
7575
<div id="contact-type-form" class="">
7676
<div class="row">
77-
<% @current_organization_groups.each do |group| %>
78-
<div class="col-md-4 justify-content-start pb-5">
79-
<h5 class="mb-1"> <%= group.name %> </h5>
80-
<% group.contact_types.each do |contact_type| %>
81-
<div class="form-check checkbox-style">
82-
<%=
83-
f.check_box :contact_type,
84-
{multiple: true, class: "form-check-input case-contact-contact-type filter-input"},
85-
contact_type.id,
86-
nil
87-
%>
88-
<label class="form-check-label" for="filterrific_contact_type_<%= contact_type.id %>">
89-
<%= contact_type.name %>
90-
</label>
91-
</div>
92-
<% end %>
93-
</div>
94-
<% end %>
77+
9578
</div>
9679
</div>
9780
</div>

0 commit comments

Comments
 (0)