Skip to content

Commit

Permalink
Merge pull request #47593 from allroundexperts/fix-47399
Browse files Browse the repository at this point in the history
fix(47399) - Redirect to proper place after upgrade
  • Loading branch information
youssef-lr committed Aug 26, 2024
2 parents f58439c + 0eba93f commit 279f302
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pages/workspace/categories/CategoryGLCodePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function CategoryGLCodePage({route}: EditCategoryPageProps) {
if (newGLCode !== glCode) {
Category.setPolicyCategoryGLCode(route.params.policyID, categoryName, newGLCode);
}
Navigation.dismissModal();
Navigation.goBack(ROUTES.WORKSPACE_CATEGORY_SETTINGS.getRoute(route.params.policyID, categoryName));
},
[categoryName, glCode, route.params.policyID],
);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/workspace/categories/CategoryPayrollCodePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function CategoryPayrollCodePage({route}: EditCategoryPageProps) {
if (newPayrollCode !== payrollCode) {
Category.setPolicyCategoryPayrollCode(route.params.policyID, categoryName, newPayrollCode);
}
Navigation.dismissModal();
Navigation.goBack(ROUTES.WORKSPACE_CATEGORY_SETTINGS.getRoute(route.params.policyID, categoryName));
},
[categoryName, payrollCode, route.params.policyID],
);
Expand Down
3 changes: 2 additions & 1 deletion src/pages/workspace/tags/TagGLCodePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper';
import * as Tag from '@userActions/Policy/Tag';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import type SCREENS from '@src/SCREENS';
import INPUT_IDS from '@src/types/form/WorkspaceTagForm';
import type {PolicyTagLists} from '@src/types/onyx';
Expand Down Expand Up @@ -45,7 +46,7 @@ function TagGLCodePage({route, policyTags}: EditTagGLCodePageProps) {
if (newGLCode !== glCode) {
Tag.setPolicyTagGLCode(route.params.policyID, tagName, orderWeight, newGLCode);
}
Navigation.dismissModal();
Navigation.goBack(ROUTES.WORKSPACE_TAG_SETTINGS.getRoute(route.params.policyID, orderWeight, tagName));
},
[glCode, route.params.policyID, tagName, orderWeight],
);
Expand Down

0 comments on commit 279f302

Please sign in to comment.