From 61db78035f0914e90fe3bb366ae6bee8fe69bb18 Mon Sep 17 00:00:00 2001 From: Clifton McIntosh Date: Mon, 11 May 2026 10:34:22 -0500 Subject: [PATCH 1/7] feat(#6503): add Columns button and panel HTML for case contact table Adds the Columns toolbar button with a (6/6) badge, the slide-down panel with Bootstrap toggle switches for the 6 user-configurable columns, and the CaseContact::TOGGLEABLE_COLUMNS constant that drives the panel. Date and Case columns are intentionally fixed (always visible). Co-Authored-By: Claude Sonnet 4.6 --- app/models/case_contact.rb | 9 ++++ .../case_contacts_new_design/index.html.erb | 41 +++++++++++++++++-- .../case_contacts_new_design_spec.rb | 25 +++++++++++ 3 files changed, 71 insertions(+), 4 deletions(-) diff --git a/app/models/case_contact.rb b/app/models/case_contact.rb index 54933056b5..3e73ea490e 100644 --- a/app/models/case_contact.rb +++ b/app/models/case_contact.rb @@ -191,6 +191,15 @@ def active_or_notes? LETTER = "letter".freeze CONTACT_MEDIUMS = [IN_PERSON, TEXT_EMAIL, VIDEO, VOICE_ONLY, LETTER].freeze + TOGGLEABLE_COLUMNS = [ + {key: "relationship", label: "Relationship", index: 4}, + {key: "medium", label: "Medium", index: 5}, + {key: "created_by", label: "Created By", index: 6}, + {key: "contacted", label: "Contacted", index: 7}, + {key: "topics", label: "Topics", index: 8}, + {key: "draft", label: "Draft", index: 9} + ].freeze + def update_cleaning_contact_types(args) transaction do contact_types.clear diff --git a/app/views/case_contacts/case_contacts_new_design/index.html.erb b/app/views/case_contacts/case_contacts_new_design/index.html.erb index 48f7076004..76a4ecf836 100644 --- a/app/views/case_contacts/case_contacts_new_design/index.html.erb +++ b/app/views/case_contacts/case_contacts_new_design/index.html.erb @@ -2,10 +2,17 @@

Case Contacts

- +
+ + + +
<%= link_to new_case_contact_path, class: "main-btn primary-btn btn-sm btn-hover" do %> @@ -13,6 +20,32 @@ <% end %>
+ +