From 871f0feac11ac3c44ea7022571bd995bebf428ce Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Wed, 25 Oct 2023 20:36:06 +0300 Subject: [PATCH] RED-7619 remove useless suggestions. god this fel good --- .../file/annotation-permissions.utils.ts | 12 +- .../app/models/file/annotation.permissions.ts | 5 +- .../src/app/models/file/annotation.wrapper.ts | 112 +-------- .../file-workload.component.html | 8 +- .../file-workload/file-workload.component.ts | 37 ++- .../dossier-overview/config.service.ts | 39 ++- .../dossier-workload-column.component.html | 7 - .../dossier-workload-column.component.ts | 8 +- .../dossiers-listing/config.service.ts | 30 +-- .../annotation-actions.component.html | 10 +- .../annotation-actions.component.ts | 22 +- .../annotation-card.component.html | 2 +- .../view-switch/view-switch.component.ts | 52 +--- .../services/file-data.service.ts | 22 +- .../services/manual-redaction.service.ts | 17 +- .../services/annotation-draw.service.ts | 8 +- .../services/readable-redactions.service.ts | 17 +- .../type-filter/type-filter.component.ts | 21 +- .../annotation-actions-translations.ts | 54 +---- .../annotation-types-translations.ts | 10 - .../app/translations/workload-translations.ts | 1 - .../src/app/users/user-preference.service.ts | 1 - apps/red-ui/src/app/utils/filter-utils.ts | 5 +- .../utils/sorters/redaction-filter-sorter.ts | 1 - .../app/utils/sorters/super-type-sorter.ts | 10 - apps/red-ui/src/assets/config/config.json | 4 +- apps/red-ui/src/assets/i18n/redact/de.json | 229 ++++++------------ apps/red-ui/src/assets/i18n/redact/en.json | 85 +------ apps/red-ui/src/assets/i18n/scm/de.json | 85 +------ apps/red-ui/src/assets/i18n/scm/en.json | 87 +------ libs/red-domain/src/lib/annotations/types.ts | 12 +- .../src/lib/colors/annotation-color-config.ts | 16 +- .../lib/dossier-stats/dossier-stats.model.ts | 4 +- .../src/lib/dossier-stats/dossier-stats.ts | 1 - libs/red-domain/src/lib/files/file.model.ts | 19 +- libs/red-domain/src/lib/files/file.ts | 3 +- libs/red-domain/src/lib/files/super-types.ts | 34 --- .../red-domain/src/lib/redaction-log/types.ts | 1 - 38 files changed, 197 insertions(+), 894 deletions(-) diff --git a/apps/red-ui/src/app/models/file/annotation-permissions.utils.ts b/apps/red-ui/src/app/models/file/annotation-permissions.utils.ts index 2729dcad0..4a70ac52c 100644 --- a/apps/red-ui/src/app/models/file/annotation-permissions.utils.ts +++ b/apps/red-ui/src/app/models/file/annotation-permissions.utils.ts @@ -2,8 +2,7 @@ import { AnnotationPermissions } from '@models/file/annotation.permissions'; import { AnnotationWrapper } from '@models/file/annotation.wrapper'; import { Dictionary } from '@red/domain'; -export const canUndo = (annotation: AnnotationWrapper, isApprover: boolean) => - !isApprover && (annotation.isSuggestion || annotation.pending); +export const canUndo = (annotation: AnnotationWrapper, isApprover: boolean) => !isApprover && annotation.pending; export const canForceHint = (annotation: AnnotationWrapper, canAddRedaction: boolean) => canAddRedaction && annotation.isIgnoredHint && !annotation.pending; @@ -33,15 +32,10 @@ export const canChangeLegalBasis = (annotation: AnnotationWrapper, canAddRedacti canAddRedaction && annotation.isRedacted && !annotation.pending; export const canRecategorizeAnnotation = (annotation: AnnotationWrapper, canRecategorize: boolean) => - canRecategorize && - ((annotation.isImage && !annotation.isSuggestion) || annotation.isSuggestionRecategorizeImage || annotation.hintDictionary) && - !annotation.pending; + canRecategorize && (annotation.isImage || annotation.hintDictionary) && !annotation.pending; export const canResizeAnnotation = (annotation: AnnotationWrapper, canAddRedaction: boolean) => canAddRedaction && !annotation.isSkipped && !annotation.pending && - (((annotation.isRedacted || annotation.isImage) && !annotation.isSuggestion) || - annotation.isSuggestionResize || - annotation.isDictBasedHint || - annotation.isRecommendation); + (annotation.isRedacted || annotation.isImage || annotation.isDictBasedHint || annotation.isRecommendation); diff --git a/apps/red-ui/src/app/models/file/annotation.permissions.ts b/apps/red-ui/src/app/models/file/annotation.permissions.ts index 87ffb175e..cddebeb9a 100644 --- a/apps/red-ui/src/app/models/file/annotation.permissions.ts +++ b/apps/red-ui/src/app/models/file/annotation.permissions.ts @@ -2,6 +2,7 @@ import { IqserPermissionsService } from '@iqser/common-ui'; import { Dictionary } from '@red/domain'; import { Roles } from '@users/roles'; import { isArray } from 'lodash-es'; +import { IMAGE_CATEGORIES } from '../../modules/file-preview/utils/constants'; import { canAcceptRecommendation, canChangeLegalBasis, @@ -16,7 +17,6 @@ import { canUndo, } from './annotation-permissions.utils'; import { AnnotationWrapper } from './annotation.wrapper'; -import { IMAGE_CATEGORIES } from '../../modules/file-preview/utils/constants'; export class AnnotationPermissions { canUndo = true; @@ -63,8 +63,7 @@ export class AnnotationPermissions { permissions.canResizeAnnotation = canResizeAnnotation(annotation, canAddRedaction); permissions.canEditAnnotations = (annotation.isSkipped || annotation.isRedacted) && !annotation.isImage; - permissions.canEditHints = - annotation.isIgnoredHint || annotation.isDictBasedHint || annotation.isHint || annotation.isSuggestionForceHint; + permissions.canEditHints = annotation.isIgnoredHint || annotation.isDictBasedHint || annotation.isHint; permissions.canEditImages = [...IMAGE_CATEGORIES, 'ocr'].includes(annotation.type); summedPermissions._merge(permissions); diff --git a/apps/red-ui/src/app/models/file/annotation.wrapper.ts b/apps/red-ui/src/app/models/file/annotation.wrapper.ts index 1bd215125..da0afdd50 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -1,12 +1,10 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { IListable } from '@iqser/common-ui'; import { - annotationDefaultColorConfig, annotationEntityColorConfig, AnnotationIconType, ChangeType, ChangeTypes, - DefaultColors, Dictionary, Earmark, EntryStates, @@ -23,9 +21,6 @@ import { LogEntryStatuses, LowLevelFilterTypes, ManualRedactionTypes, - SuggestionAddSuperTypes, - SuggestionRemoveSuperTypes, - SuggestionsSuperTypes, SuperType, SuperTypes, } from '@red/domain'; @@ -55,7 +50,6 @@ export class AnnotationWrapper implements IListable { positions: IRectangle[]; recommendationType: string; legalBasisValue: string; - legalBasisChangeValue?: string; rectangle?: boolean; section?: string; reference: string[]; @@ -107,10 +101,6 @@ export class AnnotationWrapper implements IListable { ); } - get isSuperTypeBasedColor() { - return this.isSuggestion || this.isDeclinedSuggestion; - } - get isSkipped() { return this.superType === SuperTypes.Skipped; } @@ -147,18 +137,6 @@ export class AnnotationWrapper implements IListable { 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() { return this.superType === SuperTypes.Hint; } @@ -176,10 +154,6 @@ export class AnnotationWrapper implements IListable { return 'circle'; } - if (this.isSuggestion || this.isDeclinedSuggestion) { - return 'rhombus'; - } - return 'square'; } @@ -195,34 +169,6 @@ export class AnnotationWrapper implements IListable { 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() { return this.dictionaryOperation; } @@ -251,7 +197,7 @@ export class AnnotationWrapper implements IListable { } get legalBasis() { - return this.legalBasisChangeValue || this.legalBasisValue; + return this.legalBasisValue; } get width(): number { @@ -263,14 +209,7 @@ export class AnnotationWrapper implements IListable { } get previewAnnotation() { - return ( - this.isRedacted || - this.isSuggestionAdd || - this.isSuggestionRemove || - this.isSuggestionResize || - this.isSuggestionLegalBasisChange || - this.isSuggestionRecategorizeImage - ); + return this.isRedacted; } static fromEarmark(earmark: Earmark) { @@ -292,7 +231,6 @@ export class AnnotationWrapper implements IListable { static fromData( logEntry: IEntityLogEntry, dictionaries: Dictionary[], - defaultColors: DefaultColors, changeLogType: ChangeType, legalBasisList: ILegalBasis[], hintDictionary: boolean, @@ -347,9 +285,6 @@ export class AnnotationWrapper implements IListable { annotationWrapper.hasBeenRemovedByManualOverride = !!logEntry.manualChanges?.find( 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.#setSuperType(annotationWrapper, logEntry); @@ -359,15 +294,8 @@ export class AnnotationWrapper implements IListable { const entity = dictionaries.find(d => d.type === annotationWrapper.typeValue); annotationWrapper.entity = entity?.virtual ? null : entity; - let colorKey = annotationWrapper.isSuperTypeBasedColor - ? annotationDefaultColorConfig[annotationWrapper.superType] - : annotationEntityColorConfig[annotationWrapper.superType]; - - if (annotationWrapper.isSuperTypeBasedColor && annotationWrapper.isSuggestionResize && !annotationWrapper.isModifyDictionary) { - colorKey = annotationDefaultColorConfig[SuperTypes.SuggestionAdd]; - } - - annotationWrapper.color = annotationWrapper.isSuperTypeBasedColor ? defaultColors[colorKey] : (entity[colorKey] as string); + const colorKey = annotationEntityColorConfig[annotationWrapper.superType]; + annotationWrapper.color = entity[colorKey] as string; return annotationWrapper; } @@ -408,10 +336,6 @@ export class AnnotationWrapper implements IListable { annotationWrapper.pending = !lastRelevantManualChange.processed; annotationWrapper.superType = this.#selectSuperType(logEntry, lastRelevantManualChange, annotationWrapper.hintDictionary); - - if (lastRelevantManualChange.annotationStatus === LogEntryStatuses.REQUESTED) { - annotationWrapper.recategorizationType = lastRelevantManualChange.propertyChanges.type; - } } else { if (logEntry.state === EntryStates.SKIPPED) { if (logEntry.entryType === EntryTypes.HINT) { @@ -487,20 +411,12 @@ export class AnnotationWrapper implements IListable { switch (lastManualChange.annotationStatus) { case LogEntryStatuses.APPROVED: return SuperTypes.ManualRedaction; - case LogEntryStatuses.DECLINED: - return SuperTypes.DeclinedSuggestion; - case LogEntryStatuses.REQUESTED: - return SuperTypes.SuggestionAdd; } break; case ManualRedactionTypes.ADD_TO_DICTIONARY: switch (lastManualChange.annotationStatus) { case LogEntryStatuses.APPROVED: return isHintDictionary ? SuperTypes.Hint : SuperTypes.Redaction; - case LogEntryStatuses.DECLINED: - return SuperTypes.DeclinedSuggestion; - case LogEntryStatuses.REQUESTED: - return SuperTypes.SuggestionAddDictionary; } break; case ManualRedactionTypes.REMOVE_LOCALLY: @@ -518,8 +434,6 @@ export class AnnotationWrapper implements IListable { return SuperTypes.Skipped; } - case LogEntryStatuses.REQUESTED: - return SuperTypes.SuggestionRemove; } break; case ManualRedactionTypes.REMOVE_FROM_DICTIONARY: @@ -530,16 +444,12 @@ export class AnnotationWrapper implements IListable { return SuperTypes.Skipped; case LogEntryStatuses.DECLINED: return SuperTypes.Redaction; - case LogEntryStatuses.REQUESTED: - return SuperTypes.SuggestionRemoveDictionary; } } switch (lastManualChange.annotationStatus) { case LogEntryStatuses.APPROVED: case LogEntryStatuses.DECLINED: 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; case LogEntryStatuses.DECLINED: 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.DECLINED: return isHintDictionary ? SuperTypes.Hint : SuperTypes.Skipped; - case LogEntryStatuses.REQUESTED: - return SuperTypes.SuggestionRemoveDictionary; } break; case ManualRedactionTypes.FORCE_REDACT: @@ -568,8 +474,6 @@ export class AnnotationWrapper implements IListable { return SuperTypes.Redaction; case LogEntryStatuses.DECLINED: return isHintDictionary ? SuperTypes.IgnoredHint : SuperTypes.Skipped; - case LogEntryStatuses.REQUESTED: - return SuperTypes.SuggestionForceRedaction; } break; case ManualRedactionTypes.FORCE_HINT: @@ -578,8 +482,6 @@ export class AnnotationWrapper implements IListable { return SuperTypes.Hint; case LogEntryStatuses.DECLINED: return SuperTypes.IgnoredHint; - case LogEntryStatuses.REQUESTED: - return SuperTypes.SuggestionForceHint; } break; case ManualRedactionTypes.RECATEGORIZE: @@ -600,8 +502,6 @@ export class AnnotationWrapper implements IListable { return isHintDictionary ? SuperTypes.IgnoredHint : SuperTypes.Skipped; } - case LogEntryStatuses.REQUESTED: - return SuperTypes.SuggestionRecategorizeImage; } break; case ManualRedactionTypes.LEGAL_BASIS_CHANGE: @@ -609,8 +509,6 @@ export class AnnotationWrapper implements IListable { case LogEntryStatuses.APPROVED: case LogEntryStatuses.DECLINED: return logEntry.type === SuperTypes.ManualRedaction ? SuperTypes.ManualRedaction : SuperTypes.Redaction; - case LogEntryStatuses.REQUESTED: - return SuperTypes.SuggestionChangeLegalBasis; } break; case ManualRedactionTypes.RESIZE: @@ -629,8 +527,6 @@ export class AnnotationWrapper implements IListable { return SuperTypes.Hint; } return isHintDictionary ? SuperTypes.IgnoredHint : SuperTypes.Skipped; - case LogEntryStatuses.REQUESTED: - return SuperTypes.SuggestionResize; } break; } diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-workload/file-workload.component.html b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-workload/file-workload.component.html index e27ba5621..18a3391fa 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-workload/file-workload.component.html +++ b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-workload/file-workload.component.html @@ -14,12 +14,6 @@ > - - - + - diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-workload/file-workload.component.ts b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-workload/file-workload.component.ts index 38cae9777..69865f1c6 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-workload/file-workload.component.ts +++ b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-workload/file-workload.component.ts @@ -1,10 +1,10 @@ import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core'; import { annotationDefaultColorConfig, DefaultBasedColorType, File } from '@red/domain'; -import { UserService } from '@users/user.service'; import { DossiersService } from '@services/dossiers/dossiers.service'; import { DefaultColorsService } from '@services/entity-services/default-colors.service'; -import { Observable } from 'rxjs'; import { DictionariesMapService } from '@services/entity-services/dictionaries-map.service'; +import { UserService } from '@users/user.service'; +import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; @Component({ @@ -14,17 +14,14 @@ import { map } from 'rxjs/operators'; changeDetection: ChangeDetectionStrategy.OnPush, }) export class FileWorkloadComponent implements OnInit { + #dossierTemplateId: string; @Input() file: File; - - suggestionColor$: Observable; imageColor$: Observable; updatedColor$: Observable; analysisColor$: Observable; hintColor$: Observable; redactionColor$: Observable; - #dossierTemplateId: string; - constructor( private readonly _userService: UserService, private readonly _defaultColorsService: DefaultColorsService, @@ -32,20 +29,6 @@ export class FileWorkloadComponent implements OnInit { 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 { - return this._defaultColorsService.getColor$(this.#dossierTemplateId, annotationDefaultColorConfig[type]); - } - get updated(): boolean { 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.hasImages && !this.file.hintsOnly && - !this.file.hasSuggestions && !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 { + return this._defaultColorsService.getColor$(this.#dossierTemplateId, annotationDefaultColorConfig[type]); + } } diff --git a/apps/red-ui/src/app/modules/dossier-overview/config.service.ts b/apps/red-ui/src/app/modules/dossier-overview/config.service.ts index cc550b4bc..691258434 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/config.service.ts +++ b/apps/red-ui/src/app/modules/dossier-overview/config.service.ts @@ -1,4 +1,5 @@ import { Injectable, TemplateRef } from '@angular/core'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { ActionConfig, getConfig, @@ -9,6 +10,10 @@ import { WorkflowColumn, WorkflowConfig, } 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 { annotationDefaultColorConfig, AnnotationShapeMap, @@ -22,26 +27,21 @@ import { WorkflowFileStatus, WorkflowFileStatuses, } 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 { 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 { getCurrentUser } from '@iqser/common-ui/lib/users'; -import { IFilterGroup, INestedFilter, keyChecker, NestedFilter } from '@iqser/common-ui/lib/filtering'; -import { getParam, List } from '@iqser/common-ui/lib/utils'; +import { UserPreferenceService } from '@users/user-preference.service'; +import { UserService } from '@users/user.service'; +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() export class ConfigService { @@ -198,9 +198,6 @@ export class ConfigService { if (file.hasRedactions) { allDistinctNeedsWork.add('redaction'); } - if (file.hasSuggestions) { - allDistinctNeedsWork.add('suggestion'); - } if (file.hasUpdates && file.assignee === this._userService.currentUser.id && !file.isApproved) { allDistinctNeedsWork.add('updated'); } diff --git a/apps/red-ui/src/app/modules/dossiers-listing/components/dossier-workload-column/dossier-workload-column.component.html b/apps/red-ui/src/app/modules/dossiers-listing/components/dossier-workload-column/dossier-workload-column.component.html index 2eaec1625..597091def 100644 --- a/apps/red-ui/src/app/modules/dossiers-listing/components/dossier-workload-column/dossier-workload-column.component.html +++ b/apps/red-ui/src/app/modules/dossiers-listing/components/dossier-workload-column/dossier-workload-column.component.html @@ -12,11 +12,4 @@ label="H" type="circle" > - - diff --git a/apps/red-ui/src/app/modules/dossiers-listing/components/dossier-workload-column/dossier-workload-column.component.ts b/apps/red-ui/src/app/modules/dossiers-listing/components/dossier-workload-column/dossier-workload-column.component.ts index 1ea343253..a3c9eca39 100644 --- a/apps/red-ui/src/app/modules/dossiers-listing/components/dossier-workload-column/dossier-workload-column.component.ts +++ b/apps/red-ui/src/app/modules/dossiers-listing/components/dossier-workload-column/dossier-workload-column.component.ts @@ -10,19 +10,13 @@ import { BehaviorSubject, Observable, switchMap } from 'rxjs'; changeDetection: ChangeDetectionStrategy.OnPush, }) export class DossierWorkloadColumnComponent implements OnChanges { + readonly #dossierTemplateId$ = new BehaviorSubject(null); @Input() dossier: Dossier; @Input() dossierStats: DossierStats; - - readonly suggestionColor$: Observable; readonly hintColor$: Observable; readonly redactionColor$: Observable; - readonly #dossierTemplateId$ = new BehaviorSubject(null); - 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.redactionColor$ = this.#dossierTemplateId$.pipe( switchMap(dossierTemplateId => this.#getColor$(dossierTemplateId, 'redactionColor')), diff --git a/apps/red-ui/src/app/modules/dossiers-listing/config.service.ts b/apps/red-ui/src/app/modules/dossiers-listing/config.service.ts index 5f6490ad0..0bf3c3da2 100644 --- a/apps/red-ui/src/app/modules/dossiers-listing/config.service.ts +++ b/apps/red-ui/src/app/modules/dossiers-listing/config.service.ts @@ -1,5 +1,8 @@ import { Injectable, TemplateRef } from '@angular/core'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; 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 { annotationDefaultColorConfig, AnnotationShapeMap, @@ -9,11 +12,15 @@ import { User, WorkflowFileStatus, } from '@red/domain'; -import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; -import { TranslateService } from '@ngx-translate/core'; +import { DossierStatsService } from '@services/dossiers/dossier-stats.service'; +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 { UserService } from '@users/user.service'; -import { workflowFileStatusTranslations } from '@translations/file-status-translations'; import { dossierMemberChecker, dossierMemberQuickChecker, @@ -21,17 +28,11 @@ import { dossierStateChecker, RedactionFilterSorter, } 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() export class ConfigService { readonly #isDocumine = getConfig().IS_DOCUMINE; + constructor( private readonly _translateService: TranslateService, private readonly _userPreferenceService: UserPreferenceService, @@ -106,9 +107,6 @@ export class ConfigService { if (stats.hasRedactionsFilePresent) { allDistinctNeedsWork.add('redaction'); } - if (stats.hasSuggestionsFilePresent) { - allDistinctNeedsWork.add('suggestion'); - } if (stats.hasNoFlagsFilePresent) { allDistinctNeedsWork.add('none'); } @@ -246,12 +244,6 @@ export class ConfigService { private _annotationFilterChecker = (dossier: Dossier, filter: INestedFilter) => { const stats = this._dossierStatsService.get(dossier.id); switch (filter.id) { - // case 'analysis': { - // return stats.reanalysisRequired; - // } - case 'suggestion': { - return stats.hasSuggestionsFilePresent; - } case 'redaction': { return stats.hasRedactionsFilePresent; } diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.html b/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.html index cfaff2b27..17e2a2fce 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.html @@ -7,10 +7,10 @@ @@ -28,20 +28,20 @@ @@ -136,12 +136,12 @@ > diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.ts b/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.ts index 24cf21584..31f329f08 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.ts @@ -24,6 +24,9 @@ export type AnnotationButtonType = keyof typeof AnnotationButtonTypes; styleUrls: ['./annotation-actions.component.scss'], }) export class AnnotationActionsComponent implements OnChanges { + #annotations: AnnotationWrapper[] = []; + readonly #isDocumine = getConfig().IS_DOCUMINE; + protected _annotationId = ''; @Input() buttonType: AnnotationButtonType = AnnotationButtonTypes.default; @Input() tooltipPosition: 'before' | 'above' = 'before'; @Input() canPerformAnnotationActions: boolean; @@ -31,13 +34,10 @@ export class AnnotationActionsComponent implements OnChanges { readonly roles = Roles; annotationPermissions: AnnotationPermissions; isImage = true; - protected _annotationId = ''; - #annotations: AnnotationWrapper[] = []; readonly isVisible = computed(() => { const hidden = this._annotationManager.hidden(); return this.#annotations.reduce((acc, annotation) => !hidden.has(annotation.id) && acc, true); }); - readonly #isDocumine = getConfig().IS_DOCUMINE; constructor( readonly viewModeService: ViewModeService, @@ -55,6 +55,13 @@ export class AnnotationActionsComponent implements OnChanges { 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 { const canEditRedactions = this.annotationPermissions.canChangeLegalBasis || @@ -91,18 +98,11 @@ export class AnnotationActionsComponent implements OnChanges { 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 { this.#setPermissions(); } - removeOrSuggestRemoveRedaction() { + removeRedaction() { this.annotationActionsService.removeRedaction(this.annotations, this.annotationPermissions); } diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.html b/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.html index b822419ff..920c5d427 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.html @@ -10,7 +10,7 @@
{{ annotation.typeLabel | translate }}   - + {{ 'annotation.pending' | translate }}
diff --git a/apps/red-ui/src/app/modules/file-preview/components/view-switch/view-switch.component.ts b/apps/red-ui/src/app/modules/file-preview/components/view-switch/view-switch.component.ts index 8fcf65a93..340effd47 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/view-switch/view-switch.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/view-switch/view-switch.component.ts @@ -1,13 +1,10 @@ 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 { 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({ selector: 'redaction-view-switch', @@ -37,49 +34,12 @@ export class ViewSwitchComponent { readonly viewModeService: ViewModeService, private readonly _state: FilePreviewStateService, private readonly _fileDataService: FileDataService, - private readonly _dialogService: FilePreviewDialogService, - private readonly _toaster: Toaster, ) {} switchView(viewMode: ViewMode) { if (viewMode === ViewModes.REDACTED) { - return this.#switchToRedactedView(); + return this.viewModeService.switchToRedacted(); } 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(); - }); - } } diff --git a/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts b/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts index 9ab30726b..202f26ea3 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts @@ -4,7 +4,6 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { EntitiesService, getConfig, Toaster } from '@iqser/common-ui'; import { AnnotationWrapper } from '@models/file/annotation.wrapper'; 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 { EarmarksService } from '@services/files/earmarks.service'; import { FilesService } from '@services/files/files.service'; @@ -56,7 +55,6 @@ export class FileDataService extends EntitiesService = {}; const dictionaries = this._state.dictionaries; - const defaultColors = this._defaultColorsService.find(this._state.dossierTemplateId); let checkDictionary = true; for (const entry of entityLog.entityLogEntry) { @@ -207,25 +203,16 @@ export class FileDataService extends EntitiesService !sourceKeys.includes(r.id)); + return annotations; } #getChangeLogValues( @@ -268,12 +255,11 @@ export class FileDataService extends EntitiesService visibleStatuses.includes(change.annotationStatus)); viableManualChanges.sort(chronologicallyBy(x => x.processedDate)); const lastManualChange = viableManualChanges.at(-1); - const isSuggestion = lastManualChange?.annotationStatus === LogEntryStatuses.REQUESTED; - const processedTime = isSuggestion ? lastManualChange.requestedDate : lastManualChange?.processedDate; + const processedTime = lastManualChange?.processedDate; changeOccurredAfterPageIsViewed = processedTime && timestampOf(processedTime) > viewTime; if (changeOccurredAfterPageIsViewed) { diff --git a/apps/red-ui/src/app/modules/file-preview/services/manual-redaction.service.ts b/apps/red-ui/src/app/modules/file-preview/services/manual-redaction.service.ts index 6a6748e88..b1bc55056 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/manual-redaction.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/manual-redaction.service.ts @@ -43,7 +43,7 @@ export class ManualRedactionService extends GenericService { constructor( private readonly _toaster: Toaster, private readonly _logger: NGXLogger, - private readonly _iqaerPermissionsService: IqserPermissionsService, + private readonly _iqserPermissionsService: IqserPermissionsService, ) { super(); } @@ -90,7 +90,7 @@ export class ManualRedactionService extends GenericService { const toast = requests[0].addToDictionary ? this.#showAddToDictionaryToast(requests, options?.dictionaryLabel) : 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) { return this.add(requests, dossierId, fileId).pipe(toast); } @@ -137,19 +137,6 @@ export class ManualRedactionService extends GenericService { ); } - 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) { const url = `${this._defaultModelPath}/bulk/undo/${dossierId}/${fileId}`; return super.delete(annotationIds, url).pipe(this.#log('Undo', annotationIds)); diff --git a/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts b/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts index 80eabfe1f..cea94509f 100644 --- a/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts +++ b/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts @@ -154,7 +154,7 @@ export class AnnotationDrawService { annotation.Id = annotationWrapper.id; annotation.ReadOnly = true; - const isOCR = annotationWrapper.isOCR && !annotationWrapper.isSuggestionResize; + const isOCR = annotationWrapper.isOCR; if (isOCR && !this._annotationManager.isHidden(annotationWrapper.id)) { this._annotationManager.addToHidden(annotationWrapper.id); } @@ -164,12 +164,6 @@ export class AnnotationDrawService { this._annotationManager.isHidden(annotationWrapper.id); annotation.setCustomData('redact-manager', 'true'); 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('notSignatureImage', String(annotationWrapper.isNotSignatureImage)); annotation.setCustomData('changeLog', String(annotationWrapper.isChangeLogEntry)); diff --git a/apps/red-ui/src/app/modules/pdf-viewer/services/readable-redactions.service.ts b/apps/red-ui/src/app/modules/pdf-viewer/services/readable-redactions.service.ts index d0bbfbbb7..e1160d5a7 100644 --- a/apps/red-ui/src/app/modules/pdf-viewer/services/readable-redactions.service.ts +++ b/apps/red-ui/src/app/modules/pdf-viewer/services/readable-redactions.service.ts @@ -1,13 +1,12 @@ import { inject, Injectable } from '@angular/core'; -import { TranslateService } from '@ngx-translate/core'; 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 { 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; @Injectable() @@ -21,7 +20,6 @@ export class ReadableRedactionsService { constructor( private readonly _pdf: PdfViewer, private readonly _translateService: TranslateService, - private readonly _annotationManager: REDAnnotationManager, private readonly _annotationDrawService: AnnotationDrawService, ) { this.active$ = this.#active$.asObservable(); @@ -79,8 +77,7 @@ export class ReadableRedactionsService { setAnnotationsOpacity(annotations: Annotation[], restoreToOriginal = false) { annotations.forEach(annotation => { - const isSuggestion = annotation.getCustomData('suggestion'); - annotation['Opacity'] = restoreToOriginal || isSuggestion ? parseFloat(annotation.getCustomData('opacity')) : 0.5; + annotation['Opacity'] = restoreToOriginal ? parseFloat(annotation.getCustomData('opacity')) : 0.5; }); } diff --git a/apps/red-ui/src/app/modules/shared/components/type-filter/type-filter.component.ts b/apps/red-ui/src/app/modules/shared/components/type-filter/type-filter.component.ts index 1df39b876..197352b41 100644 --- a/apps/red-ui/src/app/modules/shared/components/type-filter/type-filter.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/type-filter/type-filter.component.ts @@ -1,31 +1,20 @@ 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 { TranslateService } from '@ngx-translate/core'; @Component({ - selector: 'redaction-type-filter [dossierTemplateId]', + selector: 'redaction-type-filter', templateUrl: './type-filter.component.html', styleUrls: ['./type-filter.component.scss'], }) 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']; @Input() filter: INestedFilter; - @Input() dossierTemplateId: string; + @Input({ required: true }) dossierTemplateId: string; @Input() dossierId: string; label: string; - constructor(private readonly _defaultColorsService: DefaultColorsService, private readonly _translateService: TranslateService) {} + constructor(private readonly _translateService: TranslateService) {} ngOnChanges(): void { this.label = @@ -35,8 +24,6 @@ export class TypeFilterComponent implements OnChanges { ? '-' : this._needsAnalysisKeys.includes(this.filter.id) ? 'A' - : this._suggestionsKeys.includes(this.filter.id) - ? 'S' : this.filter.skipTranslation ? this.filter.label.charAt(0) : this._translateService.instant(this.filter.label).charAt(0); diff --git a/apps/red-ui/src/app/translations/annotation-actions-translations.ts b/apps/red-ui/src/app/translations/annotation-actions-translations.ts index 8e622a17f..fe1b0f8b6 100644 --- a/apps/red-ui/src/app/translations/annotation-actions-translations.ts +++ b/apps/red-ui/src/app/translations/annotation-actions-translations.ts @@ -1,5 +1,5 @@ -import { DictionaryActions, ManualRedactionActions } from '@red/domain'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; +import { DictionaryActions, ManualRedactionActions } from '@red/domain'; interface AnnotationActionResponses { error: string; @@ -13,26 +13,10 @@ export const dictionaryActionsTranslations: Record = { [SuperTypes.TextHighlight]: _('annotation-type.text-highlight'), - [SuperTypes.DeclinedSuggestion]: _('annotation-type.declined-suggestion'), [SuperTypes.Hint]: _('annotation-type.hint'), [SuperTypes.IgnoredHint]: _('annotation-type.ignored-hint'), [SuperTypes.ManualRedaction]: _('annotation-type.manual-redaction'), [SuperTypes.Recommendation]: _('annotation-type.recommendation'), [SuperTypes.Redaction]: _('annotation-type.redaction'), [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'), } as const; diff --git a/apps/red-ui/src/app/translations/workload-translations.ts b/apps/red-ui/src/app/translations/workload-translations.ts index 84d912e7c..efa994d66 100644 --- a/apps/red-ui/src/app/translations/workload-translations.ts +++ b/apps/red-ui/src/app/translations/workload-translations.ts @@ -6,7 +6,6 @@ export const workloadTranslations: { [key: string]: string } = { image: _('filter.image'), none: _('filter.none'), redaction: _('filter.redaction'), - suggestion: _('filter.suggestion'), updated: _('filter.updated'), comment: _('filter.comment'), }; diff --git a/apps/red-ui/src/app/users/user-preference.service.ts b/apps/red-ui/src/app/users/user-preference.service.ts index 0c4315c4d..27f412574 100644 --- a/apps/red-ui/src/app/users/user-preference.service.ts +++ b/apps/red-ui/src/app/users/user-preference.service.ts @@ -7,7 +7,6 @@ export const PreferencesKeys = { lastDossierTemplate: 'Last-Dossier-Template', filesListingMode: 'Files-Listing-Mode', autoExpandFiltersOnActions: 'Auto-Expand-Filters-On-Actions', - displaySuggestionsInPreview: 'Display-Suggestions-In-Preview', loadAllAnnotationsWarning: 'Load-All-Annotations-Warning', openScmDialogByDefault: 'Open-Structured-Component-Management-By-Default', tableExtractionType: 'Table-Extraction-Type', diff --git a/apps/red-ui/src/app/utils/filter-utils.ts b/apps/red-ui/src/app/utils/filter-utils.ts index 939bde6a2..68bf58595 100644 --- a/apps/red-ui/src/app/utils/filter-utils.ts +++ b/apps/red-ui/src/app/utils/filter-utils.ts @@ -1,5 +1,5 @@ -import { Dossier, File, User, UserType } from '@red/domain'; 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[]) { const newFiltersDelta = {}; @@ -52,9 +52,6 @@ export const annotationFilterChecker = (file: File, filter: INestedFilter, curre case 'analysis': { return file.analysisRequired; } - case 'suggestion': { - return file.hasSuggestions; - } case 'redaction': { return file.hasRedactions; } diff --git a/apps/red-ui/src/app/utils/sorters/redaction-filter-sorter.ts b/apps/red-ui/src/app/utils/sorters/redaction-filter-sorter.ts index 092b35c76..c20c57375 100644 --- a/apps/red-ui/src/app/utils/sorters/redaction-filter-sorter.ts +++ b/apps/red-ui/src/app/utils/sorters/redaction-filter-sorter.ts @@ -4,7 +4,6 @@ export const RedactionFilterSorter = { redaction: 2, image: 3, hint: 4, - suggestion: 5, none: 6, byKey: (a: { id: string }, b: { id: string }): number => RedactionFilterSorter[a.id] - RedactionFilterSorter[b.id], }; diff --git a/apps/red-ui/src/app/utils/sorters/super-type-sorter.ts b/apps/red-ui/src/app/utils/sorters/super-type-sorter.ts index 419a3d205..2305bc13c 100644 --- a/apps/red-ui/src/app/utils/sorters/super-type-sorter.ts +++ b/apps/red-ui/src/app/utils/sorters/super-type-sorter.ts @@ -2,20 +2,10 @@ import { SuperType, SuperTypes } from '@red/domain'; export const SuperTypeSorter: { [key in SuperType]: number } = { [SuperTypes.TextHighlight]: 100, - [SuperTypes.SuggestionChangeLegalBasis]: 14, - [SuperTypes.SuggestionForceRedaction]: 15, - [SuperTypes.SuggestionForceHint]: 16, - [SuperTypes.SuggestionRecategorizeImage]: 17, - [SuperTypes.SuggestionResize]: 18, [SuperTypes.Recommendation]: 7, - [SuperTypes.SuggestionAddDictionary]: 12, - [SuperTypes.SuggestionRemoveDictionary]: 13, - [SuperTypes.SuggestionAdd]: 10, - [SuperTypes.SuggestionRemove]: 11, [SuperTypes.IgnoredHint]: 45, [SuperTypes.Skipped]: 50, [SuperTypes.Redaction]: 1, [SuperTypes.ManualRedaction]: 2, [SuperTypes.Hint]: 19, - [SuperTypes.DeclinedSuggestion]: 20, }; diff --git a/apps/red-ui/src/assets/config/config.json b/apps/red-ui/src/assets/config/config.json index 42bf5941f..deb14e6da 100644 --- a/apps/red-ui/src/assets/config/config.json +++ b/apps/red-ui/src/assets/config/config.json @@ -1,7 +1,7 @@ { "ADMIN_CONTACT_NAME": null, "ADMIN_CONTACT_URL": null, - "API_URL": "https://dan.iqser.cloud", + "API_URL": "https://dan1.iqser.cloud", "APP_NAME": "RedactManager", "IS_DOCUMINE": false, "RULE_EDITOR_DEV_ONLY": false, @@ -13,7 +13,7 @@ "MAX_RETRIES_ON_SERVER_ERROR": 3, "OAUTH_CLIENT_ID": "redaction", "OAUTH_IDP_HINT": null, - "OAUTH_URL": "https://dan.iqser.cloud/auth", + "OAUTH_URL": "https://dan1.iqser.cloud/auth", "RECENT_PERIOD_IN_HOURS": 24, "SELECTION_MODE": "structural", "MANUAL_BASE_URL": "https://docs.redactmanager.com/preview", diff --git a/apps/red-ui/src/assets/i18n/redact/de.json b/apps/red-ui/src/assets/i18n/redact/de.json index 9cb057632..139c584d1 100644 --- a/apps/red-ui/src/assets/i18n/redact/de.json +++ b/apps/red-ui/src/assets/i18n/redact/de.json @@ -56,8 +56,7 @@ }, "add-edit-clone-dossier-template": { "error": { - "conflict": "Dossiervorlage konnte nicht erstellt werden: Es existiert bereits eine Dossiervorlage mit demselben Namen.", - "generic": "Fehler beim Erstellen der Dossiervorlage." + "conflict": "Dossiervorlage konnte nicht erstellt werden: Es existiert bereits eine Dossiervorlage mit demselben Namen." }, "form": { "apply-updates-default": { @@ -256,9 +255,6 @@ "user-management": "User Management", "watermarks": "Watermarks" }, - "annotation": { - "pending": "(Pending Analysis)" - }, "annotation-actions": { "accept-recommendation": { "label": "Empfehlung annehmen" @@ -283,26 +279,10 @@ "error": "Fehler beim Hinzufügen des neuen Wörterbucheintrags: {error}", "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": { "error": "Fehler beim Entfernen des Wörterbucheintrags: {error}", "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": { "error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}", "success": "Rückgängigmachen erfolgreich" @@ -313,10 +293,6 @@ "error": "Fehler beim Speichern der Schwärzung: {error}", "success": "Schwärzung hinzugefügt!" }, - "approve": { - "error": "Fehler beim Genehmigen des Vorschlags: {error}", - "success": "Vorschlag genehmigt" - }, "change-legal-basis": { "error": "Fehler beim Bearbeiten der in der Anmerkung genannten Begründung: {error}", "success": "In der Anmerkung genannte Begründung wurde bearbeitet." @@ -325,10 +301,6 @@ "error": "Failed to edit type: {error}", "success": "Type was edited." }, - "decline": { - "error": "Fehler beim Ablehnen des Vorschlags: {error}", - "success": "Vorschlag abgelehnt" - }, "force-hint": { "error": "Failed to save hint: {error}", "success": "Hint added!" @@ -341,41 +313,13 @@ "error": "Rekategorisierung des Bildes gescheitert: {error}", "success": "Bild wurde einer neuen Kategorie zugeordnet." }, - "remove": { - "error": "Fehler beim Entfernen der Schwärzung: {error}", - "success": "Schwärzung entfernt!" - }, "remove-hint": { "error": "Failed to remove hint: {error}", "success": "Hint removed!" }, - "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": "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" + "remove": { + "error": "Fehler beim Entfernen der Schwärzung: {error}", + "success": "Schwärzung entfernt!" }, "undo": { "error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}", @@ -389,15 +333,15 @@ "remove-highlights": { "label": "Remove Selected Earmarks" }, - "resize": { - "label": "Größe ändern" - }, "resize-accept": { "label": "Größe speichern" }, "resize-cancel": { "label": "Größenänderung abbrechen" }, + "resize": { + "label": "Größe ändern" + }, "see-references": { "label": "See References" }, @@ -419,7 +363,6 @@ "rule": "Schwärzung basierend auf Regel {rule}" }, "annotation-type": { - "declined-suggestion": "Abgelehnter Vorschlag", "hint": "Hinweis", "ignored-hint": "Ignorierter Hinweis", "manual-hint": "Manual Hint", @@ -427,18 +370,12 @@ "recommendation": "Empfehlung", "redaction": "Schwärzung", "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-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" }, + "annotation": { + "pending": "(Pending Analysis)" + }, "archived-dossiers-listing": { "no-data": { "title": "No archived dossiers." @@ -638,18 +575,14 @@ "warning": "Achtung: Diese Aktion kann nicht rückgängig gemacht werden!" }, "confirmation-dialog": { - "approve-file": { - "question": "Dieses Dokument enthält ungesehene Änderungen. Möchten Sie es trotzdem genehmigen?", - "title": "Warnung!" - }, "approve-file-without-analysis": { "confirmationText": "Approve without analysis", "denyText": "Cancel", "question": "Analysis required to detect new redactions.", "title": "Warning!" }, - "approve-multiple-files": { - "question": "Mindestens eine der ausgewählten Dateien enthält ungesehene Änderungen. Möchten Sie sie trotzdem genehmigen?", + "approve-file": { + "question": "Dieses Dokument enthält ungesehene Änderungen. Möchten Sie es trotzdem genehmigen?", "title": "Warnung!" }, "approve-multiple-files-without-analysis": { @@ -658,6 +591,10 @@ "question": "Analysis required to detect new redactions for at least one file.", "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": { "question": { "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)", "unassigned": "Niemandem zugewiesen" }, - "reanalyse": { - "action": "Datei analysieren" - }, "reanalyse-dossier": { "error": "Die Dateien konnten nicht für eine Reanalyse eingeplant werden. Bitte versuchen Sie es erneut.", "success": "Dateien für Reanalyse vorgesehen." }, + "reanalyse": { + "action": "Datei analysieren" + }, "start-auto-analysis": "Enable auto-analysis", "stop-auto-analysis": "Stop auto-analysis", "table-col-names": { @@ -1078,14 +1015,6 @@ "total-documents": "Anzahl der Dokumente", "total-people": "{count} {count, plural, one{User} other {Users}}" }, - "dossier-templates": { - "label": "Dossier-Vorlagen", - "status": { - "active": "Active", - "inactive": "Inactive", - "incomplete": "Incomplete" - } - }, "dossier-templates-listing": { "action": { "clone": "Clone Template", @@ -1121,6 +1050,14 @@ "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": { "heading": "Watermarks on documents", "no-watermark": "There is no watermark defined for the dossier template.
Contact your app admin to define one.", @@ -1304,15 +1241,6 @@ "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": { "error": { "generic": "Something went wrong... Entity rules update failed!" @@ -1326,19 +1254,28 @@ "title": "Entity Rule Editor", "warning-text": "Warning: experimental feature!" }, + "entity": { + "info": { + "actions": { + "revert": "Revert", + "save": "Save Changes" + }, + "heading": "Edit Entity" + } + }, "error": { "deleted-entity": { "dossier": { "action": "Zurück zur Übersicht", "label": "Dieses Dossier wurde gelöscht!" }, - "file": { - "action": "Zurück zum Dossier", - "label": "Diese Datei wurde gelöscht!" - }, "file-dossier": { "action": "Zurück zur Übersicht", "label": "Das Dossier dieser Datei wurde gelöscht!" + }, + "file": { + "action": "Zurück zum Dossier", + "label": "Diese Datei wurde gelöscht!" } }, "file-preview": { @@ -1356,12 +1293,6 @@ }, "exact-date": "{day} {month} {year} um {hour}:{minute} Uhr", "file": "Datei", - "file-attribute": { - "update": { - "error": "Failed to update file attribute value!", - "success": "File attribute value has been updated successfully!" - } - }, "file-attribute-encoding-types": { "ascii": "ASCII", "iso": "ISO-8859-1", @@ -1372,6 +1303,12 @@ "number": "Nummer", "text": "Freier Text" }, + "file-attribute": { + "update": { + "error": "Failed to update file attribute value!", + "success": "File attribute value has been updated successfully!" + } + }, "file-attributes-configurations": { "cancel": "Cancel", "form": { @@ -1585,16 +1522,6 @@ "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-options": "Filteroptionen", "filter-types": "Filter", @@ -1604,6 +1531,15 @@ "unseen-pages": "Nur Anmerkungen auf unsichtbaren Seiten", "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": { "assigned-people": "Beauftragt", "documents-status": "Documents State", @@ -1671,13 +1607,6 @@ }, "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": { "bottom-text": "Hilfe-Modus", "button-text": "Help Mode (H)", @@ -1789,6 +1718,7 @@ "copyright-claim-text": "Copyright © 2020 - {currentYear} knecon", "copyright-claim-title": "Copyright", "custom-app-title": "Name der Anwendung", + "email-report": "E-Mail-Bericht", "email": { "body": { "analyzed": "Im aktuellen Lizenzzeitraum insgesamt analysierte Seiten: {pages}.", @@ -1796,7 +1726,6 @@ }, "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-title": "Endbenutzer-Lizenzvereinbarung", "licensing-details": { @@ -1889,13 +1818,6 @@ "user-promoted-to-approver": "{user} wurde im Dossier {dossierHref, select, null{{dossierName}} other{{dossierName}}} zum Genehmiger ernannt!", "user-removed-as-dossier-member": "{user} wurde als Mitglied von: {dossierHref, select, null{{dossierName}} other{{dossierName}}} 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": { "category": { "email-notifications": "E-Mail Benachrichtigungen", @@ -1909,6 +1831,7 @@ "dossier": "Dossierbezogene Benachrichtigungen", "other": "Andere Benachrichtigungen" }, + "options-title": "Wählen Sie aus, in welcher Kategorie Sie benachrichtigt werden möchten", "options": { "ASSIGN_APPROVER": "Wenn ich einem Dokument als Genehmiger 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_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": { "daily": "Tägliche Zusammenfassung", "instant": "Sofortig", @@ -1934,6 +1856,13 @@ }, "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": { "confirmation-dialog": { "cancel": "Cancel", @@ -2025,16 +1954,16 @@ "warnings-subtitle": "Do not show again options", "warnings-title": "Prompts and Dialogs Settings" }, - "processing": { - "basic": "Processing", - "ocr": "OCR" - }, "processing-status": { "ocr": "OCR", "pending": "Pending", "processed": "Processed", "processing": "Processing" }, + "processing": { + "basic": "Processing", + "ocr": "OCR" + }, "readonly": "Lesemodus", "readonly-archived": "Read only (archived)", "redact-text": { @@ -2264,12 +2193,6 @@ "red-user-admin": "Benutzer-Admin", "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": { "cols": { "assignee": "Bevollmächtigter", @@ -2293,6 +2216,12 @@ "no-match": "Keine Dokumente entsprechen Ihren aktuellen Filtern.", "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", "size": "Size", "smtp-auth-config": { @@ -2379,16 +2308,6 @@ } }, "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 account settings.", - "title": "Document with unapproved suggestions" - } - }, "unknown": "Unbekannt", "update-profile": { "errors": { diff --git a/apps/red-ui/src/assets/i18n/redact/en.json b/apps/red-ui/src/assets/i18n/redact/en.json index 5714e28ab..52c1ed2f8 100644 --- a/apps/red-ui/src/assets/i18n/redact/en.json +++ b/apps/red-ui/src/assets/i18n/redact/en.json @@ -56,8 +56,7 @@ }, "add-edit-clone-dossier-template": { "error": { - "conflict": "Failed to create dossier template: a dossier template with the same name already exists.", - "generic": "Failed to create dossier template." + "conflict": "Failed to create dossier template: a dossier template with the same name already exists." }, "form": { "apply-updates-default": { @@ -280,26 +279,10 @@ "error": "Failed to add entry to dictionary: {error}", "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": { "error": "Failed to remove dictionary entry: {error}", "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": { "error": "Failed to undo: {error}", "success": "Undo successful" @@ -310,10 +293,6 @@ "error": "Failed to save redaction: {error}", "success": "Redaction added!" }, - "approve": { - "error": "Failed to approve suggestion: {error}", - "success": "Suggestion approved." - }, "change-legal-basis": { "error": "Failed to edit annotation reason: {error}", "success": "Annotation reason was edited." @@ -322,10 +301,6 @@ "error": "Failed to edit type: {error}", "success": "Type was edited." }, - "decline": { - "error": "Failed to decline suggestion: {error}", - "success": "Suggestion declined." - }, "force-hint": { "error": "Failed to save hint: {error}", "success": "Hint added!" @@ -346,34 +321,6 @@ "error": "Failed to remove redaction: {error}", "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": { "error": "Failed to undo: {error}", "success": "Undo successful" @@ -416,7 +363,6 @@ "rule": "Redaction based on rule {rule}" }, "annotation-type": { - "declined-suggestion": "Declined Suggestion", "hint": "Hint", "ignored-hint": "Ignored Hint", "manual-hint": "Manual Hint", @@ -424,16 +370,7 @@ "recommendation": "Recommendation", "redaction": "Redaction", "skipped": "Skipped", - "suggestion-add": "Suggested redaction", - "suggestion-add-dictionary": "Suggested add to Dictionary", "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" }, "annotation": { @@ -1601,7 +1538,6 @@ "image": "Images", "none": "No Annotations", "redaction": "Redacted", - "suggestion": "Suggested Redaction", "updated": "Updated" }, "filters": { @@ -2372,16 +2308,6 @@ } }, "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 account settings.", - "title": "Document with unapproved suggestions" - } - }, "unknown": "Unknown", "update-profile": { "errors": { @@ -2545,12 +2471,5 @@ "select": "Select" } }, - "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." - } + "yesterday": "Yesterday" } diff --git a/apps/red-ui/src/assets/i18n/scm/de.json b/apps/red-ui/src/assets/i18n/scm/de.json index dc15fc295..dd5a5e771 100644 --- a/apps/red-ui/src/assets/i18n/scm/de.json +++ b/apps/red-ui/src/assets/i18n/scm/de.json @@ -56,8 +56,7 @@ }, "add-edit-clone-dossier-template": { "error": { - "conflict": "Dossiervorlage konnte nicht erstellt werden: Es existiert bereits eine Dossiervorlage mit demselben Namen.", - "generic": "Fehler beim Erstellen der Dossiervorlage." + "conflict": "Dossiervorlage konnte nicht erstellt werden: Es existiert bereits eine Dossiervorlage mit demselben Namen." }, "form": { "apply-updates-default": { @@ -280,26 +279,10 @@ "error": "Fehler beim Hinzufügen des neuen Wörterbucheintrags: {error}", "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": { "error": "Fehler beim Entfernen des Wörterbucheintrags: {error}", "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": { "error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}", "success": "Rückgängigmachen erfolgreich" @@ -310,10 +293,6 @@ "error": "Fehler beim Speichern der Schwärzung: {error}", "success": "Schwärzung hinzugefügt!" }, - "approve": { - "error": "Fehler beim Genehmigen des Vorschlags: {error}", - "success": "Vorschlag genehmigt" - }, "change-legal-basis": { "error": "Fehler beim Bearbeiten der in der Anmerkung genannten Begründung: {error}", "success": "In der Anmerkung genannte Begründung wurde bearbeitet." @@ -322,10 +301,6 @@ "error": "", "success": "" }, - "decline": { - "error": "Fehler beim Ablehnen des Vorschlags: {error}", - "success": "Vorschlag abgelehnt" - }, "force-hint": { "error": "", "success": "" @@ -346,34 +321,6 @@ "error": "Fehler beim Entfernen der Schwärzung: {error}", "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": { "error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}", "success": "erfolgreich Rückgängig gemacht" @@ -416,7 +363,6 @@ "rule": "Schwärzung basierend auf Regel {rule}" }, "annotation-type": { - "declined-suggestion": "Abgelehnter Vorschlag", "hint": "Hinweis", "ignored-hint": "Ignorierter Hinweis", "manual-hint": "", @@ -424,16 +370,7 @@ "recommendation": "Empfehlung", "redaction": "Schwärzung", "skipped": "Übersprungen", - "suggestion-add": "Vorschlag für Schwärzung", - "suggestion-add-dictionary": "Vorschlag für neuen Wörterbucheintrag", "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": "" }, "annotation": { @@ -1601,7 +1538,6 @@ "image": "Bilder", "none": "Keine Anmerkungen", "redaction": "Geschwärzt", - "suggestion": "Vorgeschlagene Schwärzung", "updated": "Aktualisiert" }, "filters": { @@ -2372,16 +2308,6 @@ } }, "type": "Typ", - "unapproved-suggestions": { - "confirmation-dialog": { - "checkbox-text": "", - "confirmation-text": "", - "deny-text": "", - "not-displayed-question": "", - "success-confirmation-text": "", - "title": "" - } - }, "unknown": "Unbekannt", "update-profile": { "errors": { @@ -2545,12 +2471,5 @@ "select": "Wählen" } }, - "yesterday": "Gestern", - "generic-errors": { - "400": "", - "403": "", - "404": "", - "409": "", - "500": "" - } + "yesterday": "Gestern" } diff --git a/apps/red-ui/src/assets/i18n/scm/en.json b/apps/red-ui/src/assets/i18n/scm/en.json index 97a19f6b2..5bedda4dc 100644 --- a/apps/red-ui/src/assets/i18n/scm/en.json +++ b/apps/red-ui/src/assets/i18n/scm/en.json @@ -56,8 +56,7 @@ }, "add-edit-clone-dossier-template": { "error": { - "conflict": "Failed to create dossier template: a dossier template with the same name already exists.", - "generic": "Failed to create dossier template." + "conflict": "Failed to create dossier template: a dossier template with the same name already exists." }, "form": { "apply-updates-default": { @@ -280,26 +279,10 @@ "error": "Failed to add entry to dictionary: {error}", "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": { "error": "Failed to remove dictionary entry: {error}", "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": { "error": "Failed to undo: {error}", "success": "Undo successful" @@ -310,10 +293,6 @@ "error": "Failed to save annotation: {error}", "success": "Annotation added!" }, - "approve": { - "error": "Failed to approve suggestion: {error}", - "success": "Suggestion approved." - }, "change-legal-basis": { "error": "Failed to edit annotation reason: {error}", "success": "Annotation reason was edited." @@ -322,10 +301,6 @@ "error": "", "success": "" }, - "decline": { - "error": "Failed to decline suggestion: {error}", - "success": "Suggestion declined." - }, "force-hint": { "error": "Failed to save hint: {error}", "success": "Hint added!" @@ -346,34 +321,6 @@ "error": "Failed to remove annotation: {error}", "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": { "error": "Failed to undo: {error}", "success": "Undo successful" @@ -416,7 +363,6 @@ "rule": "Annotation based on rule {rule}" }, "annotation-type": { - "declined-suggestion": "Declined Suggestion", "hint": "Hint", "ignored-hint": "Ignored Hint", "manual-hint": "Manual Hint", @@ -424,16 +370,7 @@ "recommendation": "Recommendation", "redaction": "Annotation", "skipped": "Skipped", - "suggestion-add": "Suggested annotation", - "suggestion-add-dictionary": "Suggested add to Dictionary", "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" }, "annotation": { @@ -1508,7 +1445,7 @@ "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", "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": { "annotations": { "jump-to-next": "Jump to Next", @@ -1601,7 +1538,6 @@ "image": "Images", "none": "No Annotations", "redaction": "Annotations", - "suggestion": "Suggested Annotation", "updated": "Updated" }, "filters": { @@ -2372,16 +2308,6 @@ } }, "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 account settings.", - "title": "Document with unapproved suggestions" - } - }, "unknown": "Unknown", "update-profile": { "errors": { @@ -2545,12 +2471,5 @@ "select": "Select" } }, - "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." - } + "yesterday": "Yesterday" } diff --git a/libs/red-domain/src/lib/annotations/types.ts b/libs/red-domain/src/lib/annotations/types.ts index 068a256ed..b9c5f79b0 100644 --- a/libs/red-domain/src/lib/annotations/types.ts +++ b/libs/red-domain/src/lib/annotations/types.ts @@ -1,25 +1,16 @@ 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 = | 'add' - | 'approve' | 'remove' | 'remove-hint' | 'change-legal-basis' - | 'decline' - | 'request-remove' - | 'request-remove-hint' - | 'request-change-legal-basis' | 'recategorize-image' - | 'request-image-recategorization' - | 'suggest' | 'undo' | 'force-redaction' | 'force-hint' - | 'request-force-redaction' - | 'request-force-hint' | 'change-type'; export const AnnotationIconTypes = { @@ -36,7 +27,6 @@ export const AnnotationShapeMap: Record = { analysis: AnnotationIconTypes.square, hint: AnnotationIconTypes.circle, redaction: AnnotationIconTypes.square, - suggestion: AnnotationIconTypes.rhombus, updated: AnnotationIconTypes.square, image: AnnotationIconTypes.square, none: AnnotationIconTypes.none, diff --git a/libs/red-domain/src/lib/colors/annotation-color-config.ts b/libs/red-domain/src/lib/colors/annotation-color-config.ts index 55b0f087c..449a09075 100644 --- a/libs/red-domain/src/lib/colors/annotation-color-config.ts +++ b/libs/red-domain/src/lib/colors/annotation-color-config.ts @@ -1,22 +1,11 @@ -import { DefaultColorType } from './default-color-type'; 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 = { [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.Skipped]: 'skippedColor', [SuperTypes.Redaction]: 'redactionColor', @@ -25,7 +14,6 @@ export const annotationDefaultColorConfig: Record implements IFile { readonly added?: string; @@ -51,7 +51,6 @@ export class File extends Entity implements IFile { readonly rulesVersion?: number; readonly uploader?: string; readonly excludedPages: number[]; - readonly hasSuggestions: boolean; readonly processingStatus: ProcessingFileStatus; readonly workflowStatus: WorkflowFileStatus; readonly fileManipulationDate: string; @@ -83,7 +82,10 @@ export class File extends Entity implements IFile { readonly processingType: ProcessingType; - constructor(file: IFile, readonly reviewerName: string) { + constructor( + file: IFile, + readonly reviewerName: string, + ) { super(file); this.added = file.added; this.allManualRedactionsApplied = !!file.allManualRedactionsApplied; @@ -122,7 +124,6 @@ export class File extends Entity implements IFile { this.rulesVersion = file.rulesVersion; this.uploader = file.uploader; this.excludedPages = file.excludedPages || []; - this.hasSuggestions = !!file.hasSuggestions; this.fileManipulationDate = file.fileManipulationDate ?? ''; this.redactionModificationDate = file.redactionModificationDate ?? ''; this.lastManualChangeDate = file.lastManualChangeDate; @@ -135,7 +136,7 @@ export class File extends Entity implements IFile { this.statusSort = StatusSorter[this.workflowStatus]; this.cacheIdentifier = btoa(`${this.fileManipulationDate}${file.lastOCRTime}${file.ocrEndTime}${file.lastLayoutProcessed}`); 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.isFullProcessing = isFullProcessingStatuses.includes(this.processingStatus); this.isOcrProcessing = this.processingStatus === ProcessingFileStatuses.OCR_PROCESSING; @@ -144,7 +145,7 @@ export class File extends Entity implements IFile { this.isNew = this.workflowStatus === WorkflowFileStatuses.NEW; this.isUnderReview = this.workflowStatus === WorkflowFileStatuses.UNDER_REVIEW; 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.canBeOCRed = !this.excluded && diff --git a/libs/red-domain/src/lib/files/file.ts b/libs/red-domain/src/lib/files/file.ts index 083bc5c8a..1a06145ea 100644 --- a/libs/red-domain/src/lib/files/file.ts +++ b/libs/red-domain/src/lib/files/file.ts @@ -1,8 +1,8 @@ /** * Object containing information on a specific file. */ -import { ProcessingFileStatus, WorkflowFileStatus } from './types'; import { FileAttributes } from '../file-attributes'; +import { ProcessingFileStatus, WorkflowFileStatus } from './types'; export interface IFile { /** @@ -56,7 +56,6 @@ export interface IFile { * Shows if any requests were found during the analysis. */ readonly hasRequests?: boolean; - readonly hasSuggestions?: boolean; /** * Shows if there is any change between the previous and current analysis. */ diff --git a/libs/red-domain/src/lib/files/super-types.ts b/libs/red-domain/src/lib/files/super-types.ts index f8794e157..29a38db2d 100644 --- a/libs/red-domain/src/lib/files/super-types.ts +++ b/libs/red-domain/src/lib/files/super-types.ts @@ -2,16 +2,6 @@ import { ValuesOf } from '@iqser/common-ui/lib/utils'; export const SuperTypes = { 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', Skipped: 'skipped', Redaction: 'redaction', @@ -36,27 +26,3 @@ export const FalsePositiveSuperTypes = { [SuperTypes.IgnoredHint]: true, [SuperTypes.Skipped]: true, } 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; diff --git a/libs/red-domain/src/lib/redaction-log/types.ts b/libs/red-domain/src/lib/redaction-log/types.ts index 41116c670..ff114eff4 100644 --- a/libs/red-domain/src/lib/redaction-log/types.ts +++ b/libs/red-domain/src/lib/redaction-log/types.ts @@ -25,7 +25,6 @@ export type ManualRedactionType = ValuesOf; export const LogEntryStatuses = { APPROVED: 'APPROVED', DECLINED: 'DECLINED', - REQUESTED: 'REQUESTED', } as const; export type LogEntryStatus = ValuesOf;