Skip to content
Snippets Groups Projects
Commit 8dc0493f authored by Mathias Chouet's avatar Mathias Chouet Committed by mathias.chouet
Browse files

Hide calculate button and results panel when form is not calculable

parent 1f094b0e
No related branches found
No related tags found
No related merge requests found
......@@ -76,7 +76,8 @@
<mat-card-actions>
<!-- bouton calculer -->
<button type="submit" id="trigger-calculate" mat-raised-button color="accent" name="Calculer" (click)="doCompute()" [disabled]="isCalculateDisabled">
<button type="submit" id="trigger-calculate" mat-raised-button color="accent" name="Calculer"
(click)="doCompute()" [disabled]="isCalculateDisabled" [hidden]="calculateDisabledPermanently">
{{ uitextCalculer }}
</button>
</mat-card-actions>
......@@ -84,6 +85,7 @@
<!-- résultats -->
<mat-card id="calc-card-results"
[hidden]="calculateDisabledPermanently"
[class.pab-results]="isWide"
[fxFlex.gt-sm]="isWide ? '1 0 auto' : '1 0 400px'"
[fxFlex.lt-md]="isWide ? '1 0 auto' : '1 0 500px'"
......
......@@ -157,6 +157,10 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe
return this._formulaire.kids as FormulaireElement[];
}
public get calculateDisabledPermanently(): boolean {
return this._formulaire.calculateDisabled;
}
/**
* détermine si un FormulaireElement est du type FieldSet
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment