Set up new page for case contacts table#6467
Conversation
| order: [[2, 'desc']], | ||
| columnDefs: [ | ||
| { orderable: false, targets: [0, 1, -1] } // disable sort on bell, chevron, vertical elipses menu | ||
| ] |
There was a problem hiding this comment.
I used this existing function to remove the sortable function for a few columns in the table. As far as I can tell, this function was leftover from an old feature (seems to be a similar-looking table to the one this PR is implementing). Is it safe to assume that editing this function is not gonna break anything elsewhere in the app?
For more context, this PR from a while back is where the function got added. It seems case contacts used to be in a table once upon a time?
|
I plan to add basic tests for verifying that the routing works and the template renders correctly. Currently seeing a lot of failing tests when I run |
|
this is looking proming! |
|
@compwron this PR is ready for review :) what's the review process e.g. should I tag people here or post in slack or just leave it like this and someone will get round to it when they have a moment? |
| bundle exec rake db:schema:load | ||
| bundle exec rails assets:precompile | ||
|
|
||
| - name: Run rspec and upload code coverage |
There was a problem hiding this comment.
no more code coverage? I mean it does speed it up, but was this intended?
There was a problem hiding this comment.
ah I thought what I've done here is removing what we're doing with code climate, as per this slack thread: https://rubyforgood.slack.com/archives/CVB0QJGVD/p1757473365867509?thread_ts=1757356417.512309&cid=CVB0QJGVD
have I removed more than I was supposed to? 🫣
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| </td> | ||
| <td> | ||
| <% if case_contact.contact_made %> | ||
| <i class="lni lni-checkmark-circle" style="color: green;"></i> |
There was a problem hiding this comment.
Inline styles should be avoided in favor of CSS classes. Consider defining a CSS class for the green checkmark styling.
| <% if case_contact.contact_made %> | ||
| <i class="lni lni-checkmark-circle" style="color: green;"></i> | ||
| <% else %> | ||
| <i class="lni lni-cross-circle" style="color: orange;"></i> |
There was a problem hiding this comment.
Inline styles should be avoided in favor of CSS classes. Consider defining a CSS class for the orange cross styling.
compwron
left a comment
There was a problem hiding this comment.
looks safe in prod, let's try it :)
What github issue is this PR for, if any?
Resolves #6462
What changed, and why?
The following design has been proposed as a replacement for the existing Case Contact Cards. This PR provides the foundations for the new design by doing the following:
I will create new issues/tickets for the next steps as listed below below (and new PRs will be made for each issue). This will enable others to support with this new page.
How is this tested? (please write rspec and jest tests!) 💖💪
Added basic testing in
spec/requests/case_contacts_new_design_spec.rbto verify that all case contacts are listed, draft status badges display, and contacts are ordered by date as default.Screenshots please :)