RED-5673 - Help mode links overlay the open user menu

This commit is contained in:
Valentin Mihai 2022-12-06 00:56:30 +02:00
parent cf384ccdcc
commit 99381829c3
12 changed files with 48 additions and 12 deletions

View File

@ -35,16 +35,18 @@
<iqser-user-button [matMenuTriggerFor]="userMenu" id="userMenu"></iqser-user-button>
<mat-menu #userMenu="matMenu" xPosition="before">
<ng-container *ngFor="let item of userMenuItems; trackBy: trackByName">
<a (click)="item.action?.()" *ngIf="item.show" [id]="item.id" [routerLink]="item.routerLink" mat-menu-item>
{{ item.name | translate }}
</a>
</ng-container>
<div id="user-menu-items">
<ng-container *ngFor="let item of userMenuItems; trackBy: trackByName">
<a (click)="item.action?.()" *ngIf="item.show" [id]="item.id" [routerLink]="item.routerLink" mat-menu-item>
{{ item.name | translate }}
</a>
</ng-container>
<button (click)="userService.logout()" id="logout" mat-menu-item>
<mat-icon svgIcon="iqser:logout"></mat-icon>
<span translate="top-bar.navigation-items.my-account.children.logout"> </span>
</button>
<button (click)="userService.logout()" id="logout" mat-menu-item>
<mat-icon svgIcon="iqser:logout"></mat-icon>
<span translate="top-bar.navigation-items.my-account.children.logout"> </span>
</button>
</div>
</mat-menu>
</div>
</div>

View File

@ -22,6 +22,7 @@
*allow="roles.dossiers.edit; if: currentUser.isManager"
[icon]="'iqser:edit'"
[iqserHelpMode]="'dashboard_in_dossier'"
[overlappingElement]="'USER_MENU'"
[tooltipPosition]="'below'"
[tooltip]="'dossier-details.edit-owner' | translate"
class="ml-14"

View File

@ -11,6 +11,7 @@
[dossier]="dossier"
[files]="entitiesService.all$ | async"
[iqserHelpMode]="'edit_dossier_in_dossier'"
[overlappingElement]="'USER_MENU'"
[tooltipPosition]="'below'"
></redaction-file-download-btn>
@ -20,6 +21,7 @@
[disabled]="listingService.areSomeSelected$ | async"
[icon]="'iqser:csv'"
[iqserHelpMode]="'edit_dossier_in_dossier'"
[overlappingElement]="'USER_MENU'"
[tooltipPosition]="'below'"
[tooltip]="'dossier-overview.header-actions.download-csv' | translate"
></iqser-circle-button>
@ -41,6 +43,7 @@
[icon]="'iqser:upload'"
[id]="'upload-document-btn'"
[iqserHelpMode]="'edit_dossier_in_dossier'"
[overlappingElement]="'USER_MENU'"
[tooltipPosition]="'below'"
[tooltip]="'dossier-overview.header-actions.upload-document' | translate"
[type]="circleButtonTypes.primary"

View File

@ -11,6 +11,7 @@ import {
ListingMode,
ListingModes,
NestedFilter,
OverlappingElements,
TableColumnConfig,
WorkflowColumn,
WorkflowConfig,
@ -160,6 +161,7 @@ export class ConfigService {
icon: 'iqser:edit',
hide: !this.currentUser.isManager && !this._iqserPermissionsService.has(ROLES.dossiers.edit),
helpModeKey: 'edit_dossier_in_dossier',
overlappingElement: OverlappingElements.USER_MENU,
disabled$,
},
];

View File

@ -1,5 +1,13 @@
import { Injectable, TemplateRef } from '@angular/core';
import { ButtonConfig, IFilterGroup, INestedFilter, keyChecker, NestedFilter, TableColumnConfig } from '@iqser/common-ui';
import {
ButtonConfig,
IFilterGroup,
INestedFilter,
keyChecker,
NestedFilter,
OverlappingElements,
TableColumnConfig,
} from '@iqser/common-ui';
import {
annotationDefaultColorConfig,
AnnotationShapeMap,
@ -65,6 +73,7 @@ export class ConfigService {
icon: 'iqser:plus',
type: 'primary',
helpModeKey: 'new_dossier_button',
overlappingElement: OverlappingElements.USER_MENU,
},
];
}

