Merge branch 'dan' into 'master'

RED-7765 ignore missing types if redaction log entry is hidden

See merge request redactmanager/red-ui!154
This commit is contained in:
Dan Percic 2023-10-23 16:15:46 +02:00
commit a8e116e167
2 changed files with 14 additions and 14 deletions

View File

@ -45,12 +45,12 @@ export class FileDataService extends EntitiesService<AnnotationWrapper, Annotati
readonly #annotations = signal<AnnotationWrapper[]>([]);
readonly #earmarks = signal<Map<number, AnnotationWrapper[]>>(new Map());
#originalViewedPages: ViewedPage[] = [];
readonly #isDocumine = getConfig().IS_DOCUMINE;
protected readonly _entityClass = AnnotationWrapper;
missingTypes = new Set<string>();
readonly earmarks: Signal<Map<number, AnnotationWrapper[]>>;
readonly annotations: Signal<AnnotationWrapper[]>;
readonly annotations$: Observable<AnnotationWrapper[]>;
readonly #isDocumine = getConfig().IS_DOCUMINE;
constructor(
private readonly _state: FilePreviewStateService,
@ -184,12 +184,23 @@ export class FileDataService extends EntitiesService<AnnotationWrapper, Annotati
const file = this._state.file();
const annotations: AnnotationWrapper[] = [];
const sourceIds: { [key: string]: AnnotationWrapper[] } = {};
const sourceIds: Record<string, AnnotationWrapper[]> = {};
const dictionaries = this._state.dictionaries;
const defaultColors = this._defaultColorsService.find(this._state.dossierTemplateId);
let checkDictionary = true;
for (const entry of redactionLog.redactionLogEntry) {
const pageNumber = entry.positions[0]?.page;
const manual = entry.manualChanges?.length > 0;
if (!manual && file.excludedPages.includes(pageNumber)) {
continue;
}
const changeLogValues = this.#getChangeLogValues(entry, file);
if (changeLogValues.hidden) {
continue;
}
let dictionary = dictionaries.find(dict => dict.type === entry.type);
if (!dictionary && checkDictionary) {
const dictionaryRequest = this._dictionaryService.loadDictionaryDataForDossierTemplate(this._state.dossierTemplateId);
@ -203,17 +214,6 @@ export class FileDataService extends EntitiesService<AnnotationWrapper, Annotati
continue;
}
const pageNumber = entry.positions[0]?.page;
const manual = entry.manualChanges?.length > 0;
if (!manual && file.excludedPages.includes(pageNumber)) {
continue;
}
const changeLogValues = this.#getChangeLogValues(entry, file);
if (changeLogValues.hidden) {
continue;
}
const annotation = AnnotationWrapper.fromData(
entry,
dictionaries,

View File

@ -1,4 +1,4 @@
FROM node:20.6-buster as builder
FROM node:20.8-buster as builder
WORKDIR /ng-app