From ba863a37efd5d724d51af8b41133978ed54c915c Mon Sep 17 00:00:00 2001 From: Ishpaul Singh Date: Thu, 9 Jan 2025 22:32:23 +0530 Subject: [PATCH 1/3] add tasks for new user first workspace --- src/CONST.ts | 125 ++++++++++++------ .../API/parameters/CreateWorkspaceParams.ts | 1 + src/libs/actions/IOU.ts | 6 +- src/libs/actions/Policy/Policy.ts | 36 ++++- src/libs/actions/Report.ts | 80 ++++++----- src/types/onyx/IntroSelected.ts | 3 + 6 files changed, 176 insertions(+), 75 deletions(-) diff --git a/src/CONST.ts b/src/CONST.ts index 789e9b588609..687112baacb1 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -72,6 +72,7 @@ const selectableOnboardingChoices = { const backendOnboardingChoices = { ADMIN: 'newDotAdmin', SUBMIT: 'newDotSubmit', + TRACK_WORKSPACE: 'newDotTrackWorkspace', } as const; const onboardingChoices = { @@ -98,6 +99,50 @@ const selfGuidedTourTask: OnboardingTask = { description: ({navatticURL}) => `[Take a self-guided product tour](${navatticURL}) and learn about everything Expensify has to offer.`, }; +const createWorkspaceTask: OnboardingTask = { + type: 'createWorkspace', + autoCompleted: true, + title: 'Create a workspace', + description: + '*Create a workspace* to track expenses, scan receipts, chat, and more.\n' + + '\n' + + 'Here’s how to create a workspace:\n' + + '\n' + + '1. Click the settings tab.\n' + + '2. Click *Workspaces* > *New workspace*.\n' + + '\n' + + '*Your new workspace is ready! It’ll keep all of your spend (and chats) in one place.*', +}; + +const meetGuideTask: OnboardingTask = { + type: 'meetGuide', + autoCompleted: false, + title: 'Meet your setup specialist', + description: ({adminsRoomLink}) => + `Meet your setup specialist, who can answer any questions as you get started with Expensify. Yes, a real human!\n` + + '\n' + + `Chat with the specialist in your [#admins room](${adminsRoomLink}).`, +}; + +const setupCategoriesTask: OnboardingTask = { + type: 'setupCategories', + autoCompleted: false, + title: 'Set up categories', + description: ({workspaceCategoriesLink}) => + '*Set up categories* so your team can code expenses for easy reporting.\n' + + '\n' + + 'Here’s how to set up categories:\n' + + '\n' + + '1. Click the settings tab.\n' + + '2. Go to *Workspaces*.\n' + + '3. Select your workspace.\n' + + '4. Click *Categories*.\n' + + "5. Disable any categories you don't need.\n" + + '6. Add your own categories in the top right.\n' + + '\n' + + `[Take me to workspace category settings](${workspaceCategoriesLink}).`, +}; + const onboardingEmployerOrSubmitMessage: OnboardingMessage = { message: 'Getting paid back is as easy as sending a message. Let’s go over the basics.', video: { @@ -5014,30 +5059,9 @@ const CONST = { height: 960, }, tasks: [ - { - type: 'createWorkspace', - autoCompleted: true, - title: 'Create a workspace', - description: - '*Create a workspace* to track expenses, scan receipts, chat, and more.\n' + - '\n' + - 'Here’s how to create a workspace:\n' + - '\n' + - '1. Click the settings tab.\n' + - '2. Click *Workspaces* > *New workspace*.\n' + - '\n' + - '*Your new workspace is ready! It’ll keep all of your spend (and chats) in one place.*', - }, + createWorkspaceTask, selfGuidedTourTask, - { - type: 'meetGuide', - autoCompleted: false, - title: 'Meet your setup specialist', - description: ({adminsRoomLink}) => - `Meet your setup specialist, who can answer any questions as you get started with Expensify. Yes, a real human!\n` + - '\n' + - `Chat with the specialist in your [#admins room](${adminsRoomLink}).`, - }, + meetGuideTask, { type: 'setupCategoriesAndTags', autoCompleted: false, @@ -5047,24 +5071,7 @@ const CONST = { '\n' + `Import them automatically by [connecting your accounting software](${workspaceAccountingLink}), or set them up manually in your [workspace settings](${workspaceSettingsLink}).`, }, - { - type: 'setupCategories', - autoCompleted: false, - title: 'Set up categories', - description: ({workspaceCategoriesLink}) => - '*Set up categories* so your team can code expenses for easy reporting.\n' + - '\n' + - 'Here’s how to set up categories:\n' + - '\n' + - '1. Click the settings tab.\n' + - '2. Go to *Workspaces*.\n' + - '3. Select your workspace.\n' + - '4. Click *Categories*.\n' + - "5. Disable any categories you don't need.\n" + - '6. Add your own categories in the top right.\n' + - '\n' + - `[Take me to workspace category settings](${workspaceCategoriesLink}).`, - }, + setupCategoriesTask, { type: 'setupTags', autoCompleted: false, @@ -5141,6 +5148,42 @@ const CONST = { }, ], }, + [onboardingChoices.TRACK_WORKSPACE]: { + message: 'Here are some important tasks to help get your workspace set up.', + video: { + url: `${CLOUDFRONT_URL}/videos/guided-setup-manage-team-v2.mp4`, + thumbnailUrl: `${CLOUDFRONT_URL}/images/guided-setup-manage-team.jpg`, + duration: 55, + width: 1280, + height: 960, + }, + tasks: [ + createWorkspaceTask, + meetGuideTask, + setupCategoriesTask, + { + type: 'inviteAccountant', + autoCompleted: false, + title: 'Invite your accountant', + description: ({workspaceMembersLink}) => + '*Invite your accountant to Expensify and share your expenses with them to make tax time easier.\n' + + '\n' + + 'Here’s how to invite your accountant:\n' + + '\n' + + '1. Click your profile picture.\n' + + '2. Go to *Workspaces*.\n' + + '3. Select your workspace.\n' + + '4. Click *Members* > Invite member.\n' + + '5. Enter their email or phone number.\n' + + '6. Add an invite message if you’d like.\n' + + '7. You’ll be set as the expense approver. You can change this to any admin once you invite your team.\n' + + '\n' + + 'That’s it, happy expensing! 😄\n' + + '\n' + + `[View your workspace members](${workspaceMembersLink}).`, + }, + ], + }, [onboardingChoices.PERSONAL_SPEND]: onboardingPersonalSpendMessage, [onboardingChoices.CHAT_SPLIT]: { message: 'Splitting bills with friends is as easy as sending a message. Here’s how.', diff --git a/src/libs/API/parameters/CreateWorkspaceParams.ts b/src/libs/API/parameters/CreateWorkspaceParams.ts index 91c1039169aa..1b8cfcaeecd5 100644 --- a/src/libs/API/parameters/CreateWorkspaceParams.ts +++ b/src/libs/API/parameters/CreateWorkspaceParams.ts @@ -11,6 +11,7 @@ type CreateWorkspaceParams = { customUnitID: string; customUnitRateID: string; engagementChoice?: string; + guidedSetupData?: string; }; export default CreateWorkspaceParams; diff --git a/src/libs/actions/IOU.ts b/src/libs/actions/IOU.ts index ee49b1c8e803..03788dfb5469 100644 --- a/src/libs/actions/IOU.ts +++ b/src/libs/actions/IOU.ts @@ -2642,7 +2642,7 @@ function getTrackExpenseInformation( let createdWorkspaceParams: CreateWorkspaceParams | undefined; if (isDraftReport) { - const workspaceData = Policy.buildPolicyData(undefined, policy?.makeMeAdmin, policy?.name, policy?.id, chatReport?.reportID); + const workspaceData = Policy.buildPolicyData(undefined, policy?.makeMeAdmin, policy?.name, policy?.id, chatReport?.reportID, CONST.ONBOARDING_CHOICES.TRACK_WORKSPACE); createdWorkspaceParams = workspaceData.params; optimisticData.push(...workspaceData.optimisticData); successData.push(...workspaceData.successData); @@ -3821,6 +3821,8 @@ function categorizeTrackedExpense(trackedExpenseParams: CategorizeTrackedExpense policyExpenseCreatedReportActionID: createdWorkspaceParams?.expenseCreatedReportActionID, adminsChatReportID: createdWorkspaceParams?.adminsChatReportID, adminsCreatedReportActionID: createdWorkspaceParams?.adminsCreatedReportActionID, + engagementChoice: createdWorkspaceParams?.engagementChoice, + guidedSetupData: createdWorkspaceParams?.guidedSetupData, }; API.write(WRITE_COMMANDS.CATEGORIZE_TRACKED_EXPENSE, parameters, {optimisticData, successData, failureData}); @@ -3902,6 +3904,8 @@ function shareTrackedExpense( policyExpenseCreatedReportActionID: createdWorkspaceParams?.expenseCreatedReportActionID, adminsChatReportID: createdWorkspaceParams?.adminsChatReportID, adminsCreatedReportActionID: createdWorkspaceParams?.adminsCreatedReportActionID, + engagementChoice: createdWorkspaceParams?.engagementChoice, + guidedSetupData: createdWorkspaceParams?.guidedSetupData, }; API.write(WRITE_COMMANDS.SHARE_TRACKED_EXPENSE, parameters, {optimisticData, successData, failureData}); diff --git a/src/libs/actions/Policy/Policy.ts b/src/libs/actions/Policy/Policy.ts index c04648c04104..278114d171d3 100644 --- a/src/libs/actions/Policy/Policy.ts +++ b/src/libs/actions/Policy/Policy.ts @@ -5,6 +5,7 @@ import type {NullishDeep, OnyxCollection, OnyxEntry, OnyxUpdate} from 'react-nat import Onyx from 'react-native-onyx'; import type {ValueOf} from 'type-fest'; import type {ReportExportType} from '@components/ButtonWithDropdownMenu/types'; +import {prepareOnboardingOnyxData} from '@libs/actions/Report'; import * as API from '@libs/API'; import type { AddBillingCardAndRequestWorkspaceOwnerChangeParams, @@ -78,9 +79,11 @@ import * as TransactionUtils from '@libs/TransactionUtils'; import type {PolicySelector} from '@pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover'; import * as PaymentMethods from '@userActions/PaymentMethods'; import * as PersistedRequests from '@userActions/PersistedRequests'; +import type {OnboardingPurpose} from '@src/CONST'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type { + IntroSelected, InvitedEmailsToAccountIDs, PersonalDetailsList, Policy, @@ -1676,6 +1679,12 @@ function createDraftInitialWorkspace(policyOwnerEmail = '', policyName = '', pol Onyx.update(optimisticData); } +let introSelected: OnyxEntry; +Onyx.connect({ + key: ONYXKEYS.NVP_INTRO_SELECTED, + callback: (value) => (introSelected = value), +}); + /** * Generates onyx data for creating a new workspace * @@ -1685,7 +1694,7 @@ function createDraftInitialWorkspace(policyOwnerEmail = '', policyName = '', pol * @param [policyID] custom policy id we will use for created workspace * @param [expenseReportId] the reportID of the expense report that is being used to create the workspace */ -function buildPolicyData(policyOwnerEmail = '', makeMeAdmin = false, policyName = '', policyID = generatePolicyID(), expenseReportId?: string, engagementChoice?: string) { +function buildPolicyData(policyOwnerEmail = '', makeMeAdmin = false, policyName = '', policyID = generatePolicyID(), expenseReportId?: string, engagementChoice?: OnboardingPurpose) { const workspaceName = policyName || generateDefaultWorkspaceName(policyOwnerEmail); const {customUnits, customUnitID, customUnitRateID, outputCurrency} = buildOptimisticDistanceRateCustomUnits(); @@ -1947,9 +1956,24 @@ function buildPolicyData(policyOwnerEmail = '', makeMeAdmin = false, policyName expenseCreatedReportActionID, customUnitID, customUnitRateID, - engagementChoice, }; + if (!introSelected?.createWorkspace && engagementChoice) { + const { + guidedSetupData, + optimisticData: taskOptimisticData, + successData: taskSuccessData, + failureData: taskFailureData, + } = prepareOnboardingOnyxData(engagementChoice, CONST.ONBOARDING_MESSAGES[engagementChoice], expenseChatReportID, policyID); + + params.guidedSetupData = JSON.stringify(guidedSetupData); + params.engagementChoice = engagementChoice; + + optimisticData.push(...taskOptimisticData); + successData.push(...taskSuccessData); + failureData.push(...taskFailureData); + } + return {successData, optimisticData, failureData, params}; } @@ -1962,7 +1986,13 @@ function buildPolicyData(policyOwnerEmail = '', makeMeAdmin = false, policyName * @param [policyID] custom policy id we will use for created workspace * @param [engagementChoice] Purpose of using application selected by user in guided setup flow */ -function createWorkspace(policyOwnerEmail = '', makeMeAdmin = false, policyName = '', policyID = generatePolicyID(), engagementChoice = ''): CreateWorkspaceParams { +function createWorkspace( + policyOwnerEmail = '', + makeMeAdmin = false, + policyName = '', + policyID = generatePolicyID(), + engagementChoice = CONST.ONBOARDING_CHOICES.MANAGE_TEAM, +): CreateWorkspaceParams { const {optimisticData, failureData, successData, params} = buildPolicyData(policyOwnerEmail, makeMeAdmin, policyName, policyID, undefined, engagementChoice); API.write(WRITE_COMMANDS.CREATE_WORKSPACE, params, {optimisticData, successData, failureData}); diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 1e157b983483..27dd0d850b4c 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -892,7 +892,7 @@ function openReport( onboardingMessage.tasks = updatedTasks; } - const onboardingData = prepareOnboardingOptimisticData(choice, onboardingMessage); + const onboardingData = prepareOnboardingOnyxData(choice, onboardingMessage); optimisticData.push(...onboardingData.optimisticData, { onyxMethod: Onyx.METHOD.MERGE, @@ -3555,7 +3555,7 @@ function getReportPrivateNote(reportID: string | undefined) { API.read(READ_COMMANDS.GET_REPORT_PRIVATE_NOTE, parameters, {optimisticData, successData, failureData}); } -function prepareOnboardingOptimisticData( +function prepareOnboardingOnyxData( engagementChoice: OnboardingPurpose, data: ValueOf, adminsChatReportID?: string, @@ -3618,6 +3618,7 @@ function prepareOnboardingOptimisticData( reportComment: videoComment.commentText, }; } + let createWorkspaceTaskReportID; const tasksData = data.tasks .filter((task) => { if (['setupCategories', 'setupTags'].includes(task.type) && userReportedIntegration) { @@ -3627,6 +3628,14 @@ function prepareOnboardingOptimisticData( if (['addAccountingIntegration', 'setupCategoriesAndTags'].includes(task.type) && !userReportedIntegration) { return false; } + type SkipViewTourOnboardingChoices = "newDotSubmit" | "newDotSplitChat" | "newDotPersonalSpend" | "newDotEmployer" + if ( + task.type === 'viewTour' && + [CONST.ONBOARDING_CHOICES.EMPLOYER, CONST.ONBOARDING_CHOICES.PERSONAL_SPEND, CONST.ONBOARDING_CHOICES.SUBMIT, CONST.ONBOARDING_CHOICES.CHAT_SPLIT].includes(introSelected?.choice as SkipViewTourOnboardingChoices) && + engagementChoice === CONST.ONBOARDING_CHOICES.MANAGE_TEAM + ) { + return false; + } return true; }) .map((task, index) => { @@ -3675,6 +3684,9 @@ function prepareOnboardingOptimisticData( const completedTaskReportAction = task.autoCompleted ? ReportUtils.buildOptimisticTaskReportAction(currentTask.reportID, CONST.REPORT.ACTIONS.TYPE.TASK_COMPLETED, 'marked as complete', actorAccountID, 2) : null; + if (task.type === 'createWorkspace') { + createWorkspaceTaskReportID = currentTask.reportID + } return { task, @@ -3856,7 +3868,6 @@ function prepareOnboardingOptimisticData( const optimisticData: OnyxUpdate[] = [...tasksForOptimisticData]; const lastVisibleActionCreated = welcomeSignOffCommentAction.created; - optimisticData.push( { onyxMethod: Onyx.METHOD.MERGE, @@ -3871,7 +3882,10 @@ function prepareOnboardingOptimisticData( { onyxMethod: Onyx.METHOD.MERGE, key: ONYXKEYS.NVP_INTRO_SELECTED, - value: {choice: engagementChoice}, + value: { + choice: engagementChoice, + createWorkspace: createWorkspaceTaskReportID, + }, }, ); @@ -3937,7 +3951,10 @@ function prepareOnboardingOptimisticData( { onyxMethod: Onyx.METHOD.MERGE, key: ONYXKEYS.NVP_INTRO_SELECTED, - value: {choice: null}, + value: { + choice: null, + createWorkspace: null, + }, }, ); // If we post tasks in the #admins room, it means that a guide is assigned and all messages except tasks are handled by the backend @@ -4100,33 +4117,35 @@ function prepareOnboardingOptimisticData( } } - optimisticData.push({ - onyxMethod: Onyx.METHOD.MERGE, - key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${targetChatReportID}`, - value: { - [welcomeSignOffCommentAction.reportActionID]: welcomeSignOffCommentAction as ReportAction, - }, - }); + if (!introSelected?.choice) { + optimisticData.push({ + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${targetChatReportID}`, + value: { + [welcomeSignOffCommentAction.reportActionID]: welcomeSignOffCommentAction as ReportAction, + }, + }); - successData.push({ - onyxMethod: Onyx.METHOD.MERGE, - key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${targetChatReportID}`, - value: { - [welcomeSignOffCommentAction.reportActionID]: {pendingAction: null}, - }, - }); + successData.push({ + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${targetChatReportID}`, + value: { + [welcomeSignOffCommentAction.reportActionID]: {pendingAction: null}, + }, + }); - failureData.push({ - onyxMethod: Onyx.METHOD.MERGE, - key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${targetChatReportID}`, - value: { - [welcomeSignOffCommentAction.reportActionID]: { - errors: ErrorUtils.getMicroSecondOnyxErrorWithTranslationKey('report.genericAddCommentFailureMessage'), - } as ReportAction, - }, - }); + failureData.push({ + onyxMethod: Onyx.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${targetChatReportID}`, + value: { + [welcomeSignOffCommentAction.reportActionID]: { + errors: ErrorUtils.getMicroSecondOnyxErrorWithTranslationKey('report.genericAddCommentFailureMessage'), + } as ReportAction, + }, + }); + guidedSetupData.push(...tasksForParameters, {type: 'message', ...welcomeSignOffMessage}); + } - guidedSetupData.push(...tasksForParameters, {type: 'message', ...welcomeSignOffMessage}); return {optimisticData, successData, failureData, guidedSetupData, actorAccountID, selfDMParameters}; } @@ -4143,7 +4162,7 @@ function completeOnboarding( userReportedIntegration?: OnboardingAccounting, wasInvited?: boolean, ) { - const {optimisticData, successData, failureData, guidedSetupData, actorAccountID, selfDMParameters} = prepareOnboardingOptimisticData( + const {optimisticData, successData, failureData, guidedSetupData, actorAccountID, selfDMParameters} = prepareOnboardingOnyxData( engagementChoice, data, adminsChatReportID, @@ -4693,4 +4712,5 @@ export { getConciergeReportID, setDeleteTransactionNavigateBackUrl, clearDeleteTransactionNavigateBackUrl, + prepareOnboardingOnyxData, }; diff --git a/src/types/onyx/IntroSelected.ts b/src/types/onyx/IntroSelected.ts index d8077a4a8a4a..aec09130d9cb 100644 --- a/src/types/onyx/IntroSelected.ts +++ b/src/types/onyx/IntroSelected.ts @@ -14,6 +14,9 @@ type IntroSelected = { /** Task reportID for 'viewTour' type */ viewTour?: string; + + /** Task reportID for 'createWorkspace' type */ + createWorkspace?: string; }; export default IntroSelected; From 32dc80935b1fa46995b1d8adea1e79b05776c36a Mon Sep 17 00:00:00 2001 From: Ishpaul Singh Date: Fri, 10 Jan 2025 02:22:17 +0530 Subject: [PATCH 2/3] prettier --- src/libs/actions/Report.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 27dd0d850b4c..6ac05869a09e 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -3628,14 +3628,16 @@ function prepareOnboardingOnyxData( if (['addAccountingIntegration', 'setupCategoriesAndTags'].includes(task.type) && !userReportedIntegration) { return false; } - type SkipViewTourOnboardingChoices = "newDotSubmit" | "newDotSplitChat" | "newDotPersonalSpend" | "newDotEmployer" + type SkipViewTourOnboardingChoices = 'newDotSubmit' | 'newDotSplitChat' | 'newDotPersonalSpend' | 'newDotEmployer'; if ( task.type === 'viewTour' && - [CONST.ONBOARDING_CHOICES.EMPLOYER, CONST.ONBOARDING_CHOICES.PERSONAL_SPEND, CONST.ONBOARDING_CHOICES.SUBMIT, CONST.ONBOARDING_CHOICES.CHAT_SPLIT].includes(introSelected?.choice as SkipViewTourOnboardingChoices) && + [CONST.ONBOARDING_CHOICES.EMPLOYER, CONST.ONBOARDING_CHOICES.PERSONAL_SPEND, CONST.ONBOARDING_CHOICES.SUBMIT, CONST.ONBOARDING_CHOICES.CHAT_SPLIT].includes( + introSelected?.choice as SkipViewTourOnboardingChoices, + ) && engagementChoice === CONST.ONBOARDING_CHOICES.MANAGE_TEAM ) { - return false; - } + return false; + } return true; }) .map((task, index) => { @@ -3685,7 +3687,7 @@ function prepareOnboardingOnyxData( ? ReportUtils.buildOptimisticTaskReportAction(currentTask.reportID, CONST.REPORT.ACTIONS.TYPE.TASK_COMPLETED, 'marked as complete', actorAccountID, 2) : null; if (task.type === 'createWorkspace') { - createWorkspaceTaskReportID = currentTask.reportID + createWorkspaceTaskReportID = currentTask.reportID; } return { @@ -4146,7 +4148,6 @@ function prepareOnboardingOnyxData( guidedSetupData.push(...tasksForParameters, {type: 'message', ...welcomeSignOffMessage}); } - return {optimisticData, successData, failureData, guidedSetupData, actorAccountID, selfDMParameters}; } From ace0d1e01ee846f07a25f751703563b73e2e4269 Mon Sep 17 00:00:00 2001 From: Ishpaul Singh Date: Sat, 11 Jan 2025 02:19:37 +0530 Subject: [PATCH 3/3] replace meetSetupSpecialist task with meetGuideTask and fix guidedSetupData being empty --- src/CONST.ts | 10 +--------- src/libs/actions/Report.ts | 4 +++- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/CONST.ts b/src/CONST.ts index 111488022626..29a81afe7b17 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -5243,15 +5243,7 @@ const CONST = { height: 960, }, tasks: [ - { - type: 'meetSetupSpecialist', - autoCompleted: false, - title: 'Meet your setup specialist', - description: - '*Meet your setup specialist* who can answer any questions as you get started with Expensify. Yes, a real human!' + - '\n' + - 'Chat with them in your #admins room or schedule a call today.', - }, + meetGuideTask, { type: 'reviewWorkspaceSettings', autoCompleted: false, diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 6ac05869a09e..ac22b0b9d2e2 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -4119,6 +4119,8 @@ function prepareOnboardingOnyxData( } } + guidedSetupData.push(...tasksForParameters); + if (!introSelected?.choice) { optimisticData.push({ onyxMethod: Onyx.METHOD.MERGE, @@ -4145,7 +4147,7 @@ function prepareOnboardingOnyxData( } as ReportAction, }, }); - guidedSetupData.push(...tasksForParameters, {type: 'message', ...welcomeSignOffMessage}); + guidedSetupData.push({type: 'message', ...welcomeSignOffMessage}); } return {optimisticData, successData, failureData, guidedSetupData, actorAccountID, selfDMParameters};