From 936b5bd45d821e34eecbf852f9627c1cef0f7d45 Mon Sep 17 00:00:00 2001 From: jaydamani Date: Sat, 2 Nov 2024 13:23:30 +0100 Subject: [PATCH 1/4] feature(onboarding): combine category and tag setup task for connections --- src/CONST.ts | 9 +++++++++ src/libs/actions/Report.ts | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/CONST.ts b/src/CONST.ts index 437ee4e7fd42..b79c831264eb 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -4891,6 +4891,15 @@ const CONST = { '\n' + `Chat with the specialist in your [#admins room](${adminsRoomLink}).`, }, + { + type: 'addAccountingIntegration', + autoCompleted: false, + title: 'Set up categories and tags', + description: ({workspaceCategoriesLink, workspaceAccountingLink}) => + '*Set up categories and tags* so your team can code expenses for easy reporting.\n' + + '\n' + + `Import them automatically by [connecting your accounting software](${workspaceAccountingLink}), or set them up manually in your [workspace settings](${workspaceCategoriesLink}).`, + }, { type: 'setupCategories', autoCompleted: false, diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 3eac21cd1b18..0333577fff8d 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -3439,7 +3439,11 @@ function completeOnboarding( const tasksData = data.tasks .filter((task) => { - if (task.type === 'addAccountingIntegration' && !userReportedIntegration) { + if (['setupCategories', 'setupTags'].includes(task.type) && userReportedIntegration) { + return false; + } + + if (['addAccountingIntegration', 'setupCategoriesAndTags'].includes(task.type) && !userReportedIntegration) { return false; } return true; From 3c8de6dbc3ff0c764b6d4973d664ea7c386c0f16 Mon Sep 17 00:00:00 2001 From: jaydamani Date: Sat, 2 Nov 2024 13:32:05 +0100 Subject: [PATCH 2/4] update task type --- src/CONST.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CONST.ts b/src/CONST.ts index b79c831264eb..1ce3b14acc53 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -4892,7 +4892,7 @@ const CONST = { `Chat with the specialist in your [#admins room](${adminsRoomLink}).`, }, { - type: 'addAccountingIntegration', + type: 'setupCategoriesAndTags', autoCompleted: false, title: 'Set up categories and tags', description: ({workspaceCategoriesLink, workspaceAccountingLink}) => From 766e05bca88f1fa039404b0e0d6b92cce7452560 Mon Sep 17 00:00:00 2001 From: jaydamani Date: Tue, 5 Nov 2024 19:55:41 +0100 Subject: [PATCH 3/4] update link in setupCategoriesAndTags --- src/CONST.ts | 5 +++-- src/libs/actions/Report.ts | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/CONST.ts b/src/CONST.ts index 1ce3b14acc53..97b8ac45acc7 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -264,6 +264,7 @@ type OnboardingTaskType = { workspaceMembersLink: string; integrationName: string; workspaceAccountingLink: string; + workspaceSettingsLink: string; }>, ) => string); }; @@ -4895,10 +4896,10 @@ const CONST = { type: 'setupCategoriesAndTags', autoCompleted: false, title: 'Set up categories and tags', - description: ({workspaceCategoriesLink, workspaceAccountingLink}) => + description: ({workspaceSettingsLink, workspaceAccountingLink}) => '*Set up categories and tags* so your team can code expenses for easy reporting.\n' + '\n' + - `Import them automatically by [connecting your accounting software](${workspaceAccountingLink}), or set them up manually in your [workspace settings](${workspaceCategoriesLink}).`, + `Import them automatically by [connecting your accounting software](${workspaceAccountingLink}), or set them up manually in your [workspace settings](${workspaceSettingsLink}).`, }, { type: 'setupCategories', diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 0333577fff8d..b560dc244d89 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -3458,6 +3458,7 @@ function completeOnboarding( workspaceMoreFeaturesLink: `${environmentURL}/${ROUTES.WORKSPACE_MORE_FEATURES.getRoute(onboardingPolicyID ?? '-1')}`, integrationName, workspaceAccountingLink: `${environmentURL}/${ROUTES.POLICY_ACCOUNTING.getRoute(onboardingPolicyID ?? '-1')}`, + workspaceSettingsLink: `${environmentURL}/${ROUTES.WORKSPACE_INITIAL.getRoute(onboardingPolicyID ?? '01')}`, }) : task.description; const taskTitle = From 6dc5507184db3884830e25add289cbe5bd5d00b3 Mon Sep 17 00:00:00 2001 From: jaydamani Date: Fri, 15 Nov 2024 18:22:46 +0100 Subject: [PATCH 4/4] fix default for id --- src/libs/actions/Report.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 5f3aa94dd358..ac598d8fc58d 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -3533,7 +3533,7 @@ function prepareOnboardingOptimisticData( navatticURL: getNavatticURL(environment, engagementChoice), integrationName, workspaceAccountingLink: `${environmentURL}/${ROUTES.POLICY_ACCOUNTING.getRoute(onboardingPolicyID ?? '-1')}`, - workspaceSettingsLink: `${environmentURL}/${ROUTES.WORKSPACE_INITIAL.getRoute(onboardingPolicyID ?? '01')}`, + workspaceSettingsLink: `${environmentURL}/${ROUTES.WORKSPACE_INITIAL.getRoute(onboardingPolicyID ?? '-1')}`, }) : task.description; const taskTitle =