Merge branch 'VM/RED-7880' into 'master'

RED-7880 - Effective dictionary compare with dossier (template) missing the type

Closes RED-7880

See merge request redactmanager/red-ui!185
This commit is contained in:
Dan Percic 2023-11-14 12:40:11 +01:00
commit 37a3aaf0c0
6 changed files with 93 additions and 77 deletions

View File

@ -82,6 +82,7 @@
[initialEntries]="entriesToDisplay || []" [initialEntries]="entriesToDisplay || []"
[withFloatingActions]="false" [withFloatingActions]="false"
[selectedDictionaryType]="selectedDictionary.type" [selectedDictionaryType]="selectedDictionary.type"
[selectedDictionaryTypeLabel]="selectedDictionary.label"
[activeEntryType]="activeEntryType" [activeEntryType]="activeEntryType"
[hint]="selectedDictionary.hint" [hint]="selectedDictionary.hint"
[currentDossierId]="dossier.dossierId" [currentDossierId]="dossier.dossierId"

View File

@ -1,5 +1,5 @@
import { ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core'; import { ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';
import { IconButtonTypes, LoadingService } from '@iqser/common-ui'; import { IconButtonTypes, LoadingService, Toaster } from '@iqser/common-ui';
import { import {
Dictionary, Dictionary,
DICTIONARY_TYPE_KEY_MAP, DICTIONARY_TYPE_KEY_MAP,
@ -49,6 +49,7 @@ export class DictionaryManagerComponent implements OnChanges, OnInit {
@Input() isLeavingPage = false; @Input() isLeavingPage = false;
@Input() hint = false; @Input() hint = false;
@Input() selectedDictionaryType = 'dossier_redaction'; @Input() selectedDictionaryType = 'dossier_redaction';
@Input() selectedDictionaryTypeLabel: string;
@Input() activeEntryType: DictionaryEntryType = DictionaryEntryTypes.ENTRY; @Input() activeEntryType: DictionaryEntryType = DictionaryEntryTypes.ENTRY;
@Output() readonly saveDictionary = new EventEmitter<string[]>(); @Output() readonly saveDictionary = new EventEmitter<string[]>();
@ViewChild(EditorComponent) readonly editor: EditorComponent; @ViewChild(EditorComponent) readonly editor: EditorComponent;
@ -74,6 +75,7 @@ export class DictionaryManagerComponent implements OnChanges, OnInit {
protected readonly _loadingService: LoadingService, protected readonly _loadingService: LoadingService,
private readonly _changeRef: ChangeDetectorRef, private readonly _changeRef: ChangeDetectorRef,
private readonly _activeDossiersService: ActiveDossiersService, private readonly _activeDossiersService: ActiveDossiersService,
private readonly _toaster: Toaster,
readonly dossierTemplatesService: DossierTemplatesService, readonly dossierTemplatesService: DossierTemplatesService,
) { ) {
this.dossiers = _activeDossiersService.all; this.dossiers = _activeDossiersService.all;
@ -276,7 +278,16 @@ export class DictionaryManagerComponent implements OnChanges, OnInit {
dictionary = ( dictionary = (
await firstValueFrom( await firstValueFrom(
this._dictionaryService.loadDictionaryEntriesByType([this.selectedDictionaryType], dossierTemplateId, dossierId), this._dictionaryService.loadDictionaryEntriesByType([this.selectedDictionaryType], dossierTemplateId, dossierId),
) ).catch(() => {
const selectedDossierTemplate = this.dossierTemplatesService.find(dossierTemplateId);
this._toaster.error(_('dictionary-overview.compare-error'), {
params: {
type: this.selectedDictionaryTypeLabel,
template: selectedDossierTemplate.name,
},
});
return [{ entries: [], type: '' }];
})
)[0]; )[0];
} }
const activeEntries = const activeEntries =

View File

@ -254,9 +254,6 @@
"user-management": "User Management", "user-management": "User Management",
"watermarks": "Watermarks" "watermarks": "Watermarks"
}, },
"annotation": {
"pending": "(Pending Analysis)"
},
"annotation-actions": { "annotation-actions": {
"accept-recommendation": { "accept-recommendation": {
"label": "Empfehlung annehmen" "label": "Empfehlung annehmen"
@ -315,14 +312,14 @@
"error": "Rekategorisierung des Bildes gescheitert: {error}", "error": "Rekategorisierung des Bildes gescheitert: {error}",
"success": "Bild wurde einer neuen Kategorie zugeordnet." "success": "Bild wurde einer neuen Kategorie zugeordnet."
}, },
"remove": {
"error": "Fehler beim Entfernen der Schwärzung: {error}",
"success": "Schwärzung entfernt!"
},
"remove-hint": { "remove-hint": {
"error": "Failed to remove hint: {error}", "error": "Failed to remove hint: {error}",
"success": "Hint removed!" "success": "Hint removed!"
}, },
"remove": {
"error": "Fehler beim Entfernen der Schwärzung: {error}",
"success": "Schwärzung entfernt!"
},
"undo": { "undo": {
"error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}", "error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}",
"success": "erfolgreich Rückgängig gemacht" "success": "erfolgreich Rückgängig gemacht"
@ -335,15 +332,15 @@
"remove-highlights": { "remove-highlights": {
"label": "Remove Selected Earmarks" "label": "Remove Selected Earmarks"
}, },
"resize": {
"label": "Größe ändern"
},
"resize-accept": { "resize-accept": {
"label": "Größe speichern" "label": "Größe speichern"
}, },
"resize-cancel": { "resize-cancel": {
"label": "Größenänderung abbrechen" "label": "Größenänderung abbrechen"
}, },
"resize": {
"label": "Größe ändern"
},
"see-references": { "see-references": {
"label": "See References" "label": "See References"
}, },
@ -374,6 +371,9 @@
"skipped": "Übersprungen", "skipped": "Übersprungen",
"text-highlight": "Earmark" "text-highlight": "Earmark"
}, },
"annotation": {
"pending": "(Pending Analysis)"
},
"archived-dossiers-listing": { "archived-dossiers-listing": {
"no-data": { "no-data": {
"title": "No archived dossiers." "title": "No archived dossiers."
@ -579,18 +579,14 @@
"warning": "Achtung: Diese Aktion kann nicht rückgängig gemacht werden!" "warning": "Achtung: Diese Aktion kann nicht rückgängig gemacht werden!"
}, },
"confirmation-dialog": { "confirmation-dialog": {
"approve-file": {
"question": "Dieses Dokument enthält ungesehene Änderungen. Möchten Sie es trotzdem genehmigen?",
"title": "Warnung!"
},
"approve-file-without-analysis": { "approve-file-without-analysis": {
"confirmationText": "Approve without analysis", "confirmationText": "Approve without analysis",
"denyText": "Cancel", "denyText": "Cancel",
"question": "Analysis required to detect new redactions.", "question": "Analysis required to detect new redactions.",
"title": "Warning!" "title": "Warning!"
}, },
"approve-multiple-files": { "approve-file": {
"question": "Mindestens eine der ausgewählten Dateien enthält ungesehene Änderungen. Möchten Sie sie trotzdem genehmigen?", "question": "Dieses Dokument enthält ungesehene Änderungen. Möchten Sie es trotzdem genehmigen?",
"title": "Warnung!" "title": "Warnung!"
}, },
"approve-multiple-files-without-analysis": { "approve-multiple-files-without-analysis": {
@ -599,6 +595,10 @@
"question": "Analysis required to detect new redactions for at least one file.", "question": "Analysis required to detect new redactions for at least one file.",
"title": "Warning" "title": "Warning"
}, },
"approve-multiple-files": {
"question": "Mindestens eine der ausgewählten Dateien enthält ungesehene Änderungen. Möchten Sie sie trotzdem genehmigen?",
"title": "Warnung!"
},
"assign-file-to-me": { "assign-file-to-me": {
"question": { "question": {
"multiple": "Dieses Dokument wird gerade von einer anderen Person geprüft. Möchten Sie Reviewer werden und sich selbst dem Dokument zuweisen?", "multiple": "Dieses Dokument wird gerade von einer anderen Person geprüft. Möchten Sie Reviewer werden und sich selbst dem Dokument zuweisen?",
@ -690,6 +690,7 @@
"dev-mode": "DEV", "dev-mode": "DEV",
"dictionary": "Wörterbuch", "dictionary": "Wörterbuch",
"dictionary-overview": { "dictionary-overview": {
"compare-error": "",
"compare": { "compare": {
"compare": "Vergleichen", "compare": "Vergleichen",
"select-dictionary": "Wörterbuch auswählen", "select-dictionary": "Wörterbuch auswählen",
@ -944,13 +945,13 @@
"recent": "Neu ({hours} h)", "recent": "Neu ({hours} h)",
"unassigned": "Niemandem zugewiesen" "unassigned": "Niemandem zugewiesen"
}, },
"reanalyse": {
"action": "Datei analysieren"
},
"reanalyse-dossier": { "reanalyse-dossier": {
"error": "Die Dateien konnten nicht für eine Reanalyse eingeplant werden. Bitte versuchen Sie es erneut.", "error": "Die Dateien konnten nicht für eine Reanalyse eingeplant werden. Bitte versuchen Sie es erneut.",
"success": "Dateien für Reanalyse vorgesehen." "success": "Dateien für Reanalyse vorgesehen."
}, },
"reanalyse": {
"action": "Datei analysieren"
},
"start-auto-analysis": "Enable auto-analysis", "start-auto-analysis": "Enable auto-analysis",
"stop-auto-analysis": "Stop auto-analysis", "stop-auto-analysis": "Stop auto-analysis",
"table-col-names": { "table-col-names": {
@ -1019,14 +1020,6 @@
"total-documents": "Anzahl der Dokumente", "total-documents": "Anzahl der Dokumente",
"total-people": "<strong>{count}</strong> {count, plural, one{User} other {Users}}" "total-people": "<strong>{count}</strong> {count, plural, one{User} other {Users}}"
}, },
"dossier-templates": {
"label": "Dossier-Vorlagen",
"status": {
"active": "Active",
"inactive": "Inactive",
"incomplete": "Incomplete"
}
},
"dossier-templates-listing": { "dossier-templates-listing": {
"action": { "action": {
"clone": "Clone Template", "clone": "Clone Template",
@ -1062,6 +1055,14 @@
"title": "{length} {length, plural, one{Dossier-Vorlage} other{Dossier-Vorlagen}}" "title": "{length} {length, plural, one{Dossier-Vorlage} other{Dossier-Vorlagen}}"
} }
}, },
"dossier-templates": {
"label": "Dossier-Vorlagen",
"status": {
"active": "Active",
"inactive": "Inactive",
"incomplete": "Incomplete"
}
},
"dossier-watermark-selector": { "dossier-watermark-selector": {
"heading": "Watermarks on documents", "heading": "Watermarks on documents",
"no-watermark": "There is no watermark defined for the dossier template.<br>Contact your app admin to define one.", "no-watermark": "There is no watermark defined for the dossier template.<br>Contact your app admin to define one.",
@ -1245,15 +1246,6 @@
"title": "{length} {length, plural, one{Wörterbuch} other{Wörterbücher}}" "title": "{length} {length, plural, one{Wörterbuch} other{Wörterbücher}}"
} }
}, },
"entity": {
"info": {
"actions": {
"revert": "Revert",
"save": "Save Changes"
},
"heading": "Edit Entity"
}
},
"entity-rules-screen": { "entity-rules-screen": {
"error": { "error": {
"generic": "Something went wrong... Entity rules update failed!" "generic": "Something went wrong... Entity rules update failed!"
@ -1267,19 +1259,28 @@
"title": "Entity Rule Editor", "title": "Entity Rule Editor",
"warning-text": "Warning: experimental feature!" "warning-text": "Warning: experimental feature!"
}, },
"entity": {
"info": {
"actions": {
"revert": "Revert",
"save": "Save Changes"
},
"heading": "Edit Entity"
}
},
"error": { "error": {
"deleted-entity": { "deleted-entity": {
"dossier": { "dossier": {
"action": "Zurück zur Übersicht", "action": "Zurück zur Übersicht",
"label": "Dieses Dossier wurde gelöscht!" "label": "Dieses Dossier wurde gelöscht!"
}, },
"file": {
"action": "Zurück zum Dossier",
"label": "Diese Datei wurde gelöscht!"
},
"file-dossier": { "file-dossier": {
"action": "Zurück zur Übersicht", "action": "Zurück zur Übersicht",
"label": "Das Dossier dieser Datei wurde gelöscht!" "label": "Das Dossier dieser Datei wurde gelöscht!"
},
"file": {
"action": "Zurück zum Dossier",
"label": "Diese Datei wurde gelöscht!"
} }
}, },
"file-preview": { "file-preview": {
@ -1297,12 +1298,6 @@
}, },
"exact-date": "{day} {month} {year} um {hour}:{minute} Uhr", "exact-date": "{day} {month} {year} um {hour}:{minute} Uhr",
"file": "Datei", "file": "Datei",
"file-attribute": {
"update": {
"error": "Failed to update file attribute value!",
"success": "File attribute value has been updated successfully!"
}
},
"file-attribute-encoding-types": { "file-attribute-encoding-types": {
"ascii": "ASCII", "ascii": "ASCII",
"iso": "ISO-8859-1", "iso": "ISO-8859-1",
@ -1313,6 +1308,12 @@
"number": "Nummer", "number": "Nummer",
"text": "Freier Text" "text": "Freier Text"
}, },
"file-attribute": {
"update": {
"error": "Failed to update file attribute value!",
"success": "File attribute value has been updated successfully!"
}
},
"file-attributes-configurations": { "file-attributes-configurations": {
"cancel": "Cancel", "cancel": "Cancel",
"form": { "form": {
@ -1526,15 +1527,6 @@
"csv": "File attributes were imported successfully from uploaded CSV file." "csv": "File attributes were imported successfully from uploaded CSV file."
} }
}, },
"filter": {
"analysis": "Analyse erforderlich",
"comment": "Kommentare",
"hint": "Nut Hinweise",
"image": "Bilder",
"none": "Keine Anmerkungen",
"redaction": "Geschwärzt",
"updated": "Aktualisiert"
},
"filter-menu": { "filter-menu": {
"filter-options": "Filteroptionen", "filter-options": "Filteroptionen",
"filter-types": "Filter", "filter-types": "Filter",
@ -1544,6 +1536,15 @@
"unseen-pages": "Nur Anmerkungen auf unsichtbaren Seiten", "unseen-pages": "Nur Anmerkungen auf unsichtbaren Seiten",
"with-comments": "Nur Anmerkungen mit Kommentaren" "with-comments": "Nur Anmerkungen mit Kommentaren"
}, },
"filter": {
"analysis": "Analyse erforderlich",
"comment": "Kommentare",
"hint": "Nut Hinweise",
"image": "Bilder",
"none": "Keine Anmerkungen",
"redaction": "Geschwärzt",
"updated": "Aktualisiert"
},
"filters": { "filters": {
"assigned-people": "Beauftragt", "assigned-people": "Beauftragt",
"documents-status": "Documents State", "documents-status": "Documents State",
@ -1814,13 +1815,6 @@
"user-promoted-to-approver": "<b>{user}</b> wurde im Dossier <b>{dossierHref, select, null{{dossierName}} other{<a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a>}}</b> zum Genehmiger ernannt!", "user-promoted-to-approver": "<b>{user}</b> wurde im Dossier <b>{dossierHref, select, null{{dossierName}} other{<a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a>}}</b> zum Genehmiger ernannt!",
"user-removed-as-dossier-member": "<b>{user}</b> wurde als Mitglied von: <b>{dossierHref, select, null{{dossierName}} other{<a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a>}}</b> entfernt!" "user-removed-as-dossier-member": "<b>{user}</b> wurde als Mitglied von: <b>{dossierHref, select, null{{dossierName}} other{<a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a>}}</b> entfernt!"
}, },
"notifications": {
"button-text": "Notifications",
"deleted-dossier": "Deleted Dossier",
"label": "Benachrichtigungen",
"mark-all-as-read": "Alle als gelesen markieren",
"mark-as": "Mark as {type, select, read{read} unread{unread} other{}}"
},
"notifications-screen": { "notifications-screen": {
"category": { "category": {
"email-notifications": "E-Mail Benachrichtigungen", "email-notifications": "E-Mail Benachrichtigungen",
@ -1834,6 +1828,7 @@
"dossier": "Dossierbezogene Benachrichtigungen", "dossier": "Dossierbezogene Benachrichtigungen",
"other": "Andere Benachrichtigungen" "other": "Andere Benachrichtigungen"
}, },
"options-title": "Wählen Sie aus, in welcher Kategorie Sie benachrichtigt werden möchten",
"options": { "options": {
"ASSIGN_APPROVER": "Wenn ich einem Dokument als Genehmiger zugewiesen bin", "ASSIGN_APPROVER": "Wenn ich einem Dokument als Genehmiger zugewiesen bin",
"ASSIGN_REVIEWER": "Wenn ich einem Dokument als Überprüfer zugewiesen bin", "ASSIGN_REVIEWER": "Wenn ich einem Dokument als Überprüfer zugewiesen bin",
@ -1851,7 +1846,6 @@
"USER_PROMOTED_TO_APPROVER": "Wenn ich Genehmiger in einem Dossier werde", "USER_PROMOTED_TO_APPROVER": "Wenn ich Genehmiger in einem Dossier werde",
"USER_REMOVED_AS_DOSSIER_MEMBER": "Wenn ich die Dossier-Mitgliedschaft verliere" "USER_REMOVED_AS_DOSSIER_MEMBER": "Wenn ich die Dossier-Mitgliedschaft verliere"
}, },
"options-title": "Wählen Sie aus, in welcher Kategorie Sie benachrichtigt werden möchten",
"schedule": { "schedule": {
"daily": "Tägliche Zusammenfassung", "daily": "Tägliche Zusammenfassung",
"instant": "Sofortig", "instant": "Sofortig",
@ -1859,6 +1853,13 @@
}, },
"title": "Benachrichtigungseinstellungen" "title": "Benachrichtigungseinstellungen"
}, },
"notifications": {
"button-text": "Notifications",
"deleted-dossier": "Deleted Dossier",
"label": "Benachrichtigungen",
"mark-all-as-read": "Alle als gelesen markieren",
"mark-as": "Mark as {type, select, read{read} unread{unread} other{}}"
},
"ocr": { "ocr": {
"confirmation-dialog": { "confirmation-dialog": {
"cancel": "Cancel", "cancel": "Cancel",
@ -1950,16 +1951,16 @@
"warnings-subtitle": "Do not show again options", "warnings-subtitle": "Do not show again options",
"warnings-title": "Prompts and Dialogs Settings" "warnings-title": "Prompts and Dialogs Settings"
}, },
"processing": {
"basic": "Processing",
"ocr": "OCR"
},
"processing-status": { "processing-status": {
"ocr": "OCR", "ocr": "OCR",
"pending": "Pending", "pending": "Pending",
"processed": "Processed", "processed": "Processed",
"processing": "Processing" "processing": "Processing"
}, },
"processing": {
"basic": "Processing",
"ocr": "OCR"
},
"readonly": "Lesemodus", "readonly": "Lesemodus",
"readonly-archived": "Read only (archived)", "readonly-archived": "Read only (archived)",
"redact-text": { "redact-text": {
@ -2189,12 +2190,6 @@
"red-user-admin": "Benutzer-Admin", "red-user-admin": "Benutzer-Admin",
"regular": "Regulär" "regular": "Regulär"
}, },
"search": {
"active-dossiers": "ganze Plattform",
"all-dossiers": "all documents",
"placeholder": "Nach Dokumenten oder Dokumenteninhalt suchen",
"this-dossier": "in diesem Dossier"
},
"search-screen": { "search-screen": {
"cols": { "cols": {
"assignee": "Bevollmächtigter", "assignee": "Bevollmächtigter",
@ -2218,6 +2213,12 @@
"no-match": "Keine Dokumente entsprechen Ihren aktuellen Filtern.", "no-match": "Keine Dokumente entsprechen Ihren aktuellen Filtern.",
"table-header": "{length} {length, plural, one{Suchergebnis} other{Suchergebnisse}}" "table-header": "{length} {length, plural, one{Suchergebnis} other{Suchergebnisse}}"
}, },
"search": {
"active-dossiers": "ganze Plattform",
"all-dossiers": "all documents",
"placeholder": "Nach Dokumenten oder Dokumenteninhalt suchen",
"this-dossier": "in diesem Dossier"
},
"seconds": "seconds", "seconds": "seconds",
"size": "Size", "size": "Size",
"smtp-auth-config": { "smtp-auth-config": {

View File

@ -690,6 +690,7 @@
"dev-mode": "DEV", "dev-mode": "DEV",
"dictionary": "Type", "dictionary": "Type",
"dictionary-overview": { "dictionary-overview": {
"compare-error": "\"{type}\" type does not exist on \"{template}\" template.",
"compare": { "compare": {
"compare": "Compare", "compare": "Compare",
"select-dictionary": "Select Dictionary", "select-dictionary": "Select Dictionary",

View File

@ -690,6 +690,7 @@
"dev-mode": "DEV", "dev-mode": "DEV",
"dictionary": "Wörterbuch", "dictionary": "Wörterbuch",
"dictionary-overview": { "dictionary-overview": {
"compare-error": "",
"compare": { "compare": {
"compare": "Vergleichen", "compare": "Vergleichen",
"select-dictionary": "Wörterbuch auswählen", "select-dictionary": "Wörterbuch auswählen",

View File

@ -690,6 +690,7 @@
"dev-mode": "DEV", "dev-mode": "DEV",
"dictionary": "Type", "dictionary": "Type",
"dictionary-overview": { "dictionary-overview": {
"compare-error": "",
"compare": { "compare": {
"compare": "Compare", "compare": "Compare",
"select-dictionary": "Select Dictionary", "select-dictionary": "Select Dictionary",