|
|
|
@ -53,6 +53,17 @@ export class AgenceComponent implements OnInit { |
|
|
|
|
.subscribe(businessunits => this.businessUnits = businessunits); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
getBusinessUnitById(id: number): Businessunit { |
|
|
|
|
let bu = {} as Businessunit; |
|
|
|
|
this.businessUnits.forEach(c => { |
|
|
|
|
if (c.id == id) { |
|
|
|
|
bu = c; |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
return bu; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
add(agence: Agence): void { |
|
|
|
|
this.agenceService.addAgence(agence) |
|
|
|
|
.subscribe(agence => { |
|
|
|
|