-
+
-
+
+
+
+ maximumSelectedTextWidth ? '95%' : 'unset',
+ 'max-width': textWidth > maximumSelectedTextWidth ? 0 : 'unset'
+ }"
+ >
+
-
+
-
-
-
+
+
+
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.scss b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.scss
index d4c112676..0b6f2896a 100644
--- a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.scss
+++ b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.scss
@@ -13,29 +13,14 @@
}
}
-.edit-button {
- top: 0;
- right: calc((0.5rem + 34px) * -1);
- position: sticky;
-}
-
-.undo-button {
- top: 0;
- right: calc((0.5rem + 34px) * -2);
+iqser-circle-button {
+ padding-left: 8px;
}
.w-full {
width: 100%;
}
-.absolute {
- position: absolute;
-}
-
-.relative {
- position: relative;
-}
-
.fixed-height-36 {
min-height: 36px;
}
@@ -43,3 +28,30 @@
textarea {
margin-top: 0;
}
+
+.table {
+ display: flex;
+ flex-direction: column;
+ min-width: calc(100% - 26px);
+ padding: 0 13px;
+
+ label {
+ opacity: 0.7;
+ font-weight: normal;
+ }
+
+ .row {
+ display: inline-flex;
+ flex-direction: row;
+ align-items: center;
+ background-color: var(--iqser-alt-background);
+ min-width: 100%;
+
+ span {
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ list-style-position: inside;
+ overflow: hidden;
+ }
+ }
+}
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.ts b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.ts
index 12a5b4259..a55a7fb2b 100644
--- a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.ts
+++ b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.ts
@@ -14,7 +14,7 @@ import { getRedactOrHintOptions, RedactOrHintOption, RedactOrHintOptions } from
import { RedactTextData, RedactTextResult } from '../../utils/dialog-types';
import { LegalBasisOption } from '../manual-redaction-dialog/manual-annotation-dialog.component';
-const MAXIMUM_SELECTED_TEXT_WIDTH = 421;
+const MAXIMUM_TEXT_AREA_WIDTH = 421;
@Component({
templateUrl: './redact-text-dialog.component.html',
@@ -39,6 +39,10 @@ export class RedactTextDialogComponent
readonly #dossier = inject(ActiveDossiersService).find(this.data.dossierId);
readonly #manualRedactionTypeExists = inject(DictionaryService).hasManualType(this.#dossier.dossierTemplateId);
#applyToAllDossiers = this.data.applyToAllDossiers ?? true;
+ readonly maximumTextAreaWidth = MAXIMUM_TEXT_AREA_WIDTH;
+ readonly maximumSelectedTextWidth = 567;
+
+ textWidth: number;
get defaultOption() {
const inDossierOption = this.options.find(option => option.value === RedactOrHintOptions.IN_DOSSIER);
@@ -60,7 +64,7 @@ export class RedactTextDialogComponent
this.options = getRedactOrHintOptions(this.#dossier, this.#applyToAllDossiers, this.data.isApprover, this.data.isPageExcluded);
this.form = this.#getForm();
this.#setupValidators(this.dictionaryRequest ? RedactOrHintOptions.IN_DOSSIER : RedactOrHintOptions.ONLY_HERE);
-
+ this.textWidth = calcTextWidthInPixels(this.form.controls.selectedText.value);
this.form.controls.option.valueChanges
.pipe(
tap((option: DetailsRadioOption
) => {
@@ -136,7 +140,7 @@ export class RedactTextDialogComponent
this.isEditingSelectedText = !this.isEditingSelectedText;
if (this.isEditingSelectedText) {
const width = calcTextWidthInPixels(this.form.controls.selectedText.value);
- this.selectedTextRows = Math.ceil(width / MAXIMUM_SELECTED_TEXT_WIDTH);
+ this.selectedTextRows = Math.ceil(width / MAXIMUM_TEXT_AREA_WIDTH);
}
}
@@ -213,4 +217,6 @@ export class RedactTextDialogComponent
}
this.form.controls.dictionary.setValue(this.#manualRedactionTypeExists ? SuperTypes.ManualRedaction : null);
}
+
+ protected readonly window = window;
}
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.html
index 63287b276..1acb8a0e6 100644
--- a/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.html
+++ b/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.html
@@ -10,6 +10,7 @@
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 ed69238b7..42094db60 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
@@ -73,6 +73,10 @@ export class RemoveRedactionDialogComponent extends IqserDialogComponent<
return DialogHelpModeKeys.REDACTION_REMOVE;
}
+ get hasFalsePositiveOption() {
+ return !!this.options.find(option => option.value === RemoveRedactionOptions.FALSE_POSITIVE);
+ }
+
get defaultOption() {
const removeHereOption = this.options.find(option => option.value === RemoveRedactionOptions.ONLY_HERE);
if (!!removeHereOption && !removeHereOption.disabled) return removeHereOption;
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 a86a57ef7..dd90f6be4 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
@@ -56,7 +56,7 @@ export class ManualRedactionService extends GenericService
{
value: annotation.value,
reason: annotation.legalBasis ?? 'Dictionary Request',
positions: annotation.positions,
- type: redaction.type,
+ type: redaction.type ?? annotation.type,
comment: redaction.comment,
}));
return this.addAnnotation(recommendations, dossierId, fileId);
diff --git a/apps/red-ui/src/app/services/entity-services/dictionary.service.ts b/apps/red-ui/src/app/services/entity-services/dictionary.service.ts
index 1aac767c8..f664bc8a9 100644
--- a/apps/red-ui/src/app/services/entity-services/dictionary.service.ts
+++ b/apps/red-ui/src/app/services/entity-services/dictionary.service.ts
@@ -162,15 +162,24 @@ export class DictionaryService extends EntitiesService
.sort((a, b) => a.label.localeCompare(b.label));
}
- getEditableRedactionTypes(dossierTemplateId: string, isImage: boolean, isHint: boolean, isOCR: boolean): Dictionary[] {
- return this._dictionariesMapService
- .get(dossierTemplateId)
+ getEditableRedactionTypes(
+ dossierId: string,
+ isImage: boolean,
+ isHint: boolean,
+ isOCR: boolean,
+ currentlySelectedType: string,
+ ): Dictionary[] {
+ return this.#extractDossierLevelTypes(dossierId)
.filter(
d =>
d.model['typeId'] &&
(isImage
? (isOCR ? [...IMAGE_CATEGORIES, 'ocr'] : IMAGE_CATEGORIES).includes(d.type)
- : (isHint ? d.hint : !d.hint) && !d.virtual && !d.systemManaged && ![...IMAGE_CATEGORIES, 'ocr'].includes(d.type)),
+ : (isHint ? d.hint : !d.hint) &&
+ (d.addToDictionaryAction || currentlySelectedType === d.type) &&
+ !d.virtual &&
+ !d.systemManaged &&
+ ![...IMAGE_CATEGORIES, 'ocr'].includes(d.type)),
)
.sort((a, b) => a.label.localeCompare(b.label));
}
diff --git a/apps/red-ui/src/app/services/entity-services/trash.service.ts b/apps/red-ui/src/app/services/entity-services/trash.service.ts
index 2b8365f93..04444e600 100644
--- a/apps/red-ui/src/app/services/entity-services/trash.service.ts
+++ b/apps/red-ui/src/app/services/entity-services/trash.service.ts
@@ -115,10 +115,7 @@ export class TrashService extends EntitiesService {
}
private _hardDeleteFiles(dossierId: string, fileIds: List) {
- const queryParams = fileIds.map(id => ({ key: 'fileIds', value: id }));
- return super
- .delete({}, `delete/hard-delete/${dossierId}`, queryParams)
- .pipe(switchMap(() => this._dossierStatsService.getFor([dossierId])));
+ return super._post(fileIds, `delete/hard-delete/${dossierId}`).pipe(switchMap(() => this._dossierStatsService.getFor([dossierId])));
}
private _restoreFiles(dossierId: string, fileIds: List) {
diff --git a/apps/red-ui/src/app/services/files/file-management.service.ts b/apps/red-ui/src/app/services/files/file-management.service.ts
index 22f4a7a15..3d018fad7 100644
--- a/apps/red-ui/src/app/services/files/file-management.service.ts
+++ b/apps/red-ui/src/app/services/files/file-management.service.ts
@@ -16,7 +16,7 @@ export class FileManagementService extends GenericService {
delete(files: List, dossierId: string) {
const fileIds = files.map(f => f.id);
- return super._post(fileIds, `delete/hard-delete/${dossierId}`).pipe(switchMap(() => this.#filesService.loadAll(dossierId)));
+ return super._post(fileIds, `delete/${dossierId}`).pipe(switchMap(() => this.#filesService.loadAll(dossierId)));
}
rotatePage(body: IPageRotationRequest, dossierId: string, fileId: string) {
diff --git a/apps/red-ui/src/assets/i18n/redact/de.json b/apps/red-ui/src/assets/i18n/redact/de.json
index 1fb343cab..09d830a41 100644
--- a/apps/red-ui/src/assets/i18n/redact/de.json
+++ b/apps/red-ui/src/assets/i18n/redact/de.json
@@ -367,7 +367,6 @@
"annotation": {
"pending": "(Pending analysis)"
},
- "annotations": "",
"archived-dossiers-listing": {
"no-data": {
"title": "No archived dossiers."
@@ -1998,7 +1997,8 @@
"reason-placeholder": "Select a reason...",
"revert-text": "Revert to selected text",
"type": "Type",
- "type-placeholder": "Select type..."
+ "type-placeholder": "Select type...",
+ "unchanged": ""
},
"title": "Redact text"
}
diff --git a/apps/red-ui/src/assets/i18n/redact/en.json b/apps/red-ui/src/assets/i18n/redact/en.json
index 843c23c5e..35fcded6d 100644
--- a/apps/red-ui/src/assets/i18n/redact/en.json
+++ b/apps/red-ui/src/assets/i18n/redact/en.json
@@ -1998,7 +1998,8 @@
"reason-placeholder": "Select a reason...",
"revert-text": "Revert to selected text",
"type": "Type",
- "type-placeholder": "Select type..."
+ "type-placeholder": "Select type...",
+ "unchanged": "Unchanged"
},
"title": "Redact text"
}
diff --git a/apps/red-ui/src/assets/i18n/scm/de.json b/apps/red-ui/src/assets/i18n/scm/de.json
index a878cb162..f00a14406 100644
--- a/apps/red-ui/src/assets/i18n/scm/de.json
+++ b/apps/red-ui/src/assets/i18n/scm/de.json
@@ -367,7 +367,6 @@
"annotation": {
"pending": "(Pending analysis)"
},
- "annotations": "",
"archived-dossiers-listing": {
"no-data": {
"title": "No archived dossiers."
@@ -1998,7 +1997,8 @@
"reason-placeholder": "Select a reasons...",
"revert-text": "",
"type": "Type",
- "type-placeholder": "Select type..."
+ "type-placeholder": "Select type...",
+ "unchanged": ""
},
"title": "Redact text"
}
diff --git a/apps/red-ui/src/assets/i18n/scm/en.json b/apps/red-ui/src/assets/i18n/scm/en.json
index 7eeb2efc4..1b110b692 100644
--- a/apps/red-ui/src/assets/i18n/scm/en.json
+++ b/apps/red-ui/src/assets/i18n/scm/en.json
@@ -1998,7 +1998,8 @@
"reason-placeholder": "Select a reasons...",
"revert-text": "",
"type": "Type",
- "type-placeholder": "Select type..."
+ "type-placeholder": "Select type...",
+ "unchanged": ""
},
"title": "Redact text"
}