|
|
|
@ -41,7 +41,7 @@ export class AgenceEditComponent implements OnInit { |
|
|
|
|
return this.registerForm.controls; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async ngOnInit(): Promise<void> { |
|
|
|
|
async ngOnInit() { |
|
|
|
|
this.getBusinessUnits() |
|
|
|
|
this.registerForm = this.formBuilder.group({ |
|
|
|
|
name: ['', Validators.required], |
|
|
|
@ -71,7 +71,6 @@ export class AgenceEditComponent implements OnInit { |
|
|
|
|
this.agenceService.updateAgence(this.agence) |
|
|
|
|
.subscribe(() => { |
|
|
|
|
this.showSuccess(); |
|
|
|
|
this.goBack(); |
|
|
|
|
}, |
|
|
|
|
() => { |
|
|
|
|
this.showError() |
|
|
|
@ -85,11 +84,11 @@ export class AgenceEditComponent implements OnInit { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
showSuccess() { |
|
|
|
|
this.toastr.success('Modification réussie', 'Business Unit'); |
|
|
|
|
this.toastr.success('Modification réussie', 'Agence'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
showError() { |
|
|
|
|
this.toastr.error('Modification échouée', 'Business Unit'); |
|
|
|
|
this.toastr.error('Modification échouée', 'Agence'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|