diff --git a/src/ROUTES.ts b/src/ROUTES.ts index 27504998c49c..6b8b4e90ed7b 100644 --- a/src/ROUTES.ts +++ b/src/ROUTES.ts @@ -430,8 +430,8 @@ const ROUTES = { getRoute: (policyID: string, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/categories`, backTo), }, SETTINGS_CATEGORY_SETTINGS: { - route: 'settings/:policyID/categories/:categoryName', - getRoute: (policyID: string, categoryName: string, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/categories/${encodeURIComponent(categoryName)}`, backTo), + route: 'settings/:policyID/category/:categoryName', + getRoute: (policyID: string, categoryName: string, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/category/${encodeURIComponent(categoryName)}`, backTo), }, SETTINGS_CATEGORIES_SETTINGS: { route: 'settings/:policyID/categories/settings', @@ -442,9 +442,8 @@ const ROUTES = { getRoute: (policyID: string, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/categories/new`, backTo), }, SETTINGS_CATEGORY_EDIT: { - route: 'settings/:policyID/categories/:categoryName/edit', - getRoute: (policyID: string, categoryName: string, backTo = '') => - getUrlWithBackToParam(`settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/edit`, backTo), + route: 'settings/:policyID/category/:categoryName/edit', + getRoute: (policyID: string, categoryName: string, backTo = '') => getUrlWithBackToParam(`settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}/edit`, backTo), }, MONEY_REQUEST_STEP_CURRENCY: { route: ':action/:iouType/currency/:transactionID/:reportID/:pageIndex?', @@ -771,8 +770,8 @@ const ROUTES = { getRoute: (policyID: string) => `settings/workspaces/${policyID}/categories` as const, }, WORKSPACE_CATEGORY_SETTINGS: { - route: 'settings/workspaces/:policyID/categories/:categoryName', - getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}` as const, + route: 'settings/workspaces/:policyID/category/:categoryName', + getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}` as const, }, WORKSPACE_UPGRADE: { route: 'settings/workspaces/:policyID/upgrade/:featureName', @@ -796,36 +795,36 @@ const ROUTES = { getRoute: (policyID: string) => `settings/workspaces/${policyID}/categories/new` as const, }, WORKSPACE_CATEGORY_EDIT: { - route: 'settings/workspaces/:policyID/categories/:categoryName/edit', - getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/edit` as const, + route: 'settings/workspaces/:policyID/category/:categoryName/edit', + getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}/edit` as const, }, WORKSPACE_CATEGORY_PAYROLL_CODE: { - route: 'settings/workspaces/:policyID/categories/:categoryName/payroll-code', - getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/payroll-code` as const, + route: 'settings/workspaces/:policyID/category/:categoryName/payroll-code', + getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}/payroll-code` as const, }, WORKSPACE_CATEGORY_GL_CODE: { - route: 'settings/workspaces/:policyID/categories/:categoryName/gl-code', - getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/gl-code` as const, + route: 'settings/workspaces/:policyID/category/:categoryName/gl-code', + getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}/gl-code` as const, }, WORSKPACE_CATEGORY_DEFAULT_TAX_RATE: { - route: 'settings/workspaces/:policyID/categories/:categoryName/tax-rate', - getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/tax-rate` as const, + route: 'settings/workspaces/:policyID/category/:categoryName/tax-rate', + getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}/tax-rate` as const, }, WORSKPACE_CATEGORY_FLAG_AMOUNTS_OVER: { - route: 'settings/workspaces/:policyID/categories/:categoryName/flag-amounts', - getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/flag-amounts` as const, + route: 'settings/workspaces/:policyID/category/:categoryName/flag-amounts', + getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}/flag-amounts` as const, }, WORSKPACE_CATEGORY_DESCRIPTION_HINT: { - route: 'settings/workspaces/:policyID/categories/:categoryName/description-hint', - getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/description-hint` as const, + route: 'settings/workspaces/:policyID/category/:categoryName/description-hint', + getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}/description-hint` as const, }, WORSKPACE_CATEGORY_REQUIRE_RECEIPTS_OVER: { - route: 'settings/workspaces/:policyID/categories/:categoryName/require-receipts-over', - getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/require-receipts-over` as const, + route: 'settings/workspaces/:policyID/category/:categoryName/require-receipts-over', + getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}/require-receipts-over` as const, }, WORSKPACE_CATEGORY_APPROVER: { - route: 'settings/workspaces/:policyID/categories/:categoryName/approver', - getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/categories/${encodeURIComponent(categoryName)}/approver` as const, + route: 'settings/workspaces/:policyID/category/:categoryName/approver', + getRoute: (policyID: string, categoryName: string) => `settings/workspaces/${policyID}/category/${encodeURIComponent(categoryName)}/approver` as const, }, WORKSPACE_MORE_FEATURES: { route: 'settings/workspaces/:policyID/more-features',