diff --git a/apps/red-ui/src/app/modules/admin/screens/dossier-states-listing/dossier-states-listing-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/dossier-states-listing/dossier-states-listing-screen.component.ts index e503109e0..8c34f7811 100644 --- a/apps/red-ui/src/app/modules/admin/screens/dossier-states-listing/dossier-states-listing-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/dossier-states-listing/dossier-states-listing-screen.component.ts @@ -16,7 +16,7 @@ import { firstValueFrom } from 'rxjs'; import { AdminDialogService } from '../../services/admin-dialog.service'; import { UserService } from '@services/user.service'; import { HttpStatusCode } from '@angular/common/http'; -import { DoughnutChartConfig } from '../../../shared/components/simple-doughnut-chart/simple-doughnut-chart.component'; +import { DoughnutChartConfig } from '@shared/components/simple-doughnut-chart/simple-doughnut-chart.component'; import { ActivatedRoute } from '@angular/router'; import { DossierTemplatesService } from '@services/entity-services/dossier-templates.service'; @@ -93,7 +93,7 @@ export class DossierStatesListingScreenComponent extends ListingComponent { this._loadingService.start(); - await firstValueFrom(this.dossierStateService.setDossierState(newValue)).catch(error => { + await firstValueFrom(this.dossierStateService.updateDossierState(newValue)).catch(error => { if (error.status === HttpStatusCode.Conflict) { this._toaster.error(_('dossier-states-listing.error.conflict')); } else { @@ -106,6 +106,7 @@ export class DossierStatesListingScreenComponent extends ListingComponent { this._loadingService.start(); + // TODO: Move this in service; dossiers states service should be a mapping service await firstValueFrom(this._activeDossiersService.loadAll()); try { 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 2123eb951..f586fca22 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 @@ -133,7 +133,9 @@ export class DossierOverviewScreenComponent extends ListingComponent imple ) .subscribe(); - this._fileDropOverlayService.initFileDropHandling(this.dossierId); + if (this.currentDossier.isActive) { + this._fileDropOverlayService.initFileDropHandling(this.dossierId); + } this.addSubscription = this.configService.listingMode$.subscribe(() => { this._computeAllFilters(); diff --git a/apps/red-ui/src/app/services/entity-services/dossier-state.service.ts b/apps/red-ui/src/app/services/entity-services/dossier-state.service.ts index 373eca825..cfe8f536a 100644 --- a/apps/red-ui/src/app/services/entity-services/dossier-state.service.ts +++ b/apps/red-ui/src/app/services/entity-services/dossier-state.service.ts @@ -14,7 +14,7 @@ export class DossierStateService extends EntitiesService(body, this._defaultModelPath); } diff --git a/apps/red-ui/src/app/services/permissions.service.ts b/apps/red-ui/src/app/services/permissions.service.ts index 3268961fc..befafdb3f 100644 --- a/apps/red-ui/src/app/services/permissions.service.ts +++ b/apps/red-ui/src/app/services/permissions.service.ts @@ -38,7 +38,10 @@ export class PermissionsService { canEditFileAttributes(file: File): boolean { const dossier = this._getDossier(file); - return ((file.isUnderReview || file.isNew) && this.isDossierMember(dossier)) || (file.isUnderApproval && this.isApprover(dossier)); + return ( + this._isActive(file) && + (((file.isUnderReview || file.isNew) && this.isDossierMember(dossier)) || (file.isUnderApproval && this.isApprover(dossier))) + ); } canToggleAnalysis(file: File | File[]): boolean {