Skip to content
Snippets Groups Projects
Commit 390eba0a authored by François Grand's avatar François Grand
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 108cf6d5
No related branches found
No related tags found
No related merge requests found
......@@ -214,7 +214,7 @@
</button>
<button mat-raised-button color="accent" id="generate-backwater-curve" *ngIf="isPAM"
(click)="generateBackwaterInPAM()">
(click)="generateBackwaterInPAM()" [disabled]="!generateCrPamEnabled">
{{ uitextGenerateBackwaterInPAM }}
</button>
......
......@@ -1020,6 +1020,10 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe
);
}
public get generateCrPamEnabled(): boolean {
return this.hasResults && !this._formulaire.currentNub.result.hasErrorMessages();
}
public get uitextGenerateParSimulationTitle(): string {
const parCalage = (this._formulaire.currentNub as Par);
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