From e29c83b8e7e2fdbcd5d6697238d14a6787a0c63b Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Tue, 2 Apr 2024 15:07:54 +0300 Subject: [PATCH 01/12] RED-8755: deactivate multi select on esc and added button tooltip. --- .../file-workload.component.html | 2 + .../file-preview-screen.component.ts | 12 +- apps/red-ui/src/assets/i18n/redact/de.json | 162 +++++++++--------- apps/red-ui/src/assets/i18n/redact/en.json | 16 +- apps/red-ui/src/assets/i18n/scm/de.json | 162 +++++++++--------- apps/red-ui/src/assets/i18n/scm/en.json | 16 +- 6 files changed, 182 insertions(+), 188 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.html b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.html index 47999770b..2054494ac 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.html @@ -69,7 +69,9 @@ diff --git a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts index f52cb6fa0..ca962e762 100644 --- a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts @@ -78,6 +78,7 @@ import { ViewModeService } from './services/view-mode.service'; import { ALL_HOTKEYS } from './utils/constants'; import { RedactTextData } from './utils/dialog-types'; import { AnnotationActionsService } from './services/annotation-actions.service'; +import { MultiSelectService } from './services/multi-select.service'; @Component({ templateUrl: './file-preview-screen.component.html', @@ -146,6 +147,7 @@ export class FilePreviewScreenComponent private readonly _dialog: MatDialog, private readonly _tablesService: TablesService, private readonly _annotationActionsService: AnnotationActionsService, + private readonly _multiSelectService: MultiSelectService, ) { super(); effect(() => { @@ -312,8 +314,11 @@ export class FilePreviewScreenComponent } @Bind() - handleDeleteRectangleOnEsc($event: KeyboardEvent) { + handleEscInsideViewer($event: KeyboardEvent) { $event.preventDefault(); + if (this._multiSelectService.active()) { + this._multiSelectService.deactivate(); + } if (!!this._annotationManager.selected[0]) { const doesHaveWrapper = this._fileDataService.find(this._annotationManager.selected[0]?.Id); if (!doesHaveWrapper) { @@ -356,7 +361,7 @@ export class FilePreviewScreenComponent this.pdfProxyService.configureElements(); this.#restoreOldFilters(); document.documentElement.addEventListener('fullscreenchange', this.fullscreenListener); - this.pdf.instance.UI.hotkeys.on('esc', this.handleDeleteRectangleOnEsc); + this.pdf.instance.UI.hotkeys.on('esc', this.handleEscInsideViewer); this.#openComponentLogDialogIfDefault(); this._viewerHeaderService.resetLayers(); } @@ -420,6 +425,9 @@ export class FilePreviewScreenComponent .find(annotation => annotation.id === this._annotationManager.resizingAnnotationId); this._annotationActionsService.cancelResize(resizedAnnotation).then(); } + if (this._multiSelectService.active()) { + this._multiSelectService.deactivate(); + } this.fullScreen = false; this.closeFullScreen(); this._changeRef.markForCheck(); diff --git a/apps/red-ui/src/assets/i18n/redact/de.json b/apps/red-ui/src/assets/i18n/redact/de.json index 484810a04..8ca4b9983 100644 --- a/apps/red-ui/src/assets/i18n/redact/de.json +++ b/apps/red-ui/src/assets/i18n/redact/de.json @@ -250,9 +250,6 @@ "watermarks": "Watermarks" }, "analysis-disabled": "", - "annotation": { - "pending": "(Pending analysis)" - }, "annotation-actions": { "accept-recommendation": { "label": "Empfehlung annehmen" @@ -311,14 +308,14 @@ "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!" }, + "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}", "success": "erfolgreich Rückgängig gemacht" @@ -331,15 +328,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" }, @@ -358,7 +355,6 @@ "annotation-engines": { "dictionary": "{isHint, select, true{Hint} other{Redaction}} basierend auf Wörterbuch", "imported": "Imported", - "manual": "Manual", "ner": "Redaktion basierend auf KI", "rule": "Schwärzung basierend auf Regel {rule}" }, @@ -372,6 +368,9 @@ "skipped": "Übersprungen", "text-highlight": "Earmark" }, + "annotation": { + "pending": "(Pending analysis)" + }, "archived-dossiers-listing": { "no-data": { "title": "No archived dossiers." @@ -577,18 +576,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": { @@ -597,6 +592,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?", @@ -941,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": { @@ -1016,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", @@ -1059,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.", @@ -1244,15 +1243,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!" @@ -1267,19 +1257,28 @@ "warning-text": "Warning: experimental feature!", "warnings-found": "{warnings, plural, one{A warning} other{{warnings} warnings}} found in rules" }, + "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": { @@ -1297,12 +1296,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", @@ -1313,6 +1306,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": { @@ -1490,7 +1489,10 @@ "highlights": { "label": "Earmarks" }, - "is-excluded": "Schwärzungen für dieses Dokument deaktiviert." + "is-excluded": "Schwärzungen für dieses Dokument deaktiviert.", + "multi-select": { + "close": "" + } }, "text-highlights": "Earmarks", "text-highlights-tooltip": "Shows all text earmarks and allows removing or importing them as redactions", @@ -1528,15 +1530,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", - "updated": "Aktualisiert" - }, "filter-menu": { "filter-options": "Filteroptionen", "filter-types": "Filter", @@ -1546,6 +1539,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", @@ -1816,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", @@ -1836,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", @@ -1853,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", @@ -1861,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", @@ -1952,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": { @@ -1990,7 +1992,6 @@ "reason-placeholder": "Select a reason...", "revert-text": "Revert to selected text", "selected-text": "Selected text:", - "text": "Text:", "type": "Type", "type-placeholder": "Select type..." }, @@ -2042,9 +2043,6 @@ "content": { "comment": "Comment", "comment-placeholder": "Add remarks or mentions...", - "list-item": "{text}", - "list-item-false-positive": "{text} as {type} in the context: {context}", - "list-item-false-recommendation": "{text} as {type}", "options": { "do-not-recommend": { "description": "Do not recommend the selected term in any document of this dossier.", @@ -2071,9 +2069,7 @@ "description-bulk": "Do not redact the selected terms at this position in the current document.", "label": "Remove here" } - }, - "redacted-text": "Selected {type}", - "redacted-text-bulk": "Selected {type, select, redaction{redactions} recommendation{recommendations} other{hints}}" + } }, "title": "Remove {type, select, redaction{redaction} recommendation{recommendation} other{hint}}", "title-bulk": "Remove {type, select, redaction{redactions} recommendation{recommendations} other{hints}}" @@ -2191,12 +2187,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", @@ -2220,6 +2210,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": { @@ -2471,4 +2467,4 @@ } }, "yesterday": "Gestern" -} \ No newline at end of file +} diff --git a/apps/red-ui/src/assets/i18n/redact/en.json b/apps/red-ui/src/assets/i18n/redact/en.json index f1d56e326..9ab7835c7 100644 --- a/apps/red-ui/src/assets/i18n/redact/en.json +++ b/apps/red-ui/src/assets/i18n/redact/en.json @@ -355,7 +355,6 @@ "annotation-engines": { "dictionary": "Based on dictionary", "imported": "Imported", - "manual": "Manual", "ner": "Based on AI", "rule": "Based on rule" }, @@ -1490,7 +1489,10 @@ "highlights": { "label": "Earmarks" }, - "is-excluded": "Redaction is disabled for this document." + "is-excluded": "Redaction is disabled for this document.", + "multi-select": { + "close": "Deactivate multi select" + } }, "text-highlights": "Earmarks", "text-highlights-tooltip": "Shows all text earmarks and allows removing or importing them as redactions", @@ -1990,7 +1992,6 @@ "reason-placeholder": "Select a reason...", "revert-text": "Revert to selected text", "selected-text": "Selected text:", - "text": "Text:", "type": "Type", "type-placeholder": "Select type..." }, @@ -2042,9 +2043,6 @@ "content": { "comment": "Comment", "comment-placeholder": "Add remarks or mentions...", - "list-item": "{text}", - "list-item-false-positive": "{text} as {type} in the context: {context}", - "list-item-false-recommendation": "{text} as {type}", "options": { "do-not-recommend": { "description": "Do not recommend the selected term in any document of this dossier.", @@ -2071,9 +2069,7 @@ "description-bulk": "Do not redact the selected terms at this position in the current document.", "label": "Remove here" } - }, - "redacted-text": "Selected {type}", - "redacted-text-bulk": "Selected {type, select, redaction{redactions} recommendation{recommendations} other{hints}}" + } }, "title": "Remove {type, select, redaction{redaction} recommendation{recommendation} other{hint}}", "title-bulk": "Remove {type, select, redaction{redactions} recommendation{recommendations} other{hints}}" @@ -2471,4 +2467,4 @@ } }, "yesterday": "Yesterday" -} \ No newline at end of file +} diff --git a/apps/red-ui/src/assets/i18n/scm/de.json b/apps/red-ui/src/assets/i18n/scm/de.json index 6fabc707b..fa2ab55f5 100644 --- a/apps/red-ui/src/assets/i18n/scm/de.json +++ b/apps/red-ui/src/assets/i18n/scm/de.json @@ -250,9 +250,6 @@ "watermarks": "Watermarks" }, "analysis-disabled": "Analysis disabled", - "annotation": { - "pending": "(Pending analysis)" - }, "annotation-actions": { "accept-recommendation": { "label": "Empfehlung annehmen" @@ -311,14 +308,14 @@ "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!" }, + "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}", "success": "erfolgreich Rückgängig gemacht" @@ -331,15 +328,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" }, @@ -358,7 +355,6 @@ "annotation-engines": { "dictionary": "{isHint, select, true{Hint} other{Redaction}} basierend auf Wörterbuch", "imported": "Annotation is imported", - "manual": "Manual", "ner": "Redaktion basierend auf KI", "rule": "Schwärzung basierend auf Regel {rule}" }, @@ -372,6 +368,9 @@ "skipped": "Übersprungen", "text-highlight": "Earmark" }, + "annotation": { + "pending": "(Pending analysis)" + }, "archived-dossiers-listing": { "no-data": { "title": "No archived dossiers." @@ -577,18 +576,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 components.", "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": { @@ -597,6 +592,10 @@ "question": "Analysis required to detect new components 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?", @@ -941,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": { @@ -1016,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", @@ -1059,6 +1050,14 @@ "title": "{length} dossier {length, plural, one{template} other{templates}}" } }, + "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.", @@ -1244,15 +1243,6 @@ "title": "{length} {length, plural, one{entity} other{entities}}" } }, - "entity": { - "info": { - "actions": { - "revert": "Revert", - "save": "Save changes" - }, - "heading": "Edit entity" - } - }, "entity-rules-screen": { "error": { "generic": "Something went wrong... Entity rules update failed!" @@ -1267,19 +1257,28 @@ "warning-text": "Warning: experimental feature!", "warnings-found": "{warnings, plural, one{A warning} other{{warnings} warnings}} found in rules" }, + "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": { @@ -1297,12 +1296,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", @@ -1313,6 +1306,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": { @@ -1490,7 +1489,10 @@ "highlights": { "label": "Earmarks" }, - "is-excluded": "Schwärzungen für dieses Dokument deaktiviert." + "is-excluded": "Schwärzungen für dieses Dokument deaktiviert.", + "multi-select": { + "close": "" + } }, "text-highlights": "Earmarks", "text-highlights-tooltip": "Shows all text-earmarks and allows removing or importing them as components", @@ -1528,15 +1530,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", - "updated": "Aktualisiert" - }, "filter-menu": { "filter-options": "Filteroptionen", "filter-types": "Filter", @@ -1546,6 +1539,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", @@ -1816,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", @@ -1836,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", @@ -1853,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", @@ -1861,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", @@ -1952,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": { @@ -1990,7 +1992,6 @@ "reason-placeholder": "Select a reasons...", "revert-text": "", "selected-text": "Selected text:", - "text": "", "type": "Type", "type-placeholder": "Select type..." }, @@ -2042,9 +2043,6 @@ "content": { "comment": "Comment", "comment-placeholder": "Add remarks or mentions...", - "list-item": "", - "list-item-false-positive": "", - "list-item-false-recommendation": "", "options": { "do-not-recommend": { "description": "Do not recommend ''{value}'' as {type} in any document of the current dossier.", @@ -2071,9 +2069,7 @@ "description-bulk": "", "label": "Remove here" } - }, - "redacted-text": "", - "redacted-text-bulk": "" + } }, "title": "Remove {type}", "title-bulk": "" @@ -2191,12 +2187,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", @@ -2220,6 +2210,12 @@ "no-match": "Keine Dokumente entsprechen Ihren aktuellen Filtern.", "table-header": "{length} search {length, plural, one{result} other{results}}" }, + "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": { @@ -2471,4 +2467,4 @@ } }, "yesterday": "Gestern" -} \ No newline at end of file +} diff --git a/apps/red-ui/src/assets/i18n/scm/en.json b/apps/red-ui/src/assets/i18n/scm/en.json index e46d88176..38d281bdf 100644 --- a/apps/red-ui/src/assets/i18n/scm/en.json +++ b/apps/red-ui/src/assets/i18n/scm/en.json @@ -355,7 +355,6 @@ "annotation-engines": { "dictionary": "{isHint, select, true{Hint} other{Annotation}} based on dictionary", "imported": "Annotation is imported", - "manual": "Manual", "ner": "Annotation based on AI", "rule": "Annotation based on rule {rule}" }, @@ -1490,7 +1489,10 @@ "highlights": { "label": "Earmarks" }, - "is-excluded": "Extraction is disabled for this document." + "is-excluded": "Extraction is disabled for this document.", + "multi-select": { + "close": "" + } }, "text-highlights": "Earmarks", "text-highlights-tooltip": "Shows all text-earmarks and allows removing or importing them as components", @@ -1990,7 +1992,6 @@ "reason-placeholder": "Select a reasons...", "revert-text": "", "selected-text": "Selected text:", - "text": "", "type": "Type", "type-placeholder": "Select type..." }, @@ -2042,9 +2043,6 @@ "content": { "comment": "Comment", "comment-placeholder": "Add remarks or mentions...", - "list-item": "", - "list-item-false-positive": "", - "list-item-false-recommendation": "", "options": { "do-not-recommend": { "description": "Do not recommend ''{value}'' as {type} in any document of the current dossier.", @@ -2071,9 +2069,7 @@ "description-bulk": "", "label": "Remove here" } - }, - "redacted-text": "", - "redacted-text-bulk": "" + } }, "title": "Remove {type}", "title-bulk": "" @@ -2471,4 +2467,4 @@ } }, "yesterday": "Yesterday" -} \ No newline at end of file +} From 3871b7bd4f77cb51e3dfbf2d59d7c06b9acb223d Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Thu, 28 Mar 2024 12:00:39 +0200 Subject: [PATCH 02/12] RED-8765: fixed actions and edit fields for specific combinations. --- .../src/app/models/file/annotation-permissions.utils.ts | 3 ++- .../edit-redaction-dialog/edit-redaction-dialog.component.ts | 4 +--- 2 files changed, 3 insertions(+), 4 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 168cd371b..ec313b6de 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 @@ -56,6 +56,7 @@ export const canResizeAnnotation = ( export const canEditAnnotation = (annotation: AnnotationWrapper) => (annotation.isRedacted || annotation.isSkipped) && !annotation.isImage; -export const canEditHint = (annotation: AnnotationWrapper) => (annotation.isHint && !annotation.isRuleBased) || annotation.isIgnoredHint; +export const canEditHint = (annotation: AnnotationWrapper) => + ((annotation.isHint && !annotation.isRuleBased) || annotation.isIgnoredHint) && !annotation.isImage; export const canEditImage = (annotation: AnnotationWrapper) => annotation.isImage; 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 bfa171555..7c3b94304 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 @@ -9,7 +9,6 @@ import { firstValueFrom } from 'rxjs'; import { getEditRedactionOptions, RedactOrHintOption } from '../../utils/dialog-options'; import { EditRedactionData, EditRedactResult } from '../../utils/dialog-types'; import { LegalBasisOption } from '../manual-redaction-dialog/manual-annotation-dialog.component'; -import { editRedactionLabelsTranslations } from '@translations/redact-text-translations'; import { Roles } from '@users/roles'; import { DialogHelpModeKeys } from '../../utils/constants'; @@ -31,11 +30,10 @@ export class EditRedactionDialogComponent readonly #applyToAllDossiers = this.data.applyToAllDossiers; readonly annotations = this.data.annotations; readonly iconButtonTypes = IconButtonTypes; - readonly editRedactionLabelsTranslations = editRedactionLabelsTranslations; 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.every(annotation => annotation.type === SuperTypes.ManualRedaction); + readonly isManualRedaction = this.annotations.some(annotation => annotation.type === SuperTypes.ManualRedaction); readonly isHint = this.annotations.every(annotation => annotation.HINT || annotation.IMAGE_HINT); readonly isRedacted = this.annotations.every(annotation => annotation.isRedacted); readonly isImported: boolean = this.annotations.every(annotation => annotation.imported); From cdaa9218809eb4784da2f1f3afb6656b64c861c6 Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Tue, 2 Apr 2024 16:24:27 +0300 Subject: [PATCH 03/12] RED-8812 & RED-8841: fixes after suggestions. --- .../remove-redaction-dialog.component.html | 2 +- .../remove-redaction-dialog.component.scss | 3 +++ .../remove-redaction-dialog.component.ts | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) 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 e7468fd7a..d2bdeca2b 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 @@ -6,7 +6,7 @@ >
-
+
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.scss b/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.scss index da4f7c52d..d4f4cecd5 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.scss +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.scss @@ -40,12 +40,15 @@ table { text-overflow: ellipsis; list-style-position: inside; overflow: hidden; + + padding-right: 8px; } th:last-child, td:last-child { max-width: 0; width: 50%; + padding-right: 0; } } } 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 acc251e7d..f6d556571 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 @@ -28,7 +28,6 @@ export class RemoveRedactionDialogComponent extends IqserDialogComponent< readonly hint = this.data.redactions[0].HINT; readonly skipped = this.data.redactions.some(annotation => annotation.isSkipped); readonly redactedTexts = this.data.redactions.map(annotation => annotation.value); - readonly isImage = this.data.redactions.every(redaction => redaction.isImage); protected readonly roles = Roles; form: UntypedFormGroup = this._formBuilder.group({ From c5b28df758ef4e10368870a0e68b504020a32150 Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Tue, 2 Apr 2024 16:35:38 +0300 Subject: [PATCH 04/12] RED-8623: reverted filtering notification changes on certain pages. --- apps/red-ui/src/app/services/notifications.service.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/apps/red-ui/src/app/services/notifications.service.ts b/apps/red-ui/src/app/services/notifications.service.ts index c5658c501..ad596231b 100644 --- a/apps/red-ui/src/app/services/notifications.service.ts +++ b/apps/red-ui/src/app/services/notifications.service.ts @@ -12,8 +12,6 @@ import { DossiersCacheService } from './dossiers/dossiers-cache.service'; import dayjs from 'dayjs'; import { List, mapEach } from '@iqser/common-ui/lib/utils'; import { APP_BASE_HREF } from '@angular/common'; -import { Router } from '@angular/router'; -import { filterEventsOnPages } from '@utils/operators'; const INCLUDE_SEEN = false; @@ -35,7 +33,6 @@ export class NotificationsService extends EntitiesService (this._dossiersCacheService.empty ? this._dossiersCacheService.load() : of(null))), switchMap(() => this.#loadNotificationsIfChanged()), ); // Rebuild notifications when cached dossiers are updated - const changed$ = this._dossiersCacheService.changed$.pipe( - filterEventsOnPages(this._router), - tap(() => this.setEntities(this.all.map(e => this._new(e)))), - ); + const changed$ = this._dossiersCacheService.changed$.pipe(tap(() => this.setEntities(this.all.map(e => this._new(e))))); return merge(timer$, changed$); } From 058e58a7b70a821d79b14e9a418340383999645d Mon Sep 17 00:00:00 2001 From: project_703_bot_497bb7eb186ca592c63b3e50cd5c69e1 Date: Wed, 3 Apr 2024 01:03:51 +0000 Subject: [PATCH 05/12] push back localazy update --- apps/red-ui/src/assets/i18n/redact/de.json | 162 +++++++++++---------- apps/red-ui/src/assets/i18n/redact/en.json | 2 +- apps/red-ui/src/assets/i18n/scm/de.json | 162 +++++++++++---------- apps/red-ui/src/assets/i18n/scm/en.json | 2 +- 4 files changed, 168 insertions(+), 160 deletions(-) diff --git a/apps/red-ui/src/assets/i18n/redact/de.json b/apps/red-ui/src/assets/i18n/redact/de.json index 8ca4b9983..484810a04 100644 --- a/apps/red-ui/src/assets/i18n/redact/de.json +++ b/apps/red-ui/src/assets/i18n/redact/de.json @@ -250,6 +250,9 @@ "watermarks": "Watermarks" }, "analysis-disabled": "", + "annotation": { + "pending": "(Pending analysis)" + }, "annotation-actions": { "accept-recommendation": { "label": "Empfehlung annehmen" @@ -308,14 +311,14 @@ "error": "Rekategorisierung des Bildes gescheitert: {error}", "success": "Bild wurde einer neuen Kategorie zugeordnet." }, - "remove-hint": { - "error": "Failed to remove hint: {error}", - "success": "Hint removed!" - }, "remove": { "error": "Fehler beim Entfernen der Schwärzung: {error}", "success": "Schwärzung entfernt!" }, + "remove-hint": { + "error": "Failed to remove hint: {error}", + "success": "Hint removed!" + }, "undo": { "error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}", "success": "erfolgreich Rückgängig gemacht" @@ -328,15 +331,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" }, @@ -355,6 +358,7 @@ "annotation-engines": { "dictionary": "{isHint, select, true{Hint} other{Redaction}} basierend auf Wörterbuch", "imported": "Imported", + "manual": "Manual", "ner": "Redaktion basierend auf KI", "rule": "Schwärzung basierend auf Regel {rule}" }, @@ -368,9 +372,6 @@ "skipped": "Übersprungen", "text-highlight": "Earmark" }, - "annotation": { - "pending": "(Pending analysis)" - }, "archived-dossiers-listing": { "no-data": { "title": "No archived dossiers." @@ -576,14 +577,18 @@ "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-file": { - "question": "Dieses Dokument enthält ungesehene Änderungen. Möchten Sie es trotzdem genehmigen?", + "approve-multiple-files": { + "question": "Mindestens eine der ausgewählten Dateien enthält ungesehene Änderungen. Möchten Sie sie trotzdem genehmigen?", "title": "Warnung!" }, "approve-multiple-files-without-analysis": { @@ -592,10 +597,6 @@ "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?", @@ -940,13 +941,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": { @@ -1015,6 +1016,14 @@ "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", @@ -1050,14 +1059,6 @@ "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.", @@ -1243,6 +1244,15 @@ "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!" @@ -1257,28 +1267,19 @@ "warning-text": "Warning: experimental feature!", "warnings-found": "{warnings, plural, one{A warning} other{{warnings} warnings}} found in rules" }, - "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-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-dossier": { + "action": "Zurück zur Übersicht", + "label": "Das Dossier dieser Datei wurde gelöscht!" } }, "file-preview": { @@ -1296,6 +1297,12 @@ }, "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", @@ -1306,12 +1313,6 @@ "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": { @@ -1489,10 +1490,7 @@ "highlights": { "label": "Earmarks" }, - "is-excluded": "Schwärzungen für dieses Dokument deaktiviert.", - "multi-select": { - "close": "" - } + "is-excluded": "Schwärzungen für dieses Dokument deaktiviert." }, "text-highlights": "Earmarks", "text-highlights-tooltip": "Shows all text earmarks and allows removing or importing them as redactions", @@ -1530,15 +1528,6 @@ "csv": "File attributes were imported successfully from uploaded CSV file." } }, - "filter-menu": { - "filter-options": "Filteroptionen", - "filter-types": "Filter", - "label": "Filter", - "pages-without-annotations": "Only pages without annotations", - "redaction-changes": "Nur Anmerkungen mit Schwärzungsänderungen", - "unseen-pages": "Nur Anmerkungen auf unsichtbaren Seiten", - "with-comments": "Nur Anmerkungen mit Kommentaren" - }, "filter": { "analysis": "Analyse erforderlich", "comment": "Kommentare", @@ -1548,6 +1537,15 @@ "redaction": "Geschwärzt", "updated": "Aktualisiert" }, + "filter-menu": { + "filter-options": "Filteroptionen", + "filter-types": "Filter", + "label": "Filter", + "pages-without-annotations": "Only pages without annotations", + "redaction-changes": "Nur Anmerkungen mit Schwärzungsänderungen", + "unseen-pages": "Nur Anmerkungen auf unsichtbaren Seiten", + "with-comments": "Nur Anmerkungen mit Kommentaren" + }, "filters": { "assigned-people": "Beauftragt", "documents-status": "Documents state", @@ -1818,6 +1816,13 @@ "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", @@ -1831,7 +1836,6 @@ "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", @@ -1849,6 +1853,7 @@ "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", @@ -1856,13 +1861,6 @@ }, "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", @@ -1954,16 +1952,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": { @@ -1992,6 +1990,7 @@ "reason-placeholder": "Select a reason...", "revert-text": "Revert to selected text", "selected-text": "Selected text:", + "text": "Text:", "type": "Type", "type-placeholder": "Select type..." }, @@ -2043,6 +2042,9 @@ "content": { "comment": "Comment", "comment-placeholder": "Add remarks or mentions...", + "list-item": "{text}", + "list-item-false-positive": "{text} as {type} in the context: {context}", + "list-item-false-recommendation": "{text} as {type}", "options": { "do-not-recommend": { "description": "Do not recommend the selected term in any document of this dossier.", @@ -2069,7 +2071,9 @@ "description-bulk": "Do not redact the selected terms at this position in the current document.", "label": "Remove here" } - } + }, + "redacted-text": "Selected {type}", + "redacted-text-bulk": "Selected {type, select, redaction{redactions} recommendation{recommendations} other{hints}}" }, "title": "Remove {type, select, redaction{redaction} recommendation{recommendation} other{hint}}", "title-bulk": "Remove {type, select, redaction{redactions} recommendation{recommendations} other{hints}}" @@ -2187,6 +2191,12 @@ "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", @@ -2210,12 +2220,6 @@ "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": { @@ -2467,4 +2471,4 @@ } }, "yesterday": "Gestern" -} +} \ No newline at end of file diff --git a/apps/red-ui/src/assets/i18n/redact/en.json b/apps/red-ui/src/assets/i18n/redact/en.json index 9ab7835c7..6e97e3a5a 100644 --- a/apps/red-ui/src/assets/i18n/redact/en.json +++ b/apps/red-ui/src/assets/i18n/redact/en.json @@ -2467,4 +2467,4 @@ } }, "yesterday": "Yesterday" -} +} \ No newline at end of file diff --git a/apps/red-ui/src/assets/i18n/scm/de.json b/apps/red-ui/src/assets/i18n/scm/de.json index fa2ab55f5..6fabc707b 100644 --- a/apps/red-ui/src/assets/i18n/scm/de.json +++ b/apps/red-ui/src/assets/i18n/scm/de.json @@ -250,6 +250,9 @@ "watermarks": "Watermarks" }, "analysis-disabled": "Analysis disabled", + "annotation": { + "pending": "(Pending analysis)" + }, "annotation-actions": { "accept-recommendation": { "label": "Empfehlung annehmen" @@ -308,14 +311,14 @@ "error": "Rekategorisierung des Bildes gescheitert: {error}", "success": "Bild wurde einer neuen Kategorie zugeordnet." }, - "remove-hint": { - "error": "Failed to remove hint: {error}", - "success": "Hint removed!" - }, "remove": { "error": "Fehler beim Entfernen der Schwärzung: {error}", "success": "Schwärzung entfernt!" }, + "remove-hint": { + "error": "Failed to remove hint: {error}", + "success": "Hint removed!" + }, "undo": { "error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}", "success": "erfolgreich Rückgängig gemacht" @@ -328,15 +331,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" }, @@ -355,6 +358,7 @@ "annotation-engines": { "dictionary": "{isHint, select, true{Hint} other{Redaction}} basierend auf Wörterbuch", "imported": "Annotation is imported", + "manual": "Manual", "ner": "Redaktion basierend auf KI", "rule": "Schwärzung basierend auf Regel {rule}" }, @@ -368,9 +372,6 @@ "skipped": "Übersprungen", "text-highlight": "Earmark" }, - "annotation": { - "pending": "(Pending analysis)" - }, "archived-dossiers-listing": { "no-data": { "title": "No archived dossiers." @@ -576,14 +577,18 @@ "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 components.", "title": "Warning!" }, - "approve-file": { - "question": "Dieses Dokument enthält ungesehene Änderungen. Möchten Sie es trotzdem genehmigen?", + "approve-multiple-files": { + "question": "Mindestens eine der ausgewählten Dateien enthält ungesehene Änderungen. Möchten Sie sie trotzdem genehmigen?", "title": "Warnung!" }, "approve-multiple-files-without-analysis": { @@ -592,10 +597,6 @@ "question": "Analysis required to detect new components 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?", @@ -940,13 +941,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": { @@ -1015,6 +1016,14 @@ "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", @@ -1050,14 +1059,6 @@ "title": "{length} dossier {length, plural, one{template} other{templates}}" } }, - "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.", @@ -1243,6 +1244,15 @@ "title": "{length} {length, plural, one{entity} other{entities}}" } }, + "entity": { + "info": { + "actions": { + "revert": "Revert", + "save": "Save changes" + }, + "heading": "Edit entity" + } + }, "entity-rules-screen": { "error": { "generic": "Something went wrong... Entity rules update failed!" @@ -1257,28 +1267,19 @@ "warning-text": "Warning: experimental feature!", "warnings-found": "{warnings, plural, one{A warning} other{{warnings} warnings}} found in rules" }, - "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-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-dossier": { + "action": "Zurück zur Übersicht", + "label": "Das Dossier dieser Datei wurde gelöscht!" } }, "file-preview": { @@ -1296,6 +1297,12 @@ }, "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", @@ -1306,12 +1313,6 @@ "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": { @@ -1489,10 +1490,7 @@ "highlights": { "label": "Earmarks" }, - "is-excluded": "Schwärzungen für dieses Dokument deaktiviert.", - "multi-select": { - "close": "" - } + "is-excluded": "Schwärzungen für dieses Dokument deaktiviert." }, "text-highlights": "Earmarks", "text-highlights-tooltip": "Shows all text-earmarks and allows removing or importing them as components", @@ -1530,15 +1528,6 @@ "csv": "File attributes were imported successfully from uploaded CSV file." } }, - "filter-menu": { - "filter-options": "Filteroptionen", - "filter-types": "Filter", - "label": "Filter", - "pages-without-annotations": "Only pages without annotations", - "redaction-changes": "Nur Anmerkungen mit Schwärzungsänderungen", - "unseen-pages": "Nur Anmerkungen auf unsichtbaren Seiten", - "with-comments": "Nur Anmerkungen mit Kommentaren" - }, "filter": { "analysis": "Analyse erforderlich", "comment": "Kommentare", @@ -1548,6 +1537,15 @@ "redaction": "Geschwärzt", "updated": "Aktualisiert" }, + "filter-menu": { + "filter-options": "Filteroptionen", + "filter-types": "Filter", + "label": "Filter", + "pages-without-annotations": "Only pages without annotations", + "redaction-changes": "Nur Anmerkungen mit Schwärzungsänderungen", + "unseen-pages": "Nur Anmerkungen auf unsichtbaren Seiten", + "with-comments": "Nur Anmerkungen mit Kommentaren" + }, "filters": { "assigned-people": "Beauftragt", "documents-status": "Documents state", @@ -1818,6 +1816,13 @@ "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", @@ -1831,7 +1836,6 @@ "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", @@ -1849,6 +1853,7 @@ "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", @@ -1856,13 +1861,6 @@ }, "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", @@ -1954,16 +1952,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": { @@ -1992,6 +1990,7 @@ "reason-placeholder": "Select a reasons...", "revert-text": "", "selected-text": "Selected text:", + "text": "", "type": "Type", "type-placeholder": "Select type..." }, @@ -2043,6 +2042,9 @@ "content": { "comment": "Comment", "comment-placeholder": "Add remarks or mentions...", + "list-item": "", + "list-item-false-positive": "", + "list-item-false-recommendation": "", "options": { "do-not-recommend": { "description": "Do not recommend ''{value}'' as {type} in any document of the current dossier.", @@ -2069,7 +2071,9 @@ "description-bulk": "", "label": "Remove here" } - } + }, + "redacted-text": "", + "redacted-text-bulk": "" }, "title": "Remove {type}", "title-bulk": "" @@ -2187,6 +2191,12 @@ "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", @@ -2210,12 +2220,6 @@ "no-match": "Keine Dokumente entsprechen Ihren aktuellen Filtern.", "table-header": "{length} search {length, plural, one{result} other{results}}" }, - "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": { @@ -2467,4 +2471,4 @@ } }, "yesterday": "Gestern" -} +} \ No newline at end of file diff --git a/apps/red-ui/src/assets/i18n/scm/en.json b/apps/red-ui/src/assets/i18n/scm/en.json index 38d281bdf..3c7eeb618 100644 --- a/apps/red-ui/src/assets/i18n/scm/en.json +++ b/apps/red-ui/src/assets/i18n/scm/en.json @@ -2467,4 +2467,4 @@ } }, "yesterday": "Yesterday" -} +} \ No newline at end of file From e6b917c37c0f38439945c0752cb0027bdff9f77b Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Wed, 3 Apr 2024 16:51:11 +0300 Subject: [PATCH 06/12] RED-8660: hide changes box when loading page. --- .../digital-signature/digital-signature-screen.component.html | 2 +- .../digital-signature/digital-signature-screen.component.scss | 4 ++++ .../digital-signature/digital-signature-screen.component.ts | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/red-ui/src/app/modules/admin/screens/digital-signature/digital-signature-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/digital-signature/digital-signature-screen.component.html index a83c6e586..59caf0512 100644 --- a/apps/red-ui/src/app/modules/admin/screens/digital-signature/digital-signature-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/digital-signature/digital-signature-screen.component.html @@ -30,7 +30,7 @@ > -
+
(); + readonly showChangesBox = computed(() => !this._loadingService.isLoading()); digitalSignature: IPkcsDigitalSignatureRequest | IKmsDigitalSignatureRequest; From dcb2c2dc40be4b29399938d56815c9a80260c899 Mon Sep 17 00:00:00 2001 From: project_703_bot_497bb7eb186ca592c63b3e50cd5c69e1 Date: Thu, 4 Apr 2024 01:03:52 +0000 Subject: [PATCH 07/12] push back localazy update --- apps/red-ui/src/assets/i18n/redact/de.json | 14 +++++--------- apps/red-ui/src/assets/i18n/scm/de.json | 14 +++++--------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/apps/red-ui/src/assets/i18n/redact/de.json b/apps/red-ui/src/assets/i18n/redact/de.json index 484810a04..fc6e6eca0 100644 --- a/apps/red-ui/src/assets/i18n/redact/de.json +++ b/apps/red-ui/src/assets/i18n/redact/de.json @@ -358,7 +358,6 @@ "annotation-engines": { "dictionary": "{isHint, select, true{Hint} other{Redaction}} basierend auf Wörterbuch", "imported": "Imported", - "manual": "Manual", "ner": "Redaktion basierend auf KI", "rule": "Schwärzung basierend auf Regel {rule}" }, @@ -1490,7 +1489,10 @@ "highlights": { "label": "Earmarks" }, - "is-excluded": "Schwärzungen für dieses Dokument deaktiviert." + "is-excluded": "Schwärzungen für dieses Dokument deaktiviert.", + "multi-select": { + "close": "Deactivate multi select" + } }, "text-highlights": "Earmarks", "text-highlights-tooltip": "Shows all text earmarks and allows removing or importing them as redactions", @@ -1990,7 +1992,6 @@ "reason-placeholder": "Select a reason...", "revert-text": "Revert to selected text", "selected-text": "Selected text:", - "text": "Text:", "type": "Type", "type-placeholder": "Select type..." }, @@ -2042,9 +2043,6 @@ "content": { "comment": "Comment", "comment-placeholder": "Add remarks or mentions...", - "list-item": "{text}", - "list-item-false-positive": "{text} as {type} in the context: {context}", - "list-item-false-recommendation": "{text} as {type}", "options": { "do-not-recommend": { "description": "Do not recommend the selected term in any document of this dossier.", @@ -2071,9 +2069,7 @@ "description-bulk": "Do not redact the selected terms at this position in the current document.", "label": "Remove here" } - }, - "redacted-text": "Selected {type}", - "redacted-text-bulk": "Selected {type, select, redaction{redactions} recommendation{recommendations} other{hints}}" + } }, "title": "Remove {type, select, redaction{redaction} recommendation{recommendation} other{hint}}", "title-bulk": "Remove {type, select, redaction{redactions} recommendation{recommendations} other{hints}}" diff --git a/apps/red-ui/src/assets/i18n/scm/de.json b/apps/red-ui/src/assets/i18n/scm/de.json index 6fabc707b..0331d4eea 100644 --- a/apps/red-ui/src/assets/i18n/scm/de.json +++ b/apps/red-ui/src/assets/i18n/scm/de.json @@ -358,7 +358,6 @@ "annotation-engines": { "dictionary": "{isHint, select, true{Hint} other{Redaction}} basierend auf Wörterbuch", "imported": "Annotation is imported", - "manual": "Manual", "ner": "Redaktion basierend auf KI", "rule": "Schwärzung basierend auf Regel {rule}" }, @@ -1490,7 +1489,10 @@ "highlights": { "label": "Earmarks" }, - "is-excluded": "Schwärzungen für dieses Dokument deaktiviert." + "is-excluded": "Schwärzungen für dieses Dokument deaktiviert.", + "multi-select": { + "close": "" + } }, "text-highlights": "Earmarks", "text-highlights-tooltip": "Shows all text-earmarks and allows removing or importing them as components", @@ -1990,7 +1992,6 @@ "reason-placeholder": "Select a reasons...", "revert-text": "", "selected-text": "Selected text:", - "text": "", "type": "Type", "type-placeholder": "Select type..." }, @@ -2042,9 +2043,6 @@ "content": { "comment": "Comment", "comment-placeholder": "Add remarks or mentions...", - "list-item": "", - "list-item-false-positive": "", - "list-item-false-recommendation": "", "options": { "do-not-recommend": { "description": "Do not recommend ''{value}'' as {type} in any document of the current dossier.", @@ -2071,9 +2069,7 @@ "description-bulk": "", "label": "Remove here" } - }, - "redacted-text": "", - "redacted-text-bulk": "" + } }, "title": "Remove {type}", "title-bulk": "" From 4a6bf81d47081da98965235fa3aa3dbe5267760e Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Thu, 4 Apr 2024 13:09:38 +0300 Subject: [PATCH 08/12] RED-8755: deselect all annotations on esc even when user is unassigned. --- .../file-preview-screen.component.ts | 17 ++++++++++++++--- .../services/annotation-manager.service.ts | 4 ++++ .../pdf-viewer/services/pdf-viewer.service.ts | 1 + 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts index ca962e762..436f34efb 100644 --- a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts @@ -316,9 +316,6 @@ export class FilePreviewScreenComponent @Bind() handleEscInsideViewer($event: KeyboardEvent) { $event.preventDefault(); - if (this._multiSelectService.active()) { - this._multiSelectService.deactivate(); - } if (!!this._annotationManager.selected[0]) { const doesHaveWrapper = this._fileDataService.find(this._annotationManager.selected[0]?.Id); if (!doesHaveWrapper) { @@ -327,6 +324,14 @@ export class FilePreviewScreenComponent this._annotationManager.deselect(this._annotationManager.selected[0]?.Id); } } + + if (this._annotationManager.selected.length) { + this._annotationManager.deselectAll(); + } + + if (this._multiSelectService.active()) { + this._multiSelectService.deactivate(); + } } async ngOnAttach(previousRoute: ActivatedRouteSnapshot) { @@ -425,9 +430,15 @@ export class FilePreviewScreenComponent .find(annotation => annotation.id === this._annotationManager.resizingAnnotationId); this._annotationActionsService.cancelResize(resizedAnnotation).then(); } + + if (this._annotationManager.selected.length) { + this._annotationManager.deselectAll(); + } + if (this._multiSelectService.active()) { this._multiSelectService.deactivate(); } + this.fullScreen = false; this.closeFullScreen(); this._changeRef.markForCheck(); diff --git a/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-manager.service.ts b/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-manager.service.ts index 8472bdd93..e86b97e7c 100644 --- a/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-manager.service.ts +++ b/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-manager.service.ts @@ -98,6 +98,10 @@ export class REDAnnotationManager { this.#manager.deselectAnnotations(ann); } + deselectAll() { + this.deselect(this.selected.map(annotation => annotation.Id)); + } + hide(annotations: Annotation[]): void { this.#manager.hideAnnotations(annotations); } diff --git a/apps/red-ui/src/app/modules/pdf-viewer/services/pdf-viewer.service.ts b/apps/red-ui/src/app/modules/pdf-viewer/services/pdf-viewer.service.ts index 09fc4f9a7..a20d160d5 100644 --- a/apps/red-ui/src/app/modules/pdf-viewer/services/pdf-viewer.service.ts +++ b/apps/red-ui/src/app/modules/pdf-viewer/services/pdf-viewer.service.ts @@ -274,6 +274,7 @@ export class PdfViewer { this.#instance.UI.hotkeys.on('esc', { keydown: e => { e.preventDefault(); + this.#clickSelectToolButton(); }, keyup: e => { e.preventDefault(); From 2757a646289c8517d1df8b1bb54ff76591b506a1 Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Fri, 5 Apr 2024 13:13:47 +0300 Subject: [PATCH 09/12] RED-8622: removed unnecessary get requests for dossier templates. --- .../guards/dossier-template-exists.guard.ts | 27 +++++++++++++++-- .../dashboard-stats.service.ts | 9 ++++++ .../dossier-templates.service.ts | 29 +++++++------------ .../entity-services/default-colors.service.ts | 11 ++++--- libs/common-ui | 2 +- 5 files changed, 50 insertions(+), 28 deletions(-) diff --git a/apps/red-ui/src/app/guards/dossier-template-exists.guard.ts b/apps/red-ui/src/app/guards/dossier-template-exists.guard.ts index e59a1ebb4..203707cb1 100644 --- a/apps/red-ui/src/app/guards/dossier-template-exists.guard.ts +++ b/apps/red-ui/src/app/guards/dossier-template-exists.guard.ts @@ -7,14 +7,27 @@ import { DossierTemplateStatsService } from '@services/entity-services/dossier-t import { NGXLogger } from 'ngx-logger'; import { firstValueFrom } from 'rxjs'; import { UserPreferenceService } from '@users/user-preference.service'; +import { DictionaryService } from '@services/entity-services/dictionary.service'; +import { DefaultColorsService } from '@services/entity-services/default-colors.service'; +import { WatermarkService } from '@services/entity-services/watermark.service'; +import { FileAttributesService } from '@services/entity-services/file-attributes.service'; export function templateExistsWhenEnteringAdmin(): CanActivateFn { return async function (route: ActivatedRouteSnapshot): Promise { const dossierTemplateId: string = route.paramMap.get(DOSSIER_TEMPLATE_ID); + const fileAttributesService = inject(FileAttributesService); + const dictionaryService = inject(DictionaryService); + const defaultColorsService = inject(DefaultColorsService); + const watermarksService = inject(WatermarkService); + const router = inject(Router); const dossierTemplate = inject(DossierTemplateStatsService).get(dossierTemplateId); + await firstValueFrom(fileAttributesService.loadFileAttributesConfig(dossierTemplateId)); + await firstValueFrom(dictionaryService.loadDictionaryDataForDossierTemplate(dossierTemplateId)); + await firstValueFrom(defaultColorsService.loadForDossierTemplate(dossierTemplateId)); + await firstValueFrom(watermarksService.loadForDossierTemplate(dossierTemplateId)); if (!dossierTemplate) { - await inject(Router).navigate(['main', 'admin', 'dossier-templates']); + await router.navigate(['main', 'admin', 'dossier-templates']); return false; } return true; @@ -29,9 +42,13 @@ export function templateExistsWhenEnteringDossierList(): CanActivateFn { const logger = inject(NGXLogger); const router = inject(Router); const userPreferencesService = inject(UserPreferenceService); + const fileAttributesService = inject(FileAttributesService); + const dictionaryService = inject(DictionaryService); + const defaultColorsService = inject(DefaultColorsService); + const watermarksService = inject(WatermarkService); - await firstValueFrom(dashboardStatsService.loadAll()); - await firstValueFrom(dossierTemplatesService.loadAll()); + await firstValueFrom(dashboardStatsService.loadForTemplate(dossierTemplateId)); + await firstValueFrom(dossierTemplatesService.loadDossierTemplate(dossierTemplateId)); const dossierTemplateStats = dashboardStatsService.find(dossierTemplateId); if (!dossierTemplateStats || dossierTemplateStats.isEmpty) { logger.warn(`[ROUTES] Dossier template ${dossierTemplateId} not found, redirecting to main`); @@ -39,6 +56,10 @@ export function templateExistsWhenEnteringDossierList(): CanActivateFn { await router.navigate(['main']); return false; } + await firstValueFrom(fileAttributesService.loadFileAttributesConfig(dossierTemplateId)); + await firstValueFrom(dictionaryService.loadDictionaryDataForDossierTemplate(dossierTemplateId)); + await firstValueFrom(defaultColorsService.loadForDossierTemplate(dossierTemplateId)); + await firstValueFrom(watermarksService.loadForDossierTemplate(dossierTemplateId)); return true; }; } diff --git a/apps/red-ui/src/app/services/dossier-templates/dashboard-stats.service.ts b/apps/red-ui/src/app/services/dossier-templates/dashboard-stats.service.ts index 80a7de45c..17249dd72 100644 --- a/apps/red-ui/src/app/services/dossier-templates/dashboard-stats.service.ts +++ b/apps/red-ui/src/app/services/dossier-templates/dashboard-stats.service.ts @@ -31,4 +31,13 @@ export class DashboardStatsService extends EntitiesService this.setEntities(entities)), ); } + + loadForTemplate(dossierTemplateId: string) { + const singleTemplateStatsUrl = `/${this._serviceName}/dossier-template/${dossierTemplateId}/stats`; + return this._http.get(singleTemplateStatsUrl).pipe( + map(entity => new DashboardStats(entity)), + switchMap(entity => this.#dossierStatesService.loadAllForTemplate(dossierTemplateId).pipe(map(() => entity))), + tap(entity => this.addEntity(entity)), + ); + } } diff --git a/apps/red-ui/src/app/services/dossier-templates/dossier-templates.service.ts b/apps/red-ui/src/app/services/dossier-templates/dossier-templates.service.ts index 13a45ae97..acad05cc7 100644 --- a/apps/red-ui/src/app/services/dossier-templates/dossier-templates.service.ts +++ b/apps/red-ui/src/app/services/dossier-templates/dossier-templates.service.ts @@ -4,10 +4,8 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { EntitiesService, Toaster } from '@iqser/common-ui'; import { List, mapEach } from '@iqser/common-ui/lib/utils'; import { DossierTemplate, IDossierTemplate } from '@red/domain'; -import { DefaultColorsService } from '@services/entity-services/default-colors.service'; -import { WatermarkService } from '@services/entity-services/watermark.service'; import { firstValueFrom, forkJoin, Observable, of } from 'rxjs'; -import { catchError, map, mapTo, switchMap, tap } from 'rxjs/operators'; +import { catchError, map, switchMap, tap } from 'rxjs/operators'; import { DictionaryService } from '../entity-services/dictionary.service'; import { DossierTemplateStatsService } from '../entity-services/dossier-template-stats.service'; import { FileAttributesService } from '../entity-services/file-attributes.service'; @@ -27,15 +25,11 @@ export class DossierTemplatesService extends EntitiesService { - const getAttributes = (entities: DossierTemplate[]) => - entities.map(e => this._fileAttributesService.loadFileAttributesConfig(e.id)); const dossierTemplateIds = (templates: DossierTemplate[]) => templates.map(d => d.id); return this.getAll().pipe( @@ -43,16 +37,7 @@ export class DossierTemplatesService extends EntitiesService { if (templates.length) { - return forkJoin([ - this._dossierTemplateStatsService.getFor(dossierTemplateIds(templates)), - ...getAttributes(templates), - // TODO: this should be removed and called only when needed - this._dictionaryService.loadDictionaryData(dossierTemplateIds(templates)), - // TODO: this should be removed and called only when needed - this._defaultColorsService.loadAll(dossierTemplateIds(templates)), - // TODO: this should be removed and called only when needed - this._watermarksService.loadAll(dossierTemplateIds(templates)), - ]).pipe(map(() => templates)); + return this._dossierTemplateStatsService.getFor(dossierTemplateIds(templates)).pipe(map(() => templates)); } return of(templates); }), @@ -60,6 +45,14 @@ export class DossierTemplatesService extends EntitiesService new DossierTemplate(entity)), + switchMap(template => this._dossierTemplateStatsService.getFor([dossierTemplateId]).pipe(map(() => template))), + tap(template => this.addEntity(template)), + ); + } + delete(body: List): Observable { const showToast = (error: HttpErrorResponse) => { if (error.status === HttpStatusCode.Conflict) { @@ -72,7 +65,7 @@ export class DossierTemplatesService extends EntitiesService (error ? of(false) : this.loadAll().pipe(mapTo(true)))), + switchMap(error => (error ? of(false) : this.loadAll().pipe(map(() => true)))), ); } diff --git a/apps/red-ui/src/app/services/entity-services/default-colors.service.ts b/apps/red-ui/src/app/services/entity-services/default-colors.service.ts index dbc5a6f7f..1ac6831d7 100644 --- a/apps/red-ui/src/app/services/entity-services/default-colors.service.ts +++ b/apps/red-ui/src/app/services/entity-services/default-colors.service.ts @@ -1,9 +1,8 @@ import { Injectable } from '@angular/core'; import { EntitiesService } from '@iqser/common-ui'; import { DefaultColors, DefaultColorType, IDefaultColors } from '@red/domain'; -import { forkJoin, Observable } from 'rxjs'; +import { Observable } from 'rxjs'; import { map, switchMap, tap } from 'rxjs/operators'; -import { mapEach } from '@iqser/common-ui/lib/utils'; @Injectable({ providedIn: 'root', @@ -23,10 +22,10 @@ export class DefaultColorsService extends EntitiesService { - return forkJoin(dossierTemplateIds.map(id => super.getFor(id))).pipe( - mapEach(defaultColors => new DefaultColors(defaultColors)), - tap(defaultColors => this.setEntities(defaultColors)), + loadForDossierTemplate(dossierTemplateId: string): Observable { + return super.getFor(dossierTemplateId).pipe( + map(defaultColors => new DefaultColors(defaultColors)), + tap(defaultColors => this.addEntity(defaultColors)), ); } diff --git a/libs/common-ui b/libs/common-ui index 957dc404a..c12b6f4d3 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit 957dc404a85626d9072da0b050aa0fbddbb30789 +Subproject commit c12b6f4d35d646c7b9b6e9b8ef6559457f05be15 From 6e5eb1d91a2acfc1bd1bd60b27b9012a3ab3bf21 Mon Sep 17 00:00:00 2001 From: project_703_bot_497bb7eb186ca592c63b3e50cd5c69e1 Date: Sat, 6 Apr 2024 01:03:43 +0000 Subject: [PATCH 10/12] push back localazy update --- apps/red-ui/src/assets/i18n/redact/de.json | 2 +- apps/red-ui/src/assets/i18n/redact/en.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/red-ui/src/assets/i18n/redact/de.json b/apps/red-ui/src/assets/i18n/redact/de.json index fc6e6eca0..4756ded38 100644 --- a/apps/red-ui/src/assets/i18n/redact/de.json +++ b/apps/red-ui/src/assets/i18n/redact/de.json @@ -1491,7 +1491,7 @@ }, "is-excluded": "Schwärzungen für dieses Dokument deaktiviert.", "multi-select": { - "close": "Deactivate multi select" + "close": "Close bulk select" } }, "text-highlights": "Earmarks", diff --git a/apps/red-ui/src/assets/i18n/redact/en.json b/apps/red-ui/src/assets/i18n/redact/en.json index 6e97e3a5a..b7b1e5dd1 100644 --- a/apps/red-ui/src/assets/i18n/redact/en.json +++ b/apps/red-ui/src/assets/i18n/redact/en.json @@ -1491,7 +1491,7 @@ }, "is-excluded": "Redaction is disabled for this document.", "multi-select": { - "close": "Deactivate multi select" + "close": "Close bulk select" } }, "text-highlights": "Earmarks", From 80fe8e50aa084a1c2864cb3e86b3b2c3ddaeb536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Sun, 7 Apr 2024 21:33:03 +0300 Subject: [PATCH 11/12] RED-3800: Moved color-picker icon to common-ui --- .../edit-color-dialog.component.html | 2 +- .../add-edit-dossier-state-dialog.component.html | 4 ++-- .../watermark-screen.component.html | 2 +- apps/red-ui/src/app/modules/icons/icons.module.ts | 1 - .../add-edit-entity.component.html | 2 +- .../download-dialog.component.html | 2 +- .../src/assets/icons/general/color-picker.svg | 15 --------------- libs/common-ui | 2 +- 8 files changed, 7 insertions(+), 23 deletions(-) delete mode 100644 apps/red-ui/src/assets/icons/general/color-picker.svg diff --git a/apps/red-ui/src/app/modules/admin/dialogs/edit-color-dialog/edit-color-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/edit-color-dialog/edit-color-dialog.component.html index d392e69e3..0739859ac 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/edit-color-dialog/edit-color-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/edit-color-dialog/edit-color-dialog.component.html @@ -21,7 +21,7 @@ >
diff --git a/apps/red-ui/src/app/modules/admin/screens/dossier-states-listing/add-edit-dossier-state-dialog/add-edit-dossier-state-dialog.component.html b/apps/red-ui/src/app/modules/admin/screens/dossier-states-listing/add-edit-dossier-state-dialog/add-edit-dossier-state-dialog.component.html index 41c82eed6..0b6be06f3 100644 --- a/apps/red-ui/src/app/modules/admin/screens/dossier-states-listing/add-edit-dossier-state-dialog/add-edit-dossier-state-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/dossier-states-listing/add-edit-dossier-state-dialog/add-edit-dossier-state-dialog.component.html @@ -1,5 +1,5 @@
-
+
@@ -37,7 +37,7 @@ >
diff --git a/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen/watermark-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen/watermark-screen.component.html index 6ad37f690..5ad404b91 100644 --- a/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen/watermark-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen/watermark-screen.component.html @@ -121,7 +121,7 @@ > diff --git a/apps/red-ui/src/app/modules/icons/icons.module.ts b/apps/red-ui/src/app/modules/icons/icons.module.ts index 45e74b71f..a2b7a8376 100644 --- a/apps/red-ui/src/app/modules/icons/icons.module.ts +++ b/apps/red-ui/src/app/modules/icons/icons.module.ts @@ -33,7 +33,6 @@ export class IconsModule { 'assign-me', 'attribute', 'case-sensitive', - 'color-picker', 'comment', 'comment-fill', 'convert', diff --git a/apps/red-ui/src/app/modules/shared/components/add-edit-entity/add-edit-entity.component.html b/apps/red-ui/src/app/modules/shared/components/add-edit-entity/add-edit-entity.component.html index b40a4c6c7..d5790c69f 100644 --- a/apps/red-ui/src/app/modules/shared/components/add-edit-entity/add-edit-entity.component.html +++ b/apps/red-ui/src/app/modules/shared/components/add-edit-entity/add-edit-entity.component.html @@ -30,7 +30,7 @@ [style.cursor]="cpDisabled(color) ? 'default' : 'pointer'" class="input-icon" > - + diff --git a/apps/red-ui/src/app/modules/shared/dialogs/download-dialog/download-dialog.component.html b/apps/red-ui/src/app/modules/shared/dialogs/download-dialog/download-dialog.component.html index e532119af..9d63dbd2d 100644 --- a/apps/red-ui/src/app/modules/shared/dialogs/download-dialog/download-dialog.component.html +++ b/apps/red-ui/src/app/modules/shared/dialogs/download-dialog/download-dialog.component.html @@ -42,7 +42,7 @@ > diff --git a/apps/red-ui/src/assets/icons/general/color-picker.svg b/apps/red-ui/src/assets/icons/general/color-picker.svg deleted file mode 100644 index 7c1574d55..000000000 --- a/apps/red-ui/src/assets/icons/general/color-picker.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - diff --git a/libs/common-ui b/libs/common-ui index c12b6f4d3..8a2033740 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit c12b6f4d35d646c7b9b6e9b8ef6559457f05be15 +Subproject commit 8a2033740ec93fd8c91e80f94d67e1b662bff121 From ee8d66ba414df40156d78046c53572b51995992e Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Mon, 8 Apr 2024 15:36:13 +0300 Subject: [PATCH 12/12] RED-8907: changed dialog options permissions based on local changes. --- .../file/annotation-permissions.utils.ts | 8 +++-- .../src/app/models/file/annotation.wrapper.ts | 15 +++++---- .../file-preview/utils/dialog-options.ts | 33 ++++++++++--------- .../red-domain/src/lib/redaction-log/types.ts | 7 ++-- 4 files changed, 35 insertions(+), 28 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 ec313b6de..e725d852a 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 @@ -13,7 +13,10 @@ export const canForceRedaction = (annotation: AnnotationWrapper, canAddRedaction export const canAcceptRecommendation = (annotation: AnnotationWrapper) => annotation.isRecommendation && !annotation.pending; export const canMarkAsFalsePositive = (annotation: AnnotationWrapper, annotationEntity: Dictionary) => - annotation.canBeMarkedAsFalsePositive && !annotation.hasBeenForcedRedaction && annotationEntity?.hasDictionary; + annotation.canBeMarkedAsFalsePositive && + !annotation.hasBeenForcedRedaction && + !annotation.hasBeenResizedLocally && + annotationEntity?.hasDictionary; export const canRemoveOnlyHere = (annotation: AnnotationWrapper, canAddRedaction: boolean, autoAnalysisDisabled: boolean) => canAddRedaction && @@ -24,7 +27,8 @@ export const canRemoveFromDictionary = (annotation: AnnotationWrapper, autoAnaly annotation.isModifyDictionary && (annotation.isRedacted || annotation.isSkipped || annotation.isHint || (annotation.isIgnoredHint && !annotation.isRuleBased)) && (autoAnalysisDisabled || !annotation.pending) && - !annotation.hasBeenResized; + !annotation.hasBeenResizedLocally && + (!annotation.hasBeenForcedHint || !annotation.hasBeenForcedRedaction); export const canRemoveRedaction = (annotation: AnnotationWrapper, permissions: AnnotationPermissions) => (!annotation.isIgnoredHint || !annotation.isRuleBased) && 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 1a8f5db59..e1985d7bd 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -57,6 +57,7 @@ export class AnnotationWrapper implements IListable { isChangeLogEntry = false; engines: LogEntryEngine[] = []; hasBeenResized: boolean; + hasBeenResizedLocally: boolean; hasBeenRecategorized: boolean; hasLegalBasisChanged: boolean; hasBeenForcedHint: boolean; @@ -253,20 +254,20 @@ export class AnnotationWrapper implements IListable { annotationWrapper.section = logEntry.section; annotationWrapper.reference = logEntry.reference || []; annotationWrapper.hasBeenResized = !!logEntry.manualChanges?.find(c => c.manualRedactionType === ManualRedactionTypes.RESIZE); + annotationWrapper.hasBeenResizedLocally = + annotationWrapper.hasBeenResized && annotationWrapper.engines.includes(LogEntryEngines.MANUAL); annotationWrapper.hasBeenRecategorized = !!logEntry.manualChanges?.find( c => c.manualRedactionType === ManualRedactionTypes.RECATEGORIZE, ); annotationWrapper.hasLegalBasisChanged = !!logEntry.manualChanges?.find( c => c.manualRedactionType === ManualRedactionTypes.LEGAL_BASIS_CHANGE, ); - annotationWrapper.hasBeenForcedHint = !!logEntry.manualChanges?.find( - c => c.manualRedactionType === ManualRedactionTypes.FORCE_HINT, - ); + annotationWrapper.hasBeenForcedHint = !!logEntry.manualChanges?.find(c => c.manualRedactionType === ManualRedactionTypes.FORCE); annotationWrapper.hasBeenForcedRedaction = !!logEntry.manualChanges?.find( - c => c.manualRedactionType === ManualRedactionTypes.FORCE_REDACT, + c => c.manualRedactionType === ManualRedactionTypes.FORCE, ); annotationWrapper.hasBeenRemovedByManualOverride = !!logEntry.manualChanges?.find( - c => c.manualRedactionType === ManualRedactionTypes.REMOVE_LOCALLY, + c => c.manualRedactionType === ManualRedactionTypes.REMOVE, ); const content = this.#createContent(annotationWrapper, logEntry, isDocumine); @@ -279,7 +280,9 @@ export class AnnotationWrapper implements IListable { annotationWrapper.superTypeLabel = annotationTypesTranslations[annotationWrapper.superType]; annotationWrapper.isRemoved = logEntry.state === EntryStates.REMOVED; - annotationWrapper.isRemovedLocally = lastRelevantManualChange?.manualRedactionType === ManualRedactionTypes.REMOVE_LOCALLY; + annotationWrapper.isRemovedLocally = + lastRelevantManualChange?.manualRedactionType === ManualRedactionTypes.REMOVE && + logEntry.engines.includes(LogEntryEngines.MANUAL); annotationWrapper.typeLabel = dictionary?.virtual ? undefined : dictionary?.label; 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 82894b5db..c949a3af1 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 @@ -127,22 +127,23 @@ export const getResizeRedactionOptions = ( if (isRss) { return options; } - - const dictBasedType = redaction.isModifyDictionary; - options.push({ - label: translations.inDossier.label, - description: translations.inDossier.description, - descriptionParams: { dossierName: dossier.dossierName }, - disabled: !dictBasedType || redaction.hasBeenRecategorized, - tooltip: !dictBasedType ? translations.inDossier.tooltip : null, - icon: FOLDER_ICON, - value: RedactOrHintOptions.IN_DOSSIER, - extraOption: { - label: translations.inDossier.extraOptionLabel, - checked: applyToAllDossiers, - hidden: !isApprover, - }, - }); + if (!redaction.hasBeenResizedLocally) { + const dictBasedType = redaction.isModifyDictionary; + options.push({ + label: translations.inDossier.label, + description: translations.inDossier.description, + descriptionParams: { dossierName: dossier.dossierName }, + disabled: !dictBasedType || redaction.hasBeenRecategorized, + tooltip: !dictBasedType ? translations.inDossier.tooltip : null, + icon: FOLDER_ICON, + value: RedactOrHintOptions.IN_DOSSIER, + extraOption: { + label: translations.inDossier.extraOptionLabel, + checked: applyToAllDossiers, + hidden: !isApprover, + }, + }); + } return options; }; diff --git a/libs/red-domain/src/lib/redaction-log/types.ts b/libs/red-domain/src/lib/redaction-log/types.ts index 1a6f2abd3..c35068387 100644 --- a/libs/red-domain/src/lib/redaction-log/types.ts +++ b/libs/red-domain/src/lib/redaction-log/types.ts @@ -13,14 +13,13 @@ export type LogEntryEngine = ValuesOf; export const ManualRedactionTypes = { ADD_LOCALLY: 'ADD_LOCALLY', ADD_TO_DICTIONARY: 'ADD_TO_DICTIONARY', - REMOVE_LOCALLY: 'REMOVE_LOCALLY', + REMOVE: 'REMOVE', REMOVE_FROM_DICTIONARY: 'REMOVE_FROM_DICTIONARY', - FORCE_REDACT: 'FORCE_REDACT', - FORCE_HINT: 'FORCE_HINT', + FORCE: 'FORCE', RECATEGORIZE: 'RECATEGORIZE', LEGAL_BASIS_CHANGE: 'LEGAL_BASIS_CHANGE', RESIZE: 'RESIZE', - RESIZE_LOCALLY: 'RESIZE_LOCALLY', + RESIZE_WITH_DICTIONARY: 'RESIZE_WITH_DICTIONARY', } as const; export type ManualRedactionType = ValuesOf;