Skip to content

Commit 99bf554

Browse files
authored
Merge pull request #51926 from jaydamani/onboaring/combine-category-and-tag-task--51591
feature(onboarding): combine category and tag setup task for connections
2 parents 4bb19d7 + 6dc5507 commit 99bf554

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/CONST.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ type OnboardingTask = {
274274
workspaceMembersLink: string;
275275
integrationName: string;
276276
workspaceAccountingLink: string;
277+
workspaceSettingsLink: string;
277278
navatticURL: string;
278279
}>,
279280
) => string);
@@ -4911,6 +4912,15 @@ const CONST = {
49114912
'\n' +
49124913
`Chat with the specialist in your [#admins room](${adminsRoomLink}).`,
49134914
},
4915+
{
4916+
type: 'setupCategoriesAndTags',
4917+
autoCompleted: false,
4918+
title: 'Set up categories and tags',
4919+
description: ({workspaceSettingsLink, workspaceAccountingLink}) =>
4920+
'*Set up categories and tags* so your team can code expenses for easy reporting.\n' +
4921+
'\n' +
4922+
`Import them automatically by [connecting your accounting software](${workspaceAccountingLink}), or set them up manually in your [workspace settings](${workspaceSettingsLink}).`,
4923+
},
49144924
{
49154925
type: 'setupCategories',
49164926
autoCompleted: false,

src/libs/actions/Report.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3528,7 +3528,11 @@ function prepareOnboardingOptimisticData(
35283528
}
35293529
const tasksData = data.tasks
35303530
.filter((task) => {
3531-
if (task.type === 'addAccountingIntegration' && !userReportedIntegration) {
3531+
if (['setupCategories', 'setupTags'].includes(task.type) && userReportedIntegration) {
3532+
return false;
3533+
}
3534+
3535+
if (['addAccountingIntegration', 'setupCategoriesAndTags'].includes(task.type) && !userReportedIntegration) {
35323536
return false;
35333537
}
35343538
return true;
@@ -3544,6 +3548,7 @@ function prepareOnboardingOptimisticData(
35443548
navatticURL: getNavatticURL(environment, engagementChoice),
35453549
integrationName,
35463550
workspaceAccountingLink: `${environmentURL}/${ROUTES.POLICY_ACCOUNTING.getRoute(onboardingPolicyID ?? '-1')}`,
3551+
workspaceSettingsLink: `${environmentURL}/${ROUTES.WORKSPACE_INITIAL.getRoute(onboardingPolicyID ?? '-1')}`,
35473552
})
35483553
: task.description;
35493554
const taskTitle =

0 commit comments

Comments
 (0)