RED-7619 remove useless suggestions. god this fel good

This commit is contained in:
Dan Percic 2023-10-25 20:36:06 +03:00
parent 94ba0e5470
commit 871f0feac1
38 changed files with 197 additions and 894 deletions

View File

@ -2,8 +2,7 @@ import { AnnotationPermissions } from '@models/file/annotation.permissions';
import { AnnotationWrapper } from '@models/file/annotation.wrapper'; import { AnnotationWrapper } from '@models/file/annotation.wrapper';
import { Dictionary } from '@red/domain'; import { Dictionary } from '@red/domain';
export const canUndo = (annotation: AnnotationWrapper, isApprover: boolean) => export const canUndo = (annotation: AnnotationWrapper, isApprover: boolean) => !isApprover && annotation.pending;
!isApprover && (annotation.isSuggestion || annotation.pending);
export const canForceHint = (annotation: AnnotationWrapper, canAddRedaction: boolean) => export const canForceHint = (annotation: AnnotationWrapper, canAddRedaction: boolean) =>
canAddRedaction && annotation.isIgnoredHint && !annotation.pending; canAddRedaction && annotation.isIgnoredHint && !annotation.pending;
@ -33,15 +32,10 @@ export const canChangeLegalBasis = (annotation: AnnotationWrapper, canAddRedacti
canAddRedaction && annotation.isRedacted && !annotation.pending; canAddRedaction && annotation.isRedacted && !annotation.pending;
export const canRecategorizeAnnotation = (annotation: AnnotationWrapper, canRecategorize: boolean) => export const canRecategorizeAnnotation = (annotation: AnnotationWrapper, canRecategorize: boolean) =>
canRecategorize && canRecategorize && (annotation.isImage || annotation.hintDictionary) && !annotation.pending;
((annotation.isImage && !annotation.isSuggestion) || annotation.isSuggestionRecategorizeImage || annotation.hintDictionary) &&
!annotation.pending;
export const canResizeAnnotation = (annotation: AnnotationWrapper, canAddRedaction: boolean) => export const canResizeAnnotation = (annotation: AnnotationWrapper, canAddRedaction: boolean) =>
canAddRedaction && canAddRedaction &&
!annotation.isSkipped && !annotation.isSkipped &&
!annotation.pending && !annotation.pending &&
(((annotation.isRedacted || annotation.isImage) && !annotation.isSuggestion) || (annotation.isRedacted || annotation.isImage || annotation.isDictBasedHint || annotation.isRecommendation);
annotation.isSuggestionResize ||
annotation.isDictBasedHint ||
annotation.isRecommendation);

View File

@ -2,6 +2,7 @@ import { IqserPermissionsService } from '@iqser/common-ui';
import { Dictionary } from '@red/domain'; import { Dictionary } from '@red/domain';
import { Roles } from '@users/roles'; import { Roles } from '@users/roles';
import { isArray } from 'lodash-es'; import { isArray } from 'lodash-es';
import { IMAGE_CATEGORIES } from '../../modules/file-preview/utils/constants';
import { import {
canAcceptRecommendation, canAcceptRecommendation,
canChangeLegalBasis, canChangeLegalBasis,
@ -16,7 +17,6 @@ import {
canUndo, canUndo,
} from './annotation-permissions.utils'; } from './annotation-permissions.utils';
import { AnnotationWrapper } from './annotation.wrapper'; import { AnnotationWrapper } from './annotation.wrapper';
import { IMAGE_CATEGORIES } from '../../modules/file-preview/utils/constants';
export class AnnotationPermissions { export class AnnotationPermissions {
canUndo = true; canUndo = true;
@ -63,8 +63,7 @@ export class AnnotationPermissions {
permissions.canResizeAnnotation = canResizeAnnotation(annotation, canAddRedaction); permissions.canResizeAnnotation = canResizeAnnotation(annotation, canAddRedaction);
permissions.canEditAnnotations = (annotation.isSkipped || annotation.isRedacted) && !annotation.isImage; permissions.canEditAnnotations = (annotation.isSkipped || annotation.isRedacted) && !annotation.isImage;
permissions.canEditHints = permissions.canEditHints = annotation.isIgnoredHint || annotation.isDictBasedHint || annotation.isHint;
annotation.isIgnoredHint || annotation.isDictBasedHint || annotation.isHint || annotation.isSuggestionForceHint;
permissions.canEditImages = [...IMAGE_CATEGORIES, 'ocr'].includes(annotation.type); permissions.canEditImages = [...IMAGE_CATEGORIES, 'ocr'].includes(annotation.type);
summedPermissions._merge(permissions); summedPermissions._merge(permissions);

View File

@ -1,12 +1,10 @@
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
import { IListable } from '@iqser/common-ui'; import { IListable } from '@iqser/common-ui';
import { import {
annotationDefaultColorConfig,
annotationEntityColorConfig, annotationEntityColorConfig,
AnnotationIconType, AnnotationIconType,
ChangeType, ChangeType,
ChangeTypes, ChangeTypes,
DefaultColors,
Dictionary, Dictionary,
Earmark, Earmark,
EntryStates, EntryStates,
@ -23,9 +21,6 @@ import {
LogEntryStatuses, LogEntryStatuses,
LowLevelFilterTypes, LowLevelFilterTypes,
ManualRedactionTypes, ManualRedactionTypes,
SuggestionAddSuperTypes,
SuggestionRemoveSuperTypes,
SuggestionsSuperTypes,
SuperType, SuperType,
SuperTypes, SuperTypes,
} from '@red/domain'; } from '@red/domain';
@ -55,7 +50,6 @@ export class AnnotationWrapper implements IListable {
positions: IRectangle[]; positions: IRectangle[];
recommendationType: string; recommendationType: string;
legalBasisValue: string; legalBasisValue: string;
legalBasisChangeValue?: string;
rectangle?: boolean; rectangle?: boolean;
section?: string; section?: string;
reference: string[]; reference: string[];
@ -107,10 +101,6 @@ export class AnnotationWrapper implements IListable {
); );
} }
get isSuperTypeBasedColor() {
return this.isSuggestion || this.isDeclinedSuggestion;
}
get isSkipped() { get isSkipped() {
return this.superType === SuperTypes.Skipped; return this.superType === SuperTypes.Skipped;
} }
@ -147,18 +137,6 @@ export class AnnotationWrapper implements IListable {
return this.type?.toLowerCase() === 'false_positive' && !!FalsePositiveSuperTypes[this.superType]; return this.type?.toLowerCase() === 'false_positive' && !!FalsePositiveSuperTypes[this.superType];
} }
get isSuggestionAddToFalsePositive() {
return this.typeLabel === annotationTypesTranslations[SuggestionAddFalsePositive];
}
get isDeclinedSuggestion() {
return this.superType === SuperTypes.DeclinedSuggestion;
}
get isApproved() {
return this.status === 'APPROVED';
}
get isHint() { get isHint() {
return this.superType === SuperTypes.Hint; return this.superType === SuperTypes.Hint;
} }
@ -176,10 +154,6 @@ export class AnnotationWrapper implements IListable {
return 'circle'; return 'circle';
} }
if (this.isSuggestion || this.isDeclinedSuggestion) {
return 'rhombus';
}
return 'square'; return 'square';
} }
@ -195,34 +169,6 @@ export class AnnotationWrapper implements IListable {
return this.superType === SuperTypes.Redaction || this.superType === SuperTypes.ManualRedaction; return this.superType === SuperTypes.Redaction || this.superType === SuperTypes.ManualRedaction;
} }
get isSuggestion() {
return !!SuggestionsSuperTypes[this.superType];
}
get isSuggestionResize() {
return this.superType === SuperTypes.SuggestionResize;
}
get isSuggestionRecategorizeImage() {
return this.superType === SuperTypes.SuggestionRecategorizeImage;
}
get isSuggestionForceHint() {
return this.superType === SuperTypes.SuggestionForceHint;
}
get isSuggestionAdd() {
return !!SuggestionAddSuperTypes[this.superType];
}
get isSuggestionRemove() {
return !!SuggestionRemoveSuperTypes[this.superType];
}
get isSuggestionLegalBasisChange() {
return this.superType === SuperTypes.SuggestionChangeLegalBasis;
}
get isModifyDictionary() { get isModifyDictionary() {
return this.dictionaryOperation; return this.dictionaryOperation;
} }
@ -251,7 +197,7 @@ export class AnnotationWrapper implements IListable {
} }
get legalBasis() { get legalBasis() {
return this.legalBasisChangeValue || this.legalBasisValue; return this.legalBasisValue;
} }
get width(): number { get width(): number {
@ -263,14 +209,7 @@ export class AnnotationWrapper implements IListable {
} }
get previewAnnotation() { get previewAnnotation() {
return ( return this.isRedacted;
this.isRedacted ||
this.isSuggestionAdd ||
this.isSuggestionRemove ||
this.isSuggestionResize ||
this.isSuggestionLegalBasisChange ||
this.isSuggestionRecategorizeImage
);
} }
static fromEarmark(earmark: Earmark) { static fromEarmark(earmark: Earmark) {
@ -292,7 +231,6 @@ export class AnnotationWrapper implements IListable {
static fromData( static fromData(
logEntry: IEntityLogEntry, logEntry: IEntityLogEntry,
dictionaries: Dictionary[], dictionaries: Dictionary[],
defaultColors: DefaultColors,
changeLogType: ChangeType, changeLogType: ChangeType,
legalBasisList: ILegalBasis[], legalBasisList: ILegalBasis[],
hintDictionary: boolean, hintDictionary: boolean,
@ -347,9 +285,6 @@ export class AnnotationWrapper implements IListable {
annotationWrapper.hasBeenRemovedByManualOverride = !!logEntry.manualChanges?.find( annotationWrapper.hasBeenRemovedByManualOverride = !!logEntry.manualChanges?.find(
c => c.manualRedactionType === ManualRedactionTypes.REMOVE_LOCALLY && c.annotationStatus === LogEntryStatuses.APPROVED, c => c.manualRedactionType === ManualRedactionTypes.REMOVE_LOCALLY && c.annotationStatus === LogEntryStatuses.APPROVED,
); );
annotationWrapper.legalBasisChangeValue = logEntry.manualChanges?.find(
c => c.manualRedactionType === ManualRedactionTypes.LEGAL_BASIS_CHANGE && c.annotationStatus === LogEntryStatuses.REQUESTED,
)?.propertyChanges.legalBasis;
this.#createContent(annotationWrapper, logEntry, isDocumine); this.#createContent(annotationWrapper, logEntry, isDocumine);
this.#setSuperType(annotationWrapper, logEntry); this.#setSuperType(annotationWrapper, logEntry);
@ -359,15 +294,8 @@ export class AnnotationWrapper implements IListable {
const entity = dictionaries.find(d => d.type === annotationWrapper.typeValue); const entity = dictionaries.find(d => d.type === annotationWrapper.typeValue);
annotationWrapper.entity = entity?.virtual ? null : entity; annotationWrapper.entity = entity?.virtual ? null : entity;
let colorKey = annotationWrapper.isSuperTypeBasedColor const colorKey = annotationEntityColorConfig[annotationWrapper.superType];
? annotationDefaultColorConfig[annotationWrapper.superType] annotationWrapper.color = entity[colorKey] as string;
: annotationEntityColorConfig[annotationWrapper.superType];
if (annotationWrapper.isSuperTypeBasedColor && annotationWrapper.isSuggestionResize && !annotationWrapper.isModifyDictionary) {
colorKey = annotationDefaultColorConfig[SuperTypes.SuggestionAdd];
}
annotationWrapper.color = annotationWrapper.isSuperTypeBasedColor ? defaultColors[colorKey] : (entity[colorKey] as string);
return annotationWrapper; return annotationWrapper;
} }
@ -408,10 +336,6 @@ export class AnnotationWrapper implements IListable {
annotationWrapper.pending = !lastRelevantManualChange.processed; annotationWrapper.pending = !lastRelevantManualChange.processed;
annotationWrapper.superType = this.#selectSuperType(logEntry, lastRelevantManualChange, annotationWrapper.hintDictionary); annotationWrapper.superType = this.#selectSuperType(logEntry, lastRelevantManualChange, annotationWrapper.hintDictionary);
if (lastRelevantManualChange.annotationStatus === LogEntryStatuses.REQUESTED) {
annotationWrapper.recategorizationType = lastRelevantManualChange.propertyChanges.type;
}
} else { } else {
if (logEntry.state === EntryStates.SKIPPED) { if (logEntry.state === EntryStates.SKIPPED) {
if (logEntry.entryType === EntryTypes.HINT) { if (logEntry.entryType === EntryTypes.HINT) {
@ -487,20 +411,12 @@ export class AnnotationWrapper implements IListable {
switch (lastManualChange.annotationStatus) { switch (lastManualChange.annotationStatus) {
case LogEntryStatuses.APPROVED: case LogEntryStatuses.APPROVED:
return SuperTypes.ManualRedaction; return SuperTypes.ManualRedaction;
case LogEntryStatuses.DECLINED:
return SuperTypes.DeclinedSuggestion;
case LogEntryStatuses.REQUESTED:
return SuperTypes.SuggestionAdd;
} }
break; break;
case ManualRedactionTypes.ADD_TO_DICTIONARY: case ManualRedactionTypes.ADD_TO_DICTIONARY:
switch (lastManualChange.annotationStatus) { switch (lastManualChange.annotationStatus) {
case LogEntryStatuses.APPROVED: case LogEntryStatuses.APPROVED:
return isHintDictionary ? SuperTypes.Hint : SuperTypes.Redaction; return isHintDictionary ? SuperTypes.Hint : SuperTypes.Redaction;
case LogEntryStatuses.DECLINED:
return SuperTypes.DeclinedSuggestion;
case LogEntryStatuses.REQUESTED:
return SuperTypes.SuggestionAddDictionary;
} }
break; break;
case ManualRedactionTypes.REMOVE_LOCALLY: case ManualRedactionTypes.REMOVE_LOCALLY:
@ -518,8 +434,6 @@ export class AnnotationWrapper implements IListable {
return SuperTypes.Skipped; return SuperTypes.Skipped;
} }
case LogEntryStatuses.REQUESTED:
return SuperTypes.SuggestionRemove;
} }
break; break;
case ManualRedactionTypes.REMOVE_FROM_DICTIONARY: case ManualRedactionTypes.REMOVE_FROM_DICTIONARY:
@ -530,16 +444,12 @@ export class AnnotationWrapper implements IListable {
return SuperTypes.Skipped; return SuperTypes.Skipped;
case LogEntryStatuses.DECLINED: case LogEntryStatuses.DECLINED:
return SuperTypes.Redaction; return SuperTypes.Redaction;
case LogEntryStatuses.REQUESTED:
return SuperTypes.SuggestionRemoveDictionary;
} }
} }
switch (lastManualChange.annotationStatus) { switch (lastManualChange.annotationStatus) {
case LogEntryStatuses.APPROVED: case LogEntryStatuses.APPROVED:
case LogEntryStatuses.DECLINED: case LogEntryStatuses.DECLINED:
return SuperTypes.Redaction; return SuperTypes.Redaction;
case LogEntryStatuses.REQUESTED:
return SuperTypes.SuggestionRemoveDictionary;
} }
} }
@ -549,8 +459,6 @@ export class AnnotationWrapper implements IListable {
return logEntry.entryType === EntryTypes.RECOMMENDATION ? SuperTypes.Recommendation : SuperTypes.Skipped; return logEntry.entryType === EntryTypes.RECOMMENDATION ? SuperTypes.Recommendation : SuperTypes.Skipped;
case LogEntryStatuses.DECLINED: case LogEntryStatuses.DECLINED:
return isHintDictionary ? SuperTypes.Hint : SuperTypes.Skipped; return isHintDictionary ? SuperTypes.Hint : SuperTypes.Skipped;
case LogEntryStatuses.REQUESTED:
return SuperTypes.SuggestionRemoveDictionary;
} }
} }
@ -558,8 +466,6 @@ export class AnnotationWrapper implements IListable {
case LogEntryStatuses.APPROVED: case LogEntryStatuses.APPROVED:
case LogEntryStatuses.DECLINED: case LogEntryStatuses.DECLINED:
return isHintDictionary ? SuperTypes.Hint : SuperTypes.Skipped; return isHintDictionary ? SuperTypes.Hint : SuperTypes.Skipped;
case LogEntryStatuses.REQUESTED:
return SuperTypes.SuggestionRemoveDictionary;
} }
break; break;
case ManualRedactionTypes.FORCE_REDACT: case ManualRedactionTypes.FORCE_REDACT:
@ -568,8 +474,6 @@ export class AnnotationWrapper implements IListable {
return SuperTypes.Redaction; return SuperTypes.Redaction;
case LogEntryStatuses.DECLINED: case LogEntryStatuses.DECLINED:
return isHintDictionary ? SuperTypes.IgnoredHint : SuperTypes.Skipped; return isHintDictionary ? SuperTypes.IgnoredHint : SuperTypes.Skipped;
case LogEntryStatuses.REQUESTED:
return SuperTypes.SuggestionForceRedaction;
} }
break; break;
case ManualRedactionTypes.FORCE_HINT: case ManualRedactionTypes.FORCE_HINT:
@ -578,8 +482,6 @@ export class AnnotationWrapper implements IListable {
return SuperTypes.Hint; return SuperTypes.Hint;
case LogEntryStatuses.DECLINED: case LogEntryStatuses.DECLINED:
return SuperTypes.IgnoredHint; return SuperTypes.IgnoredHint;
case LogEntryStatuses.REQUESTED:
return SuperTypes.SuggestionForceHint;
} }
break; break;
case ManualRedactionTypes.RECATEGORIZE: case ManualRedactionTypes.RECATEGORIZE:
@ -600,8 +502,6 @@ export class AnnotationWrapper implements IListable {
return isHintDictionary ? SuperTypes.IgnoredHint : SuperTypes.Skipped; return isHintDictionary ? SuperTypes.IgnoredHint : SuperTypes.Skipped;
} }
case LogEntryStatuses.REQUESTED:
return SuperTypes.SuggestionRecategorizeImage;
} }
break; break;
case ManualRedactionTypes.LEGAL_BASIS_CHANGE: case ManualRedactionTypes.LEGAL_BASIS_CHANGE:
@ -609,8 +509,6 @@ export class AnnotationWrapper implements IListable {
case LogEntryStatuses.APPROVED: case LogEntryStatuses.APPROVED:
case LogEntryStatuses.DECLINED: case LogEntryStatuses.DECLINED:
return logEntry.type === SuperTypes.ManualRedaction ? SuperTypes.ManualRedaction : SuperTypes.Redaction; return logEntry.type === SuperTypes.ManualRedaction ? SuperTypes.ManualRedaction : SuperTypes.Redaction;
case LogEntryStatuses.REQUESTED:
return SuperTypes.SuggestionChangeLegalBasis;
} }
break; break;
case ManualRedactionTypes.RESIZE: case ManualRedactionTypes.RESIZE:
@ -629,8 +527,6 @@ export class AnnotationWrapper implements IListable {
return SuperTypes.Hint; return SuperTypes.Hint;
} }
return isHintDictionary ? SuperTypes.IgnoredHint : SuperTypes.Skipped; return isHintDictionary ? SuperTypes.IgnoredHint : SuperTypes.Skipped;
case LogEntryStatuses.REQUESTED:
return SuperTypes.SuggestionResize;
} }
break; break;
} }

