diff --git a/src/components/Tool/FixPhoneNumbers/FixPhoneNumbers.tsx b/src/components/Tool/FixPhoneNumbers/FixPhoneNumbers.tsx index fd3063d06..c6720e03d 100644 --- a/src/components/Tool/FixPhoneNumbers/FixPhoneNumbers.tsx +++ b/src/components/Tool/FixPhoneNumbers/FixPhoneNumbers.tsx @@ -109,7 +109,7 @@ interface Props { } export interface FormValuesPerson extends PersonInvalidNumberFragment { - newPhoneNumber: PersonPhoneNumberFragment | string; + newPhoneNumber: string; isNewPhoneNumber: boolean; } diff --git a/src/components/Tool/FixPhoneNumbers/helper.test.ts b/src/components/Tool/FixPhoneNumbers/helper.test.ts index 5eb5db653..c62a1f094 100644 --- a/src/components/Tool/FixPhoneNumbers/helper.test.ts +++ b/src/components/Tool/FixPhoneNumbers/helper.test.ts @@ -74,7 +74,7 @@ const testData = [ ]; describe('FixPhoneNumbers-helper', () => { - it('Should return a Contact with all phoneNumbers', async () => { + it('Should return a Contact with all phoneNumbers', () => { const result = determineBulkDataToSend(testData[0], 'MPDX'); expect(result).toEqual([ { @@ -102,7 +102,7 @@ describe('FixPhoneNumbers-helper', () => { }, ]); }); - it('Should still return a Contact with all phoneNumbers', async () => { + it('Should still return a Contact with all phoneNumbers', () => { const result = determineBulkDataToSend(testData[1], 'MPDX'); expect(result).toEqual([ { @@ -130,7 +130,7 @@ describe('FixPhoneNumbers-helper', () => { }, ]); }); - it('Should return an empty array', async () => { + it('Should return an empty array', () => { const result = determineBulkDataToSend(testData[0], 'DataServer'); expect(result).toEqual([]); }); diff --git a/src/components/Tool/FixPhoneNumbers/helper.ts b/src/components/Tool/FixPhoneNumbers/helper.ts index c83e4b376..fd3805e70 100644 --- a/src/components/Tool/FixPhoneNumbers/helper.ts +++ b/src/components/Tool/FixPhoneNumbers/helper.ts @@ -1,7 +1,4 @@ -import { - PersonPhoneNumberInput, - PersonUpdateInput, -} from 'src/graphql/types.generated'; +import { PersonUpdateInput } from 'src/graphql/types.generated'; import { FormValuesPerson } from './FixPhoneNumbers'; export const determineBulkDataToSend = ( @@ -17,15 +14,12 @@ export const determineBulkDataToSend = ( if (primaryNumber) { dataToSend.push({ id: value.id, - phoneNumbers: value.phoneNumbers.nodes.map( - (number) => - ({ - id: number.id, - primary: number.id === primaryNumber.id, - number: number.number, - validValues: true, - } as PersonPhoneNumberInput), - ), + phoneNumbers: value.phoneNumbers.nodes.map((number) => ({ + id: number.id, + primary: number.id === primaryNumber.id, + number: number.number, + validValues: true, + })), }); } });