diff --git a/src/app/components/generic-calculator/calculator.component.html b/src/app/components/generic-calculator/calculator.component.html index b1b3ec2b01f6c9fa07ee75cbced472c8803fd769..7b46d2c9eac2d535384a739cf21fcd9ba9eac6ed 100644 --- a/src/app/components/generic-calculator/calculator.component.html +++ b/src/app/components/generic-calculator/calculator.component.html @@ -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'" diff --git a/src/app/components/generic-calculator/calculator.component.ts b/src/app/components/generic-calculator/calculator.component.ts index 4d3c377cecef1177c19f7f8e1a13b9c65ecd523c..ddb07a6c60977534be23b60361195f395a9b43d9 100644 --- a/src/app/components/generic-calculator/calculator.component.ts +++ b/src/app/components/generic-calculator/calculator.component.ts @@ -153,6 +153,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 */