diff --git a/src/components/ProductTrainingContext/TOOLTIPS.ts b/src/components/ProductTrainingContext/TOOLTIPS.ts index 79c7f431d5022..b035846f5fab7 100644 --- a/src/components/ProductTrainingContext/TOOLTIPS.ts +++ b/src/components/ProductTrainingContext/TOOLTIPS.ts @@ -138,7 +138,7 @@ const TOOLTIPS: Record = { onHideTooltip: () => dismissProductTraining(SCAN_TEST_TOOLTIP), name: SCAN_TEST_TOOLTIP, priority: 900, - shouldShow: () => true, + shouldShow: ({hasBeenAddedToNudgeMigration}) => !hasBeenAddedToNudgeMigration, shouldRenderActionButtons: true, }, [SCAN_TEST_TOOLTIP_MANAGER]: { @@ -150,7 +150,7 @@ const TOOLTIPS: Record = { onHideTooltip: (isDismissedUsingCloseButton = false) => dismissProductTraining(SCAN_TEST_TOOLTIP_MANAGER, isDismissedUsingCloseButton), name: SCAN_TEST_TOOLTIP_MANAGER, priority: 1000, - shouldShow: () => true, + shouldShow: ({hasBeenAddedToNudgeMigration}) => !hasBeenAddedToNudgeMigration, }, [SCAN_TEST_CONFIRMATION]: { content: [ @@ -161,7 +161,7 @@ const TOOLTIPS: Record = { onHideTooltip: (isDismissedUsingCloseButton = false) => dismissProductTraining(SCAN_TEST_CONFIRMATION, isDismissedUsingCloseButton), name: SCAN_TEST_CONFIRMATION, priority: 1100, - shouldShow: () => true, + shouldShow: ({hasBeenAddedToNudgeMigration}) => !hasBeenAddedToNudgeMigration, }, [OUTSTANDING_FILTER]: { content: [ diff --git a/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx b/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx index be7f607ece39c..e1fb2928810dc 100644 --- a/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx +++ b/src/pages/iou/request/MoneyRequestParticipantsSelector.tsx @@ -118,6 +118,8 @@ function MoneyRequestParticipantsSelector({ const isPaidGroupPolicy = useMemo(() => isPaidGroupPolicyUtil(policy), [policy]); const isIOUSplit = iouType === CONST.IOU.TYPE.SPLIT; const isCategorizeOrShareAction = [CONST.IOU.ACTION.CATEGORIZE, CONST.IOU.ACTION.SHARE].some((option) => option === action); + const [tryNewDot] = useOnyx(ONYXKEYS.NVP_TRY_NEW_DOT, {canBeMissing: true}); + const hasBeenAddedToNudgeMigration = !!tryNewDot?.nudgeMigration?.timestamp; const importAndSaveContacts = useCallback(() => { contactImport().then(({contactList, permissionStatus}: ContactImportResult) => { @@ -179,7 +181,7 @@ function MoneyRequestParticipantsSelector({ shouldSeparateSelfDMChat: iouType !== CONST.IOU.TYPE.INVOICE, shouldSeparateWorkspaceChat: true, includeSelfDM: !isMovingTransactionFromTrackExpense(action) && iouType !== CONST.IOU.TYPE.INVOICE, - canShowManagerMcTest: action !== CONST.IOU.ACTION.SUBMIT, + canShowManagerMcTest: !hasBeenAddedToNudgeMigration && action !== CONST.IOU.ACTION.SUBMIT, isPerDiemRequest, }, ); @@ -202,6 +204,7 @@ function MoneyRequestParticipantsSelector({ options.reports, participants, isPerDiemRequest, + hasBeenAddedToNudgeMigration, ]); const chatOptions = useMemo(() => { diff --git a/tests/ui/components/ProductTrainingContextProvider.tsx b/tests/ui/components/ProductTrainingContextProvider.tsx index 00a9fee043961..b684c877c344b 100644 --- a/tests/ui/components/ProductTrainingContextProvider.tsx +++ b/tests/ui/components/ProductTrainingContextProvider.tsx @@ -228,7 +228,6 @@ describe('ProductTrainingContextProvider', () => { it('should hide tooltip when hideProductTrainingTooltip is called', async () => { // When migrated user has dismissed welcome modal Onyx.merge(ONYXKEYS.NVP_ONBOARDING, {hasCompletedGuidedSetupFlow: true}); - Onyx.merge(ONYXKEYS.NVP_TRY_NEW_DOT, {nudgeMigration: {timestamp: new Date()}}); const date = new Date(); Onyx.set(ONYXKEYS.NVP_DISMISSED_PRODUCT_TRAINING, { migratedUserWelcomeModal: {