-
Notifications
You must be signed in to change notification settings - Fork 1
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
MPDX-7955 - Add list filter functionality #989
Conversation
…components to be able to reuse them.
…ashes the initial appeal page.
…tyles to fit it in.
…info-functionality
Bundle sizes [mpdx-react]Compared against 63b1170
|
Preview branch generated at https://MPDX-7955-add-list-filter-functionality.d3dytjb8adxkk5.amplifyapp.com |
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.
Great job! Just a couple of changes.
...s/Tool/Appeal/List/AppealsListFilterPanel/DeleteAppealModal/AddContactToAppealModal.test.tsx
Outdated
Show resolved
Hide resolved
onClick={handleClearAllClick} | ||
variant="outlined" | ||
> | ||
{t('Clear All')} |
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 don't think this button is needed. It is not on the angular.
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 know it's not on Angular, but when using it, I like to see all the contacts and be able to clear filters easily. Especially since we push people into the asked
filter on load.
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.
When I've used appeals, I've never thought of them as filters. I've thought of them more as categories. In Angular there is no Clear
button and there is no option to not have a category/filter selected. The default is always the Asked
category. There really is no need to see all the contacts at once. So I would suggest keeping the angular functionality.
|
||
const existingContactIds = data?.appeal?.contactIds ?? []; | ||
|
||
const onSubmit = async (attributes: AddContactFormikSchema) => { |
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.
Could this also add the contact to the 'Asked' category?
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.
Currently, there isn't a filter to set that. I think the issue is that I'm not using the correct filter to grab the asked. However, there isn't a filter for it, so I'm talking to Andrew about that one too.
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 wonder if filters aren't the way it is being organized in the angular.
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.
Yeah, I think it's the way graphQL handles the filtering in the backend.
… as well as tests. Need to fix once staging API is merged with production.
c2648a2
to
0d73ade
Compare
Plus fixing types
Closing this PR as I created a new PR to clean up the history, which I then split into 4 separate PRs to allow other devs to easily review the PRs. |
Description
In this PR, I added functionality to the list view filter buttons. This includes exporting contacts & emails, adding contacts to appeals and deleting appeals. All models are dynamically loaded and preloaded when the mouse is hovered over the button that opens the modal in question.
Fixes
Export contacts & emails
These models already existed, so there was less work to get them working.
Add Contacts Modal
Created a new modal that allows the user to add contacts to the appeal.
<ContactsAutocomplete/>
to exclude contact IDs so the user doesn't see contacts that are already a part of the appeal.Delete Appeal Modal
Created this modal to allow the user to delete the appeal.
Checklist: