-
-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Case contact details ux improvements 5896 #5909
base: main
Are you sure you want to change the base?
Conversation
Removed asterisk from record contact details heading Added asterisks to subheadings to help users understand what needs to be filled out. (better user experience)
when user selects contact type on new contact page - modified '_contact_types.html.erb' to sort by last_contact_time - updated ContactTypeDecorator with last_contact_timestamp method to obtain last contact or default to a time in past if no contacts Change was made in order to ensure that 'ContactType' options are displayed for users in a way that allows them to quickly access recently used contact types vs scrolling through all options.
Added server side validation to the contact model in order to ensure that "Contact Type" is filled out as required field when user submits a new case contact details form
@@ -3,7 +3,7 @@ | |||
<%= render(Form::MultipleSelectComponent.new( | |||
form: form, | |||
name: :contact_type_ids, | |||
options: options.decorate.map { |ct| ct.hash_for_multi_select_with_cases(casa_cases&.pluck(:id)) }, | |||
options: options.decorate.sort_by { |ct| ct.last_contact_timestamp(casa_cases.pluck(:id)) }.reverse.map { |ct| ct.hash_for_multi_select_with_cases(casa_cases.pluck(:id)) }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the ordering can be done in
@contact_types.order(name: :asc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to do this originally in the controller but couldn't get it to work. Any suggestions?
The decorator wasn't working correctly specifically if I remember right so the extra sorting logic there was added as a fix
This PR has been open for a long time without any pushes or comments! What's up? |
Hi @FireLemons apologies for the delay here. Let's chat about this tomorrow during office hours and I can get this restarted! |
This PR has been open for a long time without any pushes or comments! What's up? |
What github issue is this PR for, if any?
Resolves #5896
What changed, and why?
3 main changes were made to the UX around creating contact details in order to improve UX and create a better experience for recorder.
How is this tested? (please write tests!) 💖💪
added rspec testing to case_contact_decorator spec to test new method
Screenshots please :)