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 () => {
|
async () => {
|
||||||
this._loadingService.start();
|
this._loadingService.start();
|
||||||
await this._fileManagementService
|
try {
|
||||||
.delete([this.file.fileId], this.file.dossierId)
|
const dossier = this.dossiersService.find(this.file.dossierId);
|
||||||
.toPromise()
|
await this._fileManagementService.delete([this.file.fileId], this.file.dossierId).toPromise();
|
||||||
.catch(error => {
|
await this._router.navigate([dossier.routerLink]);
|
||||||
this._toaster.error(_('error.http.generic'), { params: error });
|
} catch (error) {
|
||||||
});
|
this._toaster.error(_('error.http.generic'), { params: error });
|
||||||
|
}
|
||||||
this._loadingService.stop();
|
this._loadingService.stop();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user