diff --git a/frontend/main/src/app/body/body.component.html b/frontend/main/src/app/body/body.component.html
index 442143e..6a1d914 100644
--- a/frontend/main/src/app/body/body.component.html
+++ b/frontend/main/src/app/body/body.component.html
@@ -19,12 +19,12 @@
@@ -34,12 +34,12 @@
diff --git a/frontend/main/src/app/body/body.component.ts b/frontend/main/src/app/body/body.component.ts
index 01e2906..849763a 100644
--- a/frontend/main/src/app/body/body.component.ts
+++ b/frontend/main/src/app/body/body.component.ts
@@ -1,6 +1,9 @@
import { Component, OnInit } from '@angular/core';
import { LoginComponent } from '../login/login.component';
import { LoginserviceService } from '../loginservice.service';
+import { HttpClient } from '@angular/common/http';
+import { Router } from '@angular/router';
+import { Observable } from 'rxjs';
@Component({
selector: 'app-body',
@@ -9,11 +12,31 @@ import { LoginserviceService } from '../loginservice.service';
})
export class BodyComponent implements OnInit {
- constructor(public loginService:LoginserviceService) { }
+ readonly APIBirthNow: string = "http://localhost:8080/user/birthnow"
+
+ readonly APIBirthMonth: string = "http://localhost:8080/user/birthmonth"
+
+ birthnow! : string
+ birthmonth! : string
+ aniversariantes!: Array
+ id!: number
+ nome!: string
+ email!: string
+ birth!: Date
+ document!: string
+
+ constructor(public loginService:LoginserviceService, private router:Router, private http:HttpClient) { }
ngOnInit(): void {
+ this.http.get(this.APIBirthNow)
+ .subscribe((resultado:any) => {
+ this.birthnow = resultado
+ });
-
+ this.http.get(this.APIBirthMonth)
+ .subscribe((resultado:any) => {
+ this.birthmonth=resultado
+ });
}
@@ -23,4 +46,8 @@ export class BodyComponent implements OnInit {
}
+ aniversariante(){
+ this.aniversariantes.push ({id: this.id ,nome: this.nome, email: this.email, birth: this.birth, document: this.document})
+ }
+
}
diff --git a/frontend/main/src/app/insight/insight.component.html b/frontend/main/src/app/insight/insight.component.html
index 6bf3143..4a98567 100644
--- a/frontend/main/src/app/insight/insight.component.html
+++ b/frontend/main/src/app/insight/insight.component.html
@@ -19,7 +19,7 @@ {{countPackages}}
-
12%
+
{{countBounce}}%
Bounce Rate
@@ -288,3 +288,4 @@
+
diff --git a/frontend/main/src/app/insight/insight.component.ts b/frontend/main/src/app/insight/insight.component.ts
index 9fddf9c..e6d2048 100644
--- a/frontend/main/src/app/insight/insight.component.ts
+++ b/frontend/main/src/app/insight/insight.component.ts
@@ -16,10 +16,13 @@ export class InsightComponent implements OnInit {
readonly APICountVisits:string = "http://localhost:8080/user/countVisitors"
readonly APICountPackages:string = "http://localhost:8080/quote/go"
+
+ readonly APICountBounce:string = "http://localhost:8080/user/bounce"
countClient!: number
countVisitors!: number
countPackages!:number
+ countBounce!:number
constructor(private router:Router, private http:HttpClient) {
@@ -42,6 +45,12 @@ export class InsightComponent implements OnInit {
this.countPackages=response
})
+ this.http.get(this.APICountBounce)
+ .subscribe((response:any)=>{
+ this.countBounce=response
+ })
+
+
}
register(){
@@ -52,13 +61,5 @@ export class InsightComponent implements OnInit {
this.router.navigateByUrl('users')
}
- // countClients() {
- // this.http.get(`${this.TMSLoginAPI}/countClients`).subscribe(resultado => console.log(resultado));
- // return ;
-
- // }
- // countVisitors(){
- // this.http.get(`${this.apiURL}/countVisitors`).subscribe(resultado => console.log(resultado));
- // }
}