fxied report trigger
This commit is contained in:
parent
e2b3a85888
commit
01770bfa62
@ -1,7 +1,7 @@
|
||||
<redaction-circle-button
|
||||
*ngIf="project && permissionsService.isManagerAndOwner(project)"
|
||||
[matMenuTriggerFor]="menu"
|
||||
(click)="openMenu($event)"
|
||||
(action)="openMenu($event)"
|
||||
(click)="$event.stopPropagation()"
|
||||
[tooltipClass]="tooltipClass"
|
||||
[tooltipPosition]="tooltipPosition"
|
||||
[type]="type"
|
||||
@ -9,6 +9,7 @@
|
||||
[disabled]="!isApproved"
|
||||
icon="red:report"
|
||||
></redaction-circle-button>
|
||||
<div #menuTrigger="matMenuTrigger" [matMenuTriggerFor]="menu"></div>
|
||||
|
||||
<mat-menu #menu="matMenu" xPosition="before" (closed)="onMenuClosed()">
|
||||
<div (click)="downloadRedactionReport($event, 'EFSA Template')" mat-menu-item>
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
redaction-circle-button.disabled {
|
||||
pointer-events: none;
|
||||
}
|
||||
@ -1,8 +1,9 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { PermissionsService } from '../../../common/service/permissions.service';
|
||||
import { AppStateService } from '../../../state/app-state.service';
|
||||
import { ProjectWrapper } from '../../../state/model/project.wrapper';
|
||||
import { FileStatusWrapper } from '../../../screens/file/model/file-status.wrapper';
|
||||
import { MatMenuTrigger } from '@angular/material/menu';
|
||||
|
||||
export type MenuState = 'OPEN' | 'CLOSED';
|
||||
|
||||
@ -19,6 +20,7 @@ export class ReportDownloadBtnComponent implements OnInit {
|
||||
@Input() tooltipClass: string;
|
||||
|
||||
@Output() menuStateChanged = new EventEmitter<MenuState>();
|
||||
@ViewChild('menuTrigger') menuTrigger: MatMenuTrigger;
|
||||
|
||||
constructor(public readonly permissionsService: PermissionsService, private readonly _appStateService: AppStateService) {}
|
||||
|
||||
@ -26,6 +28,7 @@ export class ReportDownloadBtnComponent implements OnInit {
|
||||
|
||||
openMenu($event: MouseEvent) {
|
||||
$event.stopPropagation();
|
||||
this.menuTrigger.openMenu();
|
||||
this.menuStateChanged.emit('OPEN');
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user