Unverified Commit 4146b3e7 authored by Zerouali's avatar Zerouali Committed by GitHub
Browse files

fixe download button JDO (#462)

parent 86249acb
......@@ -19,7 +19,7 @@
class="btn btn-primary button-maring"
*ngIf="!hideDownload || canDownload"
(click)="downloadReports()"
[disabled]="couldDownload && !canDownload"
[disabled]="couldDownload && !canDownload || !hasAccessContractId"
>
{{ downloadButtonTitle }}
</button>
......
......@@ -61,6 +61,7 @@ export class LogbookOperationDetailComponent implements OnInit, OnChanges {
canDownload: boolean;
couldDownload: boolean;
accessContractId: string;
hasAccessContractId = false;
downloadButtonTitle: string;
constructor(
......@@ -77,6 +78,7 @@ export class LogbookOperationDetailComponent implements OnInit, OnChanges {
const accessContratId: string = parameters.get(ExternalParameters.PARAM_ACCESS_CONTRACT);
if (accessContratId && accessContratId.length > 0) {
this.accessContractId = accessContratId;
this.hasAccessContractId = true;
} else {
this.snackBar.open($localize`:contrat d'accès non défini: Aucun contrat d'accès n'est associé à l'utiisateur`, null, {
panelClass: 'vitamui-snack-bar',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment