diff --git a/pages/accountLists/[accountListId]/tools/fixCommitmentInfo/[[...contactId]].page.tsx b/pages/accountLists/[accountListId]/tools/fix/commitmentInfo/[[...contactId]].page.tsx similarity index 83% rename from pages/accountLists/[accountListId]/tools/fixCommitmentInfo/[[...contactId]].page.tsx rename to pages/accountLists/[accountListId]/tools/fix/commitmentInfo/[[...contactId]].page.tsx index 259068b0c..a8cffca57 100644 --- a/pages/accountLists/[accountListId]/tools/fixCommitmentInfo/[[...contactId]].page.tsx +++ b/pages/accountLists/[accountListId]/tools/fix/commitmentInfo/[[...contactId]].page.tsx @@ -2,13 +2,13 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { loadSession } from 'pages/api/utils/pagePropsHelpers'; import FixCommitmentInfo from 'src/components/Tool/FixCommitmentInfo/FixCommitmentInfo'; -import { ToolsWrapper } from '../ToolsWrapper'; -import { SetContactFocus, useToolsHelper } from '../useToolsHelper'; +import { ToolsWrapper } from '../../ToolsWrapper'; +import { SetContactFocus, useToolsHelper } from '../../useToolsHelper'; const FixCommitmentInfoPage: React.FC = () => { const { t } = useTranslation(); const { accountListId, handleSelectContact } = useToolsHelper(); - const pageUrl = 'tools/fixCommitmentInfo'; + const pageUrl = 'tools/fix/commitmentInfo'; const setContactFocus: SetContactFocus = (contactId) => { handleSelectContact(pageUrl, contactId); diff --git a/pages/accountLists/[accountListId]/tools/fixEmailAddresses/[[...contactId]].page.test.tsx b/pages/accountLists/[accountListId]/tools/fix/emailAddresses/[[...contactId]].page.test.tsx similarity index 97% rename from pages/accountLists/[accountListId]/tools/fixEmailAddresses/[[...contactId]].page.test.tsx rename to pages/accountLists/[accountListId]/tools/fix/emailAddresses/[[...contactId]].page.test.tsx index 9215ffdfe..1ea547ae3 100644 --- a/pages/accountLists/[accountListId]/tools/fixEmailAddresses/[[...contactId]].page.test.tsx +++ b/pages/accountLists/[accountListId]/tools/fix/emailAddresses/[[...contactId]].page.test.tsx @@ -102,7 +102,7 @@ describe('FixEmailAddressesPage', () => { await waitFor(() => { expect(pushFn).toHaveBeenCalledWith( - `/accountLists/${accountListId}/tools/fixEmailAddresses/${contactId}`, + `/accountLists/${accountListId}/tools/fix/emailAddresses/${contactId}`, ); }); }); diff --git a/pages/accountLists/[accountListId]/tools/fixEmailAddresses/[[...contactId]].page.tsx b/pages/accountLists/[accountListId]/tools/fix/emailAddresses/[[...contactId]].page.tsx similarity index 83% rename from pages/accountLists/[accountListId]/tools/fixEmailAddresses/[[...contactId]].page.tsx rename to pages/accountLists/[accountListId]/tools/fix/emailAddresses/[[...contactId]].page.tsx index 3bd01e6aa..c52b7e9d8 100644 --- a/pages/accountLists/[accountListId]/tools/fixEmailAddresses/[[...contactId]].page.tsx +++ b/pages/accountLists/[accountListId]/tools/fix/emailAddresses/[[...contactId]].page.tsx @@ -2,13 +2,13 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { loadSession } from 'pages/api/utils/pagePropsHelpers'; import { FixEmailAddresses } from 'src/components/Tool/FixEmailAddresses/FixEmailAddresses'; -import { ToolsWrapper } from '../ToolsWrapper'; -import { SetContactFocus, useToolsHelper } from '../useToolsHelper'; +import { ToolsWrapper } from '../../ToolsWrapper'; +import { SetContactFocus, useToolsHelper } from '../../useToolsHelper'; const FixEmailAddressesPage: React.FC = () => { const { t } = useTranslation(); const { accountListId, handleSelectContact } = useToolsHelper(); - const pageUrl = 'tools/fixEmailAddresses'; + const pageUrl = 'tools/fix/emailAddresses'; const setContactFocus: SetContactFocus = (contactId) => { handleSelectContact(pageUrl, contactId); diff --git a/pages/accountLists/[accountListId]/tools/fixMailingAddresses/[[...contactId]].page.test.tsx b/pages/accountLists/[accountListId]/tools/fix/mailingAddresses/[[...contactId]].page.test.tsx similarity index 97% rename from pages/accountLists/[accountListId]/tools/fixMailingAddresses/[[...contactId]].page.test.tsx rename to pages/accountLists/[accountListId]/tools/fix/mailingAddresses/[[...contactId]].page.test.tsx index a6277aa4e..7a84a17de 100644 --- a/pages/accountLists/[accountListId]/tools/fixMailingAddresses/[[...contactId]].page.test.tsx +++ b/pages/accountLists/[accountListId]/tools/fix/mailingAddresses/[[...contactId]].page.test.tsx @@ -95,7 +95,7 @@ describe('FixMailingAddressesPage', () => { await waitFor(() => { expect(pushFn).toHaveBeenCalledWith( - `/accountLists/${accountListId}/tools/fixMailingAddresses/${contactId}`, + `/accountLists/${accountListId}/tools/fix/mailingAddresses/${contactId}`, ); }); }); diff --git a/pages/accountLists/[accountListId]/tools/fixMailingAddresses/[[...contactId]].page.tsx b/pages/accountLists/[accountListId]/tools/fix/mailingAddresses/[[...contactId]].page.tsx similarity index 83% rename from pages/accountLists/[accountListId]/tools/fixMailingAddresses/[[...contactId]].page.tsx rename to pages/accountLists/[accountListId]/tools/fix/mailingAddresses/[[...contactId]].page.tsx index fa661ef06..62bd69c3d 100644 --- a/pages/accountLists/[accountListId]/tools/fixMailingAddresses/[[...contactId]].page.tsx +++ b/pages/accountLists/[accountListId]/tools/fix/mailingAddresses/[[...contactId]].page.tsx @@ -2,13 +2,13 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { loadSession } from 'pages/api/utils/pagePropsHelpers'; import FixMailingAddresses from 'src/components/Tool/FixMailingAddresses/FixMailingAddresses'; -import { ToolsWrapper } from '../ToolsWrapper'; -import { SetContactFocus, useToolsHelper } from '../useToolsHelper'; +import { ToolsWrapper } from '../../ToolsWrapper'; +import { SetContactFocus, useToolsHelper } from '../../useToolsHelper'; const FixMailingAddressesPage: React.FC = () => { const { t } = useTranslation(); const { accountListId, handleSelectContact } = useToolsHelper(); - const pageUrl = 'tools/fixMailingAddresses'; + const pageUrl = 'tools/fix/mailingAddresses'; const setContactFocus: SetContactFocus = (contactId) => { handleSelectContact(pageUrl, contactId); diff --git a/pages/accountLists/[accountListId]/tools/fixPhoneNumbers/[[...contactId]].page.tsx b/pages/accountLists/[accountListId]/tools/fix/phoneNumbers/[[...contactId]].page.tsx similarity index 83% rename from pages/accountLists/[accountListId]/tools/fixPhoneNumbers/[[...contactId]].page.tsx rename to pages/accountLists/[accountListId]/tools/fix/phoneNumbers/[[...contactId]].page.tsx index f25e93932..b0e8c4bc5 100644 --- a/pages/accountLists/[accountListId]/tools/fixPhoneNumbers/[[...contactId]].page.tsx +++ b/pages/accountLists/[accountListId]/tools/fix/phoneNumbers/[[...contactId]].page.tsx @@ -2,13 +2,13 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { loadSession } from 'pages/api/utils/pagePropsHelpers'; import FixPhoneNumbers from 'src/components/Tool/FixPhoneNumbers/FixPhoneNumbers'; -import { ToolsWrapper } from '../ToolsWrapper'; -import { SetContactFocus, useToolsHelper } from '../useToolsHelper'; +import { ToolsWrapper } from '../../ToolsWrapper'; +import { SetContactFocus, useToolsHelper } from '../../useToolsHelper'; const FixPhoneNumbersPage: React.FC = () => { const { t } = useTranslation(); const { accountListId, handleSelectContact } = useToolsHelper(); - const pageUrl = 'tools/fixPhoneNumbers'; + const pageUrl = 'tools/fix/phoneNumbers'; const setContactFocus: SetContactFocus = (contactId) => { handleSelectContact(pageUrl, contactId); diff --git a/pages/accountLists/[accountListId]/tools/fixSendNewsletter/[[...contactId]].page.test.tsx b/pages/accountLists/[accountListId]/tools/fix/sendNewsletter/[[...contactId]].page.test.tsx similarity index 97% rename from pages/accountLists/[accountListId]/tools/fixSendNewsletter/[[...contactId]].page.test.tsx rename to pages/accountLists/[accountListId]/tools/fix/sendNewsletter/[[...contactId]].page.test.tsx index 6ab8659bf..fc4913e12 100644 --- a/pages/accountLists/[accountListId]/tools/fixSendNewsletter/[[...contactId]].page.test.tsx +++ b/pages/accountLists/[accountListId]/tools/fix/sendNewsletter/[[...contactId]].page.test.tsx @@ -84,7 +84,7 @@ describe('FixSendNewsletterPage', () => { await waitFor(() => { expect(pushFn).toHaveBeenCalledWith( - `/accountLists/${accountListId}/tools/fixSendNewsletter/${'contactId1'}`, + `/accountLists/${accountListId}/tools/fix/sendNewsletter/${'contactId1'}`, ); }); }); diff --git a/pages/accountLists/[accountListId]/tools/fixSendNewsletter/[[...contactId]].page.tsx b/pages/accountLists/[accountListId]/tools/fix/sendNewsletter/[[...contactId]].page.tsx similarity index 86% rename from pages/accountLists/[accountListId]/tools/fixSendNewsletter/[[...contactId]].page.tsx rename to pages/accountLists/[accountListId]/tools/fix/sendNewsletter/[[...contactId]].page.tsx index 5ee741b14..c816bd9f1 100644 --- a/pages/accountLists/[accountListId]/tools/fixSendNewsletter/[[...contactId]].page.tsx +++ b/pages/accountLists/[accountListId]/tools/fix/sendNewsletter/[[...contactId]].page.tsx @@ -2,13 +2,13 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { loadSession } from 'pages/api/utils/pagePropsHelpers'; import FixSendNewsletter from 'src/components/Tool/FixSendNewsletter/FixSendNewsletter'; -import { ToolsWrapper } from '../ToolsWrapper'; -import { SetContactFocus, useToolsHelper } from '../useToolsHelper'; +import { ToolsWrapper } from '../../ToolsWrapper'; +import { SetContactFocus, useToolsHelper } from '../../useToolsHelper'; const FixSendNewsletterPage: React.FC = () => { const { t } = useTranslation(); const { accountListId, handleSelectContact } = useToolsHelper(); - const pageUrl = 'tools/fixSendNewsletter'; + const pageUrl = 'tools/fix/sendNewsletter'; const setContactFocus: SetContactFocus = (contactId) => { handleSelectContact(pageUrl, contactId); diff --git a/pages/accountLists/[accountListId]/tools/mergeContacts/[[...contactId]].page.test.tsx b/pages/accountLists/[accountListId]/tools/merge/contacts/[[...contactId]].page.test.tsx similarity index 97% rename from pages/accountLists/[accountListId]/tools/mergeContacts/[[...contactId]].page.test.tsx rename to pages/accountLists/[accountListId]/tools/merge/contacts/[[...contactId]].page.test.tsx index bc3778043..41f9531e4 100644 --- a/pages/accountLists/[accountListId]/tools/mergeContacts/[[...contactId]].page.test.tsx +++ b/pages/accountLists/[accountListId]/tools/merge/contacts/[[...contactId]].page.test.tsx @@ -85,7 +85,7 @@ describe('MergeContactsPage', () => { await waitFor(() => { expect(pushFn).toHaveBeenCalledWith( - `/accountLists/${accountListId}/tools/mergeContacts/${'contact-1'}`, + `/accountLists/${accountListId}/tools/merge/contacts/${'contact-1'}`, ); }); }); diff --git a/pages/accountLists/[accountListId]/tools/mergeContacts/[[...contactId]].page.tsx b/pages/accountLists/[accountListId]/tools/merge/contacts/[[...contactId]].page.tsx similarity index 86% rename from pages/accountLists/[accountListId]/tools/mergeContacts/[[...contactId]].page.tsx rename to pages/accountLists/[accountListId]/tools/merge/contacts/[[...contactId]].page.tsx index 256bd9857..ff9c7f298 100644 --- a/pages/accountLists/[accountListId]/tools/mergeContacts/[[...contactId]].page.tsx +++ b/pages/accountLists/[accountListId]/tools/merge/contacts/[[...contactId]].page.tsx @@ -2,13 +2,13 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { loadSession } from 'pages/api/utils/pagePropsHelpers'; import MergeContacts from 'src/components/Tool/MergeContacts/MergeContacts'; -import { ToolsWrapper } from '../ToolsWrapper'; -import { SetContactFocus, useToolsHelper } from '../useToolsHelper'; +import { ToolsWrapper } from '../../ToolsWrapper'; +import { SetContactFocus, useToolsHelper } from '../../useToolsHelper'; const MergeContactsPage: React.FC = () => { const { t } = useTranslation(); const { accountListId, handleSelectContact } = useToolsHelper(); - const pageUrl = 'tools/mergeContacts'; + const pageUrl = 'tools/merge/contacts'; const setContactFocus: SetContactFocus = (contactId) => { handleSelectContact(pageUrl, contactId); diff --git a/pages/accountLists/[accountListId]/tools/mergePeople/[[...contactId]].page.test.tsx b/pages/accountLists/[accountListId]/tools/merge/people/[[...contactId]].page.test.tsx similarity index 97% rename from pages/accountLists/[accountListId]/tools/mergePeople/[[...contactId]].page.test.tsx rename to pages/accountLists/[accountListId]/tools/merge/people/[[...contactId]].page.test.tsx index 449d809f5..c87f5cfcd 100644 --- a/pages/accountLists/[accountListId]/tools/mergePeople/[[...contactId]].page.test.tsx +++ b/pages/accountLists/[accountListId]/tools/merge/people/[[...contactId]].page.test.tsx @@ -85,7 +85,7 @@ describe('MergePeoplePage', () => { await waitFor(() => { expect(pushFn).toHaveBeenCalledWith( - `/accountLists/${accountListId}/tools/mergePeople/${'contact-1'}`, + `/accountLists/${accountListId}/tools/merge/people/${'contact-1'}`, ); }); }); diff --git a/pages/accountLists/[accountListId]/tools/mergePeople/[[...contactId]].page.tsx b/pages/accountLists/[accountListId]/tools/merge/people/[[...contactId]].page.tsx similarity index 86% rename from pages/accountLists/[accountListId]/tools/mergePeople/[[...contactId]].page.tsx rename to pages/accountLists/[accountListId]/tools/merge/people/[[...contactId]].page.tsx index 752ab21d1..464059a15 100644 --- a/pages/accountLists/[accountListId]/tools/mergePeople/[[...contactId]].page.tsx +++ b/pages/accountLists/[accountListId]/tools/merge/people/[[...contactId]].page.tsx @@ -2,13 +2,13 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { loadSession } from 'pages/api/utils/pagePropsHelpers'; import MergePeople from 'src/components/Tool/MergePeople/MergePeople'; -import { ToolsWrapper } from '../ToolsWrapper'; -import { SetContactFocus, useToolsHelper } from '../useToolsHelper'; +import { ToolsWrapper } from '../../ToolsWrapper'; +import { SetContactFocus, useToolsHelper } from '../../useToolsHelper'; const MergePeoplePage: React.FC = () => { const { t } = useTranslation(); const { accountListId, handleSelectContact } = useToolsHelper(); - const pageUrl = 'tools/mergePeople'; + const pageUrl = 'tools/merge/people'; const setContactFocus: SetContactFocus = (contactId) => { handleSelectContact(pageUrl, contactId); diff --git a/src/components/Layouts/Primary/TopBar/Items/NavMenu/NavMenu.test.tsx b/src/components/Layouts/Primary/TopBar/Items/NavMenu/NavMenu.test.tsx index 4149d930e..55cfeb00c 100644 --- a/src/components/Layouts/Primary/TopBar/Items/NavMenu/NavMenu.test.tsx +++ b/src/components/Layouts/Primary/TopBar/Items/NavMenu/NavMenu.test.tsx @@ -258,13 +258,13 @@ describe('NavMenu', () => { ); expect(getByTestId('notificationTotalText')).toHaveTextContent('7'); userEvent.click(getByTestId('ToolsMenuToggle')); - expect(getByTestId('fixCommitmentInfo-false').firstChild).toHaveStyle( + expect(getByTestId('fix/commitmentInfo-false').firstChild).toHaveStyle( 'color: #383F43;', ); - expect(getByTestId('fixCommitmentInfo-false').children[1]).toHaveStyle( + expect(getByTestId('fix/commitmentInfo-false').children[1]).toHaveStyle( 'color: #383F43;', ); - expect(getByTestId('fixCommitmentInfo-notifications')).toBeInTheDocument(); + expect(getByTestId('fix/commitmentInfo-notifications')).toBeInTheDocument(); }); it('test notifications > 10', async () => { diff --git a/src/components/Tool/Home/ToolList.ts b/src/components/Tool/Home/ToolList.ts index 742ed6187..c5a0e7fac 100644 --- a/src/components/Tool/Home/ToolList.ts +++ b/src/components/Tool/Home/ToolList.ts @@ -48,26 +48,26 @@ export const ToolsList: ToolsGroup[] = [ desc: 'Set the correct contacts commitment info for each contact', icon: mdiCurrencyUsd, - id: 'fixCommitmentInfo', + id: 'fix/commitmentInfo', }, { tool: 'Fix Mailing Addresses', desc: 'Set the correct primary mailing address for each contact', icon: mdiMap, - id: 'fixMailingAddresses', + id: 'fix/mailingAddresses', }, { tool: 'Fix Send Newsletter', desc: 'Set the correct newsletter state for each contact', icon: mdiNewspaperVariantOutline, - id: 'fixSendNewsletter', + id: 'fix/sendNewsletter', }, { tool: 'Merge Contacts', desc: 'Review and merge duplicate contacts', icon: mdiHome, - id: 'mergeContacts', + id: 'merge/contacts', }, ], }, @@ -79,19 +79,19 @@ export const ToolsList: ToolsGroup[] = [ tool: 'Fix Email Addresses', desc: 'Set the correct primary email address for each person', icon: mdiEmail, - id: 'fixEmailAddresses', + id: 'fix/emailAddresses', }, { tool: 'Fix Phone Numbers', desc: 'Set the correct primary phone number for each person', icon: mdiPhone, - id: 'fixPhoneNumbers', + id: 'fix/phoneNumbers', }, { tool: 'Merge People', desc: 'Review and merge duplicate people', icon: mdiAccountGroup, - id: 'mergePeople', + id: 'merge/people', }, ], },