From 38dfa01a5fdc600e59319fd74b793640621e6b3b Mon Sep 17 00:00:00 2001 From: gijoe0295 Date: Thu, 5 Sep 2024 03:34:10 +0700 Subject: [PATCH] update manage my team's expenses onboarding tasks to include workspace feature links --- src/CONST.ts | 41 +++++++++++++++++++++----------------- src/libs/actions/Report.ts | 4 +++- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/src/CONST.ts b/src/CONST.ts index 11fbaf986663..0c68fe32369b 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -4401,52 +4401,57 @@ const CONST = { type: 'setupCategories', autoCompleted: false, title: 'Set up categories', - description: ({workspaceLink}: {workspaceLink: string}) => + description: ({workspaceCategoriesLink}: {workspaceCategoriesLink: string}) => '*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 your profile picture.\n' + - `2. Go to [*Workspaces* > [your workspace]](${workspaceLink}).\n` + - '3. Click *Categories*.\n' + - '4. Enable and disable default categories.\n' + - '5. Click *Add categories* to make your own.\n' + + '2. Go to Workspaces.\n' + + '3. Select your workspace.\n' + + '4. Click *Categories*.\n' + + '5. Enable and disable default categories.\n' + + '6. Click *Add categories* to make your own.\n' + + '7. For more controls like requiring a category for every expense, click *Settings*.\n' + '\n' + - 'For more controls like requiring a category for every expense, click *Settings*.', + `[Take me to workspace category settings](${workspaceCategoriesLink}).`, }, { type: 'addExpenseApprovals', autoCompleted: false, title: 'Add expense approvals', - description: ({workspaceLink}: {workspaceLink: string}) => + description: ({workspaceMoreFeaturesLink}: {workspaceMoreFeaturesLink: string}) => '*Add expense approvals* to review your team’s spend and keep it under control.\n' + '\n' + 'Here’s how to add expense approvals:\n' + '\n' + '1. Click your profile picture.\n' + - `2. Go to [*Workspaces* > [your workspace]](${workspaceLink}).\n` + - '3. Click *More features*.\n' + - '4. Enable *Workflows*.\n' + - '5. In *Workflows*, enable *Add approvals*.\n' + + '2. Go to Workspaces.\n' + + '3. Select your workspace.\n' + + '4. Click *More features*.\n' + + '5. Enable *Workflows*.\n' + + '6. In *Workflows*, enable *Add approvals*.\n' + + '7. You’ll be set as the expense approver. You can change this to any admin once you invite your team.\n' + '\n' + - 'You’ll be set as the expense approver. You can change this to any admin once you invite your team.', + `[Take me to enable more features](${workspaceMoreFeaturesLink}).`, }, { type: 'inviteTeam', autoCompleted: false, title: 'Invite your team', - description: ({workspaceLink}: {workspaceLink: string}) => + description: ({workspaceMembersLink}: {workspaceMembersLink: string}) => '*Invite your team* to Expensify so they can start tracking expenses today.\n' + '\n' + 'Here’s how to invite your team:\n' + '\n' + '1. Click your profile picture.\n' + - `2. Go to [*Workspaces* > [your workspace]](${workspaceLink}).\n` + - '3. Click *Members* > *Invite member*.\n' + - '4. Enter emails or phone numbers. \n' + - '5. Add an invite message if you want.\n' + + '2. Go to Workspaces.\n' + + '3. Select your workspace.\n' + + '4. Click *Members* > *Invite member*.\n' + + '5. Enter emails or phone numbers. \n' + + '6. Add an invite message if you want.\n' + '\n' + - 'That’s it! Happy expensing :)', + `[Take me to workspace members](${workspaceMembersLink}). That’s it, happy expensing! :)`, }, ], }, diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index bd31d3832605..923d23ca9636 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -3374,7 +3374,9 @@ function completeOnboarding( typeof task.description === 'function' ? task.description({ adminsRoomLink: `${environmentURL}/${ROUTES.REPORT_WITH_ID.getRoute(adminsChatReportID ?? '-1')}`, - workspaceLink: `${environmentURL}/${ROUTES.WORKSPACE_INITIAL.getRoute(onboardingPolicyID ?? '-1')}`, + workspaceCategoriesLink: `${environmentURL}/${ROUTES.WORKSPACE_CATEGORIES.getRoute(onboardingPolicyID ?? '-1')}`, + workspaceMembersLink: `${environmentURL}/${ROUTES.WORKSPACE_MEMBERS.getRoute(onboardingPolicyID ?? '-1')}`, + workspaceMoreFeaturesLink: `${environmentURL}/${ROUTES.WORKSPACE_MORE_FEATURES.getRoute(onboardingPolicyID ?? '-1')}`, }) : task.description; const currentTask = ReportUtils.buildOptimisticTaskReport(