From ab261b4a9ffc24df30543cddf8e5e0a3b90d72d1 Mon Sep 17 00:00:00 2001
From: bruno-roberto
Date: Sat, 1 Oct 2022 02:32:51 -0300
Subject: [PATCH 1/7] =?UTF-8?q?Altera=C3=A7=C3=B5es:=20Dashboard=20-=20Bou?=
=?UTF-8?q?nce=20Rate,=20Routes=20Body=20-=20Chat=20com=20aniversariantes?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/src/app/body/body.component.html | 14 ++++----
frontend/main/src/app/body/body.component.ts | 34 ++++++++++++++++++-
.../src/app/insight/insight.component.html | 3 +-
.../main/src/app/insight/insight.component.ts | 17 +++++-----
4 files changed, 51 insertions(+), 17 deletions(-)
diff --git a/frontend/main/src/app/body/body.component.html b/frontend/main/src/app/body/body.component.html
index b4d8527..212003c 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 @@
@@ -67,7 +67,7 @@
-
+ 15
+
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));
- // }
}
From 6d510cd29e097c63c00287f98f88b153aaba0d14 Mon Sep 17 00:00:00 2001
From: Mateus Felipe
Date: Mon, 3 Oct 2022 21:27:23 -0300
Subject: [PATCH 2/7] Updated
list recent quotes and register
---
frontend/main/src/app/carrier.service.ts | 7 ++++---
frontend/main/src/app/rct-qt/rct-qt.component.ts | 16 ++++++++++++++--
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/frontend/main/src/app/carrier.service.ts b/frontend/main/src/app/carrier.service.ts
index 8a7b74d..aada518 100644
--- a/frontend/main/src/app/carrier.service.ts
+++ b/frontend/main/src/app/carrier.service.ts
@@ -31,9 +31,10 @@ export class CarrierService {
findName(id: number):any{
- this.http.get(this.apiURL+`/`+id).subscribe((response)=>{
- return response
- })
+ return this.http.get(this.apiURL+'/'+id)
+
+
+
}
diff --git a/frontend/main/src/app/rct-qt/rct-qt.component.ts b/frontend/main/src/app/rct-qt/rct-qt.component.ts
index 1cbccbc..df6f13a 100644
--- a/frontend/main/src/app/rct-qt/rct-qt.component.ts
+++ b/frontend/main/src/app/rct-qt/rct-qt.component.ts
@@ -24,6 +24,7 @@ export class RctQtComponent implements OnInit {
pessoa_id!: number
nomePessoa!: string
razaoTransportadora!: string
+ carrier!: any
@@ -48,10 +49,21 @@ export class RctQtComponent implements OnInit {
this.cub_height = response[i].cub_height
- this.razaoTransportadora = this.carrierService.findName(response.carrier_id);
+
+
+ this.carrierService.findName(response[i].carrier_id).subscribe((response:any) => {
+
+ this.recQuotes.push({id: this.id, price: this.price, await: this.await, origin: this.origin, destiny: this.destiny, cub_height: this.cub_height, razaoTransportadora: response.razao, carrier_id: response.id, nomePessoa: this.loginService.nome})
+
+
+ })
- this.recQuotes.push({id: this.id, price: this.price, await: this.await, origin: this.origin, destiny: this.destiny, cub_height: this.cub_height, razaoTransportadora: this.razaoTransportadora, carrier_id: response.carrier_id, nomePessoa: this.loginService.nome})
+
+
+
+
+
}
From 13131eb6f0bd0a83ee15829c45b7054a3d6fb251 Mon Sep 17 00:00:00 2001
From: kaka-jaques
Date: Mon, 3 Oct 2022 22:40:31 -0300
Subject: [PATCH 3/7] UPDATE!
PROGRESS BUTTON ON RCT QT
---
frontend/main/src/app/quote.service.ts | 7 +--
.../main/src/app/rct-qt/rct-qt.component.html | 16 +++---
.../main/src/app/rct-qt/rct-qt.component.ts | 50 +++++++------------
3 files changed, 26 insertions(+), 47 deletions(-)
diff --git a/frontend/main/src/app/quote.service.ts b/frontend/main/src/app/quote.service.ts
index a0505ff..7e69baa 100644
--- a/frontend/main/src/app/quote.service.ts
+++ b/frontend/main/src/app/quote.service.ts
@@ -4,6 +4,7 @@ import { Router } from '@angular/router';
import { type } from 'os';
import { catchError } from 'rxjs';
import { LoginserviceService } from './loginservice.service';
+import { RctQtComponent } from './rct-qt/rct-qt.component';
import { ShipQtComponent } from './ship-qt/ship-qt.component';
@Injectable({
@@ -82,27 +83,21 @@ export class QuoteService {
this.http.post(this.APIBouncePut+this.login.idBounce, this.newBounce)
//FIM DO BOUNCE
-
this.http.post(this.apiURL2+'/recent',object)
.subscribe((response)=>{
-
console.log(response);
})
-
}
regPackage(object:any){
this.http.post(this.apiURL2+'/register',object)
.subscribe((response)=>{
-
console.log(response);
-
-
})
}
}
diff --git a/frontend/main/src/app/rct-qt/rct-qt.component.html b/frontend/main/src/app/rct-qt/rct-qt.component.html
index 9ee9d9d..043e5e8 100644
--- a/frontend/main/src/app/rct-qt/rct-qt.component.html
+++ b/frontend/main/src/app/rct-qt/rct-qt.component.html
@@ -1,7 +1,7 @@
| Ação |
-
+
Preço do frete |
Prazo |
Transportadora |
@@ -12,19 +12,17 @@
-
- |
-
+
+ |
+
R${{recQuote.price}} |
{{recQuote.await}} dias úteis |
{{recQuote.razaoTransportadora}} |
{{recQuote.origin}} |
{{recQuote.destiny}} |
- {{recQuote.cub_height}} kg |
- {{recQuote.nomePessoa}} |
-
-
+ {{recQuote.cub_height}} kg |
+ {{recQuote.nomePessoa}} |
-
\ No newline at end of file
+
diff --git a/frontend/main/src/app/rct-qt/rct-qt.component.ts b/frontend/main/src/app/rct-qt/rct-qt.component.ts
index df6f13a..717b519 100644
--- a/frontend/main/src/app/rct-qt/rct-qt.component.ts
+++ b/frontend/main/src/app/rct-qt/rct-qt.component.ts
@@ -12,7 +12,8 @@ import { QuoteService } from '../quote.service';
})
export class RctQtComponent implements OnInit {
-
+ progress!:boolean
+ succeed:boolean = false
recQuotes!: Array
id!: number
price!: number
@@ -25,8 +26,6 @@ export class RctQtComponent implements OnInit {
nomePessoa!: string
razaoTransportadora!: string
carrier!: any
-
-
constructor(private carrierService: CarrierService, private loginService: LoginserviceService, public quoteService: QuoteService, private router: Router, private http: HttpClient) { }
@@ -36,48 +35,34 @@ export class RctQtComponent implements OnInit {
this.quoteService.recQuote().pipe().subscribe((response: any) => {
console.log(response);
-
+
var count = Object.keys(response).length;
for (let i = 0; i < count; i++) {
- this.id = response[i].id
- this.price = response[i].price
- this.await = response[i].await
- this.origin = response[i].origin
- this.destiny = response[i].destiny
- this.cub_height = response[i].cub_height
-
-
-
-
- this.carrierService.findName(response[i].carrier_id).subscribe((response:any) => {
-
- this.recQuotes.push({id: this.id, price: this.price, await: this.await, origin: this.origin, destiny: this.destiny, cub_height: this.cub_height, razaoTransportadora: response.razao, carrier_id: response.id, nomePessoa: this.loginService.nome})
-
-
- })
-
-
-
-
+ // this.id = response[i].id
+ // this.price = response[i].price
+ // this.await = response[i].await
+ // this.origin = response[i].origin
+ // this.destiny = response[i].destiny
+ // this.cub_height = response[i].cub_height
+ this.carrierService.findName(response[i].carrier_id).subscribe((resp:any) => {
-
+ this.recQuotes.push({id: response[i].id, price: response[i].price, await: response[i].await, origin: response[i].origin, destiny: response[i].destiny, cub_height: response[i].cub_height, razaoTransportadora: resp.razao, carrier_id: resp.id, nomePessoa: this.loginService.nome})
+ })
}
console.log();
-
- })
+ })
}
-
regPackage(price: number, time: number, origin: string, destiny: string, carrier_id: string, cub_height: number) {
-
+ this.progress = true
let build = {
"price": price,
@@ -90,11 +75,12 @@ export class RctQtComponent implements OnInit {
}
console.log(build);
-
- this.quoteService.regPackage(build)
-
+ this.quoteService.regPackage(build)
+ setTimeout(()=>{
+ this.succeed = true
+ }, 1500)
}
From 86bf84822d3ee044aa1616d0e2c909d3607de7cd Mon Sep 17 00:00:00 2001
From: kaka-jaques
Date: Wed, 5 Oct 2022 00:51:06 -0300
Subject: [PATCH 4/7] UPDATE!
---
.../controllers/PessoaController.java | 4 +-
.../controllers/QuoteController.java | 6 ++
.../interfaces/CarriersRepository.java | 2 -
.../main/src/app/body/body.component.html | 12 +--
frontend/main/src/app/body/body.component.ts | 33 ++++++--
.../src/app/finance/finance.component.css | 46 +++++++++++
.../src/app/finance/finance.component.html | 82 ++++++++++++++++++-
frontend/main/src/app/quote.service.ts | 1 -
.../main/src/app/rct-qt/rct-qt.component.html | 2 -
9 files changed, 168 insertions(+), 20 deletions(-)
diff --git a/backend/TMSProject/src/main/java/br/com/entra21/teamroxo/TMSProject/controllers/PessoaController.java b/backend/TMSProject/src/main/java/br/com/entra21/teamroxo/TMSProject/controllers/PessoaController.java
index 823064c..10aa60b 100644
--- a/backend/TMSProject/src/main/java/br/com/entra21/teamroxo/TMSProject/controllers/PessoaController.java
+++ b/backend/TMSProject/src/main/java/br/com/entra21/teamroxo/TMSProject/controllers/PessoaController.java
@@ -60,8 +60,8 @@ public Optional list(@PathVariable int id){
}
@GetMapping("/countClients")
- public long numberClients() {
- return pessoaRepository.count();
+ public List numberClients() {
+ return pessoaRepository.findAll();
}
@GetMapping("/countVisitors")
diff --git a/backend/TMSProject/src/main/java/br/com/entra21/teamroxo/TMSProject/controllers/QuoteController.java b/backend/TMSProject/src/main/java/br/com/entra21/teamroxo/TMSProject/controllers/QuoteController.java
index 08d3e31..f857e39 100644
--- a/backend/TMSProject/src/main/java/br/com/entra21/teamroxo/TMSProject/controllers/QuoteController.java
+++ b/backend/TMSProject/src/main/java/br/com/entra21/teamroxo/TMSProject/controllers/QuoteController.java
@@ -6,6 +6,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
+import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
@@ -45,6 +46,11 @@ public List recentQuote(@PathVariable("id") int id){
return recentQuoteRepository.findOwnQuote(id);
}
+ @DeleteMapping("/recent/{id}")
+ public void deleteQuote(@PathVariable("id") int id){
+ recentQuoteRepository.deleteById(id);
+ }
+
@GetMapping("/go")
public int goingPackages() {
diff --git a/backend/TMSProject/src/main/java/br/com/entra21/teamroxo/TMSProject/interfaces/CarriersRepository.java b/backend/TMSProject/src/main/java/br/com/entra21/teamroxo/TMSProject/interfaces/CarriersRepository.java
index 9ac52de..c79c263 100644
--- a/backend/TMSProject/src/main/java/br/com/entra21/teamroxo/TMSProject/interfaces/CarriersRepository.java
+++ b/backend/TMSProject/src/main/java/br/com/entra21/teamroxo/TMSProject/interfaces/CarriersRepository.java
@@ -1,7 +1,5 @@
package br.com.entra21.teamroxo.TMSProject.interfaces;
-import java.util.List;
-
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
diff --git a/frontend/main/src/app/body/body.component.html b/frontend/main/src/app/body/body.component.html
index 6a1d914..258e2ae 100644
--- a/frontend/main/src/app/body/body.component.html
+++ b/frontend/main/src/app/body/body.component.html
@@ -19,12 +19,12 @@
@@ -37,9 +37,9 @@
Relatório: Aniversariantes do mês
- {{birthmonth}}
-
-
+
+
+ {{aniversariante.nome}}
diff --git a/frontend/main/src/app/body/body.component.ts b/frontend/main/src/app/body/body.component.ts
index 849763a..d57bd1e 100644
--- a/frontend/main/src/app/body/body.component.ts
+++ b/frontend/main/src/app/body/body.component.ts
@@ -12,30 +12,51 @@ import { Observable } from 'rxjs';
})
export class BodyComponent implements OnInit {
- readonly APIBirthNow: string = "http://localhost:8080/user/birthnow"
-
- readonly APIBirthMonth: string = "http://localhost:8080/user/birthmonth"
+ readonly APIBirthNow: string = "http://localhost:8080/user/birthnow"
+
+ readonly APIBirthMonth: string = "http://localhost:8080/user/birthmonth"
birthnow! : string
birthmonth! : string
aniversariantes!: Array
+ aniversariantesMes!: Array
id!: number
nome!: string
- email!: string
+ email!: string
birth!: Date
document!: string
constructor(public loginService:LoginserviceService, private router:Router, private http:HttpClient) { }
ngOnInit(): void {
+
+ this.aniversariantes = new Array()
+ this.aniversariantesMes = new Array()
+
this.http.get(this.APIBirthNow)
.subscribe((resultado:any) => {
- this.birthnow = resultado
+
+ var count = Object.keys(resultado).length
+
+ for(let i=0;i {
- this.birthmonth=resultado
+
+ var count = Object.keys(resultado).length
+
+ for(let i=0;ifinance works!
+
+
LUCRO
+
+
diff --git a/frontend/main/src/app/quote.service.ts b/frontend/main/src/app/quote.service.ts
index 7e69baa..60805db 100644
--- a/frontend/main/src/app/quote.service.ts
+++ b/frontend/main/src/app/quote.service.ts
@@ -95,7 +95,6 @@ export class QuoteService {
regPackage(object:any){
this.http.post(this.apiURL2+'/register',object)
.subscribe((response)=>{
-
console.log(response);
})
diff --git a/frontend/main/src/app/rct-qt/rct-qt.component.html b/frontend/main/src/app/rct-qt/rct-qt.component.html
index 043e5e8..c64ada3 100644
--- a/frontend/main/src/app/rct-qt/rct-qt.component.html
+++ b/frontend/main/src/app/rct-qt/rct-qt.component.html
@@ -1,7 +1,6 @@
| Ação |
-
Preço do frete |
Prazo |
Transportadora |
@@ -9,7 +8,6 @@
Destino |
Peso cubado |
Usuário |
-
From d2a21f4e2ab5285675dcfb1215e48c4d0b65a4da Mon Sep 17 00:00:00 2001
From: bruno-roberto
Date: Wed, 5 Oct 2022 00:58:04 -0300
Subject: [PATCH 5/7] =?UTF-8?q?Component=20-=20Visit=20Relat=C3=B3rio=20An?=
=?UTF-8?q?iversariantes=20Rotas=20Dashboard?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/main/src/app/app-routing.module.ts | 4 +-
frontend/main/src/app/app.module.ts | 4 +-
.../main/src/app/body/body.component.html | 47 ++++++-------------
frontend/main/src/app/body/body.component.ts | 41 ++++++++++------
.../src/app/insight/insight.component.html | 4 +-
.../main/src/app/insight/insight.component.ts | 7 ++-
.../main/src/app/visits/visits.component.css | 0
.../main/src/app/visits/visits.component.html | 18 +++++++
.../src/app/visits/visits.component.spec.ts | 23 +++++++++
.../main/src/app/visits/visits.component.ts | 33 +++++++++++++
10 files changed, 130 insertions(+), 51 deletions(-)
create mode 100644 frontend/main/src/app/visits/visits.component.css
create mode 100644 frontend/main/src/app/visits/visits.component.html
create mode 100644 frontend/main/src/app/visits/visits.component.spec.ts
create mode 100644 frontend/main/src/app/visits/visits.component.ts
diff --git a/frontend/main/src/app/app-routing.module.ts b/frontend/main/src/app/app-routing.module.ts
index 5c32c78..32954c6 100644
--- a/frontend/main/src/app/app-routing.module.ts
+++ b/frontend/main/src/app/app-routing.module.ts
@@ -18,6 +18,7 @@ import { ReceiptComponent } from './receipt/receipt.component';
import { ShipQtComponent } from './ship-qt/ship-qt.component';
import { UserClientComponent } from './user-client/user-client.component';
import { UsersComponent } from './users/users.component';
+import { VisitsComponent } from './visits/visits.component';
const routes: Routes = [
{ path: 'home', component:HomeComponent, canActivate:[LoginserviceService]},
@@ -36,7 +37,8 @@ const routes: Routes = [
{ path: 'edit', component:EditComponent, canActivate:[LoginserviceService]},
{ path: 'about', component:AboutComponent, canActivate:[LoginserviceService]},
{ path: 'forgetPassword', component:ForgetPasswordComponent},
- { path: "user-client", component:UserClientComponent, canActivate:[LoginserviceService]}
+ { path: "user-client", component:UserClientComponent, canActivate:[LoginserviceService]},
+ { path: "visits", component:VisitsComponent, canActivate:[LoginserviceService]}
];
@NgModule({
diff --git a/frontend/main/src/app/app.module.ts b/frontend/main/src/app/app.module.ts
index 86dd107..f8a5112 100644
--- a/frontend/main/src/app/app.module.ts
+++ b/frontend/main/src/app/app.module.ts
@@ -24,6 +24,7 @@ import { AboutComponent } from './about/about.component';
import { HttpClientModule } from "@angular/common/http";
import { ForgetPasswordComponent } from './forget-password/forget-password.component';
import { UserClientComponent } from './user-client/user-client.component';
+import { VisitsComponent } from './visits/visits.component';
@NgModule({
declarations: [
@@ -46,7 +47,8 @@ import { UserClientComponent } from './user-client/user-client.component';
EditComponent,
AboutComponent,
ForgetPasswordComponent,
- UserClientComponent
+ UserClientComponent,
+ VisitsComponent
],
imports: [
BrowserModule,
diff --git a/frontend/main/src/app/body/body.component.html b/frontend/main/src/app/body/body.component.html
index 6a1d914..f010d99 100644
--- a/frontend/main/src/app/body/body.component.html
+++ b/frontend/main/src/app/body/body.component.html
@@ -19,12 +19,12 @@
@@ -37,9 +37,9 @@
Relatório: Aniversariantes do mês
- {{birthmonth}}
-
-
+
+
+ {{aniversariante.nome}}
@@ -64,32 +64,7 @@
-
-
-
- 3
-
-
-
+
@@ -196,6 +171,14 @@
+
+
+
+
+ Visits
+
+
+
diff --git a/frontend/main/src/app/body/body.component.ts b/frontend/main/src/app/body/body.component.ts
index 849763a..628c4b0 100644
--- a/frontend/main/src/app/body/body.component.ts
+++ b/frontend/main/src/app/body/body.component.ts
@@ -12,42 +12,55 @@ import { Observable } from 'rxjs';
})
export class BodyComponent implements OnInit {
- readonly APIBirthNow: string = "http://localhost:8080/user/birthnow"
-
- readonly APIBirthMonth: string = "http://localhost:8080/user/birthmonth"
+ readonly APIBirthNow: string = "http://localhost:8080/user/birthnow"
+
+ readonly APIBirthMonth: string = "http://localhost:8080/user/birthmonth"
birthnow! : string
birthmonth! : string
aniversariantes!: Array
+ aniversariantesMes!: Array
id!: number
nome!: string
- email!: string
+ email!: string
birth!: Date
document!: string
constructor(public loginService:LoginserviceService, private router:Router, private http:HttpClient) { }
ngOnInit(): void {
+
+ this.aniversariantes = new Array()
+ this.aniversariantesMes = new Array()
+
this.http.get(this.APIBirthNow)
.subscribe((resultado:any) => {
- this.birthnow = resultado
+
+ var count = Object.keys(resultado).length
+
+ for(let i=0;i {
- this.birthmonth=resultado
- });
- }
+ var count = Object.keys(resultado).length
- sair(){
+ for(let i=0;i{{countClient}}
{{countVisitors}}
-
Visitors
+
Visits
-
+
diff --git a/frontend/main/src/app/insight/insight.component.ts b/frontend/main/src/app/insight/insight.component.ts
index e6d2048..f94e47c 100644
--- a/frontend/main/src/app/insight/insight.component.ts
+++ b/frontend/main/src/app/insight/insight.component.ts
@@ -37,7 +37,8 @@ export class InsightComponent implements OnInit {
this.http.get(this.APICountVisits)
.subscribe((resultado:any) => {
- this.countVisitors=resultado
+ var count = Object.keys(resultado).length
+ this.countVisitors = count
});
this.http.get(this.APICountPackages)
@@ -61,5 +62,9 @@ export class InsightComponent implements OnInit {
this.router.navigateByUrl('users')
}
+ visits(){
+ this.router.navigateByUrl('visits')
+ }
+
}
diff --git a/frontend/main/src/app/visits/visits.component.css b/frontend/main/src/app/visits/visits.component.css
new file mode 100644
index 0000000..e69de29
diff --git a/frontend/main/src/app/visits/visits.component.html b/frontend/main/src/app/visits/visits.component.html
new file mode 100644
index 0000000..c542c19
--- /dev/null
+++ b/frontend/main/src/app/visits/visits.component.html
@@ -0,0 +1,18 @@
+
+
+ | ID |
+ Data |
+ Time |
+ User |
+ Bounce Rate |
+
+
+
+ | {{visit.id}} |
+ {{visit.date}} |
+ {{visit.time}} |
+ {{visit.user}} |
+ {{visit.bounceRate}} |
+
+
+
diff --git a/frontend/main/src/app/visits/visits.component.spec.ts b/frontend/main/src/app/visits/visits.component.spec.ts
new file mode 100644
index 0000000..377f3f3
--- /dev/null
+++ b/frontend/main/src/app/visits/visits.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { VisitsComponent } from './visits.component';
+
+describe('VisitsComponent', () => {
+ let component: VisitsComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ VisitsComponent ]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(VisitsComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/frontend/main/src/app/visits/visits.component.ts b/frontend/main/src/app/visits/visits.component.ts
new file mode 100644
index 0000000..2937a48
--- /dev/null
+++ b/frontend/main/src/app/visits/visits.component.ts
@@ -0,0 +1,33 @@
+import { HttpClient } from '@angular/common/http';
+import { Component, OnInit } from '@angular/core';
+import { Router } from '@angular/router';
+
+@Component({
+ selector: 'app-visits',
+ templateUrl: './visits.component.html',
+ styleUrls: ['./visits.component.css']
+})
+export class VisitsComponent implements OnInit {
+
+ readonly APICountVisits:string = "http://localhost:8080/user/countVisitors"
+
+ visits! : Array
+
+ constructor(private router:Router, private http:HttpClient) { }
+
+ ngOnInit(): void {
+ this.visits = new Array()
+ this.http.get(this.APICountVisits)
+ .subscribe((resultado:any)=>{
+ var count = Object.keys(resultado).length
+ for(let i = 0; i
Date: Wed, 5 Oct 2022 01:07:15 -0300
Subject: [PATCH 6/7] FIX LIST COUNT BUG!
---
.../teamroxo/TMSProject/controllers/PessoaController.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/backend/TMSProject/src/main/java/br/com/entra21/teamroxo/TMSProject/controllers/PessoaController.java b/backend/TMSProject/src/main/java/br/com/entra21/teamroxo/TMSProject/controllers/PessoaController.java
index 10aa60b..814b6c5 100644
--- a/backend/TMSProject/src/main/java/br/com/entra21/teamroxo/TMSProject/controllers/PessoaController.java
+++ b/backend/TMSProject/src/main/java/br/com/entra21/teamroxo/TMSProject/controllers/PessoaController.java
@@ -60,13 +60,13 @@ public Optional list(@PathVariable int id){
}
@GetMapping("/countClients")
- public List numberClients() {
- return pessoaRepository.findAll();
+ public long numberClients() {
+ return pessoaRepository.count();
}
@GetMapping("/countVisitors")
- public long numberVisitors() {
- return countVisitorsRepository.count();
+ public List numberVisitors() {
+ return countVisitorsRepository.findAll();
}
@GetMapping("/birthnow")
From 25a6f71d30706185a6aed10acaff5e0afe5f1a6c Mon Sep 17 00:00:00 2001
From: "Kalil J. Fakhouri"
Date: Wed, 5 Oct 2022 11:55:50 -0300
Subject: [PATCH 7/7] CREATE!
GOOGLE CLOUD TUTOR!
---
README.md | 2 +-
assets/README.md | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
create mode 100644 assets/README.md
diff --git a/README.md b/README.md
index df9f062..819fb29 100644
--- a/README.md
+++ b/README.md
@@ -175,7 +175,7 @@
3.1 - GOOGLE CLOUD
-Clique aqui para aprender a configurar o Google Cloud
+Clique aqui para aprender a configurar o Google Cloud
>## 3.1.1 - Google API
>>### 3.1.1.1 - Directions API
diff --git a/assets/README.md b/assets/README.md
new file mode 100644
index 0000000..4a60eb5
--- /dev/null
+++ b/assets/README.md
@@ -0,0 +1,2 @@
+# CONFIGURANDO GOOGLE CLOUD PARA DEPLOY E SERVICES
+