From 8fbe9473b8a1ab6cd5d543f60ed5a5abe4a48b85 Mon Sep 17 00:00:00 2001 From: kaka-jaques Date: Sun, 9 Oct 2022 23:40:52 -0300 Subject: [PATCH] UPDATE --- frontend/main/src/app/body/body.component.ts | 5 ++-- .../src/app/insight/insight.component.html | 10 +++---- .../main/src/app/insight/insight.component.ts | 28 +++++++++---------- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/frontend/main/src/app/body/body.component.ts b/frontend/main/src/app/body/body.component.ts index b3a49d2..b84ea12 100644 --- a/frontend/main/src/app/body/body.component.ts +++ b/frontend/main/src/app/body/body.component.ts @@ -97,10 +97,11 @@ export class BodyComponent implements OnInit { for (let i = 0; i < count; i++) { - if (resultado[i].id === this.loginService.pessoaID) { //verificar qual ID a API tá retornando - this.notificacoes.push({ title: "Hoje é seu Aniversário!", text: "Parabéns, "+this.loginService.nome.split(' ').at(0)+"! Para comemorar temos algumas ofertas para você. Confira!", route: "ship-quote" }) + if (resultado[i].id === this.loginService.pessoaID) { + this.notificacoes.push({ title: "Hoje é seu Aniversário!🥳🎉", text: "Parabéns, "+this.loginService.nome.split(' ').at(0)+"! Para comemorar temos algumas ofertas especiais para você. Confira!🤩", route: "ship-quote" }) } } + }) setTimeout(() => { diff --git a/frontend/main/src/app/insight/insight.component.html b/frontend/main/src/app/insight/insight.component.html index 24939fb..bc75667 100644 --- a/frontend/main/src/app/insight/insight.component.html +++ b/frontend/main/src/app/insight/insight.component.html @@ -4,7 +4,7 @@
-

{{countPacks()}}

+

{{countPackages}}

New packages

@@ -19,7 +19,7 @@

{{countPacks()}}

-

{{countBounces()}}%

+

{{countBounce}}%

Bounce Rate

@@ -30,13 +30,13 @@

{{countBounces()}}%

- +
-

{{countClients()}}

+

{{countClient}}

Registered Users

@@ -51,7 +51,7 @@

{{countClients()}}

-

{{countVisits()}}

+

{{countVisitors}}

Visits

diff --git a/frontend/main/src/app/insight/insight.component.ts b/frontend/main/src/app/insight/insight.component.ts index 6880ca0..9d3e531 100644 --- a/frontend/main/src/app/insight/insight.component.ts +++ b/frontend/main/src/app/insight/insight.component.ts @@ -24,12 +24,12 @@ export class InsightComponent implements OnInit { countPackages!:number countBounce!:number - constructor(private router:Router, private http:HttpClient) { - - } + constructor(private router:Router, private http:HttpClient) { } ngOnInit(): void { - + + console.log('NO INIT'); + this.http.get(this.APICountUsers) .subscribe((resultado:any) => { this.countClient=resultado @@ -51,6 +51,10 @@ export class InsightComponent implements OnInit { this.countBounce=response }) + setTimeout(() => { + this.attData() + }, 1500); + } register(){ @@ -65,20 +69,14 @@ export class InsightComponent implements OnInit { this.router.navigateByUrl('visits') } - countVisits():number{ - return this.countVisitors - } + attData(){ - countClients():number{ - return this.countClient - } + console.log('NO ATT DATA'); - countPacks():number { - return this.countPackages - } - countBounces(): number{ - return this.countBounce + setTimeout(() => { + this.ngOnInit() + }, 1500); } }