Skip to content

Commit 5c86b72

Browse files
authored
Merge pull request #42979 from truph01/fix/42900-OpenWorkspaceView-API-call-do-not-need
Fix: OpenWorkspaceView API call is made on pages that do not need it
2 parents cd77d59 + 3c81519 commit 5c86b72

11 files changed

+6
-6
lines changed

src/pages/workspace/WorkspacePageWithSections.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ function WorkspacePageWithSections({
106106
reimbursementAccount = CONST.REIMBURSEMENT_ACCOUNT.DEFAULT_DATA,
107107
route,
108108
shouldUseScrollView = false,
109-
shouldSkipVBBACall = false,
109+
shouldSkipVBBACall = true,
110110
shouldShowBackButton = false,
111111
user,
112112
shouldShowLoading = true,

src/pages/workspace/WorkspaceProfilePage.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ function WorkspaceProfilePage({policy, currencyList = {}, route}: WorkSpaceProfi
125125
shouldShowOfflineIndicatorInWideScreen
126126
shouldShowNonAdmin
127127
icon={Illustrations.House}
128+
shouldSkipVBBACall={false}
128129
>
129130
{(hasVBA?: boolean) => (
130131
<View style={[styles.flex1, styles.mt3, isSmallScreenWidth ? styles.workspaceSectionMobile : styles.workspaceSection]}>

src/pages/workspace/bills/WorkspaceBillsPage.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ function WorkspaceBillsPage({route}: WorkspaceBillsPageProps) {
2323
shouldUseScrollView
2424
headerText={translate('workspace.common.bills')}
2525
route={route}
26+
shouldSkipVBBACall={false}
2627
guidesCallTaskID={CONST.GUIDES_CALL_TASK_IDS.WORKSPACE_BILLS}
2728
shouldShowOfflineIndicatorInWideScreen
2829
>

src/pages/workspace/card/WorkspaceCardPage.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ function WorkspaceCardPage({route}: WorkspaceCardPageProps) {
2424
shouldUseScrollView
2525
headerText={translate('workspace.common.card')}
2626
route={route}
27+
shouldSkipVBBACall={false}
2728
guidesCallTaskID={CONST.GUIDES_CALL_TASK_IDS.WORKSPACE_CARD}
2829
shouldShowOfflineIndicatorInWideScreen
2930
>

src/pages/workspace/invoices/WorkspaceInvoicesPage.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ function WorkspaceInvoicesPage({route}: WorkspaceInvoicesPageProps) {
2323
headerText={translate('workspace.common.invoices')}
2424
guidesCallTaskID={CONST.GUIDES_CALL_TASK_IDS.WORKSPACE_INVOICES}
2525
shouldShowOfflineIndicatorInWideScreen
26+
shouldSkipVBBACall={false}
2627
route={route}
2728
>
2829
{(hasVBA?: boolean, policyID?: string) => (

src/pages/workspace/reimburse/WorkspaceRateAndUnitPage/InitialPage.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ function WorkspaceRateAndUnitPage(props: WorkspaceRateAndUnitPageProps) {
101101
headerText={translate('workspace.reimburse.trackDistance')}
102102
route={props.route}
103103
guidesCallTaskID={CONST.GUIDES_CALL_TASK_IDS.WORKSPACE_REIMBURSE}
104-
shouldSkipVBBACall
105104
backButtonRoute=""
106105
shouldShowLoading={false}
107106
shouldShowBackButton

src/pages/workspace/reimburse/WorkspaceRateAndUnitPage/RatePage.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ function WorkspaceRatePage(props: WorkspaceRatePageProps) {
6464
headerText={translate('workspace.reimburse.trackDistanceRate')}
6565
route={props.route}
6666
guidesCallTaskID={CONST.GUIDES_CALL_TASK_IDS.WORKSPACE_REIMBURSE}
67-
shouldSkipVBBACall
6867
backButtonRoute={ROUTES.WORKSPACE_RATE_AND_UNIT.getRoute(props.policy?.id ?? '')}
6968
shouldShowLoading={false}
7069
shouldShowBackButton

src/pages/workspace/reimburse/WorkspaceRateAndUnitPage/UnitPage.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ function WorkspaceUnitPage(props: WorkspaceUnitPageProps) {
5252
headerText={translate('workspace.reimburse.trackDistanceUnit')}
5353
route={props.route}
5454
guidesCallTaskID={CONST.GUIDES_CALL_TASK_IDS.WORKSPACE_REIMBURSE}
55-
shouldSkipVBBACall
5655
backButtonRoute={ROUTES.WORKSPACE_RATE_AND_UNIT.getRoute(props.policy?.id ?? '')}
5756
shouldShowLoading={false}
5857
shouldShowBackButton

src/pages/workspace/reimburse/WorkspaceReimbursePage.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ function WorkspaceReimbursePage({route, policy}: WorkspaceReimbursePageProps) {
2020
headerText={translate('workspace.common.reimburse')}
2121
route={route}
2222
guidesCallTaskID={CONST.GUIDES_CALL_TASK_IDS.WORKSPACE_REIMBURSE}
23-
shouldSkipVBBACall
2423
shouldShowLoading={false}
2524
shouldShowOfflineIndicatorInWideScreen
2625
>

src/pages/workspace/travel/WorkspaceTravelPage.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ function WorkspaceTravelPage({route}: WorkspaceTravelPageProps) {
2525
route={route}
2626
guidesCallTaskID={CONST.GUIDES_CALL_TASK_IDS.WORKSPACE_TRAVEL}
2727
shouldShowOfflineIndicatorInWideScreen
28+
shouldSkipVBBACall={false}
2829
>
2930
{(hasVBA, policyID) => (
3031
<View style={[styles.mt3, isSmallScreenWidth ? styles.workspaceSectionMobile : styles.workspaceSection]}>

src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ function WorkspaceWorkflowsPage({policy, betas, route}: WorkspaceWorkflowsPagePr
289289
guidesCallTaskID={CONST.GUIDES_CALL_TASK_IDS.WORKSPACE_WORKFLOWS}
290290
shouldShowOfflineIndicatorInWideScreen
291291
shouldShowNotFoundPage={!isPaidGroupPolicy || !isPolicyAdmin}
292-
shouldSkipVBBACall
293292
isLoading={isLoading}
294293
shouldShowLoading={isLoading}
295294
shouldUseScrollView

0 commit comments

Comments
 (0)