RED-5701 - Disable OCR button for files that are not yet initially analyzed
This commit is contained in:
parent
32f0d76c0b
commit
16ee20ed48
@ -249,7 +249,7 @@ export class ViewerHeaderService {
|
||||
header.getItems().splice(10, header.getItems().length - 14, ...enabledItems);
|
||||
});
|
||||
|
||||
this._pdf.instance.UI.updateElement('selectToolButton', {
|
||||
this._pdf.instance?.UI.updateElement('selectToolButton', {
|
||||
img: this._convertPath('/assets/icons/general/pdftron-cursor.svg'),
|
||||
});
|
||||
}
|
||||
|
||||
@ -146,7 +146,11 @@ export class File extends Entity<IFile> implements IFile {
|
||||
this.isUnderApproval = this.workflowStatus === WorkflowFileStatuses.UNDER_APPROVAL;
|
||||
this.canBeApproved = !this.hasSuggestions && !this.isProcessing && !this.isError;
|
||||
this.canBeOpened = !this.isError && !this.isUnprocessed && this.numberOfAnalyses > 0;
|
||||
this.canBeOCRed = !this.excluded && !this.lastOCRTime && (this.isNew || this.isUnderReview || this.isUnderApproval);
|
||||
this.canBeOCRed =
|
||||
!this.excluded &&
|
||||
!this.lastOCRTime &&
|
||||
this.numberOfAnalyses !== 0 &&
|
||||
(this.isNew || this.isUnderReview || this.isUnderApproval);
|
||||
|
||||
this.fileAttributes =
|
||||
file.fileAttributes && file.fileAttributes.attributeIdToValue ? file.fileAttributes : { attributeIdToValue: {} };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user