Skip to content

Commit c0870db

Browse files
committed
updates
1 parent df82748 commit c0870db

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/pages/workspace/WorkspaceInitialPage.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: Workspac
125125
const {shouldUseNarrowLayout} = useResponsiveLayout();
126126
const {translate} = useLocalize();
127127
const {isBetaEnabled} = usePermissions();
128+
const isUberForBusinessEnabled = isBetaEnabled(CONST.BETAS.UBER_FOR_BUSINESS);
128129
const {isOffline} = useNetwork();
129130
const wasRendered = useRef(false);
130131
const [allReports] = useOnyx(ONYXKEYS.COLLECTION.REPORT, {canBeMissing: true});
@@ -148,9 +149,9 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: Workspac
148149
[CONST.POLICY.MORE_FEATURES.ARE_RULES_ENABLED]: policy?.areRulesEnabled,
149150
[CONST.POLICY.MORE_FEATURES.ARE_INVOICES_ENABLED]: policy?.areInvoicesEnabled,
150151
[CONST.POLICY.MORE_FEATURES.ARE_PER_DIEM_RATES_ENABLED]: policy?.arePerDiemRatesEnabled,
151-
[CONST.POLICY.MORE_FEATURES.ARE_RECEIPT_PARTNERS_ENABLED]: isBetaEnabled(CONST.BETAS.UBER_FOR_BUSINESS) && (policy?.areReceiptPartnersEnabled ?? false),
152+
[CONST.POLICY.MORE_FEATURES.ARE_RECEIPT_PARTNERS_ENABLED]: isUberForBusinessEnabled && (policy?.areReceiptPartnersEnabled ?? false),
152153
}),
153-
[policy, isBetaEnabled],
154+
[policy, isUberForBusinessEnabled],
154155
) as PolicyFeatureStates;
155156

156157
const fetchPolicyData = useCallback(() => {

src/pages/workspace/WorkspaceMoreFeaturesPage.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,7 @@ function WorkspaceMoreFeaturesPage({policy, route}: WorkspaceMoreFeaturesPagePro
328328
isActive: policy?.areReceiptPartnersEnabled ?? false,
329329
pendingAction: policy?.pendingFields?.areReceiptPartnersEnabled,
330330
disabledAction: () => {
331-
// TODO: When Uber integration is added, check if any integration exists
332-
// and show the warning modal to disconnect integration first
331+
// TODO: When Uber integration is added, check if any integration exists if(!hasReceiptPartnersIntegration) return;
333332
setIsReceiptPartnersWarningModalOpen(true);
334333
},
335334
action: (isEnabled: boolean) => {

0 commit comments

Comments
 (0)