diff --git a/frontend/main/src/app/carriers/carriers.component.html b/frontend/main/src/app/carriers/carriers.component.html
index 4e87155..6d77686 100644
--- a/frontend/main/src/app/carriers/carriers.component.html
+++ b/frontend/main/src/app/carriers/carriers.component.html
@@ -34,18 +34,22 @@
Taxa |
E-mail |
Cnpj |
+ Ação |
- | {{i}} |
+ {{i+1}} |
{{carrier.razao}} |
{{carrier.taxa}} |
{{carrier.email}} |
{{carrier.cnpj}} |
-
+
+
+
+ |
diff --git a/frontend/main/src/app/carriers/carriers.component.ts b/frontend/main/src/app/carriers/carriers.component.ts
index d45bf09..2901bd0 100644
--- a/frontend/main/src/app/carriers/carriers.component.ts
+++ b/frontend/main/src/app/carriers/carriers.component.ts
@@ -71,4 +71,13 @@ export class CarriersComponent implements OnInit {
this.carriers.push({razao:this.razao, taxa:this.taxa, email:this.email, cnpj:this.cnpj});
}
+ deletar(){
+
+
+ }
+
+ alterar(){
+
+ }
+
}
diff --git a/frontend/main/src/app/quote.service.ts b/frontend/main/src/app/quote.service.ts
index 8b44c7c..f851d95 100644
--- a/frontend/main/src/app/quote.service.ts
+++ b/frontend/main/src/app/quote.service.ts
@@ -13,9 +13,13 @@ export class QuoteService {
apiURL:string = 'http://localhost:8080/ship'
apiURL2:string = 'http://localhost:8080/quote'
+
+ apiURL3:string = 'http://localhost:8080/'
+
APIBouncePut:string = "http://localhost:8080/user/disbounce/"
newBounce!:any
+
constructor(private router: Router, private http: HttpClient, private login:LoginserviceService) { }
quote(cepOrigem:string, cepDestino:string):any{
@@ -58,7 +62,7 @@ export class QuoteService {
this.http.post(this.APIBouncePut+this.login.idBounce, this.newBounce)
//FIM DO BOUNCE
- return this.http.get(this.apiURL)
+ return this.http.get(this.apiURL2+`/recent`)
}
@@ -92,6 +96,15 @@ export class QuoteService {
}
+ regPackage(object:any){
+ this.http.post(this.apiURL3+'/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 c81acf7..3b11fe2 100644
--- a/frontend/main/src/app/rct-qt/rct-qt.component.html
+++ b/frontend/main/src/app/rct-qt/rct-qt.component.html
@@ -4,23 +4,27 @@
ID |
Preço do frete |
Prazo |
+ Transportadora |
Origem |
Destino |
- Transportadora |
Peso cubado |
+ Usuário |
-
+
\ 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 cc30a23..5364b01 100644
--- a/frontend/main/src/app/rct-qt/rct-qt.component.ts
+++ b/frontend/main/src/app/rct-qt/rct-qt.component.ts
@@ -11,24 +11,62 @@ import { QuoteService } from '../quote.service';
})
export class RctQtComponent implements OnInit {
-
+
+ recQuotes!: Array
+ id!: number
+ price!: number
+ await!: number
+ origin!: string
+ destiny!: string
+ carrier_id!: number
+ cub_height!: number
+ pessoa_id!: number
+ nomePessoa!: string
+ razaoTransportadora!: string
+
+
constructor(public quoteService: QuoteService, private router: Router, private http: HttpClient) { }
ngOnInit(): void {
- this.quoteService.recQuote().pipe().subscribe((response: any) => {
+ this.quoteService.recQuote().pipe().subscribe((response: any) => {
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
}
- })
+ })
+ }
+
+
+ regPackage(price: number, time: number, origin: string, destiny: string, carrier_id: number, cub_height: number, pessoa_id: number) {
+
+ let build = {
+ "price": price,
+ "time": time,
+ "origin": origin,
+ "destiny": destiny,
+ "carrier_id": carrier_id,
+ "cub_height": cub_height,
+ "pessoa_id": pessoa_id
+ }
+
+ this.quoteService.regPackage(build)
+
+
+
+
}
}
diff --git a/frontend/main/src/app/users/users.component.html b/frontend/main/src/app/users/users.component.html
index 9e1debe..a825d34 100644
--- a/frontend/main/src/app/users/users.component.html
+++ b/frontend/main/src/app/users/users.component.html
@@ -31,10 +31,11 @@
E-mail |
CPF |
Data nascimento |
+ Ação |
- | {{i}} |
+ {{i+1}} |
{{user.name}} |
{{user.email}} |
{{user.document}} |
diff --git a/frontend/main/src/app/users/users.component.ts b/frontend/main/src/app/users/users.component.ts
index de25fa8..08f69e9 100644
--- a/frontend/main/src/app/users/users.component.ts
+++ b/frontend/main/src/app/users/users.component.ts
@@ -31,6 +31,7 @@ birth!:string
this.email = response[i].email;
this.document = response[i].document;
this.birth = response[i].birth;
+
this.users.push({name:this.name, email:this.email, document:this.document, birth:this.birth});