Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions frontend/main/src/app/body/body.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down
10 changes: 5 additions & 5 deletions frontend/main/src/app/insight/insight.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<div class="small-box bg-gradient-success">
<div class="inner">
<h3>{{countPacks()}}</h3>
<h3>{{countPackages}}</h3>
<p>New packages</p>

</div>
Expand All @@ -19,7 +19,7 @@ <h3>{{countPacks()}}</h3>

<div class="small-box bg-gradient-yellow">
<div class="inner">
<h3>{{countBounces()}}<sup style="font-size: 20px">%</sup></h3>
<h3>{{countBounce}}<sup style="font-size: 20px">%</sup></h3>
<p>Bounce Rate</p>

</div>
Expand All @@ -30,13 +30,13 @@ <h3>{{countBounces()}}<sup style="font-size: 20px">%</sup></h3>
</div>
</div>


<div class="col-lg-3 col-6">

<div class="small-box bg-gradient-blue">
<div class="inner">

<h3>{{countClients()}}</h3>
<h3>{{countClient}}</h3>
<p>Registered Users</p>

</div>
Expand All @@ -51,7 +51,7 @@ <h3>{{countClients()}}</h3>

<div class="small-box bg-gradient-primary">
<div class="inner" >
<h3>{{countVisits()}}</h3>
<h3>{{countVisitors}}</h3>
<p>Visits</p>
</div>
<div class="icon">
Expand Down
28 changes: 13 additions & 15 deletions frontend/main/src/app/insight/insight.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -51,6 +51,10 @@ export class InsightComponent implements OnInit {
this.countBounce=response
})

setTimeout(() => {
this.attData()
}, 1500);

}

register(){
Expand All @@ -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);
}

}