Skip to content

Commit

Permalink
Change tools links
Browse files Browse the repository at this point in the history
  • Loading branch information
caleballdrin committed Aug 21, 2024
1 parent 9803ed9 commit a3c75e0
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ describe('FixEmailAddressesPage', () => {

await waitFor(() => {
expect(pushFn).toHaveBeenCalledWith(
`/accountLists/${accountListId}/tools/fixEmailAddresses/${contactId}`,
`/accountLists/${accountListId}/tools/fix/emailAddresses/${contactId}`,
);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe('FixMailingAddressesPage', () => {

await waitFor(() => {
expect(pushFn).toHaveBeenCalledWith(
`/accountLists/${accountListId}/tools/fixMailingAddresses/${contactId}`,
`/accountLists/${accountListId}/tools/fix/mailingAddresses/${contactId}`,
);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe('FixSendNewsletterPage', () => {

await waitFor(() => {
expect(pushFn).toHaveBeenCalledWith(
`/accountLists/${accountListId}/tools/fixSendNewsletter/${'contactId1'}`,
`/accountLists/${accountListId}/tools/fix/sendNewsletter/${'contactId1'}`,
);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe('MergeContactsPage', () => {

await waitFor(() => {
expect(pushFn).toHaveBeenCalledWith(
`/accountLists/${accountListId}/tools/mergeContacts/${'contact-1'}`,
`/accountLists/${accountListId}/tools/merge/contacts/${'contact-1'}`,
);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe('MergePeoplePage', () => {

await waitFor(() => {
expect(pushFn).toHaveBeenCalledWith(
`/accountLists/${accountListId}/tools/mergePeople/${'contact-1'}`,
`/accountLists/${accountListId}/tools/merge/people/${'contact-1'}`,
);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
14 changes: 7 additions & 7 deletions src/components/Tool/Home/ToolList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
],
},
Expand All @@ -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',
},
],
},
Expand Down

0 comments on commit a3c75e0

Please sign in to comment.