View File

@ -14,12 +14,6 @@
></redaction-annotation-icon> ></redaction-annotation-icon>
<redaction-annotation-icon *ngIf="file.hasImages" [color]="imageColor$ | async" label="I" type="square"></redaction-annotation-icon> <redaction-annotation-icon *ngIf="file.hasImages" [color]="imageColor$ | async" label="I" type="square"></redaction-annotation-icon>
<redaction-annotation-icon *ngIf="file.hintsOnly" [color]="hintColor$ | async" label="H" type="circle"></redaction-annotation-icon> <redaction-annotation-icon *ngIf="file.hintsOnly" [color]="hintColor$ | async" label="H" type="circle"></redaction-annotation-icon>
<redaction-annotation-icon
*ngIf="file.hasSuggestions"
[color]="suggestionColor$ | async"
label="S"
type="rhombus"
></redaction-annotation-icon>
<mat-icon *ngIf="file.hasAnnotationComments" svgIcon="red:comment"></mat-icon> <mat-icon *ngIf="file.hasAnnotationComments" svgIcon="red:comment"></mat-icon>
<ng-container *ngIf="noWorkloadItems"> - </ng-container> <ng-container *ngIf="noWorkloadItems"> -</ng-container>
</div> </div>

View File

@ -1,10 +1,10 @@
import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core'; import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';
import { annotationDefaultColorConfig, DefaultBasedColorType, File } from '@red/domain'; import { annotationDefaultColorConfig, DefaultBasedColorType, File } from '@red/domain';
import { UserService } from '@users/user.service';
import { DossiersService } from '@services/dossiers/dossiers.service'; import { DossiersService } from '@services/dossiers/dossiers.service';
import { DefaultColorsService } from '@services/entity-services/default-colors.service'; import { DefaultColorsService } from '@services/entity-services/default-colors.service';
import { Observable } from 'rxjs';
import { DictionariesMapService } from '@services/entity-services/dictionaries-map.service'; import { DictionariesMapService } from '@services/entity-services/dictionaries-map.service';
import { UserService } from '@users/user.service';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
@Component({ @Component({
@ -14,17 +14,14 @@ import { map } from 'rxjs/operators';
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
}) })
export class FileWorkloadComponent implements OnInit { export class FileWorkloadComponent implements OnInit {
#dossierTemplateId: string;
@Input() file: File; @Input() file: File;
suggestionColor$: Observable<string>;
imageColor$: Observable<string>; imageColor$: Observable<string>;
updatedColor$: Observable<string>; updatedColor$: Observable<string>;
analysisColor$: Observable<string>; analysisColor$: Observable<string>;
hintColor$: Observable<string>; hintColor$: Observable<string>;
redactionColor$: Observable<string>; redactionColor$: Observable<string>;
#dossierTemplateId: string;
constructor( constructor(
private readonly _userService: UserService, private readonly _userService: UserService,
private readonly _defaultColorsService: DefaultColorsService, private readonly _defaultColorsService: DefaultColorsService,
@ -32,20 +29,6 @@ export class FileWorkloadComponent implements OnInit {
private readonly _dictionariesMapService: DictionariesMapService, private readonly _dictionariesMapService: DictionariesMapService,
) {} ) {}
ngOnInit() {
this.#dossierTemplateId = this._dossiersService.find(this.file.dossierId).dossierTemplateId;
this.suggestionColor$ = this.#getDefaultColor$('suggestion');
this.updatedColor$ = this.#getDefaultColor$('updated');
this.analysisColor$ = this.#getDefaultColor$('analysis');
this.hintColor$ = this.#getDefaultColor$('hint');
this.redactionColor$ = this.#getDefaultColor$('redaction');
this.imageColor$ = this._dictionariesMapService.watch$(this.#dossierTemplateId, 'image').pipe(map(e => e.hexColor));
}
#getDefaultColor$(type: DefaultBasedColorType): Observable<string> {
return this._defaultColorsService.getColor$(this.#dossierTemplateId, annotationDefaultColorConfig[type]);
}
get updated(): boolean { get updated(): boolean {
return this.file.hasUpdates && this.file.assignee === this._userService.currentUser.id && !this.file.isApproved; return this.file.hasUpdates && this.file.assignee === this._userService.currentUser.id && !this.file.isApproved;
} }
@ -57,8 +40,20 @@ export class FileWorkloadComponent implements OnInit {
!this.file.hasRedactions && !this.file.hasRedactions &&
!this.file.hasImages && !this.file.hasImages &&
!this.file.hintsOnly && !this.file.hintsOnly &&
!this.file.hasSuggestions &&
!this.file.hasAnnotationComments !this.file.hasAnnotationComments
); );
} }
ngOnInit() {
this.#dossierTemplateId = this._dossiersService.find(this.file.dossierId).dossierTemplateId;
this.updatedColor$ = this.#getDefaultColor$('updated');
this.analysisColor$ = this.#getDefaultColor$('analysis');
this.hintColor$ = this.#getDefaultColor$('hint');
this.redactionColor$ = this.#getDefaultColor$('redaction');
this.imageColor$ = this._dictionariesMapService.watch$(this.#dossierTemplateId, 'image').pipe(map(e => e.hexColor));
}
#getDefaultColor$(type: DefaultBasedColorType): Observable<string> {
return this._defaultColorsService.getColor$(this.#dossierTemplateId, annotationDefaultColorConfig[type]);
}
} }

View File

