Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/components/AddPaymentMethodMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {hasSeenTourSelector} from '@selectors/Onboarding';
import type {RefObject} from 'react';
import React, {useEffect, useState} from 'react';
import type {View} from 'react-native';
Expand Down Expand Up @@ -62,6 +63,7 @@ function AddPaymentMethodMenu({
const [restoreFocusType, setRestoreFocusType] = useState<BaseModalProps['restoreFocusType']>();
const [session] = useOnyx(ONYXKEYS.SESSION);
const [introSelected, introSelectedStatus] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED);
const [isSelfTourViewed = false] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {selector: hasSeenTourSelector});
const [betas] = useOnyx(ONYXKEYS.BETAS);

// Users can choose to pay with business bank account in case of Expense reports or in case of P2P IOU report
Expand All @@ -79,9 +81,9 @@ function AddPaymentMethodMenu({
return;
}

completePaymentOnboarding(CONST.PAYMENT_SELECTED.PBA, introSelected, betas);
completePaymentOnboarding(CONST.PAYMENT_SELECTED.PBA, introSelected, isSelfTourViewed, betas);
onItemSelected(CONST.PAYMENT_METHODS.PERSONAL_BANK_ACCOUNT);
}, [betas, introSelected, introSelectedStatus, introSelectedStatus.status, isPersonalOnlyOption, isVisible, onItemSelected]);
}, [betas, introSelected, introSelectedStatus, introSelectedStatus.status, isPersonalOnlyOption, isVisible, onItemSelected, isSelfTourViewed]);

