From 9bf97875665acb33c20f484b3ebc1a00b689c063 Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Thu, 26 Jan 2023 14:54:44 +0200 Subject: [PATCH] RED-5872 - Correct help mode links --- .../system-preferences-form.component.html | 2 +- .../file-preview-screen.component.html | 4 ++-- .../modules/file-preview/utils/constants.ts | 2 +- .../file-actions/file-actions.component.html | 8 +++++-- .../file-actions/file-actions.component.ts | 18 +++++++++++++-- .../expandable-file-actions.component.html | 9 -------- .../expandable-file-actions.component.ts | 22 +------------------ apps/red-ui/src/assets/help-mode/links.json | 22 +++++++++++++++++-- 8 files changed, 47 insertions(+), 40 deletions(-) diff --git a/apps/red-ui/src/app/modules/admin/screens/general-config/system-preferences-form/system-preferences-form.component.html b/apps/red-ui/src/app/modules/admin/screens/general-config/system-preferences-form/system-preferences-form.component.html index 7a097390b..0ba5dbb33 100644 --- a/apps/red-ui/src/app/modules/admin/screens/general-config/system-preferences-form/system-preferences-form.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/general-config/system-preferences-form/system-preferences-form.component.html @@ -31,7 +31,7 @@
- {{ 'file-preview.last-assignee' | translate: { status: file.workflowStatus } }} + {{ 'file-preview.last-assignee' | translate : { status: file.workflowStatus } }}
diff --git a/apps/red-ui/src/app/modules/file-preview/utils/constants.ts b/apps/red-ui/src/app/modules/file-preview/utils/constants.ts index 725771e66..63376f5f0 100644 --- a/apps/red-ui/src/app/modules/file-preview/utils/constants.ts +++ b/apps/red-ui/src/app/modules/file-preview/utils/constants.ts @@ -8,7 +8,7 @@ export const ActionsHelpModeKeys = { hint: 'hint_text', 'hint-ocr': 'hint_picture', 'hint-formula': 'picture', - 'hint-image': 'picture', + 'hint-image': 'hint_images', } as const; export const ALL_HOTKEYS: List = ['Escape', 'F', 'f', 'ArrowUp', 'ArrowDown', 'H', 'h'] as const; diff --git a/apps/red-ui/src/app/modules/shared-dossiers/components/file-actions/file-actions.component.html b/apps/red-ui/src/app/modules/shared-dossiers/components/file-actions/file-actions.component.html index 2693e70d1..e6c423c21 100644 --- a/apps/red-ui/src/app/modules/shared-dossiers/components/file-actions/file-actions.component.html +++ b/apps/red-ui/src/app/modules/shared-dossiers/components/file-actions/file-actions.component.html @@ -11,11 +11,15 @@ -
+
btn.show); } - ngOnChanges() { + ngOnChanges(changes: SimpleChanges) { this._setup(); + if (changes.fileActionsHelpModeKey) { + this.scrollableParentView = + this.fileActionsHelpModeKey === 'dossier_features_in_dossier' ? ScrollableParentViews.VIRTUAL_SCROLL : undefined; + } } async setFileApproved($event: MouseEvent) { @@ -463,4 +473,8 @@ export class FileActionsComponent implements OnChanges { await firstValueFrom(this._filesService.setToNewFor([this.file], this.file.dossierId)); this._loadingService.stop(); } + + get overlappingElements() { + return this.fileActionsHelpModeKey === 'editor_document_features' ? [OverlappingElements.USER_MENU] : []; + } } diff --git a/apps/red-ui/src/app/modules/shared/components/expandable-file-actions/expandable-file-actions.component.html b/apps/red-ui/src/app/modules/shared/components/expandable-file-actions/expandable-file-actions.component.html index dbd91cf62..f8f82a401 100644 --- a/apps/red-ui/src/app/modules/shared/components/expandable-file-actions/expandable-file-actions.component.html +++ b/apps/red-ui/src/app/modules/shared/components/expandable-file-actions/expandable-file-actions.component.html @@ -11,9 +11,6 @@ [tooltipPosition]="tooltipPosition" [tooltip]="btn.tooltip | translate" [type]="btn.buttonType || buttonType" - [iqserHelpMode]="helpModeKey" - [scrollableParentView]="scrollableParentView" - [overlappingElements]="overlappingElements" > @@ -24,9 +21,6 @@ [tooltipClass]="btn.tooltipClass" [tooltipPosition]="tooltipPosition" [type]="buttonType" - [iqserHelpMode]="helpModeKey" - [scrollableParentView]="scrollableParentView" - [overlappingElements]="overlappingElements" > @@ -39,9 +33,6 @@ [matTooltipPosition]="tooltipPosition" [matTooltip]="btn.tooltip | translate" [ngClass]="btn.class" - [iqserHelpMode]="helpModeKey" - [scrollableParentView]="scrollableParentView" - [overlappingElements]="overlappingElements" color="primary" >
diff --git a/apps/red-ui/src/app/modules/shared/components/expandable-file-actions/expandable-file-actions.component.ts b/apps/red-ui/src/app/modules/shared/components/expandable-file-actions/expandable-file-actions.component.ts index 9f14152d2..03d6a93b0 100644 --- a/apps/red-ui/src/app/modules/shared/components/expandable-file-actions/expandable-file-actions.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/expandable-file-actions/expandable-file-actions.component.ts @@ -1,14 +1,6 @@ import { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges, ViewChild } from '@angular/core'; import { Action, ActionTypes, Dossier, File } from '@red/domain'; -import { - CircleButtonType, - defaultDialogConfig, - IqserTooltipPosition, - OverlappingElements, - ScrollableParentView, - ScrollableParentViews, - Toaster, -} from '@iqser/common-ui'; +import { CircleButtonType, defaultDialogConfig, IqserTooltipPosition, Toaster } from '@iqser/common-ui'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { FileDownloadService } from '@upload-download/services/file-download.service'; import { PermissionsService } from '@services/permissions.service'; @@ -33,12 +25,10 @@ export class ExpandableFileActionsComponent implements OnChanges { @Input() actions: Action[]; @Input() buttonType: CircleButtonType; @Input() tooltipPosition: IqserTooltipPosition; - @Input() helpModeKey: 'document_features_in_dossier' | 'document_features_in_editor'; displayedButtons: Action[]; hiddenButtons: Action[]; expanded = false; - scrollableParentView: ScrollableParentView; @ViewChild(MatMenuTrigger) matMenu: MatMenuTrigger; @@ -48,11 +38,6 @@ export class ExpandableFileActionsComponent implements OnChanges { private readonly _permissionsService: PermissionsService, private readonly _dialog: MatDialog, ) {} - - get overlappingElements() { - return this.helpModeKey === 'document_features_in_editor' ? [OverlappingElements.USER_MENU] : []; - } - ngOnChanges(changes: SimpleChanges) { if (changes.actions || changes.maxWidth || changes.minWidth) { let count = 0; @@ -88,11 +73,6 @@ export class ExpandableFileActionsComponent implements OnChanges { downloadBtn.disabled = !this._permissionsService.canDownloadFiles(downloadBtn.files, downloadBtn.dossier); } } - - if (changes.helpModeKey) { - this.scrollableParentView = - this.helpModeKey === 'document_features_in_dossier' ? ScrollableParentViews.VIRTUAL_SCROLL : undefined; - } } onButtonClick(button: Action, $event: MouseEvent) { diff --git a/apps/red-ui/src/assets/help-mode/links.json b/apps/red-ui/src/assets/help-mode/links.json index b03e95e2f..f8d5477df 100644 --- a/apps/red-ui/src/assets/help-mode/links.json +++ b/apps/red-ui/src/assets/help-mode/links.json @@ -209,6 +209,12 @@ "it": "", "fr": "" }, + "hint_images": { + "en": "/en/index-en.html?contextId=hint_images", + "de": "", + "it": "", + "fr": "" + }, "workload_in_editor": { "en": "/en/index-en.html?contextId=workload_in_editor", "de": "", @@ -479,8 +485,8 @@ "it": "", "fr": "" }, - "sytem_configurations": { - "en": "/en/index-en.html?contextId=sytem_configurations", + "system_configurations": { + "en": "/en/index-en.html?contextId=system_configurations", "de": "", "it": "", "fr": "" @@ -508,5 +514,17 @@ "de": "", "it": "", "fr": "" + }, + "dossier_features_in_dossier": { + "en": "/en/index-en.html?contextId=dossier_features_in_dossier", + "de": "", + "it": "", + "fr": "" + }, + "editor_document_features": { + "en": "/en/index-en.html?contextId=editor_document_features", + "de": "", + "it": "", + "fr": "" } }