Skip to content

[BT-104] Migrate Workspace - Categories (Part 2) #83832

@mjasikowski

Description

@mjasikowski

Description

Current State:

  • 5 routes for workspace category editing and import
  • These routes use backTo parameter for return navigation

Implementation:

  • Replace getRoute(..., backTo) with createDynamicRoute()
  • Add source screens to entryScreens array
  • Remove backTo parameter from route definitions
  • Test forward/back navigation

Scope

Routes (5):

Route Constant Path
WORKSPACE_CATEGORY_EDIT workspaces/:policyID/category/:categoryName/edit
WORKSPACE_CATEGORY_SETTINGS workspaces/:policyID/category/:categoryName
WORKSPACE_CATEGORY_PAYROLL_CODE workspaces/:policyID/category/:categoryName/payroll-code
WORKSPACE_CATEGORY_GL_CODE workspaces/:policyID/category/:categoryName/gl-code
WORKSPACE_CATEGORIES_IMPORT workspaces/:policyID/categories/import
WORKSPACE_CATEGORIES_IMPORTED

Usages

WORKSPACE_CATEGORY_EDIT:

  • src/pages/workspace/categories/EditCategoryPage.tsx:62,88

WORKSPACE_CATEGORY_SETTINGS:

  • src/pages/workspace/categories/CategoryRequiredFieldsPage.tsx:56
  • src/pages/workspace/categories/WorkspaceCategoriesPage.tsx:314
  • src/pages/workspace/categories/EditCategoryPage.tsx:62,88

WORKSPACE_CATEGORY_PAYROLL_CODE:

  • Search for usages in category payroll code flow

WORKSPACE_CATEGORY_GL_CODE:

  • Search for usages in category GL code flow

WORKSPACE_CATEGORIES_IMPORT:

  • src/pages/workspace/categories/WorkspaceCategoriesPage.tsx:361

Files to modify:

  • src/ROUTES.ts - Update route definitions
  • src/libs/Navigation/types.ts - Remove backTo from params
  • Components listed above

Migration Progress

  • WORKSPACE_CATEGORY_EDIT
  • WORKSPACE_CATEGORY_SETTINGS
  • WORKSPACE_CATEGORY_PAYROLL_CODE
  • WORKSPACE_CATEGORY_GL_CODE
  • WORKSPACE_CATEGORIES_IMPORT
  • WORKSPACE_CATEGORIES_IMPORTED
Issue OwnerCurrent Issue Owner: @mananjadhav

Metadata

Metadata

Labels

InternalRequires API changes or must be handled by Expensify staffReviewingHas a PR in reviewWeeklyKSv2

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions