Skip to content

Commit

Permalink
fix #48266 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Guccio163 committed Aug 30, 2024
1 parent 8353c1f commit 6a6c173
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/pages/workspace/WorkspaceInitialPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,15 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, reimbursementAcc
});
}

if (featureStates?.[CONST.POLICY.MORE_FEATURES.ARE_RULES_ENABLED] && canUseWorkspaceRules) {
protectedCollectPolicyMenuItems.push({
translationKey: 'workspace.common.rules',
icon: Expensicons.Feed,
action: singleExecution(waitForNavigate(() => Navigation.navigate(ROUTES.WORKSPACE_RULES.getRoute(policyID)))),
routeName: SCREENS.WORKSPACE.RULES,
});
}

if (featureStates?.[CONST.POLICY.MORE_FEATURES.ARE_CATEGORIES_ENABLED]) {
protectedCollectPolicyMenuItems.push({
translationKey: 'workspace.common.categories',
Expand Down Expand Up @@ -325,15 +334,6 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, reimbursementAcc
});
}

if (featureStates?.[CONST.POLICY.MORE_FEATURES.ARE_RULES_ENABLED] && canUseWorkspaceRules) {
protectedCollectPolicyMenuItems.push({
translationKey: 'workspace.common.rules',
icon: Expensicons.Feed,
action: singleExecution(waitForNavigate(() => Navigation.navigate(ROUTES.WORKSPACE_RULES.getRoute(policyID)))),
routeName: SCREENS.WORKSPACE.RULES,
});
}

protectedCollectPolicyMenuItems.push({
translationKey: 'workspace.common.moreFeatures',
icon: Expensicons.Gear,
Expand Down

0 comments on commit 6a6c173

Please sign in to comment.