Skip to content
Snippets Groups Projects
Commit 564a499c authored by François Grand's avatar François Grand Committed by AUBRY JEAN-PASCAL
Browse files

fix: simple rock-ramp calculator: enable backwater curve generation button...

fix: simple rock-ramp calculator: enable backwater curve generation button only if calculation has been run

refs #609
parent cac551a6
No related branches found
No related tags found
2 merge requests!252release: version 4.18.0,!213Resolve "Ajout du module courbe de remous d'une passe à macro-rugosité"
...@@ -214,7 +214,7 @@ ...@@ -214,7 +214,7 @@
</button> </button>
<button mat-raised-button color="accent" id="generate-backwater-curve" *ngIf="isPAM" <button mat-raised-button color="accent" id="generate-backwater-curve" *ngIf="isPAM"
(click)="generateBackwaterInPAM()"> (click)="generateBackwaterInPAM()" [disabled]="!generateCrPamEnabled">
{{ uitextGenerateBackwaterInPAM }} {{ uitextGenerateBackwaterInPAM }}
</button> </button>
......
...@@ -1030,6 +1030,10 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe ...@@ -1030,6 +1030,10 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe
); );
} }
public get generateCrPamEnabled(): boolean {
return this.hasResults && !this._formulaire.currentNub.result.hasErrorMessages();
}
public get uitextGenerateParSimulationTitle(): string { public get uitextGenerateParSimulationTitle(): string {
const parCalage = (this._formulaire.currentNub as Par); const parCalage = (this._formulaire.currentNub as Par);
if (!this.hasResults || parCalage.result.hasErrorMessages()) { if (!this.hasResults || parCalage.result.hasErrorMessages()) {
......
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