Skip to content

Commit

Permalink
Mpdx 7936 delete button api call (#976)
Browse files Browse the repository at this point in the history
* added graphQL mutation

squash

* fixed add email functionality

* Fix inline email address editing

* Fix part of the caching issue. The way the component is using state of the emails is causing the most issues why they aren't updating. The new email gets added but replaces the last email.

* added delete functionality and fixed modal issues

* Do a bit of cleanup of the code

* Fix up the tests now that delete is working

* Removing the delete modal and using the confirmationModal instead. I also added tests and improved some of the PR.

* Removed unused interface and ensured same data is returned after update.

* Update and fix tests. Now testing to ensure the new email gets added by the Star icon rather than checking what gets passed into cache.

---------

Co-authored-by: Collin Pastika <[email protected]>
Co-authored-by: Bill Randall <[email protected]>
Co-authored-by: Daniel Bisgrove <[email protected]>
  • Loading branch information
4 people authored Aug 7, 2024
1 parent bc61be7 commit e4b7269
Show file tree
Hide file tree
Showing 12 changed files with 748 additions and 952 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mutation EmailAddresses($input: PersonUpdateMutationInput!) {
person {
emailAddresses {
nodes {
email
...PersonEmailAddress
}
}
}
Expand Down
40 changes: 0 additions & 40 deletions src/components/Tool/FixEmailAddresses/DeleteModal.test.tsx

This file was deleted.

116 changes: 0 additions & 116 deletions src/components/Tool/FixEmailAddresses/DeleteModal.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { AddIcon } from 'src/components/Contacts/ContactDetails/ContactDetailsTa
import { useAccountListId } from 'src/hooks/useAccountListId';
import i18n from 'src/lib/i18n';
import { useEmailAddressesMutation } from './AddEmailAddress.generated';
import { RowWrapper } from './FixEmailAddressPerson';
import { RowWrapper } from './FixEmailAddressPerson/FixEmailAddressPerson';
import {
GetInvalidEmailAddressesDocument,
GetInvalidEmailAddressesQuery,
Expand All @@ -30,7 +30,6 @@ interface EmailValidationFormEmail {
}

interface EmailValidationFormProps {
index: number;
personId: string;
}

Expand Down
208 changes: 0 additions & 208 deletions src/components/Tool/FixEmailAddresses/FixEmailAddressPerson.test.tsx

This file was deleted.

Loading

0 comments on commit e4b7269

Please sign in to comment.