DM-337 - Add/Remove annotations dialog in DocuMine

This commit is contained in:
Valentin Mihai 2023-07-27 22:06:46 +03:00
parent 6bd2ea477b
commit ae4af92307
5 changed files with 9 additions and 9 deletions

View File

@ -49,7 +49,7 @@ export class AcceptRecommendationDialogComponent extends BaseDialogComponent imp
get displayedDictionaryLabel() {
const dictType = this.form.get('dictionary').value as string;
if (dictType && this.possibleDictionaries.length) {
return this.possibleDictionaries.find(d => d.type === dictType).label;
return this.possibleDictionaries.find(d => d.type === dictType)?.label;
}
return null;
}
@ -57,7 +57,7 @@ export class AcceptRecommendationDialogComponent extends BaseDialogComponent imp
async ngOnInit() {
this.possibleDictionaries = await this._dictionaryService.getDictionariesOptions(this._dossier.dossierTemplateId, this._dossier.id);
this.form.patchValue({
dictionary: this.possibleDictionaries.find(dict => dict.type === this.data.annotations[0].recommendationType).type,
dictionary: this.possibleDictionaries.find(dict => dict.type === this.data.annotations[0].recommendationType)?.type,
});
}

View File

@ -146,7 +146,7 @@ export const getRemoveRedactionOptions = (
options.push({
label: translations.ONLY_HERE.label,
description: translations.ONLY_HERE.description,
descriptionParams: { type: redaction.hint ? 'hint' : 'redact', value: redaction.value },
descriptionParams: { value: redaction.value },
icon: PIN_ICON,
value: RemoveRedactionOptions.ONLY_HERE,
});
@ -155,7 +155,7 @@ export const getRemoveRedactionOptions = (
options.push({
label: translations.IN_DOSSIER.label,
description: translations.IN_DOSSIER.description,
descriptionParams: { type: redaction.hint ? 'hint' : 'redact', value: redaction.value },
descriptionParams: { value: redaction.value, type: redaction.type },
icon: FOLDER_ICON,
value: RemoveRedactionOptions.IN_DOSSIER,
extraOption: !isDocumine

View File

@ -2023,11 +2023,11 @@
"comment-placeholder": "Add remarks or mentions ...",
"options": {
"false-positive": {
"description": "\"{value}\" is not a {type} in this context: \"{context}\".",
"description": "\"{value}\" is not a \"{type}\" in this context: \"{context}\".",
"label": "False positive"
},
"in-dossier": {
"description": "Do not annotate \"{value}\" in any document of the current dossier.",
"description": "Do not annotate \"{value}\" as \"{type}\" in any dossier.",
"label": "Remove from dossier"
},
"only-here": {

View File

@ -2023,11 +2023,11 @@
"comment-placeholder": "Add remarks or mentions ...",
"options": {
"false-positive": {
"description": "\"{value}\" is not a {type} in this context: \"{context}\".",
"description": "\"{value}\" is not a \"{type}\" in this context: \"{context}\".",
"label": "False positive"
},
"in-dossier": {
"description": "Do not annotate \"{value}\" in any document of the current dossier.",
"description": "Do not annotate \"{value}\" as \"{type}\" in any dossier.",
"label": "Remove from dossier"
},
"only-here": {

@ -1 +1 @@
Subproject commit e1323070c688fe46a0ba64ae9964506024b73443
Subproject commit 0fd87149ae2de85fe2c41d8bca46e8706cd31df9