OCR Fix - RED-1593

This commit is contained in:
Timo 2021-07-13 16:28:59 +03:00
parent 7ccad5c34f
commit e2b3a97723
3 changed files with 14 additions and 2 deletions

View File

@ -106,6 +106,10 @@ export class FileDataModel {
result = result.filter(r => reasonAnnotationIds.indexOf(r.id) < 0);
result.forEach(redactionLogEntry => {
if (redactionLogEntry.id === '96a9fad412ac0ccc340c9ee53f97986b') {
redactionLogEntry.dictionaryEntry = true;
}
redactionLogEntry.legalBasisMapping = this.redactionLog.legalBasis;
});

View File

@ -115,7 +115,7 @@
<redaction-circle-button
(action)="ocrFile($event)"
*ngIf="canOcr && screen === 'dossier-overview'"
*ngIf="canOcr"
[tooltipPosition]="tooltipPosition"
[type]="buttonType"
icon="red:ocr"

View File

@ -78,6 +78,8 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy, OnAttach,
@ViewChild(PdfViewerComponent) viewerComponent: PdfViewerComponent;
private _instance: WebViewerInstance;
private _lastPage: string;
private _reloadFileOnReanalysis: boolean = false;
@ViewChild('fileWorkloadComponent') private _workloadComponent: FileWorkloadComponent;
constructor(
@ -500,6 +502,11 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy, OnAttach,
this.viewDocumentInfo = false;
return;
case 'ocr-file':
this._updateCanPerformActions();
this._reloadFileOnReanalysis = true;
return;
default:
this._updateCanPerformActions();
}
@ -604,7 +611,8 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy, OnAttach,
this.fileReanalysedSubscription = this.appStateService.fileReanalysed.subscribe(
async (fileStatus: FileStatusWrapper) => {
if (fileStatus.fileId === this.fileId) {
await this._loadFileData(true);
await this._loadFileData(!this._reloadFileOnReanalysis);
this._reloadFileOnReanalysis = false;
this.viewReady = true;
this._updateCanPerformActions();
this._cleanupAndRedrawManualAnnotations();