diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/edit-redaction-dialog/edit-redaction-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/edit-redaction-dialog/edit-redaction-dialog.component.html index 00afb75cc..a1f9c2ce9 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/edit-redaction-dialog/edit-redaction-dialog.component.html +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/edit-redaction-dialog/edit-redaction-dialog.component.html @@ -6,8 +6,8 @@ class="dialog-header heading-l" > -
-
+
+
-
+ + +
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/edit-redaction-dialog/edit-redaction-dialog.component.ts b/apps/red-ui/src/app/modules/file-preview/dialogs/edit-redaction-dialog/edit-redaction-dialog.component.ts index 44aa3110c..2191aff10 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/edit-redaction-dialog/edit-redaction-dialog.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/edit-redaction-dialog/edit-redaction-dialog.component.ts @@ -5,7 +5,6 @@ import { MatDialogClose } from '@angular/material/dialog'; import { MatFormField } from '@angular/material/form-field'; import { MatOption, MatSelect, MatSelectTrigger } from '@angular/material/select'; import { MatTooltip } from '@angular/material/tooltip'; -import { DetailsRadioOption } from '@common-ui/inputs/details-radio/details-radio-option'; import { CircleButtonComponent, HasScrollbarDirective, @@ -26,10 +25,11 @@ import { SelectedAnnotationsTableComponent, ValueColumn, } from '../../components/selected-annotations-table/selected-annotations-table.component'; -import { DialogHelpModeKeys } from '../../utils/constants'; import { getEditRedactionOptions } from '../../utils/dialog-options'; -import { EditRedactionData, EditRedactResult, RedactOrHintOption } from '../../utils/dialog-types'; +import { EditRedactionData, EditRedactionOption, EditRedactResult } from '../../utils/dialog-types'; import { LegalBasisOption } from '../manual-redaction-dialog/manual-annotation-dialog.component'; +import { DetailsRadioComponent } from '@common-ui/inputs/details-radio/details-radio.component'; +import { DetailsRadioOption } from '@common-ui/inputs/details-radio/details-radio-option'; interface TypeSelectOptions { type: string; @@ -58,18 +58,16 @@ interface TypeSelectOptions { HelpButtonComponent, MatDialogClose, HasScrollbarDirective, + DetailsRadioComponent, ], }) export class EditRedactionDialogComponent extends IqserDialogComponent implements OnInit { - readonly #dossier = inject(ActiveDossiersService).find(this.data.dossierId); - readonly #applyToAllDossiers = this.data.applyToAllDossiers; - protected readonly roles = Roles; + readonly ignoredKeys = ['option', 'comment']; readonly annotations = this.data.annotations; readonly iconButtonTypes = IconButtonTypes; - readonly isModifyDictionary = this.annotations.every(annotation => annotation.isModifyDictionary); readonly isImage = this.annotations.reduce((acc, next) => acc && next.isImage, true); readonly redactedTexts = !this.isImage ? this.annotations.map(annotation => annotation.value).filter(value => !!value) : null; readonly isManualRedaction = this.annotations.some(annotation => annotation.type === SuperTypes.ManualRedaction); @@ -82,13 +80,15 @@ export class EditRedactionDialogComponent { label: redaction.value, bold: true }, { label: redaction.typeLabel }, ]); - options: DetailsRadioOption[] | undefined; + options = getEditRedactionOptions(); legalOptions: LegalBasisOption[] = []; dictionaries: Dictionary[] = []; typeSelectOptions: TypeSelectOptions[] = []; readonly form = this.#getForm(); hasTypeChanged = false; initialReasonDisabled = this.someSkipped; + protected readonly roles = Roles; + readonly #dossier = inject(ActiveDossiersService).find(this.data.dossierId); constructor( private readonly _justificationsService: JustificationsService, @@ -144,16 +144,6 @@ export class EditRedactionDialogComponent return this.annotations.length > 1; } - get helpButtonKey() { - if (this.isHint) { - return DialogHelpModeKeys.HINT_EDIT; - } - if (this.someSkipped) { - return DialogHelpModeKeys.SKIPPED_EDIT; - } - return DialogHelpModeKeys.REDACTION_EDIT; - } - get sameType() { return this.annotations.every(annotation => annotation.type === this.annotations[0].type); } @@ -179,7 +169,6 @@ export class EditRedactionDialogComponent typeChanged() { const selectedDictionaryType = this.form.controls.type.value; - this.#setOptions(selectedDictionaryType); const initialReason = this.form.get('type').value === this.initialFormValue.type && !this.initialReasonDisabled; if (this.redactBasedTypes.includes(selectedDictionaryType) || initialReason) { @@ -193,7 +182,7 @@ export class EditRedactionDialogComponent } else { this.form.controls.reason.disable(); } - this.form.patchValue({ reason: null, option: null }); + this.form.patchValue({ reason: null }); } save() { @@ -206,6 +195,7 @@ export class EditRedactionDialogComponent comment: value.comment, type: value.type, value: this.allRectangles ? value.value : null, + option: value.option.value, }); } @@ -230,22 +220,6 @@ export class EditRedactionDialogComponent } } - #setOptions(type: string, reasonChanged = false) { - const selectedDictionary = this.dictionaries.find(d => d.type === type); - this.options = getEditRedactionOptions( - this.#dossier.dossierName, - this.#applyToAllDossiers, - !!selectedDictionary?.dossierDictionaryOnly, - this.isModifyDictionary, - ); - this.form.patchValue( - { - option: !this.isModifyDictionary || reasonChanged ? this.options[0] : this.options[1], - }, - { emitEvent: false }, - ); - } - #getForm() { const sameSection = this.annotations.every(annotation => annotation.section === this.annotations[0].section); return new FormGroup({ @@ -256,7 +230,7 @@ export class EditRedactionDialogComponent disabled: this.isImported, }), section: new FormControl({ value: sameSection ? this.annotations[0].section : null, disabled: this.isImported }), - option: new FormControl(null), + option: new FormControl>(this.options[0]), value: new FormControl(this.allRectangles ? this.annotations[0].value : null), }); } diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.ts b/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.ts index 972fd64ba..1d637a41b 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.ts @@ -24,7 +24,6 @@ import { SelectedAnnotationsTableComponent, ValueColumn, } from '../../components/selected-annotations-table/selected-annotations-table.component'; -import { DialogHelpModeKeys } from '../../utils/constants'; import { getRemoveRedactionOptions } from '../../utils/dialog-options'; import { RemoveRedactionData, diff --git a/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts b/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts index 9bdb9b7db..f44e02c32 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts @@ -9,6 +9,7 @@ import { DictionaryEntryTypes, EarmarkOperation, type IBulkLocalRemoveRequest, + IBulkRecategorizationRequest, ILegalBasisChangeRequest, IRecategorizationRequest, IRectangle, @@ -34,6 +35,7 @@ import { EditRedactionData, EditRedactResult, ForceAnnotationOptions, + RedactOrHintOptions, RemoveRedactionData, RemoveRedactionOptions, RemoveRedactionPermissions, @@ -108,13 +110,11 @@ export class AnnotationActionsService { } async editRedaction(annotations: AnnotationWrapper[]) { - const { dossierId, dossierTemplateId, fileId, file } = this._state; + const { dossierId, fileId } = this._state; const includeUnprocessed = annotations.every(annotation => this.#includeUnprocessed(annotation, true)); - const dossierTemplate = this._dossierTemplatesService.find(dossierTemplateId); const data = { annotations, dossierId, - applyToAllDossiers: dossierTemplate.applyDictionaryUpdatesToAllDossiersByDefault, }; const result = await this.#getEditRedactionDialog(data).result(); @@ -122,22 +122,38 @@ export class AnnotationActionsService { return; } - const recategorizeBody: List = annotations.map(annotation => { - const body: IRecategorizationRequest = { - annotationId: annotation.id, - type: result.type ?? annotation.type, - comment: result.comment, - }; - if (!this.#isDocumine) { - return { - ...body, - legalBasis: result.legalBasis, - section: result.section ?? annotation.section, - value: result.value ?? annotation.value, + let recategorizeBody: List | IBulkRecategorizationRequest; + + if (result.option === RedactOrHintOptions.ONLY_HERE) { + recategorizeBody = annotations.map(annotation => { + const body: IRecategorizationRequest = { + annotationId: annotation.id, + type: result.type ?? annotation.type, + comment: result.comment, }; - } - return body; - }); + if (!this.#isDocumine) { + return { + ...body, + legalBasis: result.legalBasis, + section: result.section ?? annotation.section, + value: result.value ?? annotation.value, + }; + } + return body; + }); + } else { + const originTypes = annotations.map(a => a.type); + const originLegalBases = annotations.map(a => a.legalBasis); + recategorizeBody = { + value: annotations[0].value, + type: result.type, + legalBasis: result.legalBasis, + section: result.section, + originTypes, + originLegalBases, + rectangle: false, + }; + } await this.#processObsAndEmit( this._manualRedactionService @@ -147,6 +163,7 @@ export class AnnotationActionsService { fileId, this.#getChangedFields(annotations, result), includeUnprocessed, + result.option === RedactOrHintOptions.IN_DOCUMENT, ) .pipe(log()), ); 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 36504f8db..0ed5aa351 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 @@ -9,6 +9,7 @@ import type { DictionaryActions, IAddRedactionRequest, IBulkLocalRemoveRequest, + IBulkRecategorizationRequest, ILegalBasisChangeRequest, IManualAddResponse, IRecategorizationRequest, @@ -71,15 +72,16 @@ export class ManualRedactionService extends GenericService { } recategorizeRedactions( - body: List, + body: List | IBulkRecategorizationRequest, dossierId: string, fileId: string, successMessageParameters?: { [key: string]: string; }, includeUnprocessed = false, + bulkLocal = false, ) { - return this.recategorize(body, dossierId, fileId, includeUnprocessed).pipe( + return this.#recategorize(body, dossierId, fileId, includeUnprocessed, bulkLocal).pipe( this.#showToast('recategorize-annotation', false, successMessageParameters), ); } @@ -118,7 +120,7 @@ export class ManualRedactionService extends GenericService { includeUnprocessed = false, bulkLocal = false, ) { - return this.remove(body, dossierId, fileId, includeUnprocessed, bulkLocal).pipe( + return this.#remove(body, dossierId, fileId, includeUnprocessed, bulkLocal).pipe( this.#showToast(!isHint ? 'remove' : 'remove-hint', removeFromDictionary), ); } @@ -141,30 +143,11 @@ export class ManualRedactionService extends GenericService { return this._post(bulkLocal ? body[0] : body, `${bulkPath}/add/${dossierId}/${fileId}`).pipe(this.#log('Add', body)); } - recategorize(body: List, dossierId: string, fileId: string, includeUnprocessed = false) { - return this._post(body, `${this.#bulkRedaction}/recategorize/${dossierId}/${fileId}?includeUnprocessed=${includeUnprocessed}`).pipe( - this.#log('Recategorize', body), - ); - } - 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)); } - remove( - body: List | IBulkLocalRemoveRequest, - dossierId: string, - fileId: string, - includeUnprocessed = false, - bulkLocal = false, - ) { - const bulkPath = bulkLocal ? this.#bulkLocal : this.#bulkRedaction; - return this._post(body, `${bulkPath}/remove/${dossierId}/${fileId}?includeUnprocessed=${includeUnprocessed}`).pipe( - this.#log('Remove', body), - ); - } - forceRedaction(body: List, dossierId: string, fileId: string) { return this._post(body, `${this.#bulkRedaction}/force/${dossierId}/${fileId}`).pipe(this.#log('Force redaction', body)); } @@ -175,6 +158,32 @@ export class ManualRedactionService extends GenericService { ); } + #recategorize( + body: List | IBulkRecategorizationRequest, + dossierId: string, + fileId: string, + includeUnprocessed = false, + bulkLocal = false, + ) { + const bulkPath = bulkLocal ? this.#bulkLocal : this.#bulkRedaction; + return this._post(body, `${bulkPath}/recategorize/${dossierId}/${fileId}?includeUnprocessed=${includeUnprocessed}`).pipe( + this.#log('Recategorize', body), + ); + } + + #remove( + body: List | IBulkLocalRemoveRequest, + dossierId: string, + fileId: string, + includeUnprocessed = false, + bulkLocal = false, + ) { + const bulkPath = bulkLocal ? this.#bulkLocal : this.#bulkRedaction; + return this._post(body, `${bulkPath}/remove/${dossierId}/${fileId}?includeUnprocessed=${includeUnprocessed}`).pipe( + this.#log('Remove', body), + ); + } + #log(action: string, body: unknown) { return tap(response => { this._logger.info(`[MANUAL-REDACTIONS] ${action} `, body, response); diff --git a/apps/red-ui/src/app/modules/file-preview/utils/constants.ts b/apps/red-ui/src/app/modules/file-preview/utils/constants.ts index 57787e87b..1b1590059 100644 --- a/apps/red-ui/src/app/modules/file-preview/utils/constants.ts +++ b/apps/red-ui/src/app/modules/file-preview/utils/constants.ts @@ -19,16 +19,6 @@ export const ActionsHelpModeKeys = { 'hint-image': 'hint', } as const; -export const DialogHelpModeKeys = { - REDACTION_EDIT: 'redaction_edit', - REDACTION_REMOVE: 'redaction_remove', - SKIPPED_EDIT: 'skipped_edit', - SKIPPED_REMOVE: 'skipped_remove', - RECOMMENDATION_REMOVE: 'recommendation_remove', - HINT_EDIT: 'hint_edit', - HINT_REMOVE: 'hint_remove', -} as const; - export const ALL_HOTKEYS: List = ['Escape', 'F', 'f', 'ArrowUp', 'ArrowDown', 'H', 'h'] as const; export const HeaderElements = { diff --git a/apps/red-ui/src/app/modules/file-preview/utils/dialog-options.ts b/apps/red-ui/src/app/modules/file-preview/utils/dialog-options.ts index 00cbf3ce6..35cf0740c 100644 --- a/apps/red-ui/src/app/modules/file-preview/utils/dialog-options.ts +++ b/apps/red-ui/src/app/modules/file-preview/utils/dialog-options.ts @@ -7,6 +7,7 @@ import { removeAnnotationTranslations } from '@translations/remove-annotation-tr import { removeRedactionTranslations } from '@translations/remove-redaction-translations'; import { resizeRedactionTranslations } from '@translations/resize-redaction-translations'; import { + EditRedactionOption, ForceAnnotationOption, RedactOrHintOption, RedactOrHintOptions, @@ -22,36 +23,21 @@ const DOCUMENT_ICON = 'iqser:document'; const FOLDER_ICON = 'red:folder'; const REMOVE_FROM_DICT_ICON = 'red:remove-from-dict'; -export const getEditRedactionOptions = ( - dossierName: string, - applyToAllDossiers: boolean, - dossierDictionaryOnly: boolean, - isModifyDictionary: boolean, -): DetailsRadioOption[] => { - const options: DetailsRadioOption[] = [ +export const getEditRedactionOptions = (): DetailsRadioOption[] => { + return [ { label: editRedactionTranslations.onlyHere.label, description: editRedactionTranslations.onlyHere.description, icon: PIN_ICON, - value: ResizeOptions.ONLY_HERE, + value: RedactOrHintOptions.ONLY_HERE, + }, + { + label: editRedactionTranslations.inDocument.label, + description: editRedactionTranslations.inDocument.description, + icon: DOCUMENT_ICON, + value: RedactOrHintOptions.IN_DOCUMENT, }, ]; - if (isModifyDictionary) { - options.push({ - label: editRedactionTranslations.inDossier.label, - description: editRedactionTranslations.inDossier.description, - descriptionParams: { dossierName: dossierName }, - icon: FOLDER_ICON, - value: ResizeOptions.IN_DOSSIER, - extraOption: { - label: editRedactionTranslations.inDossier.extraOptionLabel, - checked: applyToAllDossiers, - hidden: dossierDictionaryOnly, - disabled: true, - }, - }); - } - return options; }; export const getRedactOrHintOptions = ( @@ -71,7 +57,7 @@ export const getRedactOrHintOptions = ( label: translations.onlyHere.label, description: translations.onlyHere.description, icon: PIN_ICON, - value: ResizeOptions.ONLY_HERE, + value: RedactOrHintOptions.ONLY_HERE, }); } @@ -84,7 +70,7 @@ export const getRedactOrHintOptions = ( label: redactTextTranslations.inDocument.label, description: redactTextTranslations.inDocument.description, icon: DOCUMENT_ICON, - value: ResizeOptions.IN_DOCUMENT, + value: RedactOrHintOptions.IN_DOCUMENT, }); } @@ -93,7 +79,7 @@ export const getRedactOrHintOptions = ( description: translations.inDossier.description, descriptionParams: { dossierName: dossier.dossierName }, icon: FOLDER_ICON, - value: ResizeOptions.IN_DOSSIER, + value: RedactOrHintOptions.IN_DOSSIER, disabled: isPageExcluded, extraOption: { label: translations.inDossier.extraOptionLabel, @@ -119,7 +105,7 @@ export const getResizeRedactionOptions = ( label: translations.onlyHere.label, description: translations.onlyHere.description, icon: PIN_ICON, - value: RedactOrHintOptions.ONLY_HERE, + value: ResizeOptions.ONLY_HERE, }, ]; @@ -135,7 +121,7 @@ export const getResizeRedactionOptions = ( disabled: !dictBasedType || redaction.hasBeenRecategorized, tooltip: !dictBasedType ? translations.inDossier.tooltip : null, icon: FOLDER_ICON, - value: RedactOrHintOptions.IN_DOSSIER, + value: ResizeOptions.IN_DOSSIER, extraOption: { label: translations.inDossier.extraOptionLabel, checked: applyToAllDossiers, diff --git a/apps/red-ui/src/app/modules/file-preview/utils/dialog-types.ts b/apps/red-ui/src/app/modules/file-preview/utils/dialog-types.ts index d7efb27eb..7595f3f69 100644 --- a/apps/red-ui/src/app/modules/file-preview/utils/dialog-types.ts +++ b/apps/red-ui/src/app/modules/file-preview/utils/dialog-types.ts @@ -3,6 +3,13 @@ import { AnnotationWrapper } from '@models/file/annotation.wrapper'; import { ManualRedactionEntryWrapper } from '@models/file/manual-redaction-entry.wrapper'; import { Dictionary, Dossier, File, IAddRedactionRequest, IManualRedactionEntry } from '@red/domain'; +export const EditRedactionOptions = { + ONLY_HERE: 'ONLY_HERE', + IN_DOCUMENT: 'IN_DOCUMENT', +} as const; + +export type EditRedactionOption = keyof typeof EditRedactionOptions; + export const RedactOrHintOptions = { ONLY_HERE: 'ONLY_HERE', IN_DOCUMENT: 'IN_DOCUMENT', @@ -45,7 +52,6 @@ export interface RedactTextData { export interface EditRedactionData { annotations: AnnotationWrapper[]; dossierId: string; - applyToAllDossiers: boolean; isApprover?: boolean; } @@ -58,7 +64,9 @@ export interface RedactTextResult { bulkLocal?: boolean; } -export type RedactRecommendationData = EditRedactionData; +export type RedactRecommendationData = EditRedactionData & { + applyToAllDossiers: boolean; +}; export interface RedactRecommendationResult { redaction: IAddRedactionRequest; @@ -72,6 +80,7 @@ export interface EditRedactResult { comment: string; type: string; value: string; + option: EditRedactionOption; } export type AddHintResult = RedactTextResult; diff --git a/apps/red-ui/src/app/translations/redact-text-translations.ts b/apps/red-ui/src/app/translations/redact-text-translations.ts index a5166ca86..0cf5b8f26 100644 --- a/apps/red-ui/src/app/translations/redact-text-translations.ts +++ b/apps/red-ui/src/app/translations/redact-text-translations.ts @@ -25,20 +25,13 @@ export const redactTextTranslations: Record<'onlyHere' | 'inDocument' | 'inDossi }, } as const; -export const editRedactionTranslations: Record<'onlyHere' | 'inDossier', DialogOption> = { +export const editRedactionTranslations: Record<'onlyHere' | 'inDocument', DialogOption> = { onlyHere: { label: _('edit-redaction.dialog.content.options.only-here.label'), description: _('edit-redaction.dialog.content.options.only-here.description'), }, - inDossier: { - label: _('edit-redaction.dialog.content.options.in-dossier.label'), - description: _('edit-redaction.dialog.content.options.in-dossier.description'), - extraOptionLabel: _('edit-redaction.dialog.content.options.in-dossier.extraOptionLabel'), + inDocument: { + label: _('edit-redaction.dialog.content.options.in-document.label'), + description: _('edit-redaction.dialog.content.options.in-document.description'), }, } as const; - -export const editRedactionLabelsTranslations = { - redactedText: _('edit-redaction.dialog.content.redacted-text'), - customRectangle: _('edit-redaction.dialog.content.custom-rectangle'), - imported: _('edit-redaction.dialog.content.imported'), -} as const; diff --git a/apps/red-ui/src/app/utils/main.guard.ts b/apps/red-ui/src/app/utils/main.guard.ts index 0c8874d5c..7c4db96bd 100644 --- a/apps/red-ui/src/app/utils/main.guard.ts +++ b/apps/red-ui/src/app/utils/main.guard.ts @@ -27,8 +27,6 @@ export function mainGuard(): AsyncGuard { const logger = inject(NGXLogger); logger.info('[ROUTES] Main resolver started...'); - console.log('main guard'); - const router = inject(Router); inject(FeaturesService).loadConfig(); if (inject(IqserPermissionsService).has(Roles.dossiers.read)) { diff --git a/apps/red-ui/src/assets/i18n/redact/de.json b/apps/red-ui/src/assets/i18n/redact/de.json index bdbaa2f35..764732cc2 100644 --- a/apps/red-ui/src/assets/i18n/redact/de.json +++ b/apps/red-ui/src/assets/i18n/redact/de.json @@ -1284,14 +1284,11 @@ "content": { "comment": "Kommentar", "comment-placeholder": "Bemerkungen oder Notizen hinzufügen...", - "custom-rectangle": "Bereichsschwärzung", - "imported": "Importierte Schwärzung", "legal-basis": "Rechtsgrundlage", "options": { - "in-dossier": { - "description": "Schwärzung in jedem Dokument in {dossierName} bearbeiten.", - "extraOptionLabel": "In alle aktiven und zukünftigen Dossiers übernehmen", - "label": "Typ in Dossier ändern" + "in-document": { + "description": "", + "label": "" }, "only-here": { "description": "Bearbeiten Sie die Schwärzung nur an dieser Stelle im Dokument.", diff --git a/apps/red-ui/src/assets/i18n/redact/en.json b/apps/red-ui/src/assets/i18n/redact/en.json index 6c771c61b..a703911d6 100644 --- a/apps/red-ui/src/assets/i18n/redact/en.json +++ b/apps/red-ui/src/assets/i18n/redact/en.json @@ -1284,18 +1284,15 @@ "content": { "comment": "Comment", "comment-placeholder": "Add remarks or notes...", - "custom-rectangle": "Custom Rectangle", - "imported": "Imported Redaction", "legal-basis": "Legal basis", "options": { - "in-dossier": { - "description": "Edit redaction in every document in {dossierName}.", - "extraOptionLabel": "Apply to all active and future dossiers", - "label": "Change type in dossier" + "in-document": { + "description": "Edit redaction of all linked occurrences of the term in this document.", + "label": "Change in document" }, "only-here": { "description": "Edit redaction only at this position in this document.", - "label": "Change type only here" + "label": "Change only here" } }, "reason": "Reason", diff --git a/apps/red-ui/src/assets/i18n/scm/de.json b/apps/red-ui/src/assets/i18n/scm/de.json index ef13dcc84..91caf05d7 100644 --- a/apps/red-ui/src/assets/i18n/scm/de.json +++ b/apps/red-ui/src/assets/i18n/scm/de.json @@ -1284,13 +1284,10 @@ "content": { "comment": "Comment", "comment-placeholder": "Add remarks or mentions...", - "custom-rectangle": "", - "imported": "", "legal-basis": "", "options": { - "in-dossier": { + "in-document": { "description": "", - "extraOptionLabel": "", "label": "" }, "only-here": { diff --git a/apps/red-ui/src/assets/i18n/scm/en.json b/apps/red-ui/src/assets/i18n/scm/en.json index 1f9e9b480..ccb133a4a 100644 --- a/apps/red-ui/src/assets/i18n/scm/en.json +++ b/apps/red-ui/src/assets/i18n/scm/en.json @@ -1284,13 +1284,10 @@ "content": { "comment": "Comment", "comment-placeholder": "Add remarks or mentions...", - "custom-rectangle": "", - "imported": "", "legal-basis": "", "options": { - "in-dossier": { + "in-document": { "description": "", - "extraOptionLabel": "", "label": "" }, "only-here": { diff --git a/libs/red-domain/src/lib/redaction-log/recategorization.request.ts b/libs/red-domain/src/lib/redaction-log/recategorization.request.ts index 5892fd7a4..815d28acf 100644 --- a/libs/red-domain/src/lib/redaction-log/recategorization.request.ts +++ b/libs/red-domain/src/lib/redaction-log/recategorization.request.ts @@ -6,3 +6,18 @@ export interface IRecategorizationRequest { readonly section?: string; readonly value?: string; } + +export interface IBulkRecategorizationRequest { + readonly value: string; + readonly type: string; + readonly legalBasis: string; + readonly section: string; + readonly originTypes: string[]; + readonly originLegalBases: string[]; + readonly rectangle: boolean; + readonly position?: { + readonly rectangle: number[]; + readonly pageNumber: number; + }; + readonly pageNumbers?: number[]; +}