Skip to content

Commit

Permalink
add task types
Browse files Browse the repository at this point in the history
  • Loading branch information
rezkiy37 committed Apr 19, 2024
1 parent 76d419c commit 67a2e10
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
13 changes: 13 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3620,6 +3620,7 @@ const CONST = {
},
tasks: [
{
type: 'createWorkspace',
title: 'Create a workspace',
subtitle: 'Create a workspace to track expenses, scan receipts, chat, and more.',
message:
Expand All @@ -3631,6 +3632,7 @@ const CONST = {
'Your new workspace is ready! It’ll keep all of your spend (and chats) in one place.',
},
{
type: 'trackExpense',
title: 'Track an expense',
subtitle: 'Track an expense in any currency, in just a few clicks.',
message:
Expand All @@ -3656,6 +3658,7 @@ const CONST = {
},
tasks: [
{
type: 'submitExpense',
title: 'Submit an expense',
subtitle: 'Submit an expense by entering an amount or scanning a receipt.',
message:
Expand All @@ -3669,6 +3672,7 @@ const CONST = {
'Then, send your request and wait for that sweet “Cha-ching!” when it’s complete.',
},
{
type: 'enableWallet',
title: 'Enable your wallet',
subtitle: 'You’ll need to enable your Expensify Wallet to get paid back. Don’t worry, it’s easy!',
message:
Expand All @@ -3693,6 +3697,7 @@ const CONST = {
},
tasks: [
{
type: 'createWorkspace',
title: 'Create a workspace',
subtitle: 'Create a workspace to track expenses, scan receipts, chat, and more.',
message:
Expand All @@ -3704,6 +3709,7 @@ const CONST = {
'Your new workspace is ready! It’ll keep all of your spend (and chats) in one place.',
},
{
type: 'meetGuide',
title: 'Meet your setup specialist',
subtitle: '',
message: ({adminsRoomLink, guideCalendarLink}: {adminsRoomLink: string; guideCalendarLink: string}) =>
Expand All @@ -3712,6 +3718,7 @@ const CONST = {
`Chat with the specialist in your [#admins room](${adminsRoomLink}) or [schedule a call](${guideCalendarLink}) today.`,
},
{
type: 'setupCategories',
title: 'Set up categories',
subtitle: 'Set up categories so your team can code expenses for easy reporting.',
message:
Expand All @@ -3726,6 +3733,7 @@ const CONST = {
'For more controls like requiring a category for every expense, click Settings.',
},
{
type: 'addExpenseApprovals',
title: 'Add expense approvals',
subtitle: 'Add expense approvals to review your team’s spend and keep it under control.',
message:
Expand All @@ -3740,6 +3748,7 @@ const CONST = {
'You’ll be set as the expense approver. You can change this to any admin once you invite your team.',
},
{
type: 'inviteTeam',
title: 'Invite your team',
subtitle: 'Invite your team to Expensify so they can start tracking expenses today.',
message:
Expand All @@ -3766,6 +3775,7 @@ const CONST = {
},
tasks: [
{
type: 'trackExpense',
title: 'Track an expense',
subtitle: 'Track an expense in any currency, whether you have a receipt or not.',
message:
Expand All @@ -3791,6 +3801,7 @@ const CONST = {
},
tasks: [
{
type: 'startChat',
title: 'Start a chat',
subtitle: 'Start a chat with a friend or group using their email or phone number.',
message:
Expand All @@ -3805,6 +3816,7 @@ const CONST = {
'Every chat will also turn into an email or text that they can respond to directly.',
},
{
type: 'splitExpense',
title: 'Split an expense',
subtitle: 'Split an expense right in your chat with one or more friends.',
message:
Expand All @@ -3818,6 +3830,7 @@ const CONST = {
'Feel free to add more details if you want, or just send it off. Let’s get you paid back!',
},
{
type: 'enableWallet',
title: 'Enable your wallet',
subtitle: 'You’ll need to enable your Expensify Wallet to get paid back. Don’t worry, it’s easy!',
message:
Expand Down
5 changes: 3 additions & 2 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3066,6 +3066,7 @@ function completeOnboarding(
const instructionComment = ReportUtils.buildOptimisticAddCommentReportAction(taskMessage, undefined, actorAccountID, 1, isTaskMessageFunction ? undefined : false);

return {
task,
currentTask,
taskCreatedAction,
taskReportAction,
Expand All @@ -3074,7 +3075,7 @@ function completeOnboarding(
};
});

const tasksForParameters = tasksData.reduce<TaskForParameters[]>((acc, {currentTask, taskCreatedAction, taskReportAction, subtitleComment, instructionComment}) => {
const tasksForParameters = tasksData.reduce<TaskForParameters[]>((acc, {task, currentTask, taskCreatedAction, taskReportAction, subtitleComment, instructionComment}) => {
const instructionCommentAction: OptimisticAddCommentReportAction = instructionComment.reportAction;
const instructionCommentText = instructionComment.commentText;
const instructionMessage: TaskMessage = {
Expand All @@ -3087,7 +3088,7 @@ function completeOnboarding(
...acc,
{
type: 'task',
task: engagementChoice,
task: task.type,
taskReportID: currentTask.reportID,
parentReportID: currentTask.parentReportID ?? '',
parentReportActionID: taskReportAction.reportAction.reportActionID,
Expand Down

0 comments on commit 67a2e10

Please sign in to comment.