Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
bistaastha committed Dec 19, 2024
1 parent 88c6870 commit a858682
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions src/app/fyle/dashboard/tasks/tasks.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,33 +400,36 @@ export class TasksComponent implements OnInit {
});
}

onTaskClicked(taskCta: TaskCta, task: DashboardTask): void {
this.trackingService.tasksClicked({
Asset: 'Mobile',
header: task.header,
});
handleEventsWithTaskConfig(taskCta: TaskCta, task: DashboardTask): void {
switch (taskCta.event) {
case TASKEVENT.expensesAddToReport:
this.onExpensesToReportTaskClick();
break;
case TASKEVENT.openDraftReports:
this.onOpenDraftReportsTaskClick(taskCta, task);
break;
case TASKEVENT.openSentBackReport:
this.onSentBackReportTaskClick(taskCta, task);
break;
case TASKEVENT.reviewExpenses:
this.onReviewExpensesTaskClick();
break;
case TASKEVENT.openTeamReport:
this.onTeamReportsTaskClick(taskCta, task);
break;
case TASKEVENT.openPotentialDuplicates:
this.onPotentialDuplicatesTaskClick();
break;
case TASKEVENT.openSentBackAdvance:
this.onSentBackAdvanceTaskClick(taskCta, task);
break;
default:
break;
}
}

handleEventsWithoutTaskConfig(taskCtaEvent: TASKEVENT): void {
switch (taskCtaEvent) {
case TASKEVENT.expensesAddToReport:
this.onExpensesToReportTaskClick();
break;
case TASKEVENT.reviewExpenses:
this.onReviewExpensesTaskClick();
break;
case TASKEVENT.openPotentialDuplicates:
this.onPotentialDuplicatesTaskClick();
break;
case TASKEVENT.mobileNumberVerification:
this.onMobileNumberVerificationTaskClick();
break;
Expand All @@ -441,6 +444,15 @@ export class TasksComponent implements OnInit {
}
}

onTaskClicked(taskCta: TaskCta, task: DashboardTask): void {
this.trackingService.tasksClicked({
Asset: 'Mobile',
header: task.header,
});
this.handleEventsWithTaskConfig(taskCta, task);
this.handleEventsWithoutTaskConfig(taskCta.event);
}

onMobileNumberVerificationTaskClick(): void {
this.trackingService.clickedOnTask({
type: 'Opt in',
Expand Down

0 comments on commit a858682

Please sign in to comment.