RED-3027: Fixed double success notification on dossier delete
This commit is contained in:
parent
b0d4585550
commit
8f71ab1f9d
@ -124,17 +124,13 @@ export class EditDossierDialogComponent extends BaseDialogComponent {
|
||||
return this.activeComponent?.disabled;
|
||||
}
|
||||
|
||||
afterSave() {
|
||||
this._toaster.success(_('edit-dossier-dialog.change-successful'), { params: { dossierName: this._dossierName } });
|
||||
}
|
||||
|
||||
async save(closeAfterSave: boolean = false) {
|
||||
this._loadingService.start();
|
||||
const result = await this.activeComponent.save();
|
||||
this._loadingService.stop();
|
||||
|
||||
if (result.success) {
|
||||
this.afterSave();
|
||||
this._toaster.success(_('edit-dossier-dialog.change-successful'), { params: { dossierName: this._dossierName } });
|
||||
}
|
||||
|
||||
if (result.success && closeAfterSave) {
|
||||
|
||||
@ -116,7 +116,6 @@ export class EditDossierGeneralInfoComponent implements OnInit, EditDossierSecti
|
||||
});
|
||||
this._dialogService.openDialog('confirm', null, data, async () => {
|
||||
await this._dossiersService.delete(this.dossier).toPromise();
|
||||
this._editDossierDialogRef.componentInstance.afterSave();
|
||||
this._editDossierDialogRef.close();
|
||||
this._router.navigate(['main', 'dossiers']).then(() => this._notifyDossierDeleted());
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user