From dd60b49348d562579599fd4914cd4228ddd2b3a5 Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Tue, 8 Mar 2022 14:13:41 +0200 Subject: [PATCH] RED-3540, RED-3541 -> adjust links in HelpMode --- .../annotation-actions.component.html | 8 +++---- .../annotation-actions.component.ts | 11 ++-------- apps/red-ui/src/assets/help-mode/links.json | 22 +++++++++++++++++-- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.html b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.html index 5ce02dac9..bb81fe0b1 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.html @@ -33,7 +33,7 @@ [tooltip]="'annotation-actions.resize.label' | translate" [type]="buttonType" icon="red:resize" - iqserHelpMode="redaction_resize_redaction" + [iqserHelpMode]="helpModeKey + '_resize'" [scrollableParentView]="scrollableParentView" > @@ -149,7 +149,7 @@ [tooltip]="'annotation-actions.remove-annotation.remove-from-dict' | translate" [type]="buttonType" icon="red:remove-from-dict" - [iqserHelpMode]="removeFromDictionaryHelpModeKey" + [iqserHelpMode]="helpModeKey + '_remove_from_dictionary'" [scrollableParentView]="scrollableParentView" > @@ -160,7 +160,7 @@ [tooltip]="'annotation-actions.remove-annotation.false-positive' | translate" [type]="buttonType" icon="red:thumb-down" - iqserHelpMode="redaction_false_positive" + [iqserHelpMode]="helpModeKey + '_false_positive'" [scrollableParentView]="scrollableParentView" > @@ -171,7 +171,7 @@ [tooltip]="'annotation-actions.remove-annotation.only-here' | translate" [type]="buttonType" icon="iqser:trash" - iqserHelpMode="redaction_remove_only_here" + [iqserHelpMode]="helpModeKey + '_remove_only_here'" [scrollableParentView]="scrollableParentView" > diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.ts b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.ts index 4a2d881cc..6e257a003 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.ts @@ -17,12 +17,6 @@ export const AnnotationButtonTypes = { export type AnnotationButtonType = keyof typeof AnnotationButtonTypes; -const helpModeKey = { - hint: 'hints_remove_from_dictionary', - recommendation: 'recommendation_remove_from_dictionary', - skipped: 'skipped_remove_from_dictionary', -}; - @Component({ selector: 'redaction-annotation-actions', templateUrl: './annotation-actions.component.html', @@ -134,8 +128,7 @@ export class AnnotationActionsComponent implements OnChanges { ); } - get removeFromDictionaryHelpModeKey() { - const type = this.annotations[0]?.typeLabel?.split('.')[1]; - return helpModeKey[type]; + get helpModeKey() { + return this.annotations[0]?.typeLabel?.split('.')[1]; } } diff --git a/apps/red-ui/src/assets/help-mode/links.json b/apps/red-ui/src/assets/help-mode/links.json index 901b0bf0b..9786ee578 100644 --- a/apps/red-ui/src/assets/help-mode/links.json +++ b/apps/red-ui/src/assets/help-mode/links.json @@ -119,13 +119,19 @@ "it": "", "fr": "" }, + "recommendation_false_positive": { + "en": "/en/index-en.html?contextId=recommendation_false_positive", + "de": "", + "it": "", + "fr": "" + }, "skipped_remove_from_dictionary": { "en": "/en/index-en.html?contextId=skipped_remove_from_dictionary", "de": "", "it": "", "fr": "" }, - "hints_remove_from_dictionary": { + "hint_remove_from_dictionary": { "en": "/en/index-en.html?contextId=hints_remove_from_dictionary", "de": "", "it": "", @@ -143,6 +149,12 @@ "it": "", "fr": "" }, + "hint_remove_only_here": { + "en": "/en/index-en.html?contextId=hint_remove_only_here", + "de": "", + "it": "", + "fr": "" + }, "reset_filters": { "en": "/en/index-en.html?contextId=reset_filters", "de": "", @@ -191,12 +203,18 @@ "it": "", "fr": "" }, - "redaction_resize_redaction": { + "redaction_resize": { "en": "/en/index-en.html?contextId=redaction_resize_redaction", "de": "", "it": "", "fr": "" }, + "recommendation_resize": { + "en": "/en/index-en.html?contextId=recommendation_resize", + "de": "", + "it": "", + "fr": "" + }, "skipped_force_redaction": { "en": "/en/index-en.html?contextId=skipped_force_redaction", "de": "",