Fixed OCR INC6158219 / RED-2813
This commit is contained in:
parent
7a9b98f928
commit
0f00cafae3
@ -1,4 +1,7 @@
|
||||
{
|
||||
"cli": {
|
||||
"analytics": "4b8eed12-a1e6-4b7a-9ea2-925b27941271"
|
||||
},
|
||||
"version": 1,
|
||||
"projects": {
|
||||
"common-ui": {
|
||||
|
||||
@ -167,13 +167,16 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
|
||||
}
|
||||
|
||||
async updateViewMode(): Promise<void> {
|
||||
const annotations = this._getAnnotations(a => a.getCustomData('redacto-manager'));
|
||||
const ocrAnnotationIds = this.annotationData.allAnnotations.filter(a => a.isOCR).map(a => a.id);
|
||||
const annotations = this._getAnnotations(a => a.getCustomData('redact-manager'));
|
||||
const redactions = annotations.filter(a => a.getCustomData('redaction'));
|
||||
|
||||
switch (this.viewModeService.viewMode) {
|
||||
case 'STANDARD': {
|
||||
this._setAnnotationsColor(redactions, 'annotationColor');
|
||||
const standardEntries = annotations.filter(a => a.getCustomData('changeLogRemoved') === 'false');
|
||||
const standardEntries = annotations
|
||||
.filter(a => a.getCustomData('changeLogRemoved') === 'false')
|
||||
.filter(a => !ocrAnnotationIds.includes(a.Id));
|
||||
const nonStandardEntries = annotations.filter(a => a.getCustomData('changeLogRemoved') === 'true');
|
||||
this._show(standardEntries);
|
||||
this._hide(nonStandardEntries);
|
||||
|
||||
@ -390,7 +390,7 @@ export class AnnotationActionsService {
|
||||
}
|
||||
|
||||
updateHiddenAnnotation(annotations: AnnotationWrapper[], viewerAnnotations: Annotation[], hidden: boolean) {
|
||||
const annotationId = (viewerAnnotations[0] as any).Dx;
|
||||
const annotationId = viewerAnnotations[0].Id;
|
||||
const annotationToBeUpdated = annotations.find((a: AnnotationWrapper) => a.annotationId === annotationId);
|
||||
annotationToBeUpdated.hidden = hidden;
|
||||
}
|
||||
|
||||
@ -180,7 +180,7 @@ export class AnnotationDrawService {
|
||||
(hideSkipped && annotationWrapper.isSkipped) ||
|
||||
annotationWrapper.isOCR ||
|
||||
annotationWrapper.hidden;
|
||||
annotation.setCustomData('redacto-manager', 'true');
|
||||
annotation.setCustomData('redact-manager', 'true');
|
||||
annotation.setCustomData('redaction', String(annotationWrapper.isRedacted));
|
||||
annotation.setCustomData('skipped', String(annotationWrapper.isSkipped));
|
||||
annotation.setCustomData('changeLog', String(annotationWrapper.isChangeLogEntry));
|
||||
|
||||
@ -48,7 +48,6 @@ export class ConfigService {
|
||||
}
|
||||
|
||||
updateDisplayName(name: string): void {
|
||||
console.log('got name', name);
|
||||
this._values = { ...this._values, APP_NAME: name } as const;
|
||||
this._titleService.setTitle(this._values.APP_NAME || 'RedactManager');
|
||||
}
|
||||
|
||||
@ -70,8 +70,11 @@ export class FilesMapService {
|
||||
}
|
||||
|
||||
replace(entity: File) {
|
||||
const all = this.get(entity.dossierId).filter(file => file.fileId !== entity.fileId);
|
||||
this.set(entity.dossierId, [...all, entity]);
|
||||
const existingFile = this.get(entity.dossierId).find(file => file.fileId === entity.fileId);
|
||||
if (existingFile.lastUpdated !== entity.lastUpdated) {
|
||||
const all = this.get(entity.dossierId).filter(file => file.fileId !== entity.fileId);
|
||||
this.set(entity.dossierId, [...all, entity]);
|
||||
}
|
||||
}
|
||||
|
||||
watch$(key: string, entityId: string): Observable<File> {
|
||||
|
||||
@ -69,7 +69,6 @@ export class UserPreferenceService extends GenericService<UserAttributes> {
|
||||
}
|
||||
|
||||
reload(): void {
|
||||
console.log('here');
|
||||
this.getAll<UserAttributes>()
|
||||
.toPromise()
|
||||
.then(attributes => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user