View File

@ -17,6 +17,7 @@
(click)="multiSelectService.activate()"
*ngIf="(multiSelectService.enabled$ | async) && (multiSelectInactive$ | async)"
[iqserHelpMode]="'workload_in_editor'"
[overlappingElement]="'USER_MENU'"
class="all-caps-label primary pointer"
translate="file-preview.tabs.annotations.select"
></div>
@ -24,6 +25,7 @@
<iqser-popup-filter
[actionsTemplate]="annotationFilterActionTemplate"
[iqserHelpMode]="'workload_in_editor'"
[overlappingElement]="'USER_MENU'"
[primaryFiltersSlug]="'primaryFilters'"
[secondaryFiltersSlug]="'secondaryFilters'"
></iqser-popup-filter>

View File

@ -21,6 +21,7 @@
[annotations]="[annotation]"
[canPerformAnnotationActions]="pdfProxyService.canPerformAnnotationActions$ | async"
[iqserHelpMode]="getActionsHelpModeKey(annotation)"
[overlappingElement]="'USER_MENU'"
[scrollableParentView]="scrollableParentView"
></redaction-annotation-actions>
</ng-template>

View File

@ -37,6 +37,7 @@
[icon]="'iqser:edit'"
[id]="'change-assignee'"
[iqserHelpMode]="'document_features_in_editor'"
[overlappingElement]="'USER_MENU'"
[tooltipPosition]="'below'"
[tooltip]="assignTooltip$ | async"
></iqser-circle-button>

View File

@ -13,6 +13,7 @@
[type]="btn.buttonType || buttonType"
[iqserHelpMode]="helpModeKey"
[scrollableParentView]="scrollableParentView"
[overlappingElement]="overlappingElement"
></iqser-circle-button>
<!-- download redacted file-->
@ -25,6 +26,7 @@
[type]="buttonType"
[iqserHelpMode]="helpModeKey"
[scrollableParentView]="scrollableParentView"
[overlappingElement]="overlappingElement"
></redaction-file-download-btn>
<!-- exclude from redaction -->
@ -39,6 +41,7 @@
[ngClass]="btn.class"
[iqserHelpMode]="helpModeKey"
[scrollableParentView]="scrollableParentView"
[overlappingElement]="overlappingElement"
color="primary"
></mat-slide-toggle>
</div>

View File

@ -1,6 +1,13 @@
import { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges, ViewChild } from '@angular/core';
import { Action, ActionTypes, File } from '@red/domain';
import { CircleButtonType, IqserTooltipPosition, ScrollableParentView, ScrollableParentViews, Toaster } from '@iqser/common-ui';
import {
CircleButtonType,
IqserTooltipPosition,
OverlappingElements,
ScrollableParentView,
ScrollableParentViews,
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';
@ -88,4 +95,8 @@ export class ExpandableFileActionsComponent implements OnChanges {
button.action($event);
this.matMenu.closeMenu();
}
get overlappingElement() {
return this.helpModeKey === 'document_features_in_editor' ? OverlappingElements.USER_MENU : undefined;
}
}

View File

@ -23,6 +23,7 @@
[class.large-spacing]="largeSpacing"
[icon]="'iqser:plus'"
[iqserHelpMode]="'edit_dossier_members'"
[overlappingElement]="'USER_MENU'"
[size]="32"
[tooltip]="'dossier-details.assign-members' | translate"
[type]="circleButtonTypes.primary"

@ -1 +1 @@
Subproject commit 70938dcea23f80cb8cffefc371122079b3ec79b7
Subproject commit be87af01477ef705491833fbbade5278af7fa4fe