diff --git a/src/app/fyle/dashboard/dashboard.page.html b/src/app/fyle/dashboard/dashboard.page.html index fe041cf73d..25b1a31b4c 100644 --- a/src/app/fyle/dashboard/dashboard.page.html +++ b/src/app/fyle/dashboard/dashboard.page.html @@ -61,7 +61,7 @@ - + diff --git a/src/app/fyle/dashboard/dashboard.page.spec.ts b/src/app/fyle/dashboard/dashboard.page.spec.ts index 2d801a3666..5f20e8590a 100644 --- a/src/app/fyle/dashboard/dashboard.page.spec.ts +++ b/src/app/fyle/dashboard/dashboard.page.spec.ts @@ -807,4 +807,11 @@ describe('DashboardPage', () => { expect(component.tasksComponent.doRefresh).not.toHaveBeenCalled(); }); }); + + it('hideOptInDashboardBanner(): should set canShowOptInBanner$ to false', () => { + component.hideOptInDashboardBanner(); + component.canShowOptInBanner$.subscribe((res) => { + expect(res).toBeFalse(); + }); + }); }); diff --git a/src/app/fyle/dashboard/dashboard.page.ts b/src/app/fyle/dashboard/dashboard.page.ts index 227b0a136f..0d7fa952e0 100644 --- a/src/app/fyle/dashboard/dashboard.page.ts +++ b/src/app/fyle/dashboard/dashboard.page.ts @@ -375,6 +375,7 @@ export class DashboardPage { } else { this.trackingService.optInFromPostPostCardAdditionInDashboard(); this.tasksComponent.doRefresh(); + this.canShowOptInBanner$ = of(false); } }); } @@ -438,4 +439,8 @@ export class DashboardPage { this.trackingService.skipOptInFromDashboardBanner(); } } + + hideOptInDashboardBanner(): void { + this.canShowOptInBanner$ = of(false); + } } diff --git a/src/app/fyle/dashboard/tasks/tasks.component.ts b/src/app/fyle/dashboard/tasks/tasks.component.ts index 828f8d82d6..6a40bf7a3e 100644 --- a/src/app/fyle/dashboard/tasks/tasks.component.ts +++ b/src/app/fyle/dashboard/tasks/tasks.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, OnInit } from '@angular/core'; +import { Component, EventEmitter, OnInit, Output } from '@angular/core'; import { MatBottomSheet } from '@angular/material/bottom-sheet'; import { MatSnackBar } from '@angular/material/snack-bar'; import { ActivatedRoute, Router } from '@angular/router'; @@ -44,6 +44,8 @@ import { TransactionStatus } from 'src/app/core/models/platform/v1/expense.model styleUrls: ['./tasks.component.scss'], }) export class TasksComponent implements OnInit { + @Output() optedIn = new EventEmitter(); + tasks$: Observable; loadData$: BehaviorSubject = new BehaviorSubject({ @@ -416,6 +418,7 @@ export class TasksComponent implements OnInit { if (data && data.action === 'SUCCESS') { this.doRefresh(); + this.optedIn.emit(); } }); }