Skip to content

Commit

Permalink
Merge pull request #40940 from Expensify/hayata-prevent-users-from-di…
Browse files Browse the repository at this point in the history
…sabling-accounting-feature-if-there-is-active-accounting-connection

[App PR #41278] Prevent users from disabling accounting feature if there is active accounting connection
  • Loading branch information
aldo-expensify authored May 2, 2024
2 parents 0451223 + ef2f428 commit 39f3a85
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/pages/workspace/WorkspaceMoreFeaturesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ function WorkspaceMoreFeaturesPage({policy, route}: WorkspaceMoreFeaturesPagePro
action: (isEnabled: boolean) => {
Policy.enablePolicyConnections(policy?.id ?? '', isEnabled);
},
disabled: hasAccountingConnection,
errors: ErrorUtils.getLatestErrorField(policy ?? {}, CONST.POLICY.MORE_FEATURES.ARE_CONNECTIONS_ENABLED),
onCloseError: () => Policy.clearPolicyErrorField(policy?.id ?? '', CONST.POLICY.MORE_FEATURES.ARE_CONNECTIONS_ENABLED),
},
Expand Down

0 comments on commit 39f3a85

Please sign in to comment.