RED-6082: fix lastProcessed

This commit is contained in:
Dan Percic 2023-02-11 16:37:59 +02:00
parent 71bb204bba
commit a747f9917a
2 changed files with 4 additions and 1 deletions

View File

@ -23,6 +23,7 @@
></iqser-circle-button>
<redaction-file-download-btn
[disabled]="downloadBtnDisabled"
[dossier]="dossier"
[files]="files"
[iqserHelpMode]="'download_dossier'"

View File

@ -1,7 +1,7 @@
import { Component, Input, OnChanges } from '@angular/core';
import { PermissionsService } from '@services/permissions.service';
import { CircleButtonTypes, getCurrentUser, IqserPermissionsService, ScrollableParentViews } from '@iqser/common-ui';
import { Dossier, File, User } from '@red/domain';
import type { Dossier, File, User } from '@red/domain';
import { DossiersDialogService } from '../../services/dossiers-dialog.service';
import { LongPressEvent } from '@shared/directives/long-press.directive';
import { UserPreferenceService } from '@users/user-preference.service';
@ -22,6 +22,7 @@ export class DossiersListingActionsComponent implements OnChanges {
analysisForced: boolean;
files: File[];
displayReanalyseBtn = false;
downloadBtnDisabled = false;
@Input() dossier: Dossier;
@ -36,6 +37,7 @@ export class DossiersListingActionsComponent implements OnChanges {
ngOnChanges() {
this.files = this.filesMapService.get(this.dossier.id);
this.downloadBtnDisabled = this.files.some(file => !file.lastProcessed);
this.displayReanalyseBtn = this.permissionsService.displayReanalyseBtn(this.dossier) && this.analysisForced;
}