Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(onboarding): combine category and tag setup task for connections #51926

Merged
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
10 changes: 10 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ type OnboardingTask = {
workspaceMembersLink: string;
integrationName: string;
workspaceAccountingLink: string;
workspaceSettingsLink: string;
navatticURL: string;
}>,
) => string);
Expand Down Expand Up @@ -4902,6 +4903,15 @@ const CONST = {
'\n' +
`Chat with the specialist in your [#admins room](${adminsRoomLink}).`,
},
{
type: 'setupCategoriesAndTags',
autoCompleted: false,
title: 'Set up categories and tags',
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](${workspaceSettingsLink}).`,
},
{
type: 'setupCategories',
autoCompleted: false,
Expand Down
7 changes: 6 additions & 1 deletion src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3513,7 +3513,11 @@ function prepareOnboardingOptimisticData(
}
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;
Expand All @@ -3529,6 +3533,7 @@ function prepareOnboardingOptimisticData(
navatticURL: getNavatticURL(environment, engagementChoice),
integrationName,
workspaceAccountingLink: `${environmentURL}/${ROUTES.POLICY_ACCOUNTING.getRoute(onboardingPolicyID ?? '-1')}`,
workspaceSettingsLink: `${environmentURL}/${ROUTES.WORKSPACE_INITIAL.getRoute(onboardingPolicyID ?? '-1')}`,
})
: task.description;
const taskTitle =
Expand Down
Loading