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}) + + + + + }