This commit is contained in:
Adina Țeudan 2021-06-03 14:23:08 +03:00
parent 3ab2e93d32
commit f17e6ab034
4 changed files with 6 additions and 3 deletions

View File

@ -56,6 +56,7 @@
<!-- ></redaction-circle-button>--> <!-- ></redaction-circle-button>-->
<redaction-file-download-btn <redaction-file-download-btn
[disabled]="areSomeEntitiesSelected"
[dossier]="activeDossier" [dossier]="activeDossier"
[file]="allEntities" [file]="allEntities"
tooltipPosition="below" tooltipPosition="below"
@ -64,9 +65,10 @@
<redaction-circle-button <redaction-circle-button
(action)="reanalyseDossier()" (action)="reanalyseDossier()"
*ngIf="permissionsService.displayReanalyseBtn()" *ngIf="permissionsService.displayReanalyseBtn()"
[disabled]="areSomeEntitiesSelected"
[tooltipClass]="'small ' + areSomeEntitiesSelected ? '' : 'warn'"
[tooltip]="'dossier-overview.new-rule.toast.actions.reanalyse-all'" [tooltip]="'dossier-overview.new-rule.toast.actions.reanalyse-all'"
icon="red:refresh" icon="red:refresh"
tooltipClass="warn small"
tooltipPosition="below" tooltipPosition="below"
type="warn" type="warn"
></redaction-circle-button> ></redaction-circle-button>

View File

@ -30,7 +30,7 @@ button {
} }
} }
&.warn { &.warn:not([disabled]) {
background-color: $yellow-2; background-color: $yellow-2;
&:hover { &:hover {

View File

@ -1,6 +1,6 @@
<redaction-circle-button <redaction-circle-button
(action)="downloadFiles($event)" (action)="downloadFiles($event)"
[disabled]="!canDownloadFiles" [disabled]="disabled || !canDownloadFiles"
[tooltipClass]="tooltipClass" [tooltipClass]="tooltipClass"
[tooltipPosition]="tooltipPosition" [tooltipPosition]="tooltipPosition"
[tooltip]=" [tooltip]="

View File

@ -20,6 +20,7 @@ export class FileDownloadBtnComponent {
@Input() tooltipPosition: 'above' | 'below' | 'before' | 'after' = 'above'; @Input() tooltipPosition: 'above' | 'below' | 'before' | 'after' = 'above';
@Input() type: 'default' | 'primary' | 'warn' | 'dark-bg' = 'default'; @Input() type: 'default' | 'primary' | 'warn' | 'dark-bg' = 'default';
@Input() tooltipClass: string; @Input() tooltipClass: string;
@Input() disabled = false;
constructor( constructor(
@Inject(BASE_HREF) private readonly _baseHref: string, @Inject(BASE_HREF) private readonly _baseHref: string,