Navigate to dossier after deleting file
This commit is contained in:
parent
7863adb602
commit
839ef240af
@ -111,12 +111,13 @@ export class FileActionsComponent extends AutoUnsubscribe implements OnDestroy,
|
||||
}),
|
||||
async () => {
|
||||
this._loadingService.start();
|
||||
await this._fileManagementService
|
||||
.delete([this.file.fileId], this.file.dossierId)
|
||||
.toPromise()
|
||||
.catch(error => {
|
||||
this._toaster.error(_('error.http.generic'), { params: error });
|
||||
});
|
||||
try {
|
||||
const dossier = this.dossiersService.find(this.file.dossierId);
|
||||
await this._fileManagementService.delete([this.file.fileId], this.file.dossierId).toPromise();
|
||||
await this._router.navigate([dossier.routerLink]);
|
||||
} catch (error) {
|
||||
this._toaster.error(_('error.http.generic'), { params: error });
|
||||
}
|
||||
this._loadingService.stop();
|
||||
},
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user