UI fix for error file

This commit is contained in:
Timo Bejan 2021-11-10 10:33:44 +02:00
parent 8b3a1742a7
commit c047420312
2 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ export class File implements IFile, IListable {
readonly lastUpdated?: string; readonly lastUpdated?: string;
readonly lastUploaded?: string; readonly lastUploaded?: string;
readonly legalBasisVersion?: number; readonly legalBasisVersion?: number;
readonly numberOfAnalyses?: number; readonly numberOfAnalyses: number;
readonly numberOfPages?: number; readonly numberOfPages?: number;
readonly rulesVersion?: number; readonly rulesVersion?: number;
readonly status: FileStatus; readonly status: FileStatus;
@ -110,7 +110,7 @@ export class File implements IFile, IListable {
this.isUnderReview = this.status === FileStatuses.UNDER_REVIEW; this.isUnderReview = this.status === FileStatuses.UNDER_REVIEW;
this.isUnderApproval = this.status === FileStatuses.UNDER_APPROVAL; this.isUnderApproval = this.status === FileStatuses.UNDER_APPROVAL;
this.canBeApproved = !this.analysisRequired && !this.hasSuggestions; this.canBeApproved = !this.analysisRequired && !this.hasSuggestions;
this.canBeOpened = !this.isError && !this.isPending; this.canBeOpened = !this.isError && !this.isPending && this.numberOfAnalyses > 0;
this.isWorkable = !this.isProcessing && this.canBeOpened; this.isWorkable = !this.isProcessing && this.canBeOpened;
this.canBeOCRed = !this.excluded && !this.lastOCRTime && ['UNASSIGNED', 'UNDER_REVIEW', 'UNDER_APPROVAL'].includes(this.status); this.canBeOCRed = !this.excluded && !this.lastOCRTime && ['UNASSIGNED', 'UNDER_REVIEW', 'UNDER_APPROVAL'].includes(this.status);

View File

@ -117,7 +117,7 @@ export interface IFile {
/** /**
* The number of times the file has been analyzed. * The number of times the file has been analyzed.
*/ */
readonly numberOfAnalyses?: number; readonly numberOfAnalyses: number;
/** /**
* The number of pages of the file. * The number of pages of the file.
*/ */