if (isPersonalOnlyOption) {
return null;
Expand All @@ -108,7 +110,7 @@ function AddPaymentMethodMenu({
text: translate('common.personalBankAccount'),
icon: icons.Bank,
onSelected: () => {
completePaymentOnboarding(CONST.PAYMENT_SELECTED.PBA, introSelected, betas);
completePaymentOnboarding(CONST.PAYMENT_SELECTED.PBA, introSelected, isSelfTourViewed, betas);
onItemSelected(CONST.PAYMENT_METHODS.PERSONAL_BANK_ACCOUNT);
},
},
Expand Down
6 changes: 5 additions & 1 deletion src/components/KYCWall/BaseKYCWall.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {hasSeenTourSelector} from '@selectors/Onboarding';
import React, {useCallback, useEffect, useImperativeHandle, useRef, useState} from 'react';
import {Dimensions} from 'react-native';
import type {EmitterSubscription, View} from 'react-native';
Expand Down Expand Up @@ -62,6 +63,8 @@
const [chatReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${chatReportID}`);
const [policies] = useOnyx(ONYXKEYS.COLLECTION.POLICY);
const [introSelected] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED);
const [isSelfTourViewed = false] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {selector: hasSeenTourSelector});
const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT);

Check failure on line 67 in src/components/KYCWall/BaseKYCWall.tsx

View workflow job for this annotation

GitHub Actions / ESLint check

'reimbursementAccount' is assigned a value but never used

Check failure on line 67 in src/components/KYCWall/BaseKYCWall.tsx

View workflow job for this annotation

GitHub Actions / ESLint check

'reimbursementAccount' is assigned a value but never used

Check failure on line 67 in src/components/KYCWall/BaseKYCWall.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

'reimbursementAccount' is assigned a value but never used

Check failure on line 67 in src/components/KYCWall/BaseKYCWall.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

'reimbursementAccount' is assigned a value but never used
const [betas] = useOnyx(ONYXKEYS.BETAS);

const {formatPhoneNumber} = useLocalize();
Expand Down Expand Up @@ -167,7 +170,7 @@
if (policyID && iouReport?.policyID) {
savePreferredPaymentMethod(iouReport.policyID, policyID, CONST.LAST_PAYMENT_METHOD.IOU, lastPaymentMethod?.[iouReport?.policyID]);
}
completePaymentOnboarding(CONST.PAYMENT_SELECTED.BBA, introSelected, betas, adminsChatReportID, policyID);
completePaymentOnboarding(CONST.PAYMENT_SELECTED.BBA, introSelected, isSelfTourViewed, betas, adminsChatReportID, policyID);
if (workspaceChatReportID) {
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(workspaceChatReportID, reportPreviewReportActionID));
}
Expand Down Expand Up @@ -207,6 +210,7 @@
formatPhoneNumber,
reportTransactions,
lastPaymentMethod,
isSelfTourViewed,
betas,
],
);
Expand Down
3 changes: 3 additions & 0 deletions src/components/MoneyReportHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@
paymentMethod,
activePolicy,
betas,
isSelfTourViewed,
});
} else {
startAnimation();
Expand All @@ -623,6 +624,7 @@
activePolicy,
policy,
betas,
isSelfTourViewed,
userBillingGraceEndPeriods,
});
if (currentSearchQueryJSON && !isOffline) {
Expand Down Expand Up @@ -658,6 +660,7 @@
shouldCalculateTotals,
currentSearchResults?.search?.isLoading,
betas,
isSelfTourViewed,
userBillingGraceEndPeriods,
],
);
Expand Down Expand Up @@ -1765,7 +1768,7 @@
}
return option;
});
}, [originalSelectedTransactionsOptions, showDeleteModal, dismissedRejectUseExplanation]);

Check warning on line 1771 in src/components/MoneyReportHeader.tsx

View workflow job for this annotation

GitHub Actions / ESLint check

React Hook useMemo has missing dependencies: 'isDelegateAccessRestricted' and 'showDelegateNoAccessModal'. Either include them or remove the dependency array

Check warning on line 1771 in src/components/MoneyReportHeader.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

React Hook useMemo has missing dependencies: 'isDelegateAccessRestricted' and 'showDelegateNoAccessModal'. Either include them or remove the dependency array

const shouldShowSelectedTransactionsButton = !!selectedTransactionsOptions.length && !transactionThreadReportID;

Expand Down
3 changes: 3 additions & 0 deletions src/components/ProcessMoneyReportHoldMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {hasSeenTourSelector} from '@selectors/Onboarding';
import React, {useMemo} from 'react';
import type {OnyxEntry} from 'react-native-onyx';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
Expand Down Expand Up @@ -76,6 +77,7 @@ function ProcessMoneyReportHoldMenu({
const activePolicy = usePolicy(activePolicyID);
const policy = usePolicy(moneyRequestReport?.policyID);
const [introSelected] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED);
const [isSelfTourViewed = false] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {selector: hasSeenTourSelector});
const [betas] = useOnyx(ONYXKEYS.BETAS);
const [moneyRequestReportNextStep] = useOnyx(`${ONYXKEYS.COLLECTION.NEXT_STEP}${moneyRequestReport?.reportID}`);
const {isBetaEnabled} = usePermissions();
Expand Down Expand Up @@ -123,6 +125,7 @@ function ProcessMoneyReportHoldMenu({
activePolicy,
policy,
betas,
isSelfTourViewed,
userBillingGraceEndPeriods,
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {useFocusEffect} from '@react-navigation/native';
import {hasSeenTourSelector} from '@selectors/Onboarding';
import {FlashList} from '@shopify/flash-list';
import type {FlashListRef, ListRenderItemInfo} from '@shopify/flash-list';
import React, {useCallback, useDeferredValue, useEffect, useMemo, useRef, useState} from 'react';
Expand Down Expand Up @@ -180,6 +181,7 @@ function MoneyRequestReportPreviewContent({
const isIouReportArchived = useReportIsArchived(iouReportID);
const isChatReportArchived = useReportIsArchived(chatReport?.reportID);
const [introSelected] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED);
const [isSelfTourViewed = false] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {selector: hasSeenTourSelector});
const {isBetaEnabled} = usePermissions();
const [transactionViolations] = useOnyx(ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS);
const [bankAccountList] = useOnyx(ONYXKEYS.BANK_ACCOUNT_LIST);
Expand Down Expand Up @@ -275,6 +277,7 @@ function MoneyRequestReportPreviewContent({
paymentMethod,
activePolicy,
betas,
isSelfTourViewed,
});
} else {
payMoneyRequest({
Expand All @@ -287,6 +290,7 @@ function MoneyRequestReportPreviewContent({
activePolicy,
policy,
betas,
isSelfTourViewed,
userBillingGraceEndPeriods,
});
}
Expand All @@ -306,6 +310,7 @@ function MoneyRequestReportPreviewContent({
activePolicy,
policy,
betas,
isSelfTourViewed,
userBillingGraceEndPeriods,
],
);
Expand Down
10 changes: 8 additions & 2 deletions src/libs/actions/IOU/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@
paymentMethod?: PaymentMethod;
activePolicy?: OnyxTypes.Policy;
betas: OnyxEntry<OnyxTypes.Beta[]>;
isSelfTourViewed: boolean;
};

type RejectMoneyRequestData = {
Expand Down Expand Up @@ -808,7 +809,7 @@
betas: OnyxEntry<OnyxTypes.Beta[]>;
};

let allPersonalDetails: OnyxTypes.PersonalDetailsList = {};

Check warning on line 812 in src/libs/actions/IOU/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
Onyx.connect({
key: ONYXKEYS.PERSONAL_DETAILS_LIST,
callback: (value) => {
Expand Down Expand Up @@ -902,9 +903,10 @@
activePolicy?: OnyxEntry<OnyxTypes.Policy>;
policy?: OnyxEntry<OnyxTypes.Policy>;
betas: OnyxEntry<OnyxTypes.Beta[]>;
isSelfTourViewed: boolean;
};

let allTransactions: NonNullable<OnyxCollection<OnyxTypes.Transaction>> = {};

Check warning on line 909 in src/libs/actions/IOU/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
Onyx.connect({
key: ONYXKEYS.COLLECTION.TRANSACTION,
waitForCollectionCallback: true,
Expand All @@ -918,7 +920,7 @@
},
});

let allTransactionDrafts: NonNullable<OnyxCollection<OnyxTypes.Transaction>> = {};

Check warning on line 923 in src/libs/actions/IOU/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
Onyx.connect({
key: ONYXKEYS.COLLECTION.TRANSACTION_DRAFT,
waitForCollectionCallback: true,
Expand All @@ -927,7 +929,7 @@
},
});

let allTransactionViolations: NonNullable<OnyxCollection<OnyxTypes.TransactionViolations>> = {};

Check warning on line 932 in src/libs/actions/IOU/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
Onyx.connect({
key: ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS,
waitForCollectionCallback: true,
Expand All @@ -941,7 +943,7 @@
},
});

let allPolicyTags: OnyxCollection<OnyxTypes.PolicyTagLists> = {};

Check warning on line 946 in src/libs/actions/IOU/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
Onyx.connect({
key: ONYXKEYS.COLLECTION.POLICY_TAGS,
waitForCollectionCallback: true,
Expand All @@ -954,7 +956,7 @@
},
});

let allReports: OnyxCollection<OnyxTypes.Report>;

Check warning on line 959 in src/libs/actions/IOU/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
Onyx.connect({
key: ONYXKEYS.COLLECTION.REPORT,
waitForCollectionCallback: true,
Expand All @@ -963,7 +965,7 @@
},
});

let allReportNameValuePairs: OnyxCollection<OnyxTypes.ReportNameValuePairs>;

Check warning on line 968 in src/libs/actions/IOU/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
Onyx.connect({
key: ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS,
waitForCollectionCallback: true,
Expand All @@ -973,7 +975,7 @@
});

let userAccountID = -1;
let currentUserEmail = '';

Check warning on line 978 in src/libs/actions/IOU/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
Onyx.connect({
key: ONYXKEYS.SESSION,
callback: (value) => {
Expand All @@ -982,7 +984,7 @@
},
});

let deprecatedCurrentUserPersonalDetails: OnyxEntry<OnyxTypes.PersonalDetails>;

Check warning on line 987 in src/libs/actions/IOU/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
Onyx.connect({
key: ONYXKEYS.PERSONAL_DETAILS_LIST,
callback: (value) => {
Expand Down Expand Up @@ -11950,6 +11952,7 @@
function completePaymentOnboarding(
paymentSelected: ValueOf<typeof CONST.PAYMENT_SELECTED>,
introSelected: OnyxEntry<OnyxTypes.IntroSelected>,
isSelfTourViewed: boolean,
betas: OnyxEntry<OnyxTypes.Beta[]>,
adminsChatReportID?: string,
onboardingPolicyID?: string,
Expand Down Expand Up @@ -11985,6 +11988,7 @@
shouldSkipTestDriveModal: true,
companySize: introSelected?.companySize as OnboardingCompanySize,
introSelected,
isSelfTourViewed,
betas,
});
}
Expand All @@ -12003,14 +12007,15 @@
activePolicy,
policy,
betas,
isSelfTourViewed,
} = params;
if (chatReport.policyID && shouldRestrictUserBillableActions(chatReport.policyID, userBillingGraceEndPeriods)) {
Navigation.navigate(ROUTES.RESTRICTED_ACTION.getRoute(chatReport.policyID));
return;
}

const paymentSelected = paymentType === CONST.IOU.PAYMENT_TYPE.VBBA ? CONST.IOU.PAYMENT_SELECTED.BBA : CONST.IOU.PAYMENT_SELECTED.PBA;
completePaymentOnboarding(paymentSelected, introSelected, betas);
completePaymentOnboarding(paymentSelected, introSelected, isSelfTourViewed, betas);

const recipient = {accountID: iouReport?.ownerAccountID ?? CONST.DEFAULT_NUMBER_ID};
const {params: payMoneyRequestParams, onyxData} = getPayMoneyRequestParams({
Expand Down Expand Up @@ -12051,6 +12056,7 @@
activePolicy,
invoiceReportCurrentNextStepDeprecated,
betas,
isSelfTourViewed,
}: PayInvoiceArgs) {
const recipient = {accountID: invoiceReport?.ownerAccountID ?? CONST.DEFAULT_NUMBER_ID};
const {
Expand Down Expand Up @@ -12085,7 +12091,7 @@
});

const paymentSelected = paymentMethodType === CONST.IOU.PAYMENT_TYPE.VBBA ? CONST.IOU.PAYMENT_SELECTED.BBA : CONST.IOU.PAYMENT_SELECTED.PBA;
completePaymentOnboarding(paymentSelected, introSelected, betas);
completePaymentOnboarding(paymentSelected, introSelected, isSelfTourViewed, betas);

let params: PayInvoiceParams = {
reportID: invoiceReport?.reportID,
Expand Down
3 changes: 3 additions & 0 deletions src/libs/actions/Report/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4807,6 +4807,7 @@ type CompleteOnboardingProps = {
onboardingPurposeSelected?: OnboardingPurpose;
shouldWaitForRHPVariantInitialization?: boolean;
introSelected: OnyxEntry<IntroSelected>;
isSelfTourViewed: boolean;
betas: OnyxEntry<Beta[]>;
};

Expand All @@ -4827,6 +4828,7 @@ async function completeOnboarding({
onboardingPurposeSelected,
shouldWaitForRHPVariantInitialization = false,
introSelected,
isSelfTourViewed,
betas,
}: CompleteOnboardingProps) {
const onboardingData = prepareOnboardingOnyxData({
Expand All @@ -4841,6 +4843,7 @@ async function completeOnboarding({
selectedInterestedFeatures,
isInvitedAccountant,
onboardingPurposeSelected,
isSelfTourViewed,
betas,
});
if (!onboardingData) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function BaseOnboardingInterestedFeatures({shouldUseNativeStyles}: BaseOnboardin
const [introSelected] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED);
const [betas] = useOnyx(ONYXKEYS.BETAS);
const [activePolicyID] = useOnyx(ONYXKEYS.NVP_ACTIVE_POLICY_ID);
const [isSelfTourViewed] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {selector: hasSeenTourSelector});
const [isSelfTourViewed = false] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {selector: hasSeenTourSelector});

const {isBetaEnabled} = usePermissions();
const [session] = useOnyx(ONYXKEYS.SESSION);
Expand Down Expand Up @@ -225,6 +225,7 @@ function BaseOnboardingInterestedFeatures({shouldUseNativeStyles}: BaseOnboardin
shouldSkipTestDriveModal: !!policyID && !adminsChatReportID,
shouldWaitForRHPVariantInitialization: isSidePanelReportSupported,
introSelected,
isSelfTourViewed,
betas,
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {hasSeenTourSelector} from '@selectors/Onboarding';
import React, {useCallback, useEffect, useState} from 'react';
import {View} from 'react-native';
import FormProvider from '@components/Form/FormProvider';
Expand Down Expand Up @@ -48,6 +49,7 @@ function BaseOnboardingPersonalDetails({currentUserPersonalDetails, shouldUseNat
const {onboardingMessages} = useOnboardingMessages();
const [session] = useOnyx(ONYXKEYS.SESSION);
const [onboardingPersonalDetailsForm] = useOnyx(ONYXKEYS.FORMS.ONBOARDING_PERSONAL_DETAILS_FORM);
const [isSelfTourViewed = false] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {selector: hasSeenTourSelector});

// When we merge public email with work email, we now want to navigate to the
// concierge chat report of the new work email and not the last accessed report.
Expand Down Expand Up @@ -83,6 +85,7 @@ function BaseOnboardingPersonalDetails({currentUserPersonalDetails, shouldUseNat
onboardingPolicyID,
shouldSkipTestDriveModal: !!onboardingPolicyID && !mergedAccountConciergeReportID,
introSelected,
isSelfTourViewed,
betas,
});

Expand Down Expand Up @@ -110,6 +113,7 @@ function BaseOnboardingPersonalDetails({currentUserPersonalDetails, shouldUseNat
mergedAccountConciergeReportID,
conciergeChatReportID,
introSelected,
isSelfTourViewed,
betas,
],
);
Expand Down
3 changes: 3 additions & 0 deletions src/pages/OnboardingPurpose/BaseOnboardingPurpose.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {useIsFocused} from '@react-navigation/native';
import {hasSeenTourSelector} from '@selectors/Onboarding';
import React, {useCallback, useImperativeHandle, useMemo, useRef} from 'react';
import {View} from 'react-native';
import {ScrollView} from 'react-native-gesture-handler';
Expand Down Expand Up @@ -67,6 +68,7 @@ function BaseOnboardingPurpose({shouldUseNativeStyles, shouldEnableMaxHeight, ro
const [personalDetailsForm] = useOnyx(ONYXKEYS.FORMS.ONBOARDING_PERSONAL_DETAILS_FORM);
const [onboardingCompanySize] = useOnyx(ONYXKEYS.ONBOARDING_COMPANY_SIZE);
const [introSelected] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED);
const [isSelfTourViewed = false] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {selector: hasSeenTourSelector});
const [betas] = useOnyx(ONYXKEYS.BETAS);
const paddingHorizontal = onboardingIsMediumOrLargerScreenWidth ? styles.ph8 : styles.ph5;

Expand Down Expand Up @@ -109,6 +111,7 @@ function BaseOnboardingPurpose({shouldUseNativeStyles, shouldEnableMaxHeight, ro
onboardingPolicyID,
companySize: onboardingCompanySize,
introSelected,
isSelfTourViewed,
betas,
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {hasSeenTourSelector} from '@selectors/Onboarding';
import React, {useEffect, useState} from 'react';
import {View} from 'react-native';
import Button from '@components/Button';
Expand Down Expand Up @@ -45,6 +46,7 @@ function BaseOnboardingWorkspaceInvite({shouldUseNativeStyles}: BaseOnboardingWo
const [onboardingAdminsChatReportID] = useOnyx(ONYXKEYS.ONBOARDING_ADMINS_CHAT_REPORT_ID);
const [onboardingPurposeSelected] = useOnyx(ONYXKEYS.ONBOARDING_PURPOSE_SELECTED);
const [introSelected] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED);
const [isSelfTourViewed = false] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {selector: hasSeenTourSelector});
const [betas] = useOnyx(ONYXKEYS.BETAS);
const policy = usePolicy(onboardingPolicyID);
const {onboardingMessages} = useOnboardingMessages();
Expand Down Expand Up @@ -129,6 +131,7 @@ function BaseOnboardingWorkspaceInvite({shouldUseNativeStyles}: BaseOnboardingWo
isInvitedAccountant,
onboardingPurposeSelected,
introSelected,
isSelfTourViewed,
betas,
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {hasSeenTourSelector} from '@selectors/Onboarding';
import React, {useCallback, useEffect} from 'react';
import {View} from 'react-native';
import Button from '@components/Button';
Expand Down Expand Up @@ -43,6 +44,7 @@ function BaseOnboardingWorkspaceOptional({shouldUseNativeStyles}: BaseOnboarding
const archivedReportsIdSet = useArchivedReportsIdSet();
const {onboardingMessages} = useOnboardingMessages();
const [introSelected] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED);
const [isSelfTourViewed = false] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {selector: hasSeenTourSelector});
const [betas] = useOnyx(ONYXKEYS.BETAS);
const {isRestrictedPolicyCreation} = usePreferredPolicy();
// When we merge public email with work email, we now want to navigate to the
Expand Down Expand Up @@ -91,6 +93,7 @@ function BaseOnboardingWorkspaceOptional({shouldUseNativeStyles}: BaseOnboarding
onboardingPolicyID,
shouldSkipTestDriveModal: (!!onboardingPolicyID && !onboardingAdminsChatReportID) || onboardingPurposeSelected === CONST.ONBOARDING_CHOICES.PERSONAL_SPEND,
introSelected,
isSelfTourViewed,
betas,
});

Expand Down Expand Up @@ -119,6 +122,7 @@ function BaseOnboardingWorkspaceOptional({shouldUseNativeStyles}: BaseOnboarding
mergedAccountConciergeReportID,
introSelected,
conciergeChatReportID,
isSelfTourViewed,
betas,
]);

Expand Down
3 changes: 3 additions & 0 deletions src/pages/OnboardingWorkspaces/BaseOnboardingWorkspaces.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {useFocusEffect} from '@react-navigation/native';
import {hasSeenTourSelector} from '@selectors/Onboarding';
import React from 'react';
import {View} from 'react-native';
import Button from '@components/Button';
Expand Down Expand Up @@ -51,6 +52,7 @@ function BaseOnboardingWorkspaces({route, shouldUseNativeStyles}: BaseOnboarding
const [loginList] = useOnyx(ONYXKEYS.LOGIN_LIST);
const [session] = useOnyx(ONYXKEYS.SESSION);
const [introSelected] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED);
const [isSelfTourViewed = false] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {selector: hasSeenTourSelector});
const [betas] = useOnyx(ONYXKEYS.BETAS);
const archivedReportsIdSet = useArchivedReportsIdSet();

Expand All @@ -77,6 +79,7 @@ function BaseOnboardingWorkspaces({route, shouldUseNativeStyles}: BaseOnboarding
shouldSkipTestDriveModal: !!(policy.automaticJoiningEnabled ? policy.policyID : undefined),
companySize: onboardingCompanySize,
introSelected,
isSelfTourViewed,
betas,
});
setOnboardingAdminsChatReportID();
Expand Down
Loading
Loading