From ddf97d9cd0368a8753d240aefdb66ccb4dca80e9 Mon Sep 17 00:00:00 2001 From: Clement FERRERE Date: Tue, 5 Jul 2022 14:57:46 +0200 Subject: [PATCH] optimisation agence --- .../agence/agence-edit/agence-edit.component.html | 3 +-- .../components/agence/agence-edit/agence-edit.component.ts | 7 +++---- src/app/components/agence/agence.component.html | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/app/components/agence/agence-edit/agence-edit.component.html b/src/app/components/agence/agence-edit/agence-edit.component.html index decda8c..24ae14d 100644 --- a/src/app/components/agence/agence-edit/agence-edit.component.html +++ b/src/app/components/agence/agence-edit/agence-edit.component.html @@ -5,7 +5,6 @@
@@ -35,7 +34,7 @@
- +
diff --git a/src/app/components/agence/agence-edit/agence-edit.component.ts b/src/app/components/agence/agence-edit/agence-edit.component.ts index e8387e3..c050298 100644 --- a/src/app/components/agence/agence-edit/agence-edit.component.ts +++ b/src/app/components/agence/agence-edit/agence-edit.component.ts @@ -41,7 +41,7 @@ export class AgenceEditComponent implements OnInit { return this.registerForm.controls; } - async ngOnInit(): Promise { + 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'); } } diff --git a/src/app/components/agence/agence.component.html b/src/app/components/agence/agence.component.html index be75997..6fa4e8a 100644 --- a/src/app/components/agence/agence.component.html +++ b/src/app/components/agence/agence.component.html @@ -30,7 +30,7 @@
- +