diff --git a/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts b/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts index 2a0ff2dfc..fad82258c 100644 --- a/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts +++ b/apps/red-ui/src/app/components/downloads-list-screen/downloads-list-screen.component.ts @@ -28,7 +28,7 @@ export class DownloadsListScreenComponent implements OnInit { deleteItem(download: DownloadStatusWrapper) { this._downloadControllerService - .deleteDownload({ storageId: download.storageId }) + .deleteDownload({ storageIds: [download.storageId] }) .subscribe(() => this.fileDownloadService.getDownloadStatus().subscribe()); } } diff --git a/apps/red-ui/src/app/modules/dossier/components/bulk-actions/dossier-overview-bulk-actions.component.ts b/apps/red-ui/src/app/modules/dossier/components/bulk-actions/dossier-overview-bulk-actions.component.ts index fa0a2d997..99837fade 100644 --- a/apps/red-ui/src/app/modules/dossier/components/bulk-actions/dossier-overview-bulk-actions.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/bulk-actions/dossier-overview-bulk-actions.component.ts @@ -147,12 +147,11 @@ export class DossierOverviewBulkActionsComponent { setToUnderApproval() { // If more than 1 approver - show dialog and ask who to assign if (this._appStateService.activeDossier.approverIds.length > 1) { - this._loadingService.start(); - this._dialogService.openAssignFileToUserDialog( this.selectedFiles, 'approver', () => { + this._loadingService.start(); this.reload.emit(); this._loadingService.stop(); }, @@ -189,11 +188,10 @@ export class DossierOverviewBulkActionsComponent { } assign() { - this._loadingService.start(); - const mode = this.selectedFiles[0].isUnderApproval ? 'approver' : 'reviewer'; this._dialogService.openAssignFileToUserDialog(this.selectedFiles, mode, () => { + this._loadingService.start(); this.reload.emit(); this._loadingService.stop(); }); diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.ts index 9bab99401..007d9a673 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview-screen/dossier-overview-screen.component.ts @@ -98,32 +98,35 @@ export class DossierOverviewScreenComponent } async ngOnInit(): Promise { - this._fileDropOverlayService.initFileDropHandling(); - - this.calculateData(); - - this.addSubscription = timer(0, 7500).subscribe(async () => { - await this._appStateService.reloadActiveDossierFilesIfNecessary(); - this._loadEntitiesFromState(); - }); - - this.addSubscription = this._appStateService.fileChanged.subscribe(() => { - this.calculateData(); - }); - - this.addSubscription = this._router.events - .pipe(filter(event => event instanceof NavigationStart)) - .subscribe((event: NavigationStart) => { - if (!event.url.endsWith(this._appStateService.activeDossierId)) { - this._lastScrollPosition = this.scrollViewport.measureScrollOffset('top'); - } - }); - this._loadingService.start(); - this.dossierAttributes = await this._dossierAttributesService.getValues(this.activeDossier); + try { + this._fileDropOverlayService.initFileDropHandling(); - this._loadingService.stop(); + this.calculateData(); + + this.addSubscription = timer(0, 7500).subscribe(async () => { + await this._appStateService.reloadActiveDossierFilesIfNecessary(); + this._loadEntitiesFromState(); + }); + + this.addSubscription = this._appStateService.fileChanged.subscribe(() => { + this.calculateData(); + }); + + this.addSubscription = this._router.events + .pipe(filter(event => event instanceof NavigationStart)) + .subscribe((event: NavigationStart) => { + if (!event.url.endsWith(this._appStateService.activeDossierId)) { + this._lastScrollPosition = this.scrollViewport.measureScrollOffset('top'); + } + }); + + this.dossierAttributes = await this._dossierAttributesService.getValues(this.activeDossier); + } catch (e) { + } finally { + this._loadingService.stop(); + } } ngOnDestroy(): void { diff --git a/apps/red-ui/src/app/services/loading.service.ts b/apps/red-ui/src/app/services/loading.service.ts index 66f938fe1..2a1ea4b13 100644 --- a/apps/red-ui/src/app/services/loading.service.ts +++ b/apps/red-ui/src/app/services/loading.service.ts @@ -15,6 +15,7 @@ export class LoadingService { } start(): void { + console.log('start'); this._loadingEvent.next(true); this._loadingStarted = new Date().getTime(); } diff --git a/libs/red-ui-http/src/lib/model/removeDownloadRequest.ts b/libs/red-ui-http/src/lib/model/removeDownloadRequest.ts index 11be360b1..87003df06 100644 --- a/libs/red-ui-http/src/lib/model/removeDownloadRequest.ts +++ b/libs/red-ui-http/src/lib/model/removeDownloadRequest.ts @@ -11,5 +11,5 @@ */ export interface RemoveDownloadRequest { - storageId?: string; + storageIds?: string[]; }