@ -1,4 +1,5 @@
import { Injectable, TemplateRef } from '@angular/core'; import { Injectable, TemplateRef } from '@angular/core';
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
import { import {
ActionConfig, ActionConfig,
getConfig, getConfig,
@ -9,6 +10,10 @@ import {
WorkflowColumn, WorkflowColumn,
WorkflowConfig, WorkflowConfig,
} from '@iqser/common-ui'; } from '@iqser/common-ui';
import { IFilterGroup, INestedFilter, keyChecker, NestedFilter } from '@iqser/common-ui/lib/filtering';
import { getCurrentUser } from '@iqser/common-ui/lib/users';
import { getParam, List } from '@iqser/common-ui/lib/utils';
import { TranslateService } from '@ngx-translate/core';
import { import {
annotationDefaultColorConfig, annotationDefaultColorConfig,
AnnotationShapeMap, AnnotationShapeMap,
@ -22,26 +27,21 @@ import {
WorkflowFileStatus, WorkflowFileStatus,
WorkflowFileStatuses, WorkflowFileStatuses,
} from '@red/domain'; } from '@red/domain';
import { workflowFileStatusTranslations } from '@translations/file-status-translations';
import { PermissionsService } from '@services/permissions.service';
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
import { TranslateService } from '@ngx-translate/core';
import { UserService } from '@users/user.service';
import { DossiersDialogService } from '../shared-dossiers/services/dossiers-dialog.service';
import { annotationFilterChecker, RedactionFilterSorter } from '../../utils';
import { workloadTranslations } from '@translations/workload-translations';
import { BehaviorSubject, Observable } from 'rxjs';
import { BulkActionsService } from './services/bulk-actions.service';
import dayjs from 'dayjs';
import { DefaultColorsService } from '@services/entity-services/default-colors.service';
import { map } from 'rxjs/operators';
import { DictionariesMapService } from '@services/entity-services/dictionaries-map.service';
import { UserPreferenceService } from '@users/user-preference.service';
import { DossiersService } from '@services/dossiers/dossiers.service'; import { DossiersService } from '@services/dossiers/dossiers.service';
import { DefaultColorsService } from '@services/entity-services/default-colors.service';
import { DictionariesMapService } from '@services/entity-services/dictionaries-map.service';
import { PermissionsService } from '@services/permissions.service';
import { workflowFileStatusTranslations } from '@translations/file-status-translations';
import { workloadTranslations } from '@translations/workload-translations';
import { Roles } from '@users/roles'; import { Roles } from '@users/roles';
import { getCurrentUser } from '@iqser/common-ui/lib/users'; import { UserPreferenceService } from '@users/user-preference.service';
import { IFilterGroup, INestedFilter, keyChecker, NestedFilter } from '@iqser/common-ui/lib/filtering'; import { UserService } from '@users/user.service';
import { getParam, List } from '@iqser/common-ui/lib/utils'; import dayjs from 'dayjs';
import { BehaviorSubject, Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { annotationFilterChecker, RedactionFilterSorter } from '../../utils';
import { DossiersDialogService } from '../shared-dossiers/services/dossiers-dialog.service';
import { BulkActionsService } from './services/bulk-actions.service';
@Injectable() @Injectable()
export class ConfigService { export class ConfigService {
@ -198,9 +198,6 @@ export class ConfigService {
if (file.hasRedactions) { if (file.hasRedactions) {
allDistinctNeedsWork.add('redaction'); allDistinctNeedsWork.add('redaction');
} }
if (file.hasSuggestions) {
allDistinctNeedsWork.add('suggestion');
}
if (file.hasUpdates && file.assignee === this._userService.currentUser.id && !file.isApproved) { if (file.hasUpdates && file.assignee === this._userService.currentUser.id && !file.isApproved) {
allDistinctNeedsWork.add('updated'); allDistinctNeedsWork.add('updated');
} }

View File

@ -12,11 +12,4 @@
label="H" label="H"
type="circle" type="circle"
></redaction-annotation-icon> ></redaction-annotation-icon>
<redaction-annotation-icon
*ngIf="dossierStats.hasSuggestionsFilePresent"
[color]="suggestionColor$ | async"
label="S"
type="rhombus"
></redaction-annotation-icon>
</div> </div>

View File

@ -10,19 +10,13 @@ import { BehaviorSubject, Observable, switchMap } from 'rxjs';
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
}) })
export class DossierWorkloadColumnComponent implements OnChanges { export class DossierWorkloadColumnComponent implements OnChanges {
readonly #dossierTemplateId$ = new BehaviorSubject<string>(null);
@Input() dossier: Dossier; @Input() dossier: Dossier;
@Input() dossierStats: DossierStats; @Input() dossierStats: DossierStats;
readonly suggestionColor$: Observable<string>;
readonly hintColor$: Observable<string>; readonly hintColor$: Observable<string>;
readonly redactionColor$: Observable<string>; readonly redactionColor$: Observable<string>;
readonly #dossierTemplateId$ = new BehaviorSubject<string>(null);
constructor(private readonly _defaultColorsService: DefaultColorsService) { constructor(private readonly _defaultColorsService: DefaultColorsService) {
this.suggestionColor$ = this.#dossierTemplateId$.pipe(
switchMap(dossierTemplateId => this.#getColor$(dossierTemplateId, 'requestAddColor')),
);
this.hintColor$ = this.#dossierTemplateId$.pipe(switchMap(dossierTemplateId => this.#getColor$(dossierTemplateId, 'hintColor'))); this.hintColor$ = this.#dossierTemplateId$.pipe(switchMap(dossierTemplateId => this.#getColor$(dossierTemplateId, 'hintColor')));
this.redactionColor$ = this.#dossierTemplateId$.pipe( this.redactionColor$ = this.#dossierTemplateId$.pipe(
switchMap(dossierTemplateId => this.#getColor$(dossierTemplateId, 'redactionColor')), switchMap(dossierTemplateId => this.#getColor$(dossierTemplateId, 'redactionColor')),

View File

@ -1,5 +1,8 @@
import { Injectable, TemplateRef } from '@angular/core'; import { Injectable, TemplateRef } from '@angular/core';
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
import { ButtonConfig, getConfig, TableColumnConfig } from '@iqser/common-ui'; import { ButtonConfig, getConfig, TableColumnConfig } from '@iqser/common-ui';
import { IFilterGroup, INestedFilter, keyChecker, NestedFilter } from '@iqser/common-ui/lib/filtering';
import { TranslateService } from '@ngx-translate/core';
import { import {
annotationDefaultColorConfig, annotationDefaultColorConfig,
AnnotationShapeMap, AnnotationShapeMap,
@ -9,11 +12,15 @@ import {
User, User,
WorkflowFileStatus, WorkflowFileStatus,
} from '@red/domain'; } from '@red/domain';
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { DossierStatsService } from '@services/dossiers/dossier-stats.service';
import { TranslateService } from '@ngx-translate/core'; import { DefaultColorsService } from '@services/entity-services/default-colors.service';
import { DossierStatesMapService } from '@services/entity-services/dossier-states-map.service';
import { PermissionsService } from '@services/permissions.service';
import { SharedDialogService } from '@shared/services/dialog.service';
import { workflowFileStatusTranslations } from '@translations/file-status-translations';
import { workloadTranslations } from '@translations/workload-translations';
import { UserPreferenceService } from '@users/user-preference.service'; import { UserPreferenceService } from '@users/user-preference.service';
import { UserService } from '@users/user.service'; import { UserService } from '@users/user.service';
import { workflowFileStatusTranslations } from '@translations/file-status-translations';
import { import {
dossierMemberChecker, dossierMemberChecker,
dossierMemberQuickChecker, dossierMemberQuickChecker,
@ -21,17 +28,11 @@ import {
dossierStateChecker, dossierStateChecker,
RedactionFilterSorter, RedactionFilterSorter,
} from '../../utils'; } from '../../utils';
import { workloadTranslations } from '@translations/workload-translations';
import { DossierStatsService } from '@services/dossiers/dossier-stats.service';
import { DossierStatesMapService } from '@services/entity-services/dossier-states-map.service';
import { PermissionsService } from '@services/permissions.service';
import { SharedDialogService } from '@shared/services/dialog.service';
import { DefaultColorsService } from '@services/entity-services/default-colors.service';
import { IFilterGroup, INestedFilter, keyChecker, NestedFilter } from '@iqser/common-ui/lib/filtering';
@Injectable() @Injectable()
export class ConfigService { export class ConfigService {
readonly #isDocumine = getConfig().IS_DOCUMINE; readonly #isDocumine = getConfig().IS_DOCUMINE;
constructor( constructor(
private readonly _translateService: TranslateService, private readonly _translateService: TranslateService,
private readonly _userPreferenceService: UserPreferenceService, private readonly _userPreferenceService: UserPreferenceService,
@ -106,9 +107,6 @@ export class ConfigService {
if (stats.hasRedactionsFilePresent) { if (stats.hasRedactionsFilePresent) {
allDistinctNeedsWork.add('redaction'); allDistinctNeedsWork.add('redaction');
} }
if (stats.hasSuggestionsFilePresent) {
allDistinctNeedsWork.add('suggestion');
}
if (stats.hasNoFlagsFilePresent) { if (stats.hasNoFlagsFilePresent) {
allDistinctNeedsWork.add('none'); allDistinctNeedsWork.add('none');
} }
@ -246,12 +244,6 @@ export class ConfigService {
private _annotationFilterChecker = (dossier: Dossier, filter: INestedFilter) => { private _annotationFilterChecker = (dossier: Dossier, filter: INestedFilter) => {
const stats = this._dossierStatsService.get(dossier.id); const stats = this._dossierStatsService.get(dossier.id);
switch (filter.id) { switch (filter.id) {
// case 'analysis': {
// return stats.reanalysisRequired;
// }
case 'suggestion': {
return stats.hasSuggestionsFilePresent;
}
case 'redaction': { case 'redaction': {
return stats.hasRedactionsFilePresent; return stats.hasRedactionsFilePresent;
} }

View File

@ -7,10 +7,10 @@
<ng-container *ngIf="resizing && annotationPermissions.canResizeAnnotation"> <ng-container *ngIf="resizing && annotationPermissions.canResizeAnnotation">
<iqser-circle-button <iqser-circle-button
(action)="acceptResize()" (action)="acceptResize()"
[class.disabled]="!resized"
[tooltipPosition]="tooltipPosition" [tooltipPosition]="tooltipPosition"
[tooltip]="resized ? ('annotation-actions.resize-accept.label' | translate) : ''" [tooltip]="resized ? ('annotation-actions.resize-accept.label' | translate) : ''"
[type]="buttonType" [type]="buttonType"
[class.disabled]="!resized"
icon="iqser:check" icon="iqser:check"
></iqser-circle-button> ></iqser-circle-button>
@ -28,20 +28,20 @@
<iqser-circle-button <iqser-circle-button
(action)="resize()" (action)="resize()"
*ngIf="annotationPermissions.canResizeAnnotation && annotations.length === 1" *ngIf="annotationPermissions.canResizeAnnotation && annotations.length === 1"
[attr.help-mode-key]="helpModeKey('resize')"
[tooltipPosition]="tooltipPosition" [tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.resize.label' | translate" [tooltip]="'annotation-actions.resize.label' | translate"
[type]="buttonType" [type]="buttonType"
[attr.help-mode-key]="helpModeKey('resize')"
icon="red:resize" icon="red:resize"
></iqser-circle-button> ></iqser-circle-button>
<iqser-circle-button <iqser-circle-button
(action)="annotationActionsService.editRedaction(annotations)" (action)="annotationActionsService.editRedaction(annotations)"
*ngIf="canEdit" *ngIf="canEdit"
[attr.help-mode-key]="helpModeKey('edit')"
[tooltipPosition]="tooltipPosition" [tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.edit-redaction.label' | translate" [tooltip]="'annotation-actions.edit-redaction.label' | translate"
[type]="buttonType" [type]="buttonType"
[attr.help-mode-key]="helpModeKey('edit')"
icon="iqser:edit" icon="iqser:edit"
></iqser-circle-button> ></iqser-circle-button>
@ -136,12 +136,12 @@
></iqser-circle-button> ></iqser-circle-button>
<iqser-circle-button <iqser-circle-button
(action)="removeOrSuggestRemoveRedaction()" (action)="removeRedaction()"
*ngIf="canRemoveRedaction" *ngIf="canRemoveRedaction"
[attr.help-mode-key]="helpModeKey('remove')"
[tooltipPosition]="tooltipPosition" [tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.remove-annotation.remove-redaction' | translate" [tooltip]="'annotation-actions.remove-annotation.remove-redaction' | translate"
[type]="buttonType" [type]="buttonType"
[attr.help-mode-key]="helpModeKey('remove')"
icon="iqser:trash" icon="iqser:trash"
></iqser-circle-button> ></iqser-circle-button>
</ng-container> </ng-container>

View File

@ -24,6 +24,9 @@ export type AnnotationButtonType = keyof typeof AnnotationButtonTypes;
styleUrls: ['./annotation-actions.component.scss'], styleUrls: ['./annotation-actions.component.scss'],
}) })
export class AnnotationActionsComponent implements OnChanges { export class AnnotationActionsComponent implements OnChanges {
#annotations: AnnotationWrapper[] = [];
readonly #isDocumine = getConfig().IS_DOCUMINE;
protected _annotationId = '';
@Input() buttonType: AnnotationButtonType = AnnotationButtonTypes.default; @Input() buttonType: AnnotationButtonType = AnnotationButtonTypes.default;
@Input() tooltipPosition: 'before' | 'above' = 'before'; @Input() tooltipPosition: 'before' | 'above' = 'before';
@Input() canPerformAnnotationActions: boolean; @Input() canPerformAnnotationActions: boolean;
@ -31,13 +34,10 @@ export class AnnotationActionsComponent implements OnChanges {
readonly roles = Roles; readonly roles = Roles;
annotationPermissions: AnnotationPermissions; annotationPermissions: AnnotationPermissions;
isImage = true; isImage = true;
protected _annotationId = '';
#annotations: AnnotationWrapper[] = [];
readonly isVisible = computed(() => { readonly isVisible = computed(() => {
const hidden = this._annotationManager.hidden(); const hidden = this._annotationManager.hidden();
return this.#annotations.reduce((acc, annotation) => !hidden.has(annotation.id) && acc, true); return this.#annotations.reduce((acc, annotation) => !hidden.has(annotation.id) && acc, true);
}); });
readonly #isDocumine = getConfig().IS_DOCUMINE;
constructor( constructor(
readonly viewModeService: ViewModeService, readonly viewModeService: ViewModeService,
@ -55,6 +55,13 @@ export class AnnotationActionsComponent implements OnChanges {
return this.#annotations; return this.#annotations;
} }
@Input()
set annotations(annotations: AnnotationWrapper[]) {
this.#annotations = annotations.filter(a => a !== undefined);
this.isImage = this.#annotations?.reduce((accumulator, annotation) => annotation.isImage && accumulator, true);
this._annotationId = this.#annotations[0]?.id;
}
get canEdit(): boolean { get canEdit(): boolean {
const canEditRedactions = const canEditRedactions =
this.annotationPermissions.canChangeLegalBasis || this.annotationPermissions.canChangeLegalBasis ||
@ -91,18 +98,11 @@ export class AnnotationActionsComponent implements OnChanges {
return this.annotations.every(a => a.superType === type); return this.annotations.every(a => a.superType === type);
} }
@Input()
set annotations(annotations: AnnotationWrapper[]) {
this.#annotations = annotations.filter(a => a !== undefined);
this.isImage = this.#annotations?.reduce((accumulator, annotation) => annotation.isImage && accumulator, true);
this._annotationId = this.#annotations[0]?.id;
}
ngOnChanges(): void { ngOnChanges(): void {
this.#setPermissions(); this.#setPermissions();
} }
removeOrSuggestRemoveRedaction() { removeRedaction() {
this.annotationActionsService.removeRedaction(this.annotations, this.annotationPermissions); this.annotationActionsService.removeRedaction(this.annotations, this.annotationPermissions);
} }

View File

@ -10,7 +10,7 @@
<div> <div>
<strong>{{ annotation.typeLabel | translate }}</strong> <strong>{{ annotation.typeLabel | translate }}</strong>
&nbsp; &nbsp;
<strong *ngIf="annotation.pending && !annotation.isSuggestion" class="pending-analysis"> <strong *ngIf="annotation.pending" class="pending-analysis">
{{ 'annotation.pending' | translate }} {{ 'annotation.pending' | translate }}
</strong> </strong>
</div> </div>

View File

@ -1,13 +1,10 @@
import { Component, computed, Inject } from '@angular/core'; import { Component, computed, Inject } from '@angular/core';
import { ViewMode, ViewModes } from '@red/domain';
import { ViewModeService } from '../../services/view-mode.service';
import { FilePreviewStateService } from '../../services/file-preview-state.service';
import { FileDataService } from '../../services/file-data.service';
import { ConfirmOptions, IConfirmationDialogData, Toaster } from '@iqser/common-ui';
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
import { FilePreviewDialogService } from '../../services/file-preview-dialog.service';
import { Roles } from '@users/roles';
import { BASE_HREF } from '@iqser/common-ui/lib/utils'; import { BASE_HREF } from '@iqser/common-ui/lib/utils';
import { ViewMode, ViewModes } from '@red/domain';
import { Roles } from '@users/roles';
import { FileDataService } from '../../services/file-data.service';
import { FilePreviewStateService } from '../../services/file-preview-state.service';
import { ViewModeService } from '../../services/view-mode.service';
@Component({ @Component({
selector: 'redaction-view-switch', selector: 'redaction-view-switch',
@ -37,49 +34,12 @@ export class ViewSwitchComponent {
readonly viewModeService: ViewModeService, readonly viewModeService: ViewModeService,
private readonly _state: FilePreviewStateService, private readonly _state: FilePreviewStateService,
private readonly _fileDataService: FileDataService, private readonly _fileDataService: FileDataService,
private readonly _dialogService: FilePreviewDialogService,
private readonly _toaster: Toaster,
) {} ) {}
switchView(viewMode: ViewMode) { switchView(viewMode: ViewMode) {
if (viewMode === ViewModes.REDACTED) { if (viewMode === ViewModes.REDACTED) {
return this.#switchToRedactedView(); return this.viewModeService.switchToRedacted();
} }
this.viewModeService.switchTo(viewMode); this.viewModeService.switchTo(viewMode);
} }
async #switchToRedactedView() {
const suggestions = this._fileDataService.annotations().filter(a => a.isSuggestion);
if (!suggestions.length) {
return this.viewModeService.switchToRedacted();
}
const question = _('unapproved-suggestions.confirmation-dialog.not-displayed-question');
const data: IConfirmationDialogData = {
title: _('unapproved-suggestions.confirmation-dialog.title'),
question: question,
confirmationText: _('unapproved-suggestions.confirmation-dialog.confirmation-text'),
denyText: _('unapproved-suggestions.confirmation-dialog.deny-text'),
checkboxes: [
{
label: _('unapproved-suggestions.confirmation-dialog.checkbox-text'),
value: false,
},
],
checkboxesValidation: false,
};
return this._dialogService.openDialog('confirm', data, result => {
if (!result) {
return;
}
if (result === ConfirmOptions.SECOND_CONFIRM) {
this._toaster.success(_('unapproved-suggestions.confirmation-dialog.success-confirmation-text'), {
params: { settingsUrl: `${this._baseHref}/main/account/warnings-preferences` },
});
}
this.viewModeService.switchToRedacted();
});
}
} }

View File

@ -4,7 +4,6 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
import { EntitiesService, getConfig, Toaster } from '@iqser/common-ui'; import { EntitiesService, getConfig, Toaster } from '@iqser/common-ui';
import { AnnotationWrapper } from '@models/file/annotation.wrapper'; import { AnnotationWrapper } from '@models/file/annotation.wrapper';
import { ChangeType, ChangeTypes, File, IEntityLog, IEntityLogEntry, LogEntryStatuses, ViewedPage, ViewMode, ViewModes } from '@red/domain'; import { ChangeType, ChangeTypes, File, IEntityLog, IEntityLogEntry, LogEntryStatuses, ViewedPage, ViewMode, ViewModes } from '@red/domain';
import { DefaultColorsService } from '@services/entity-services/default-colors.service';
import { DictionaryService } from '@services/entity-services/dictionary.service'; import { DictionaryService } from '@services/entity-services/dictionary.service';
import { EarmarksService } from '@services/files/earmarks.service'; import { EarmarksService } from '@services/files/earmarks.service';
import { FilesService } from '@services/files/files.service'; import { FilesService } from '@services/files/files.service';
@ -56,7 +55,6 @@ export class FileDataService extends EntitiesService<AnnotationWrapper, Annotati
private readonly _filesService: FilesService, private readonly _filesService: FilesService,
private readonly _toaster: Toaster, private readonly _toaster: Toaster,
private readonly _logger: NGXLogger, private readonly _logger: NGXLogger,
private readonly _defaultColorsService: DefaultColorsService,
) { ) {
super(); super();
this.annotations$ = toObservable(this.#annotations); this.annotations$ = toObservable(this.#annotations);
@ -169,14 +167,12 @@ export class FileDataService extends EntitiesService<AnnotationWrapper, Annotati
async #convertData(entityLog: IEntityLog) { async #convertData(entityLog: IEntityLog) {
if (!entityLog.entityLogEntry) { if (!entityLog.entityLogEntry) {
return []; return [] as AnnotationWrapper[];
} }
const file = this._state.file(); const file = this._state.file();
const annotations: AnnotationWrapper[] = []; const annotations: AnnotationWrapper[] = [];
const sourceIds: Record<string, AnnotationWrapper[]> = {};
const dictionaries = this._state.dictionaries; const dictionaries = this._state.dictionaries;
const defaultColors = this._defaultColorsService.find(this._state.dossierTemplateId);
let checkDictionary = true; let checkDictionary = true;
for (const entry of entityLog.entityLogEntry) { for (const entry of entityLog.entityLogEntry) {
@ -207,25 +203,16 @@ export class FileDataService extends EntitiesService<AnnotationWrapper, Annotati
const annotation = AnnotationWrapper.fromData( const annotation = AnnotationWrapper.fromData(
entry, entry,
dictionaries, dictionaries,
defaultColors,
changeLogValues.changeLogType, changeLogValues.changeLogType,
entityLog.legalBasis ?? [], entityLog.legalBasis ?? [],
!!dictionary?.hint, !!dictionary?.hint,
this.#isDocumine, this.#isDocumine,
); );
// if (entry.sourceId) {
// if (!sourceIds[entry.sourceId]) {
// sourceIds[entry.sourceId] = [];
// }
// sourceIds[entry.sourceId].push(annotation);
// }
annotations.push(annotation); annotations.push(annotation);
} }
const sourceKeys = Object.keys(sourceIds); return annotations;
return annotations.filter(r => !sourceKeys.includes(r.id));
} }
#getChangeLogValues( #getChangeLogValues(
@ -268,12 +255,11 @@ export class FileDataService extends EntitiesService<AnnotationWrapper, Annotati
}; };
} }
const visibleStatuses: string[] = [LogEntryStatuses.APPROVED, LogEntryStatuses.REQUESTED]; const visibleStatuses: string[] = [LogEntryStatuses.APPROVED];
const viableManualChanges = entityLogEntry.manualChanges.filter(change => visibleStatuses.includes(change.annotationStatus)); const viableManualChanges = entityLogEntry.manualChanges.filter(change => visibleStatuses.includes(change.annotationStatus));
viableManualChanges.sort(chronologicallyBy(x => x.processedDate)); viableManualChanges.sort(chronologicallyBy(x => x.processedDate));
const lastManualChange = viableManualChanges.at(-1); const lastManualChange = viableManualChanges.at(-1);
const isSuggestion = lastManualChange?.annotationStatus === LogEntryStatuses.REQUESTED; const processedTime = lastManualChange?.processedDate;
const processedTime = isSuggestion ? lastManualChange.requestedDate : lastManualChange?.processedDate;
changeOccurredAfterPageIsViewed = processedTime && timestampOf(processedTime) > viewTime; changeOccurredAfterPageIsViewed = processedTime && timestampOf(processedTime) > viewTime;
if (changeOccurredAfterPageIsViewed) { if (changeOccurredAfterPageIsViewed) {

View File

@ -43,7 +43,7 @@ export class ManualRedactionService extends GenericService<IManualAddResponse> {
constructor( constructor(
private readonly _toaster: Toaster, private readonly _toaster: Toaster,
private readonly _logger: NGXLogger, private readonly _logger: NGXLogger,
private readonly _iqaerPermissionsService: IqserPermissionsService, private readonly _iqserPermissionsService: IqserPermissionsService,
) { ) {
super(); super();
} }
@ -90,7 +90,7 @@ export class ManualRedactionService extends GenericService<IManualAddResponse> {
const toast = requests[0].addToDictionary const toast = requests[0].addToDictionary
? this.#showAddToDictionaryToast(requests, options?.dictionaryLabel) ? this.#showAddToDictionaryToast(requests, options?.dictionaryLabel)
: this.#showToast(options?.hint ? 'force-hint' : 'add'); : this.#showToast(options?.hint ? 'force-hint' : 'add');
const canAddRedaction = this._iqaerPermissionsService.has(Roles.redactions.write); const canAddRedaction = this._iqserPermissionsService.has(Roles.redactions.write);
if (canAddRedaction) { if (canAddRedaction) {
return this.add(requests, dossierId, fileId).pipe(toast); return this.add(requests, dossierId, fileId).pipe(toast);
} }
@ -137,19 +137,6 @@ export class ManualRedactionService extends GenericService<IManualAddResponse> {
); );
} }
approve(annotationIds: List, dossierId: string, fileId: string) {
return this._post(annotationIds, `${this._defaultModelPath}/bulk/approve/${dossierId}/${fileId}`).pipe(
this.#log('Approve', annotationIds),
this.#showToast('approve'),
);
}
decline(annotationIds: List, dossierId: string, fileId: string) {
return this._post(annotationIds, `${this._defaultModelPath}/bulk/decline/${dossierId}/${fileId}`).pipe(
this.#log('Decline', annotationIds),
);
}
undo(annotationIds: List, dossierId: string, fileId: string) { undo(annotationIds: List, dossierId: string, fileId: string) {
const url = `${this._defaultModelPath}/bulk/undo/${dossierId}/${fileId}`; const url = `${this._defaultModelPath}/bulk/undo/${dossierId}/${fileId}`;
return super.delete(annotationIds, url).pipe(this.#log('Undo', annotationIds)); return super.delete(annotationIds, url).pipe(this.#log('Undo', annotationIds));

View File

@ -154,7 +154,7 @@ export class AnnotationDrawService {
annotation.Id = annotationWrapper.id; annotation.Id = annotationWrapper.id;
annotation.ReadOnly = true; annotation.ReadOnly = true;
const isOCR = annotationWrapper.isOCR && !annotationWrapper.isSuggestionResize; const isOCR = annotationWrapper.isOCR;
if (isOCR && !this._annotationManager.isHidden(annotationWrapper.id)) { if (isOCR && !this._annotationManager.isHidden(annotationWrapper.id)) {
this._annotationManager.addToHidden(annotationWrapper.id); this._annotationManager.addToHidden(annotationWrapper.id);
} }
@ -164,12 +164,6 @@ export class AnnotationDrawService {
this._annotationManager.isHidden(annotationWrapper.id); this._annotationManager.isHidden(annotationWrapper.id);
annotation.setCustomData('redact-manager', 'true'); annotation.setCustomData('redact-manager', 'true');
annotation.setCustomData('redaction', String(annotationWrapper.previewAnnotation)); annotation.setCustomData('redaction', String(annotationWrapper.previewAnnotation));
annotation.setCustomData('suggestion', String(annotationWrapper.isSuggestion));
annotation.setCustomData('suggestionAdd', String(annotationWrapper.isSuggestionAdd));
annotation.setCustomData('suggestionAddToFalsePositive', String(annotationWrapper.isSuggestionAddToFalsePositive));
annotation.setCustomData('suggestionRemove', String(annotationWrapper.isSuggestionRemove));
annotation.setCustomData('suggestionRecategorizeImage', String(annotationWrapper.isSuggestionRecategorizeImage));
annotation.setCustomData('suggestionForceHint', String(annotationWrapper.isSuggestionForceHint));
annotation.setCustomData('skipped', String(annotationWrapper.isSkipped)); annotation.setCustomData('skipped', String(annotationWrapper.isSkipped));
annotation.setCustomData('notSignatureImage', String(annotationWrapper.isNotSignatureImage)); annotation.setCustomData('notSignatureImage', String(annotationWrapper.isNotSignatureImage));
annotation.setCustomData('changeLog', String(annotationWrapper.isChangeLogEntry)); annotation.setCustomData('changeLog', String(annotationWrapper.isChangeLogEntry));

View File

@ -1,13 +1,12 @@
import { inject, Injectable } from '@angular/core'; import { inject, Injectable } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
import { HeaderElements } from '../../file-preview/utils/constants';
import { PdfViewer } from './pdf-viewer.service';
import { REDAnnotationManager } from './annotation-manager.service';
import { AnnotationDrawService } from './annotation-draw.service';
import { BehaviorSubject, Observable } from 'rxjs';
import { Core } from '@pdftron/webviewer';
import { BASE_HREF_FN } from '@iqser/common-ui/lib/utils'; import { BASE_HREF_FN } from '@iqser/common-ui/lib/utils';
import { TranslateService } from '@ngx-translate/core';
import { Core } from '@pdftron/webviewer';
import { BehaviorSubject, Observable } from 'rxjs';
import { HeaderElements } from '../../file-preview/utils/constants';
import { AnnotationDrawService } from './annotation-draw.service';
import { PdfViewer } from './pdf-viewer.service';
import Annotation = Core.Annotations.Annotation; import Annotation = Core.Annotations.Annotation;
@Injectable() @Injectable()
@ -21,7 +20,6 @@ export class ReadableRedactionsService {
constructor( constructor(
private readonly _pdf: PdfViewer, private readonly _pdf: PdfViewer,
private readonly _translateService: TranslateService, private readonly _translateService: TranslateService,
private readonly _annotationManager: REDAnnotationManager,
private readonly _annotationDrawService: AnnotationDrawService, private readonly _annotationDrawService: AnnotationDrawService,
) { ) {
this.active$ = this.#active$.asObservable(); this.active$ = this.#active$.asObservable();
@ -79,8 +77,7 @@ export class ReadableRedactionsService {
setAnnotationsOpacity(annotations: Annotation[], restoreToOriginal = false) { setAnnotationsOpacity(annotations: Annotation[], restoreToOriginal = false) {
annotations.forEach(annotation => { annotations.forEach(annotation => {
const isSuggestion = annotation.getCustomData('suggestion'); annotation['Opacity'] = restoreToOriginal ? parseFloat(annotation.getCustomData('opacity')) : 0.5;
annotation['Opacity'] = restoreToOriginal || isSuggestion ? parseFloat(annotation.getCustomData('opacity')) : 0.5;
}); });
} }

View File

@ -1,31 +1,20 @@
import { Component, Input, OnChanges } from '@angular/core'; import { Component, Input, OnChanges } from '@angular/core';
import { SuperTypes } from '@red/domain';
import { DefaultColorsService } from '@services/entity-services/default-colors.service';
import { TranslateService } from '@ngx-translate/core';
import { INestedFilter } from '@iqser/common-ui/lib/filtering'; import { INestedFilter } from '@iqser/common-ui/lib/filtering';
import { TranslateService } from '@ngx-translate/core';
@Component({ @Component({
selector: 'redaction-type-filter [dossierTemplateId]', selector: 'redaction-type-filter',
templateUrl: './type-filter.component.html', templateUrl: './type-filter.component.html',
styleUrls: ['./type-filter.component.scss'], styleUrls: ['./type-filter.component.scss'],
}) })
export class TypeFilterComponent implements OnChanges { export class TypeFilterComponent implements OnChanges {
private _suggestionsKeys: string[] = [
SuperTypes.SuggestionRemove,
SuperTypes.SuggestionForceRedaction,
SuperTypes.SuggestionAdd,
SuperTypes.SuggestionRemoveDictionary,
SuperTypes.SuggestionAddDictionary,
SuperTypes.DeclinedSuggestion,
'suggestion',
];
private _needsAnalysisKeys: string[] = ['remove-only-here', 'analysis']; private _needsAnalysisKeys: string[] = ['remove-only-here', 'analysis'];
@Input() filter: INestedFilter; @Input() filter: INestedFilter;
@Input() dossierTemplateId: string; @Input({ required: true }) dossierTemplateId: string;
@Input() dossierId: string; @Input() dossierId: string;
label: string; label: string;
constructor(private readonly _defaultColorsService: DefaultColorsService, private readonly _translateService: TranslateService) {} constructor(private readonly _translateService: TranslateService) {}
ngOnChanges(): void { ngOnChanges(): void {
this.label = this.label =
@ -35,8 +24,6 @@ export class TypeFilterComponent implements OnChanges {
? '-' ? '-'
: this._needsAnalysisKeys.includes(this.filter.id) : this._needsAnalysisKeys.includes(this.filter.id)
? 'A' ? 'A'
: this._suggestionsKeys.includes(this.filter.id)
? 'S'
: this.filter.skipTranslation : this.filter.skipTranslation
? this.filter.label.charAt(0) ? this.filter.label.charAt(0)
: this._translateService.instant(this.filter.label).charAt(0); : this._translateService.instant(this.filter.label).charAt(0);

View File

@ -1,5 +1,5 @@
import { DictionaryActions, ManualRedactionActions } from '@red/domain';
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
import { DictionaryActions, ManualRedactionActions } from '@red/domain';
interface AnnotationActionResponses { interface AnnotationActionResponses {
error: string; error: string;
@ -13,26 +13,10 @@ export const dictionaryActionsTranslations: Record<DictionaryActions, Annotation
conflictError: _('annotation-actions.message.dictionary.add.conflict-error'), conflictError: _('annotation-actions.message.dictionary.add.conflict-error'),
success: _('annotation-actions.message.dictionary.add.success'), success: _('annotation-actions.message.dictionary.add.success'),
}, },
approve: {
error: _('annotation-actions.message.dictionary.approve.error'),
success: _('annotation-actions.message.dictionary.approve.success'),
},
decline: {
error: _('annotation-actions.message.dictionary.decline.error'),
success: _('annotation-actions.message.dictionary.decline.success'),
},
remove: { remove: {
error: _('annotation-actions.message.dictionary.remove.error'), error: _('annotation-actions.message.dictionary.remove.error'),
success: _('annotation-actions.message.dictionary.remove.success'), success: _('annotation-actions.message.dictionary.remove.success'),
}, },
'request-remove': {
error: _('annotation-actions.message.dictionary.request-remove.error'),
success: _('annotation-actions.message.dictionary.request-remove.success'),
},
suggest: {
error: _('annotation-actions.message.dictionary.suggest.error'),
success: _('annotation-actions.message.dictionary.suggest.success'),
},
undo: { undo: {
error: _('annotation-actions.message.dictionary.undo.error'), error: _('annotation-actions.message.dictionary.undo.error'),
success: _('annotation-actions.message.dictionary.undo.success'), success: _('annotation-actions.message.dictionary.undo.success'),
@ -44,18 +28,10 @@ export const manualRedactionActionsTranslations: Record<ManualRedactionActions,
error: _('annotation-actions.message.manual-redaction.add.error'), error: _('annotation-actions.message.manual-redaction.add.error'),
success: _('annotation-actions.message.manual-redaction.add.success'), success: _('annotation-actions.message.manual-redaction.add.success'),
}, },
approve: {
error: _('annotation-actions.message.manual-redaction.approve.error'),
success: _('annotation-actions.message.manual-redaction.approve.success'),
},
'change-legal-basis': { 'change-legal-basis': {
error: _('annotation-actions.message.manual-redaction.change-legal-basis.error'), error: _('annotation-actions.message.manual-redaction.change-legal-basis.error'),
success: _('annotation-actions.message.manual-redaction.change-legal-basis.success'), success: _('annotation-actions.message.manual-redaction.change-legal-basis.success'),
}, },
decline: {
error: _('annotation-actions.message.manual-redaction.decline.error'),
success: _('annotation-actions.message.manual-redaction.decline.success'),
},
'force-redaction': { 'force-redaction': {
error: _('annotation-actions.message.manual-redaction.force-redaction.error'), error: _('annotation-actions.message.manual-redaction.force-redaction.error'),
success: _('annotation-actions.message.manual-redaction.force-redaction.success'), success: _('annotation-actions.message.manual-redaction.force-redaction.success'),
@ -72,26 +48,6 @@ export const manualRedactionActionsTranslations: Record<ManualRedactionActions,
error: _('annotation-actions.message.manual-redaction.change-type.error'), error: _('annotation-actions.message.manual-redaction.change-type.error'),
success: _('annotation-actions.message.manual-redaction.change-type.success'), success: _('annotation-actions.message.manual-redaction.change-type.success'),
}, },
'request-change-legal-basis': {
error: _('annotation-actions.message.manual-redaction.request-change-legal-basis.error'),
success: _('annotation-actions.message.manual-redaction.request-change-legal-basis.success'),
},
'request-force-redaction': {
error: _('annotation-actions.message.manual-redaction.request-force-redaction.error'),
success: _('annotation-actions.message.manual-redaction.request-force-redaction.success'),
},
'request-force-hint': {
error: _('annotation-actions.message.manual-redaction.request-force-hint.error'),
success: _('annotation-actions.message.manual-redaction.request-force-hint.success'),
},
'request-image-recategorization': {
error: _('annotation-actions.message.manual-redaction.request-image-recategorization.error'),
success: _('annotation-actions.message.manual-redaction.request-image-recategorization.success'),
},
suggest: {
error: _('annotation-actions.message.manual-redaction.suggest.error'),
success: _('annotation-actions.message.manual-redaction.suggest.success'),
},
undo: { undo: {
error: _('annotation-actions.message.manual-redaction.undo.error'), error: _('annotation-actions.message.manual-redaction.undo.error'),
success: _('annotation-actions.message.manual-redaction.undo.success'), success: _('annotation-actions.message.manual-redaction.undo.success'),
@ -104,12 +60,4 @@ export const manualRedactionActionsTranslations: Record<ManualRedactionActions,
error: _('annotation-actions.message.manual-redaction.remove-hint.error'), error: _('annotation-actions.message.manual-redaction.remove-hint.error'),
success: _('annotation-actions.message.manual-redaction.remove-hint.success'), success: _('annotation-actions.message.manual-redaction.remove-hint.success'),
}, },
'request-remove': {
error: _('annotation-actions.message.manual-redaction.request-remove.error'),
success: _('annotation-actions.message.manual-redaction.request-remove.success'),
},
'request-remove-hint': {
error: _('annotation-actions.message.manual-redaction.request-remove-hint.error'),
success: _('annotation-actions.message.manual-redaction.request-remove-hint.success'),
},
} as const; } as const;

View File

@ -7,21 +7,11 @@ type TranslationKey = SuperType & typeof SuggestionAddFalsePositive;
export const annotationTypesTranslations: Record<TranslationKey, string> = { export const annotationTypesTranslations: Record<TranslationKey, string> = {
[SuperTypes.TextHighlight]: _('annotation-type.text-highlight'), [SuperTypes.TextHighlight]: _('annotation-type.text-highlight'),
[SuperTypes.DeclinedSuggestion]: _('annotation-type.declined-suggestion'),
[SuperTypes.Hint]: _('annotation-type.hint'), [SuperTypes.Hint]: _('annotation-type.hint'),
[SuperTypes.IgnoredHint]: _('annotation-type.ignored-hint'), [SuperTypes.IgnoredHint]: _('annotation-type.ignored-hint'),
[SuperTypes.ManualRedaction]: _('annotation-type.manual-redaction'), [SuperTypes.ManualRedaction]: _('annotation-type.manual-redaction'),
[SuperTypes.Recommendation]: _('annotation-type.recommendation'), [SuperTypes.Recommendation]: _('annotation-type.recommendation'),
[SuperTypes.Redaction]: _('annotation-type.redaction'), [SuperTypes.Redaction]: _('annotation-type.redaction'),
[SuperTypes.Skipped]: _('annotation-type.skipped'), [SuperTypes.Skipped]: _('annotation-type.skipped'),
[SuperTypes.SuggestionAdd]: _('annotation-type.suggestion-add'),
[SuperTypes.SuggestionAddDictionary]: _('annotation-type.suggestion-add-dictionary'),
[SuperTypes.SuggestionChangeLegalBasis]: _('annotation-type.suggestion-change-legal-basis'),
[SuperTypes.SuggestionRecategorizeImage]: _('annotation-type.suggestion-recategorize-image'),
[SuperTypes.SuggestionForceRedaction]: _('annotation-type.suggestion-force-redaction'),
[SuperTypes.SuggestionForceHint]: _('annotation-type.suggestion-force-hint'),
[SuperTypes.SuggestionRemove]: _('annotation-type.suggestion-remove'),
[SuperTypes.SuggestionRemoveDictionary]: _('annotation-type.suggestion-remove-dictionary'),
[SuperTypes.SuggestionResize]: _('annotation-type.suggestion-resize'),
[SuggestionAddFalsePositive]: _('annotation-type.suggestion-add-false-positive'), [SuggestionAddFalsePositive]: _('annotation-type.suggestion-add-false-positive'),
} as const; } as const;

View File

@ -6,7 +6,6 @@ export const workloadTranslations: { [key: string]: string } = {
image: _('filter.image'), image: _('filter.image'),
none: _('filter.none'), none: _('filter.none'),
redaction: _('filter.redaction'), redaction: _('filter.redaction'),
suggestion: _('filter.suggestion'),
updated: _('filter.updated'), updated: _('filter.updated'),
comment: _('filter.comment'), comment: _('filter.comment'),
}; };

View File

@ -7,7 +7,6 @@ export const PreferencesKeys = {
lastDossierTemplate: 'Last-Dossier-Template', lastDossierTemplate: 'Last-Dossier-Template',
filesListingMode: 'Files-Listing-Mode', filesListingMode: 'Files-Listing-Mode',
autoExpandFiltersOnActions: 'Auto-Expand-Filters-On-Actions', autoExpandFiltersOnActions: 'Auto-Expand-Filters-On-Actions',
displaySuggestionsInPreview: 'Display-Suggestions-In-Preview',
loadAllAnnotationsWarning: 'Load-All-Annotations-Warning', loadAllAnnotationsWarning: 'Load-All-Annotations-Warning',
openScmDialogByDefault: 'Open-Structured-Component-Management-By-Default', openScmDialogByDefault: 'Open-Structured-Component-Management-By-Default',
tableExtractionType: 'Table-Extraction-Type', tableExtractionType: 'Table-Extraction-Type',

View File

@ -1,5 +1,5 @@
import { Dossier, File, User, UserType } from '@red/domain';
import { handleCheckedValue, INestedFilter } from '@iqser/common-ui/lib/filtering'; import { handleCheckedValue, INestedFilter } from '@iqser/common-ui/lib/filtering';
import { Dossier, File, User, UserType } from '@red/domain';
export function handleFilterDelta(oldFilters: INestedFilter[], newFilters: INestedFilter[], allFilters: INestedFilter[]) { export function handleFilterDelta(oldFilters: INestedFilter[], newFilters: INestedFilter[], allFilters: INestedFilter[]) {
const newFiltersDelta = {}; const newFiltersDelta = {};
@ -52,9 +52,6 @@ export const annotationFilterChecker = (file: File, filter: INestedFilter, curre
case 'analysis': { case 'analysis': {
return file.analysisRequired; return file.analysisRequired;
} }
case 'suggestion': {
return file.hasSuggestions;
}
case 'redaction': { case 'redaction': {
return file.hasRedactions; return file.hasRedactions;
} }

View File

@ -4,7 +4,6 @@ export const RedactionFilterSorter = {
redaction: 2, redaction: 2,
image: 3, image: 3,
hint: 4, hint: 4,
suggestion: 5,
none: 6, none: 6,
byKey: (a: { id: string }, b: { id: string }): number => RedactionFilterSorter[a.id] - RedactionFilterSorter[b.id], byKey: (a: { id: string }, b: { id: string }): number => RedactionFilterSorter[a.id] - RedactionFilterSorter[b.id],
}; };

View File

@ -2,20 +2,10 @@ import { SuperType, SuperTypes } from '@red/domain';
export const SuperTypeSorter: { [key in SuperType]: number } = { export const SuperTypeSorter: { [key in SuperType]: number } = {
[SuperTypes.TextHighlight]: 100, [SuperTypes.TextHighlight]: 100,
[SuperTypes.SuggestionChangeLegalBasis]: 14,
[SuperTypes.SuggestionForceRedaction]: 15,
[SuperTypes.SuggestionForceHint]: 16,
[SuperTypes.SuggestionRecategorizeImage]: 17,
[SuperTypes.SuggestionResize]: 18,
[SuperTypes.Recommendation]: 7, [SuperTypes.Recommendation]: 7,
[SuperTypes.SuggestionAddDictionary]: 12,
[SuperTypes.SuggestionRemoveDictionary]: 13,
[SuperTypes.SuggestionAdd]: 10,
[SuperTypes.SuggestionRemove]: 11,
[SuperTypes.IgnoredHint]: 45, [SuperTypes.IgnoredHint]: 45,
[SuperTypes.Skipped]: 50, [SuperTypes.Skipped]: 50,
[SuperTypes.Redaction]: 1, [SuperTypes.Redaction]: 1,
[SuperTypes.ManualRedaction]: 2, [SuperTypes.ManualRedaction]: 2,
[SuperTypes.Hint]: 19, [SuperTypes.Hint]: 19,
[SuperTypes.DeclinedSuggestion]: 20,
}; };

View File

@ -1,7 +1,7 @@
{ {
"ADMIN_CONTACT_NAME": null, "ADMIN_CONTACT_NAME": null,
"ADMIN_CONTACT_URL": null, "ADMIN_CONTACT_URL": null,
"API_URL": "https://dan.iqser.cloud", "API_URL": "https://dan1.iqser.cloud",
"APP_NAME": "RedactManager", "APP_NAME": "RedactManager",
"IS_DOCUMINE": false, "IS_DOCUMINE": false,
"RULE_EDITOR_DEV_ONLY": false, "RULE_EDITOR_DEV_ONLY": false,
@ -13,7 +13,7 @@
"MAX_RETRIES_ON_SERVER_ERROR": 3, "MAX_RETRIES_ON_SERVER_ERROR": 3,
"OAUTH_CLIENT_ID": "redaction", "OAUTH_CLIENT_ID": "redaction",
"OAUTH_IDP_HINT": null, "OAUTH_IDP_HINT": null,
"OAUTH_URL": "https://dan.iqser.cloud/auth", "OAUTH_URL": "https://dan1.iqser.cloud/auth",
"RECENT_PERIOD_IN_HOURS": 24, "RECENT_PERIOD_IN_HOURS": 24,
"SELECTION_MODE": "structural", "SELECTION_MODE": "structural",
"MANUAL_BASE_URL": "https://docs.redactmanager.com/preview", "MANUAL_BASE_URL": "https://docs.redactmanager.com/preview",

View File

@ -56,8 +56,7 @@
}, },
"add-edit-clone-dossier-template": { "add-edit-clone-dossier-template": {
"error": { "error": {
"conflict": "Dossiervorlage konnte nicht erstellt werden: Es existiert bereits eine Dossiervorlage mit demselben Namen.", "conflict": "Dossiervorlage konnte nicht erstellt werden: Es existiert bereits eine Dossiervorlage mit demselben Namen."
"generic": "Fehler beim Erstellen der Dossiervorlage."
}, },
"form": { "form": {
"apply-updates-default": { "apply-updates-default": {
@ -256,9 +255,6 @@
"user-management": "User Management", "user-management": "User Management",
"watermarks": "Watermarks" "watermarks": "Watermarks"
}, },
"annotation": {
"pending": "(Pending Analysis)"
},
"annotation-actions": { "annotation-actions": {
"accept-recommendation": { "accept-recommendation": {
"label": "Empfehlung annehmen" "label": "Empfehlung annehmen"
@ -283,26 +279,10 @@
"error": "Fehler beim Hinzufügen des neuen Wörterbucheintrags: {error}", "error": "Fehler beim Hinzufügen des neuen Wörterbucheintrags: {error}",
"success": "Eintrag zum Wörterbuch hinzugefügt. Änderungen nach der Reanalyse sichtbar." "success": "Eintrag zum Wörterbuch hinzugefügt. Änderungen nach der Reanalyse sichtbar."
}, },
"approve": {
"error": "Fehler beim Genehmigen des Wörterbucheintrags: {error}",
"success": "Neuer Wörterbucheintrag wurde genehmigt. Änderungen sind nach der Reanalyse sichtbar."
},
"decline": {
"error": "Fehler beim Ablehnen des neuen Wörterbucheintrags: {error}",
"success": "Vorschlag für das Wörterbuch abgelehnt."
},
"remove": { "remove": {
"error": "Fehler beim Entfernen des Wörterbucheintrags: {error}", "error": "Fehler beim Entfernen des Wörterbucheintrags: {error}",
"success": "Wörterbucheintrag wurde gelöscht!" "success": "Wörterbucheintrag wurde gelöscht!"
}, },
"request-remove": {
"error": "Dossier-Vorlage",
"success": "Löschung des Wörterbucheintrags wurde vorgeschlagen!"
},
"suggest": {
"error": "Vorschlag für Änderung des Wörterbuchs konnte nicht gespeichert werden: {error}",
"success": "Vorschlag für die Änderung des Wörterbuchs gespeichert!"
},
"undo": { "undo": {
"error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}", "error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}",
"success": "Rückgängigmachen erfolgreich" "success": "Rückgängigmachen erfolgreich"
@ -313,10 +293,6 @@
"error": "Fehler beim Speichern der Schwärzung: {error}", "error": "Fehler beim Speichern der Schwärzung: {error}",
"success": "Schwärzung hinzugefügt!" "success": "Schwärzung hinzugefügt!"
}, },
"approve": {
"error": "Fehler beim Genehmigen des Vorschlags: {error}",
"success": "Vorschlag genehmigt"
},
"change-legal-basis": { "change-legal-basis": {
"error": "Fehler beim Bearbeiten der in der Anmerkung genannten Begründung: {error}", "error": "Fehler beim Bearbeiten der in der Anmerkung genannten Begründung: {error}",
"success": "In der Anmerkung genannte Begründung wurde bearbeitet." "success": "In der Anmerkung genannte Begründung wurde bearbeitet."
@ -325,10 +301,6 @@
"error": "Failed to edit type: {error}", "error": "Failed to edit type: {error}",
"success": "Type was edited." "success": "Type was edited."
}, },
"decline": {
"error": "Fehler beim Ablehnen des Vorschlags: {error}",
"success": "Vorschlag abgelehnt"
},
"force-hint": { "force-hint": {
"error": "Failed to save hint: {error}", "error": "Failed to save hint: {error}",
"success": "Hint added!" "success": "Hint added!"
@ -341,41 +313,13 @@
"error": "Rekategorisierung des Bildes gescheitert: {error}", "error": "Rekategorisierung des Bildes gescheitert: {error}",
"success": "Bild wurde einer neuen Kategorie zugeordnet." "success": "Bild wurde einer neuen Kategorie zugeordnet."
}, },
"remove": {
"error": "Fehler beim Entfernen der Schwärzung: {error}",
"success": "Schwärzung entfernt!"
},
"remove-hint": { "remove-hint": {
"error": "Failed to remove hint: {error}", "error": "Failed to remove hint: {error}",
"success": "Hint removed!" "success": "Hint removed!"
}, },
"request-change-legal-basis": { "remove": {
"error": "Fehler beim Vorschlagen der Änderung der Begründung:", "error": "Fehler beim Entfernen der Schwärzung: {error}",
"success": "Die Änderung der in der Anmerkung genannten Begründung wurde beantragt." "success": "Schwärzung entfernt!"
},
"request-force-hint": {
"error": "Failed to save hint suggestion: {error}",
"success": "Hint suggestion saved"
},
"request-force-redaction": {
"error": "Fehler beim Speichern des Schwärzungsvorschlags: {error}",
"success": "Vorschlag einer Schwärzung gespeichert"
},
"request-image-recategorization": {
"error": "Fehler beim Vorschlagen der Neukategorisierung des Bilds: {error}",
"success": "Bild-Neuklassifizierung angefordert."
},
"request-remove": {
"error": "Fehler beim Erstellen des Vorschlags für das Entfernen der Schwärzung: {error}",
"success": "Entfernen der Schwärzung wurde vorgeschlagen!"
},
"request-remove-hint": {
"error": "Failed to request removal of hint: {error}",
"success": "Requested to remove hint!"
},
"suggest": {
"error": "Vorschlag einer Schwärzung wurde nicht gespeichert: {error}",
"success": "Vorschlag einer Schwärzung gespeichert"
}, },
"undo": { "undo": {
"error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}", "error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}",
@ -389,15 +333,15 @@
"remove-highlights": { "remove-highlights": {
"label": "Remove Selected Earmarks" "label": "Remove Selected Earmarks"
}, },
"resize": {
"label": "Größe ändern"
},
"resize-accept": { "resize-accept": {
"label": "Größe speichern" "label": "Größe speichern"
}, },
"resize-cancel": { "resize-cancel": {
"label": "Größenänderung abbrechen" "label": "Größenänderung abbrechen"
}, },
"resize": {
"label": "Größe ändern"
},
"see-references": { "see-references": {
"label": "See References" "label": "See References"
}, },
@ -419,7 +363,6 @@
"rule": "Schwärzung basierend auf Regel {rule}" "rule": "Schwärzung basierend auf Regel {rule}"
}, },
"annotation-type": { "annotation-type": {
"declined-suggestion": "Abgelehnter Vorschlag",
"hint": "Hinweis", "hint": "Hinweis",
"ignored-hint": "Ignorierter Hinweis", "ignored-hint": "Ignorierter Hinweis",
"manual-hint": "Manual Hint", "manual-hint": "Manual Hint",
@ -427,18 +370,12 @@
"recommendation": "Empfehlung", "recommendation": "Empfehlung",
"redaction": "Schwärzung", "redaction": "Schwärzung",
"skipped": "Übersprungen", "skipped": "Übersprungen",
"suggestion-add": "Vorschlag für Schwärzung",
"suggestion-add-dictionary": "Vorschlag für neuen Wörterbucheintrag",
"suggestion-add-false-positive": "Suggested add to false positive", "suggestion-add-false-positive": "Suggested add to false positive",
"suggestion-change-legal-basis": "Vorschlag für Änderung der Rechtsgrundlage",
"suggestion-force-hint": "Suggestion force hint",
"suggestion-force-redaction": "Vorschlag für erzwungene Schwärzung",
"suggestion-recategorize-image": "Vorschlag für Rekategorisierung eines Bilds",
"suggestion-remove": "Vorschlagen, die Schwärzung zu entfernen",
"suggestion-remove-dictionary": "Vorschlag für Löschung eines Wörterbucheintrags",
"suggestion-resize": "Vorgeschlagene Größenänderung",
"text-highlight": "Earmark" "text-highlight": "Earmark"
}, },
"annotation": {
"pending": "(Pending Analysis)"
},
"archived-dossiers-listing": { "archived-dossiers-listing": {
"no-data": { "no-data": {
"title": "No archived dossiers." "title": "No archived dossiers."
@ -638,18 +575,14 @@
"warning": "Achtung: Diese Aktion kann nicht rückgängig gemacht werden!" "warning": "Achtung: Diese Aktion kann nicht rückgängig gemacht werden!"
}, },
"confirmation-dialog": { "confirmation-dialog": {
"approve-file": {
"question": "Dieses Dokument enthält ungesehene Änderungen. Möchten Sie es trotzdem genehmigen?",
"title": "Warnung!"
},
"approve-file-without-analysis": { "approve-file-without-analysis": {
"confirmationText": "Approve without analysis", "confirmationText": "Approve without analysis",
"denyText": "Cancel", "denyText": "Cancel",
"question": "Analysis required to detect new redactions.", "question": "Analysis required to detect new redactions.",
"title": "Warning!" "title": "Warning!"
}, },
"approve-multiple-files": { "approve-file": {
"question": "Mindestens eine der ausgewählten Dateien enthält ungesehene Änderungen. Möchten Sie sie trotzdem genehmigen?", "question": "Dieses Dokument enthält ungesehene Änderungen. Möchten Sie es trotzdem genehmigen?",
"title": "Warnung!" "title": "Warnung!"
}, },
"approve-multiple-files-without-analysis": { "approve-multiple-files-without-analysis": {
@ -658,6 +591,10 @@
"question": "Analysis required to detect new redactions for at least one file.", "question": "Analysis required to detect new redactions for at least one file.",
"title": "Warning" "title": "Warning"
}, },
"approve-multiple-files": {
"question": "Mindestens eine der ausgewählten Dateien enthält ungesehene Änderungen. Möchten Sie sie trotzdem genehmigen?",
"title": "Warnung!"
},
"assign-file-to-me": { "assign-file-to-me": {
"question": { "question": {
"multiple": "Dieses Dokument wird gerade von einer anderen Person geprüft. Möchten Sie Reviewer werden und sich selbst dem Dokument zuweisen?", "multiple": "Dieses Dokument wird gerade von einer anderen Person geprüft. Möchten Sie Reviewer werden und sich selbst dem Dokument zuweisen?",
@ -1003,13 +940,13 @@
"recent": "Neu ({hours} h)", "recent": "Neu ({hours} h)",
"unassigned": "Niemandem zugewiesen" "unassigned": "Niemandem zugewiesen"
}, },
"reanalyse": {
"action": "Datei analysieren"
},
"reanalyse-dossier": { "reanalyse-dossier": {
"error": "Die Dateien konnten nicht für eine Reanalyse eingeplant werden. Bitte versuchen Sie es erneut.", "error": "Die Dateien konnten nicht für eine Reanalyse eingeplant werden. Bitte versuchen Sie es erneut.",
"success": "Dateien für Reanalyse vorgesehen." "success": "Dateien für Reanalyse vorgesehen."
}, },
"reanalyse": {
"action": "Datei analysieren"
},
"start-auto-analysis": "Enable auto-analysis", "start-auto-analysis": "Enable auto-analysis",
"stop-auto-analysis": "Stop auto-analysis", "stop-auto-analysis": "Stop auto-analysis",
"table-col-names": { "table-col-names": {
@ -1078,14 +1015,6 @@
"total-documents": "Anzahl der Dokumente", "total-documents": "Anzahl der Dokumente",
"total-people": "<strong>{count}</strong> {count, plural, one{User} other {Users}}" "total-people": "<strong>{count}</strong> {count, plural, one{User} other {Users}}"
}, },
"dossier-templates": {
"label": "Dossier-Vorlagen",
"status": {
"active": "Active",
"inactive": "Inactive",
"incomplete": "Incomplete"
}
},
"dossier-templates-listing": { "dossier-templates-listing": {
"action": { "action": {
"clone": "Clone Template", "clone": "Clone Template",
@ -1121,6 +1050,14 @@
"title": "{length} {length, plural, one{Dossier-Vorlage} other{Dossier-Vorlagen}}" "title": "{length} {length, plural, one{Dossier-Vorlage} other{Dossier-Vorlagen}}"
} }
}, },
"dossier-templates": {
"label": "Dossier-Vorlagen",
"status": {
"active": "Active",
"inactive": "Inactive",
"incomplete": "Incomplete"
}
},
"dossier-watermark-selector": { "dossier-watermark-selector": {
"heading": "Watermarks on documents", "heading": "Watermarks on documents",
"no-watermark": "There is no watermark defined for the dossier template.<br>Contact your app admin to define one.", "no-watermark": "There is no watermark defined for the dossier template.<br>Contact your app admin to define one.",
@ -1304,15 +1241,6 @@
"title": "{length} {length, plural, one{Wörterbuch} other{Wörterbücher}}" "title": "{length} {length, plural, one{Wörterbuch} other{Wörterbücher}}"
} }
}, },
"entity": {
"info": {
"actions": {
"revert": "Revert",
"save": "Save Changes"
},
"heading": "Edit Entity"
}
},
"entity-rules-screen": { "entity-rules-screen": {
"error": { "error": {
"generic": "Something went wrong... Entity rules update failed!" "generic": "Something went wrong... Entity rules update failed!"
@ -1326,19 +1254,28 @@
"title": "Entity Rule Editor", "title": "Entity Rule Editor",
"warning-text": "Warning: experimental feature!" "warning-text": "Warning: experimental feature!"
}, },
"entity": {
"info": {
"actions": {
"revert": "Revert",
"save": "Save Changes"
},
"heading": "Edit Entity"
}
},
"error": { "error": {
"deleted-entity": { "deleted-entity": {
"dossier": { "dossier": {
"action": "Zurück zur Übersicht", "action": "Zurück zur Übersicht",
"label": "Dieses Dossier wurde gelöscht!" "label": "Dieses Dossier wurde gelöscht!"
}, },
"file": {
"action": "Zurück zum Dossier",
"label": "Diese Datei wurde gelöscht!"
},
"file-dossier": { "file-dossier": {
"action": "Zurück zur Übersicht", "action": "Zurück zur Übersicht",
"label": "Das Dossier dieser Datei wurde gelöscht!" "label": "Das Dossier dieser Datei wurde gelöscht!"
},
"file": {
"action": "Zurück zum Dossier",
"label": "Diese Datei wurde gelöscht!"
} }
}, },
"file-preview": { "file-preview": {
@ -1356,12 +1293,6 @@
}, },
"exact-date": "{day} {month} {year} um {hour}:{minute} Uhr", "exact-date": "{day} {month} {year} um {hour}:{minute} Uhr",
"file": "Datei", "file": "Datei",
"file-attribute": {
"update": {
"error": "Failed to update file attribute value!",
"success": "File attribute value has been updated successfully!"
}
},
"file-attribute-encoding-types": { "file-attribute-encoding-types": {
"ascii": "ASCII", "ascii": "ASCII",
"iso": "ISO-8859-1", "iso": "ISO-8859-1",
@ -1372,6 +1303,12 @@
"number": "Nummer", "number": "Nummer",
"text": "Freier Text" "text": "Freier Text"
}, },
"file-attribute": {
"update": {
"error": "Failed to update file attribute value!",
"success": "File attribute value has been updated successfully!"
}
},
"file-attributes-configurations": { "file-attributes-configurations": {
"cancel": "Cancel", "cancel": "Cancel",
"form": { "form": {
@ -1585,16 +1522,6 @@
"csv": "File attributes were imported successfully from uploaded CSV file." "csv": "File attributes were imported successfully from uploaded CSV file."
} }
}, },
"filter": {
"analysis": "Analyse erforderlich",
"comment": "Kommentare",
"hint": "Nut Hinweise",
"image": "Bilder",
"none": "Keine Anmerkungen",
"redaction": "Geschwärzt",
"suggestion": "Vorgeschlagene Schwärzung",
"updated": "Aktualisiert"
},
"filter-menu": { "filter-menu": {
"filter-options": "Filteroptionen", "filter-options": "Filteroptionen",
"filter-types": "Filter", "filter-types": "Filter",
@ -1604,6 +1531,15 @@
"unseen-pages": "Nur Anmerkungen auf unsichtbaren Seiten", "unseen-pages": "Nur Anmerkungen auf unsichtbaren Seiten",
"with-comments": "Nur Anmerkungen mit Kommentaren" "with-comments": "Nur Anmerkungen mit Kommentaren"
}, },
"filter": {
"analysis": "Analyse erforderlich",
"comment": "Kommentare",
"hint": "Nut Hinweise",
"image": "Bilder",
"none": "Keine Anmerkungen",
"redaction": "Geschwärzt",
"updated": "Aktualisiert"
},
"filters": { "filters": {
"assigned-people": "Beauftragt", "assigned-people": "Beauftragt",
"documents-status": "Documents State", "documents-status": "Documents State",
@ -1671,13 +1607,6 @@
}, },
"title": "SMTP-Konto konfigurieren" "title": "SMTP-Konto konfigurieren"
}, },
"generic-errors": {
"400": "The sent request is not valid.",
"403": "Access to the requested resource is not allowed.",
"404": "The requested resource could not be found.",
"409": "The request is incompatible with the current state.",
"500": "The server encountered an unexpected condition that prevented it from fulfilling the request."
},
"help-mode": { "help-mode": {
"bottom-text": "Hilfe-Modus", "bottom-text": "Hilfe-Modus",
"button-text": "Help Mode (H)", "button-text": "Help Mode (H)",
@ -1789,6 +1718,7 @@
"copyright-claim-text": "Copyright © 2020 - {currentYear} knecon", "copyright-claim-text": "Copyright © 2020 - {currentYear} knecon",
"copyright-claim-title": "Copyright", "copyright-claim-title": "Copyright",
"custom-app-title": "Name der Anwendung", "custom-app-title": "Name der Anwendung",
"email-report": "E-Mail-Bericht",
"email": { "email": {
"body": { "body": {
"analyzed": "Im aktuellen Lizenzzeitraum insgesamt analysierte Seiten: {pages}.", "analyzed": "Im aktuellen Lizenzzeitraum insgesamt analysierte Seiten: {pages}.",
@ -1796,7 +1726,6 @@
}, },
"title": "Lizenzbericht {licenseCustomer}" "title": "Lizenzbericht {licenseCustomer}"
}, },
"email-report": "E-Mail-Bericht",
"end-user-license-text": "Die Nutzung dieses Produkts unterliegt den Bedingungen der Endbenutzer-Lizenzvereinbarung für den RedactManager, sofern darin nichts anderweitig festgelegt.", "end-user-license-text": "Die Nutzung dieses Produkts unterliegt den Bedingungen der Endbenutzer-Lizenzvereinbarung für den RedactManager, sofern darin nichts anderweitig festgelegt.",
"end-user-license-title": "Endbenutzer-Lizenzvereinbarung", "end-user-license-title": "Endbenutzer-Lizenzvereinbarung",
"licensing-details": { "licensing-details": {
@ -1889,13 +1818,6 @@
"user-promoted-to-approver": "<b>{user}</b> wurde im Dossier <b>{dossierHref, select, null{{dossierName}} other{<a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a>}}</b> zum Genehmiger ernannt!", "user-promoted-to-approver": "<b>{user}</b> wurde im Dossier <b>{dossierHref, select, null{{dossierName}} other{<a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a>}}</b> zum Genehmiger ernannt!",
"user-removed-as-dossier-member": "<b>{user}</b> wurde als Mitglied von: <b>{dossierHref, select, null{{dossierName}} other{<a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a>}}</b> entfernt!" "user-removed-as-dossier-member": "<b>{user}</b> wurde als Mitglied von: <b>{dossierHref, select, null{{dossierName}} other{<a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a>}}</b> entfernt!"
}, },
"notifications": {
"button-text": "Notifications",
"deleted-dossier": "Deleted Dossier",
"label": "Benachrichtigungen",
"mark-all-as-read": "Alle als gelesen markieren",
"mark-as": "Mark as {type, select, read{read} unread{unread} other{}}"
},
"notifications-screen": { "notifications-screen": {
"category": { "category": {
"email-notifications": "E-Mail Benachrichtigungen", "email-notifications": "E-Mail Benachrichtigungen",
@ -1909,6 +1831,7 @@
"dossier": "Dossierbezogene Benachrichtigungen", "dossier": "Dossierbezogene Benachrichtigungen",
"other": "Andere Benachrichtigungen" "other": "Andere Benachrichtigungen"
}, },
"options-title": "Wählen Sie aus, in welcher Kategorie Sie benachrichtigt werden möchten",
"options": { "options": {
"ASSIGN_APPROVER": "Wenn ich einem Dokument als Genehmiger zugewiesen bin", "ASSIGN_APPROVER": "Wenn ich einem Dokument als Genehmiger zugewiesen bin",
"ASSIGN_REVIEWER": "Wenn ich einem Dokument als Überprüfer zugewiesen bin", "ASSIGN_REVIEWER": "Wenn ich einem Dokument als Überprüfer zugewiesen bin",
@ -1926,7 +1849,6 @@
"USER_PROMOTED_TO_APPROVER": "Wenn ich Genehmiger in einem Dossier werde", "USER_PROMOTED_TO_APPROVER": "Wenn ich Genehmiger in einem Dossier werde",
"USER_REMOVED_AS_DOSSIER_MEMBER": "Wenn ich die Dossier-Mitgliedschaft verliere" "USER_REMOVED_AS_DOSSIER_MEMBER": "Wenn ich die Dossier-Mitgliedschaft verliere"
}, },
"options-title": "Wählen Sie aus, in welcher Kategorie Sie benachrichtigt werden möchten",
"schedule": { "schedule": {
"daily": "Tägliche Zusammenfassung", "daily": "Tägliche Zusammenfassung",
"instant": "Sofortig", "instant": "Sofortig",
@ -1934,6 +1856,13 @@
}, },
"title": "Benachrichtigungseinstellungen" "title": "Benachrichtigungseinstellungen"
}, },
"notifications": {
"button-text": "Notifications",
"deleted-dossier": "Deleted Dossier",
"label": "Benachrichtigungen",
"mark-all-as-read": "Alle als gelesen markieren",
"mark-as": "Mark as {type, select, read{read} unread{unread} other{}}"
},
"ocr": { "ocr": {
"confirmation-dialog": { "confirmation-dialog": {
"cancel": "Cancel", "cancel": "Cancel",
@ -2025,16 +1954,16 @@
"warnings-subtitle": "Do not show again options", "warnings-subtitle": "Do not show again options",
"warnings-title": "Prompts and Dialogs Settings" "warnings-title": "Prompts and Dialogs Settings"
}, },
"processing": {
"basic": "Processing",
"ocr": "OCR"
},
"processing-status": { "processing-status": {
"ocr": "OCR", "ocr": "OCR",
"pending": "Pending", "pending": "Pending",
"processed": "Processed", "processed": "Processed",
"processing": "Processing" "processing": "Processing"
}, },
"processing": {
"basic": "Processing",
"ocr": "OCR"
},
"readonly": "Lesemodus", "readonly": "Lesemodus",
"readonly-archived": "Read only (archived)", "readonly-archived": "Read only (archived)",
"redact-text": { "redact-text": {
@ -2264,12 +2193,6 @@
"red-user-admin": "Benutzer-Admin", "red-user-admin": "Benutzer-Admin",
"regular": "Regulär" "regular": "Regulär"
}, },
"search": {
"active-dossiers": "ganze Plattform",
"all-dossiers": "all documents",
"placeholder": "Nach Dokumenten oder Dokumenteninhalt suchen",
"this-dossier": "in diesem Dossier"
},
"search-screen": { "search-screen": {
"cols": { "cols": {
"assignee": "Bevollmächtigter", "assignee": "Bevollmächtigter",
@ -2293,6 +2216,12 @@
"no-match": "Keine Dokumente entsprechen Ihren aktuellen Filtern.", "no-match": "Keine Dokumente entsprechen Ihren aktuellen Filtern.",
"table-header": "{length} {length, plural, one{Suchergebnis} other{Suchergebnisse}}" "table-header": "{length} {length, plural, one{Suchergebnis} other{Suchergebnisse}}"
}, },
"search": {
"active-dossiers": "ganze Plattform",
"all-dossiers": "all documents",
"placeholder": "Nach Dokumenten oder Dokumenteninhalt suchen",
"this-dossier": "in diesem Dossier"
},
"seconds": "seconds", "seconds": "seconds",
"size": "Size", "size": "Size",
"smtp-auth-config": { "smtp-auth-config": {
@ -2379,16 +2308,6 @@
} }
}, },
"type": "Typ", "type": "Typ",
"unapproved-suggestions": {
"confirmation-dialog": {
"checkbox-text": "Do not show this message again",
"confirmation-text": "Continue to Preview",
"deny-text": "Cancel",
"not-displayed-question": "The document contains unapproved suggestions that are not included in the preview.",
"success-confirmation-text": "Prompts about unapproved suggestions were disabled. Change this preference in <a href={settingsUrl} target=_self class=\"toast-link\">account settings</a>.",
"title": "Document with unapproved suggestions"
}
},
"unknown": "Unbekannt", "unknown": "Unbekannt",
"update-profile": { "update-profile": {
"errors": { "errors": {

View File

@ -56,8 +56,7 @@
}, },
"add-edit-clone-dossier-template": { "add-edit-clone-dossier-template": {
"error": { "error": {
"conflict": "Failed to create dossier template: a dossier template with the same name already exists.", "conflict": "Failed to create dossier template: a dossier template with the same name already exists."
"generic": "Failed to create dossier template."
}, },
"form": { "form": {
"apply-updates-default": { "apply-updates-default": {
@ -280,26 +279,10 @@
"error": "Failed to add entry to dictionary: {error}", "error": "Failed to add entry to dictionary: {error}",
"success": "Entry added to dictionary. Changes will be visible after reanalysis." "success": "Entry added to dictionary. Changes will be visible after reanalysis."
}, },
"approve": {
"error": "Failed to approve dictionary entry: {error}",
"success": "Dictionary entry approved. Changes will be visible after reanalysis."
},
"decline": {
"error": "Failed to decline dictionary suggestion: {error}",
"success": "Dictionary suggestion declined."
},
"remove": { "remove": {
"error": "Failed to remove dictionary entry: {error}", "error": "Failed to remove dictionary entry: {error}",
"success": "Dictionary entry removed!" "success": "Dictionary entry removed!"
}, },
"request-remove": {
"error": "Failed to request removal of dictionary entry: {error}",
"success": "Requested to remove dictionary entry!"
},
"suggest": {
"error": "Failed to save suggestion for dictionary modification: {error}",
"success": "Suggestion for dictionary modification saved!"
},
"undo": { "undo": {
"error": "Failed to undo: {error}", "error": "Failed to undo: {error}",
"success": "Undo successful" "success": "Undo successful"
@ -310,10 +293,6 @@
"error": "Failed to save redaction: {error}", "error": "Failed to save redaction: {error}",
"success": "Redaction added!" "success": "Redaction added!"
}, },
"approve": {
"error": "Failed to approve suggestion: {error}",
"success": "Suggestion approved."
},
"change-legal-basis": { "change-legal-basis": {
"error": "Failed to edit annotation reason: {error}", "error": "Failed to edit annotation reason: {error}",
"success": "Annotation reason was edited." "success": "Annotation reason was edited."
@ -322,10 +301,6 @@
"error": "Failed to edit type: {error}", "error": "Failed to edit type: {error}",
"success": "Type was edited." "success": "Type was edited."
}, },
"decline": {
"error": "Failed to decline suggestion: {error}",
"success": "Suggestion declined."
},
"force-hint": { "force-hint": {
"error": "Failed to save hint: {error}", "error": "Failed to save hint: {error}",
"success": "Hint added!" "success": "Hint added!"
@ -346,34 +321,6 @@
"error": "Failed to remove redaction: {error}", "error": "Failed to remove redaction: {error}",
"success": "Redaction removed!" "success": "Redaction removed!"
}, },
"request-change-legal-basis": {
"error": "Failed to request annotation reason change: {error}",
"success": "Annotation reason change requested."
},
"request-force-hint": {
"error": "Failed to save hint suggestion: {error}",
"success": "Hint suggestion saved"
},
"request-force-redaction": {
"error": "Failed to save redaction suggestion: {error}",
"success": "Redaction suggestion saved"
},
"request-image-recategorization": {
"error": "Failed to request image recategorization: {error}",
"success": "Image recategorization requested."
},
"request-remove-hint": {
"error": "Failed to request removal of hint: {error}",
"success": "Requested to remove hint!"
},
"request-remove": {
"error": "Failed to request removal of redaction: {error}",
"success": "Requested to remove redaction!"
},
"suggest": {
"error": "Failed to save redaction suggestion: {error}",
"success": "Redaction suggestion saved"
},
"undo": { "undo": {
"error": "Failed to undo: {error}", "error": "Failed to undo: {error}",
"success": "Undo successful" "success": "Undo successful"
@ -416,7 +363,6 @@
"rule": "Redaction based on rule {rule}" "rule": "Redaction based on rule {rule}"
}, },
"annotation-type": { "annotation-type": {
"declined-suggestion": "Declined Suggestion",
"hint": "Hint", "hint": "Hint",
"ignored-hint": "Ignored Hint", "ignored-hint": "Ignored Hint",
"manual-hint": "Manual Hint", "manual-hint": "Manual Hint",
@ -424,16 +370,7 @@
"recommendation": "Recommendation", "recommendation": "Recommendation",
"redaction": "Redaction", "redaction": "Redaction",
"skipped": "Skipped", "skipped": "Skipped",
"suggestion-add": "Suggested redaction",
"suggestion-add-dictionary": "Suggested add to Dictionary",
"suggestion-add-false-positive": "Suggested add to false positive", "suggestion-add-false-positive": "Suggested add to false positive",
"suggestion-change-legal-basis": "Suggested change legal basis",
"suggestion-force-hint": "Suggestion force hint",
"suggestion-force-redaction": "Suggestion force redaction",
"suggestion-recategorize-image": "Suggested recategorize image",
"suggestion-remove": "Suggested local removal",
"suggestion-remove-dictionary": "Suggested dictionary removal",
"suggestion-resize": "Suggested Resize",
"text-highlight": "Earmark" "text-highlight": "Earmark"
}, },
"annotation": { "annotation": {
@ -1601,7 +1538,6 @@
"image": "Images", "image": "Images",
"none": "No Annotations", "none": "No Annotations",
"redaction": "Redacted", "redaction": "Redacted",
"suggestion": "Suggested Redaction",
"updated": "Updated" "updated": "Updated"
}, },
"filters": { "filters": {
@ -2372,16 +2308,6 @@
} }
}, },
"type": "Type", "type": "Type",
"unapproved-suggestions": {
"confirmation-dialog": {
"checkbox-text": "Do not show this message again",
"confirmation-text": "Continue to Preview",
"deny-text": "Cancel",
"not-displayed-question": "The document contains unapproved suggestions that are not included in the preview.",
"success-confirmation-text": "Prompts about unapproved suggestions were disabled. Change this preference in <a href={settingsUrl} target=_self class=\"toast-link\">account settings</a>.",
"title": "Document with unapproved suggestions"
}
},
"unknown": "Unknown", "unknown": "Unknown",
"update-profile": { "update-profile": {
"errors": { "errors": {
@ -2545,12 +2471,5 @@
"select": "Select" "select": "Select"
} }
}, },
"yesterday": "Yesterday", "yesterday": "Yesterday"
"generic-errors": {
"400": "The sent request is not valid.",
"403": "Access to the requested resource is not allowed.",
"404": "The requested resource could not be found.",
"409": "The request is incompatible with the current state.",
"500": "The server encountered an unexpected condition that prevented it from fulfilling the request."
}
} }

View File

@ -56,8 +56,7 @@
}, },
"add-edit-clone-dossier-template": { "add-edit-clone-dossier-template": {
"error": { "error": {
"conflict": "Dossiervorlage konnte nicht erstellt werden: Es existiert bereits eine Dossiervorlage mit demselben Namen.", "conflict": "Dossiervorlage konnte nicht erstellt werden: Es existiert bereits eine Dossiervorlage mit demselben Namen."
"generic": "Fehler beim Erstellen der Dossiervorlage."
}, },
"form": { "form": {
"apply-updates-default": { "apply-updates-default": {
@ -280,26 +279,10 @@
"error": "Fehler beim Hinzufügen des neuen Wörterbucheintrags: {error}", "error": "Fehler beim Hinzufügen des neuen Wörterbucheintrags: {error}",
"success": "Eintrag zum Wörterbuch hinzugefügt. Änderungen nach der Reanalyse sichtbar." "success": "Eintrag zum Wörterbuch hinzugefügt. Änderungen nach der Reanalyse sichtbar."
}, },
"approve": {
"error": "Fehler beim Genehmigen des Wörterbucheintrags: {error}",
"success": "Neuer Wörterbucheintrag wurde genehmigt. Änderungen sind nach der Reanalyse sichtbar."
},
"decline": {
"error": "Fehler beim Ablehnen des neuen Wörterbucheintrags: {error}",
"success": "Vorschlag für das Wörterbuch abgelehnt."
},
"remove": { "remove": {
"error": "Fehler beim Entfernen des Wörterbucheintrags: {error}", "error": "Fehler beim Entfernen des Wörterbucheintrags: {error}",
"success": "Wörterbucheintrag wurde gelöscht!" "success": "Wörterbucheintrag wurde gelöscht!"
}, },
"request-remove": {
"error": "Dossier-Vorlage",
"success": "Löschung des Wörterbucheintrags wurde vorgeschlagen!"
},
"suggest": {
"error": "Vorschlag für Änderung des Wörterbuchs konnte nicht gespeichert werden: {error}",
"success": "Vorschlag für die Änderung des Wörterbuchs gespeichert!"
},
"undo": { "undo": {
"error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}", "error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}",
"success": "Rückgängigmachen erfolgreich" "success": "Rückgängigmachen erfolgreich"
@ -310,10 +293,6 @@
"error": "Fehler beim Speichern der Schwärzung: {error}", "error": "Fehler beim Speichern der Schwärzung: {error}",
"success": "Schwärzung hinzugefügt!" "success": "Schwärzung hinzugefügt!"
}, },
"approve": {
"error": "Fehler beim Genehmigen des Vorschlags: {error}",
"success": "Vorschlag genehmigt"
},
"change-legal-basis": { "change-legal-basis": {
"error": "Fehler beim Bearbeiten der in der Anmerkung genannten Begründung: {error}", "error": "Fehler beim Bearbeiten der in der Anmerkung genannten Begründung: {error}",
"success": "In der Anmerkung genannte Begründung wurde bearbeitet." "success": "In der Anmerkung genannte Begründung wurde bearbeitet."
@ -322,10 +301,6 @@
"error": "", "error": "",
"success": "" "success": ""
}, },
"decline": {
"error": "Fehler beim Ablehnen des Vorschlags: {error}",
"success": "Vorschlag abgelehnt"
},
"force-hint": { "force-hint": {
"error": "", "error": "",
"success": "" "success": ""
@ -346,34 +321,6 @@
"error": "Fehler beim Entfernen der Schwärzung: {error}", "error": "Fehler beim Entfernen der Schwärzung: {error}",
"success": "Schwärzung entfernt!" "success": "Schwärzung entfernt!"
}, },
"request-change-legal-basis": {
"error": "Fehler beim Vorschlagen der Änderung der Begründung:",
"success": "Die Änderung der in der Anmerkung genannten Begründung wurde beantragt."
},
"request-force-hint": {
"error": "",
"success": ""
},
"request-force-redaction": {
"error": "Fehler beim Speichern des Schwärzungsvorschlags: {error}",
"success": "Vorschlag einer Schwärzung gespeichert"
},
"request-image-recategorization": {
"error": "Fehler beim Vorschlagen der Neukategorisierung des Bilds: {error}",
"success": "Bild-Neuklassifizierung angefordert."
},
"request-remove-hint": {
"error": "",
"success": ""
},
"request-remove": {
"error": "Fehler beim Erstellen des Vorschlags für das Entfernen der Schwärzung: {error}",
"success": "Entfernen der Schwärzung wurde vorgeschlagen!"
},
"suggest": {
"error": "Vorschlag einer Schwärzung wurde nicht gespeichert: {error}",
"success": "Vorschlag einer Schwärzung gespeichert"
},
"undo": { "undo": {
"error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}", "error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}",
"success": "erfolgreich Rückgängig gemacht" "success": "erfolgreich Rückgängig gemacht"
@ -416,7 +363,6 @@
"rule": "Schwärzung basierend auf Regel {rule}" "rule": "Schwärzung basierend auf Regel {rule}"
}, },
"annotation-type": { "annotation-type": {
"declined-suggestion": "Abgelehnter Vorschlag",
"hint": "Hinweis", "hint": "Hinweis",
"ignored-hint": "Ignorierter Hinweis", "ignored-hint": "Ignorierter Hinweis",
"manual-hint": "", "manual-hint": "",
@ -424,16 +370,7 @@
"recommendation": "Empfehlung", "recommendation": "Empfehlung",
"redaction": "Schwärzung", "redaction": "Schwärzung",
"skipped": "Übersprungen", "skipped": "Übersprungen",
"suggestion-add": "Vorschlag für Schwärzung",
"suggestion-add-dictionary": "Vorschlag für neuen Wörterbucheintrag",
"suggestion-add-false-positive": "", "suggestion-add-false-positive": "",
"suggestion-change-legal-basis": "Vorschlag für Änderung der Rechtsgrundlage",
"suggestion-force-hint": "",
"suggestion-force-redaction": "Vorschlag für erzwungene Schwärzung",
"suggestion-recategorize-image": "Vorschlag für Rekategorisierung eines Bilds",
"suggestion-remove": "Vorschlagen, die Schwärzung zu entfernen",
"suggestion-remove-dictionary": "Vorschlag für Löschung eines Wörterbucheintrags",
"suggestion-resize": "Vorgeschlagene Größenänderung",
"text-highlight": "" "text-highlight": ""
}, },
"annotation": { "annotation": {
@ -1601,7 +1538,6 @@
"image": "Bilder", "image": "Bilder",
"none": "Keine Anmerkungen", "none": "Keine Anmerkungen",
"redaction": "Geschwärzt", "redaction": "Geschwärzt",
"suggestion": "Vorgeschlagene Schwärzung",
"updated": "Aktualisiert" "updated": "Aktualisiert"
}, },
"filters": { "filters": {
@ -2372,16 +2308,6 @@
} }
}, },
"type": "Typ", "type": "Typ",
"unapproved-suggestions": {
"confirmation-dialog": {
"checkbox-text": "",
"confirmation-text": "",
"deny-text": "",
"not-displayed-question": "",
"success-confirmation-text": "",
"title": ""
}
},
"unknown": "Unbekannt", "unknown": "Unbekannt",
"update-profile": { "update-profile": {
"errors": { "errors": {
@ -2545,12 +2471,5 @@
"select": "Wählen" "select": "Wählen"
} }
}, },
"yesterday": "Gestern", "yesterday": "Gestern"
"generic-errors": {
"400": "",
"403": "",
"404": "",
"409": "",
"500": ""
}
} }

View File

@ -56,8 +56,7 @@
}, },
"add-edit-clone-dossier-template": { "add-edit-clone-dossier-template": {
"error": { "error": {
"conflict": "Failed to create dossier template: a dossier template with the same name already exists.", "conflict": "Failed to create dossier template: a dossier template with the same name already exists."
"generic": "Failed to create dossier template."
}, },
"form": { "form": {
"apply-updates-default": { "apply-updates-default": {
@ -280,26 +279,10 @@
"error": "Failed to add entry to dictionary: {error}", "error": "Failed to add entry to dictionary: {error}",
"success": "Entry added to dictionary. Changes will be visible after reanalysis." "success": "Entry added to dictionary. Changes will be visible after reanalysis."
}, },
"approve": {
"error": "Failed to approve dictionary entry: {error}",
"success": "Dictionary entry approved. Changes will be visible after reanalysis."
},
"decline": {
"error": "Failed to decline dictionary suggestion: {error}",
"success": "Dictionary suggestion declined."
},
"remove": { "remove": {
"error": "Failed to remove dictionary entry: {error}", "error": "Failed to remove dictionary entry: {error}",
"success": "Dictionary entry removed!" "success": "Dictionary entry removed!"
}, },
"request-remove": {
"error": "Failed to request removal of dictionary entry: {error}",
"success": "Requested to remove dictionary entry!"
},
"suggest": {
"error": "Failed to save suggestion for dictionary modification: {error}",
"success": "Suggestion for dictionary modification saved!"
},
"undo": { "undo": {
"error": "Failed to undo: {error}", "error": "Failed to undo: {error}",
"success": "Undo successful" "success": "Undo successful"
@ -310,10 +293,6 @@
"error": "Failed to save annotation: {error}", "error": "Failed to save annotation: {error}",
"success": "Annotation added!" "success": "Annotation added!"
}, },
"approve": {
"error": "Failed to approve suggestion: {error}",
"success": "Suggestion approved."
},
"change-legal-basis": { "change-legal-basis": {
"error": "Failed to edit annotation reason: {error}", "error": "Failed to edit annotation reason: {error}",
"success": "Annotation reason was edited." "success": "Annotation reason was edited."
@ -322,10 +301,6 @@
"error": "", "error": "",
"success": "" "success": ""
}, },
"decline": {
"error": "Failed to decline suggestion: {error}",
"success": "Suggestion declined."
},
"force-hint": { "force-hint": {
"error": "Failed to save hint: {error}", "error": "Failed to save hint: {error}",
"success": "Hint added!" "success": "Hint added!"
@ -346,34 +321,6 @@
"error": "Failed to remove annotation: {error}", "error": "Failed to remove annotation: {error}",
"success": "Annotation removed!" "success": "Annotation removed!"
}, },
"request-change-legal-basis": {
"error": "Failed to request annotation reason change: {error}",
"success": "Annotation reason change requested."
},
"request-force-hint": {
"error": "Failed to save hint suggestion: {error}",
"success": "Hint suggestion saved"
},
"request-force-redaction": {
"error": "Failed to save annotation suggestion: {error}",
"success": "Annotation suggestion saved"
},
"request-image-recategorization": {
"error": "Failed to request image recategorization: {error}",
"success": "Image recategorization requested."
},
"request-remove-hint": {
"error": "Failed to request removal of hint: {error}",
"success": "Requested to remove hint!"
},
"request-remove": {
"error": "Failed to request removal of annotation: {error}",
"success": "Requested to remove annotation!"
},
"suggest": {
"error": "Failed to save annotation suggestion: {error}",
"success": "Annotation suggestion saved"
},
"undo": { "undo": {
"error": "Failed to undo: {error}", "error": "Failed to undo: {error}",
"success": "Undo successful" "success": "Undo successful"
@ -416,7 +363,6 @@
"rule": "Annotation based on rule {rule}" "rule": "Annotation based on rule {rule}"
}, },
"annotation-type": { "annotation-type": {
"declined-suggestion": "Declined Suggestion",
"hint": "Hint", "hint": "Hint",
"ignored-hint": "Ignored Hint", "ignored-hint": "Ignored Hint",
"manual-hint": "Manual Hint", "manual-hint": "Manual Hint",
@ -424,16 +370,7 @@
"recommendation": "Recommendation", "recommendation": "Recommendation",
"redaction": "Annotation", "redaction": "Annotation",
"skipped": "Skipped", "skipped": "Skipped",
"suggestion-add": "Suggested annotation",
"suggestion-add-dictionary": "Suggested add to Dictionary",
"suggestion-add-false-positive": "Suggested add to false positive", "suggestion-add-false-positive": "Suggested add to false positive",
"suggestion-change-legal-basis": "Suggested change legal basis",
"suggestion-force-hint": "Suggestion force hint",
"suggestion-force-redaction": "Suggestion force Annotation",
"suggestion-recategorize-image": "Suggested recategorize image",
"suggestion-remove": "Suggested local removal",
"suggestion-remove-dictionary": "Suggested dictionary removal",
"suggestion-resize": "Suggested Resize",
"text-highlight": "Earmark" "text-highlight": "Earmark"
}, },
"annotation": { "annotation": {
@ -1508,7 +1445,7 @@
"redacted": "Preview", "redacted": "Preview",
"redacted-tooltip": "Component preview shows only annotations. Consider this a preview for the final version. This view is only available if the file has no pending changes & doesn't require a reanalysis", "redacted-tooltip": "Component preview shows only annotations. Consider this a preview for the final version. This view is only available if the file has no pending changes & doesn't require a reanalysis",
"standard": "Standard", "standard": "Standard",
"standard-tooltip": "Standard Workload view shows all hints, annotations, recommendations & suggestions. This view allows editing.", "standard-tooltip": "Standard Workload view shows all hints, annotations & recommendations. This view allows editing.",
"tabs": { "tabs": {
"annotations": { "annotations": {
"jump-to-next": "Jump to Next", "jump-to-next": "Jump to Next",
@ -1601,7 +1538,6 @@
"image": "Images", "image": "Images",
"none": "No Annotations", "none": "No Annotations",
"redaction": "Annotations", "redaction": "Annotations",
"suggestion": "Suggested Annotation",
"updated": "Updated" "updated": "Updated"
}, },
"filters": { "filters": {
@ -2372,16 +2308,6 @@
} }
}, },
"type": "Type", "type": "Type",
"unapproved-suggestions": {
"confirmation-dialog": {
"checkbox-text": "Do not show this message again",
"confirmation-text": "Continue to Preview",
"deny-text": "Cancel",
"not-displayed-question": "The document contains unapproved suggestions that are not included in the preview.",
"success-confirmation-text": "Prompts about unapproved suggestions were disabled. Change this preference in <a href={settingsUrl} target=_self class=\"toast-link\">account settings</a>.",
"title": "Document with unapproved suggestions"
}
},
"unknown": "Unknown", "unknown": "Unknown",
"update-profile": { "update-profile": {
"errors": { "errors": {
@ -2545,12 +2471,5 @@
"select": "Select" "select": "Select"
} }
}, },
"yesterday": "Yesterday", "yesterday": "Yesterday"
"generic-errors": {
"400": "The sent request is not valid.",
"403": "Access to the requested resource is not allowed.",
"404": "The requested resource could not be found.",
"409": "The request is incompatible with the current state.",
"500": "The server encountered an unexpected condition that prevented it from fulfilling the request."
}
} }

View File

@ -1,25 +1,16 @@
export type ImageCategory = 'signature' | 'logo' | 'formula' | 'image'; export type ImageCategory = 'signature' | 'logo' | 'formula' | 'image';
export type DictionaryActions = 'add' | 'approve' | 'remove' | 'decline' | 'request-remove' | 'suggest' | 'undo'; export type DictionaryActions = 'add' | 'remove' | 'undo';
export type ManualRedactionActions = export type ManualRedactionActions =
| 'add' | 'add'
| 'approve'
| 'remove' | 'remove'
| 'remove-hint' | 'remove-hint'
| 'change-legal-basis' | 'change-legal-basis'
| 'decline'
| 'request-remove'
| 'request-remove-hint'
| 'request-change-legal-basis'
| 'recategorize-image' | 'recategorize-image'
| 'request-image-recategorization'
| 'suggest'
| 'undo' | 'undo'
| 'force-redaction' | 'force-redaction'
| 'force-hint' | 'force-hint'
| 'request-force-redaction'
| 'request-force-hint'
| 'change-type'; | 'change-type';
export const AnnotationIconTypes = { export const AnnotationIconTypes = {
@ -36,7 +27,6 @@ export const AnnotationShapeMap: Record<string, AnnotationIconType> = {
analysis: AnnotationIconTypes.square, analysis: AnnotationIconTypes.square,
hint: AnnotationIconTypes.circle, hint: AnnotationIconTypes.circle,
redaction: AnnotationIconTypes.square, redaction: AnnotationIconTypes.square,
suggestion: AnnotationIconTypes.rhombus,
updated: AnnotationIconTypes.square, updated: AnnotationIconTypes.square,
image: AnnotationIconTypes.square, image: AnnotationIconTypes.square,
none: AnnotationIconTypes.none, none: AnnotationIconTypes.none,

View File

@ -1,22 +1,11 @@
import { DefaultColorType } from './default-color-type';
import { SuperType, SuperTypes } from '../files'; import { SuperType, SuperTypes } from '../files';
import { DefaultColorType } from './default-color-type';
export type DefaultBasedColorType = SuperType | 'updated' | 'suggestion' | 'analysis'; export type DefaultBasedColorType = SuperType | 'updated' | 'analysis';
export const annotationDefaultColorConfig: Record<DefaultBasedColorType, DefaultColorType> = { export const annotationDefaultColorConfig: Record<DefaultBasedColorType, DefaultColorType> = {
[SuperTypes.TextHighlight]: 'redactionColor', // not actually used [SuperTypes.TextHighlight]: 'redactionColor', // not actually used
[SuperTypes.SuggestionChangeLegalBasis]: 'requestAddColor',
[SuperTypes.SuggestionRecategorizeImage]: 'requestAddColor',
[SuperTypes.SuggestionAddDictionary]: 'dictionaryRequestColor',
[SuperTypes.SuggestionForceRedaction]: 'requestAddColor',
[SuperTypes.SuggestionForceHint]: 'requestAddColor',
[SuperTypes.SuggestionResize]: 'dictionaryRequestColor',
[SuperTypes.SuggestionRemoveDictionary]: 'dictionaryRequestColor',
[SuperTypes.SuggestionAdd]: 'requestAddColor',
[SuperTypes.SuggestionRemove]: 'requestRemoveColor',
[SuperTypes.DeclinedSuggestion]: 'skippedColor',
[SuperTypes.IgnoredHint]: 'ignoredHintColor', [SuperTypes.IgnoredHint]: 'ignoredHintColor',
[SuperTypes.Skipped]: 'skippedColor', [SuperTypes.Skipped]: 'skippedColor',
[SuperTypes.Redaction]: 'redactionColor', [SuperTypes.Redaction]: 'redactionColor',
@ -25,7 +14,6 @@ export const annotationDefaultColorConfig: Record<DefaultBasedColorType, Default
[SuperTypes.Hint]: 'hintColor', [SuperTypes.Hint]: 'hintColor',
updated: 'updatedColor', updated: 'updatedColor',
suggestion: 'requestAddColor',
analysis: 'analysisColor', analysis: 'analysisColor',
} as const; } as const;

View File

@ -1,6 +1,6 @@
import { isProcessingStatuses, OCR_STATES, PENDING_STATES, PROCESSED_STATES, PROCESSING_STATES, ProcessingFileStatus } from '../files';
import { IDossierStats } from './dossier-stats'; import { IDossierStats } from './dossier-stats';
import { FileCountPerProcessingStatus, FileCountPerWorkflowStatus } from './types'; import { FileCountPerProcessingStatus, FileCountPerWorkflowStatus } from './types';
import { isProcessingStatuses, OCR_STATES, PENDING_STATES, PROCESSED_STATES, PROCESSING_STATES, ProcessingFileStatus } from '../files';
export const ProcessingTypes = { export const ProcessingTypes = {
pending: 'pending', pending: 'pending',
@ -21,7 +21,6 @@ export class DossierStats implements IDossierStats {
readonly hasHintsNoRedactionsFilePresent: boolean; readonly hasHintsNoRedactionsFilePresent: boolean;
readonly hasNoFlagsFilePresent: boolean; readonly hasNoFlagsFilePresent: boolean;
readonly hasRedactionsFilePresent: boolean; readonly hasRedactionsFilePresent: boolean;
readonly hasSuggestionsFilePresent: boolean;
readonly hasUpdatesFilePresent: boolean; readonly hasUpdatesFilePresent: boolean;
readonly numberOfPages: number; readonly numberOfPages: number;
readonly numberOfFiles: number; readonly numberOfFiles: number;
@ -39,7 +38,6 @@ export class DossierStats implements IDossierStats {
this.hasHintsNoRedactionsFilePresent = stats.hasHintsNoRedactionsFilePresent; this.hasHintsNoRedactionsFilePresent = stats.hasHintsNoRedactionsFilePresent;
this.hasNoFlagsFilePresent = stats.hasNoFlagsFilePresent; this.hasNoFlagsFilePresent = stats.hasNoFlagsFilePresent;
this.hasRedactionsFilePresent = stats.hasRedactionsFilePresent; this.hasRedactionsFilePresent = stats.hasRedactionsFilePresent;
this.hasSuggestionsFilePresent = stats.hasSuggestionsFilePresent;
this.hasUpdatesFilePresent = stats.hasUpdatesFilePresent; this.hasUpdatesFilePresent = stats.hasUpdatesFilePresent;
this.numberOfPages = stats.numberOfPages; this.numberOfPages = stats.numberOfPages;
this.numberOfFiles = stats.numberOfFiles; this.numberOfFiles = stats.numberOfFiles;

View File

@ -8,7 +8,6 @@ export interface IDossierStats {
hasHintsNoRedactionsFilePresent: boolean; hasHintsNoRedactionsFilePresent: boolean;
hasNoFlagsFilePresent: boolean; hasNoFlagsFilePresent: boolean;
hasRedactionsFilePresent: boolean; hasRedactionsFilePresent: boolean;
hasSuggestionsFilePresent: boolean;
hasUpdatesFilePresent: boolean; hasUpdatesFilePresent: boolean;
numberOfPages: number; numberOfPages: number;
numberOfFiles: number; numberOfFiles: number;

View File

@ -1,5 +1,9 @@
import { Entity } from '@iqser/common-ui'; import { Entity } from '@iqser/common-ui';
import { ProcessingType, ProcessingTypes } from '../dossier-stats';
import { ARCHIVE_ROUTE, DOSSIERS_ROUTE } from '../dossiers';
import { FileAttributes } from '../file-attributes';
import { StatusSorter } from '../shared'; import { StatusSorter } from '../shared';
import { IFile } from './file';
import { import {
isFullProcessingStatuses, isFullProcessingStatuses,
isProcessingStatuses, isProcessingStatuses,
@ -11,10 +15,6 @@ import {
WorkflowFileStatus, WorkflowFileStatus,
WorkflowFileStatuses, WorkflowFileStatuses,
} from './types'; } from './types';
import { IFile } from './file';
import { FileAttributes } from '../file-attributes';
import { ARCHIVE_ROUTE, DOSSIERS_ROUTE } from '../dossiers';
import { ProcessingType, ProcessingTypes } from '../dossier-stats';
export class File extends Entity<IFile> implements IFile { export class File extends Entity<IFile> implements IFile {
readonly added?: string; readonly added?: string;
@ -51,7 +51,6 @@ export class File extends Entity<IFile> implements IFile {
readonly rulesVersion?: number; readonly rulesVersion?: number;
readonly uploader?: string; readonly uploader?: string;
readonly excludedPages: number[]; readonly excludedPages: number[];
readonly hasSuggestions: boolean;
readonly processingStatus: ProcessingFileStatus; readonly processingStatus: ProcessingFileStatus;
readonly workflowStatus: WorkflowFileStatus; readonly workflowStatus: WorkflowFileStatus;
readonly fileManipulationDate: string; readonly fileManipulationDate: string;
@ -83,7 +82,10 @@ export class File extends Entity<IFile> implements IFile {
readonly processingType: ProcessingType; readonly processingType: ProcessingType;
constructor(file: IFile, readonly reviewerName: string) { constructor(
file: IFile,
readonly reviewerName: string,
) {
super(file); super(file);
this.added = file.added; this.added = file.added;
this.allManualRedactionsApplied = !!file.allManualRedactionsApplied; this.allManualRedactionsApplied = !!file.allManualRedactionsApplied;
@ -122,7 +124,6 @@ export class File extends Entity<IFile> implements IFile {
this.rulesVersion = file.rulesVersion; this.rulesVersion = file.rulesVersion;
this.uploader = file.uploader; this.uploader = file.uploader;
this.excludedPages = file.excludedPages || []; this.excludedPages = file.excludedPages || [];
this.hasSuggestions = !!file.hasSuggestions;
this.fileManipulationDate = file.fileManipulationDate ?? ''; this.fileManipulationDate = file.fileManipulationDate ?? '';
this.redactionModificationDate = file.redactionModificationDate ?? ''; this.redactionModificationDate = file.redactionModificationDate ?? '';
this.lastManualChangeDate = file.lastManualChangeDate; this.lastManualChangeDate = file.lastManualChangeDate;
@ -135,7 +136,7 @@ export class File extends Entity<IFile> implements IFile {
this.statusSort = StatusSorter[this.workflowStatus]; this.statusSort = StatusSorter[this.workflowStatus];
this.cacheIdentifier = btoa(`${this.fileManipulationDate}${file.lastOCRTime}${file.ocrEndTime}${file.lastLayoutProcessed}`); this.cacheIdentifier = btoa(`${this.fileManipulationDate}${file.lastOCRTime}${file.ocrEndTime}${file.lastLayoutProcessed}`);
this.hintsOnly = this.hasHints && !this.hasRedactions; this.hintsOnly = this.hasHints && !this.hasRedactions;
this.hasNone = !this.hasRedactions && !this.hasHints && !this.hasSuggestions; this.hasNone = !this.hasRedactions && !this.hasHints;
this.isProcessing = isProcessingStatuses.includes(this.processingStatus); this.isProcessing = isProcessingStatuses.includes(this.processingStatus);
this.isFullProcessing = isFullProcessingStatuses.includes(this.processingStatus); this.isFullProcessing = isFullProcessingStatuses.includes(this.processingStatus);
this.isOcrProcessing = this.processingStatus === ProcessingFileStatuses.OCR_PROCESSING; this.isOcrProcessing = this.processingStatus === ProcessingFileStatuses.OCR_PROCESSING;
@ -144,7 +145,7 @@ export class File extends Entity<IFile> implements IFile {
this.isNew = this.workflowStatus === WorkflowFileStatuses.NEW; this.isNew = this.workflowStatus === WorkflowFileStatuses.NEW;
this.isUnderReview = this.workflowStatus === WorkflowFileStatuses.UNDER_REVIEW; this.isUnderReview = this.workflowStatus === WorkflowFileStatuses.UNDER_REVIEW;
this.isUnderApproval = this.workflowStatus === WorkflowFileStatuses.UNDER_APPROVAL; this.isUnderApproval = this.workflowStatus === WorkflowFileStatuses.UNDER_APPROVAL;
this.canBeApproved = !this.hasSuggestions && !this.isProcessing && !this.isError; this.canBeApproved = !this.isProcessing && !this.isError;
this.canBeOpened = (!this.isError && !this.isUnprocessed && this.numberOfAnalyses > 0) || this.excluded; this.canBeOpened = (!this.isError && !this.isUnprocessed && this.numberOfAnalyses > 0) || this.excluded;
this.canBeOCRed = this.canBeOCRed =
!this.excluded && !this.excluded &&

View File

@ -1,8 +1,8 @@
/** /**
* Object containing information on a specific file. * Object containing information on a specific file.
*/ */
import { ProcessingFileStatus, WorkflowFileStatus } from './types';
import { FileAttributes } from '../file-attributes'; import { FileAttributes } from '../file-attributes';
import { ProcessingFileStatus, WorkflowFileStatus } from './types';
export interface IFile { export interface IFile {
/** /**
@ -56,7 +56,6 @@ export interface IFile {
* Shows if any requests were found during the analysis. * Shows if any requests were found during the analysis.
*/ */
readonly hasRequests?: boolean; readonly hasRequests?: boolean;
readonly hasSuggestions?: boolean;
/** /**
* Shows if there is any change between the previous and current analysis. * Shows if there is any change between the previous and current analysis.
*/ */

View File

@ -2,16 +2,6 @@ import { ValuesOf } from '@iqser/common-ui/lib/utils';
export const SuperTypes = { export const SuperTypes = {
TextHighlight: 'text-highlight', TextHighlight: 'text-highlight',
SuggestionChangeLegalBasis: 'suggestion-change-legal-basis',
SuggestionRecategorizeImage: 'suggestion-recategorize-image',
SuggestionAddDictionary: 'suggestion-add-dictionary',
SuggestionForceRedaction: 'suggestion-force-redaction',
SuggestionForceHint: 'suggestion-force-hint',
SuggestionResize: 'suggestion-resize',
SuggestionRemoveDictionary: 'suggestion-remove-dictionary',
SuggestionAdd: 'suggestion-add',
SuggestionRemove: 'suggestion-remove',
DeclinedSuggestion: 'suggestion-declined',
IgnoredHint: 'hint-ignored', IgnoredHint: 'hint-ignored',
Skipped: 'skipped', Skipped: 'skipped',
Redaction: 'redaction', Redaction: 'redaction',
@ -36,27 +26,3 @@ export const FalsePositiveSuperTypes = {
[SuperTypes.IgnoredHint]: true, [SuperTypes.IgnoredHint]: true,
[SuperTypes.Skipped]: true, [SuperTypes.Skipped]: true,
} as const; } as const;
export const SuggestionAddSuperTypes = {
[SuperTypes.SuggestionAdd]: true,
[SuperTypes.SuggestionAddDictionary]: true,
[SuperTypes.SuggestionForceRedaction]: true,
[SuperTypes.SuggestionForceHint]: true,
} as const;
export const SuggestionRemoveSuperTypes = {
[SuperTypes.SuggestionRemove]: true,
[SuperTypes.SuggestionRemoveDictionary]: true,
} as const;
export const SuggestionsSuperTypes = {
[SuperTypes.SuggestionAdd]: true,
[SuperTypes.SuggestionAddDictionary]: true,
[SuperTypes.SuggestionForceRedaction]: true,
[SuperTypes.SuggestionForceHint]: true,
[SuperTypes.SuggestionChangeLegalBasis]: true,
[SuperTypes.SuggestionRecategorizeImage]: true,
[SuperTypes.SuggestionRemove]: true,
[SuperTypes.SuggestionRemoveDictionary]: true,
[SuperTypes.SuggestionResize]: true,
} as const;

View File

@ -25,7 +25,6 @@ export type ManualRedactionType = ValuesOf<typeof ManualRedactionTypes>;
export const LogEntryStatuses = { export const LogEntryStatuses = {
APPROVED: 'APPROVED', APPROVED: 'APPROVED',
DECLINED: 'DECLINED', DECLINED: 'DECLINED',
REQUESTED: 'REQUESTED',
} as const; } as const;
export type LogEntryStatus = ValuesOf<typeof LogEntryStatuses>; export type LogEntryStatus = ValuesOf<typeof LogEntryStatuses>;