Skip to content
Snippets Groups Projects
Commit 4c9ea678 authored by AUBRY JEAN-PASCAL's avatar AUBRY JEAN-PASCAL
Browse files

fix: disable generateBackwaterInPAM button and macrorugoremous calculate button when

macrorugo form contains variable parameters
Refs #609
parent d57575dd
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é"
Pipeline #158730 passed
...@@ -583,7 +583,6 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe ...@@ -583,7 +583,6 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe
res = res && pstr.getChildren().length > 0; res = res && pstr.getChildren().length > 0;
break; break;
} }
res = res && this._formulaire.currentNub.isComputable(); res = res && this._formulaire.currentNub.isComputable();
} }
...@@ -1031,7 +1030,7 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe ...@@ -1031,7 +1030,7 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe
} }
public get generateCrPamEnabled(): boolean { public get generateCrPamEnabled(): boolean {
return this.hasResults && !this._formulaire.currentNub.result.hasErrorMessages(); return this.hasResults && this.allParamsAreFixed() && !this._formulaire.currentNub.result.hasErrorMessages();
} }
public get uitextGenerateParSimulationTitle(): string { public get uitextGenerateParSimulationTitle(): string {
...@@ -1274,7 +1273,6 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe ...@@ -1274,7 +1273,6 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe
} }
public async generateBackwaterInPAM() { public async generateBackwaterInPAM() {
console.log("generateBackwaterInPAM")
const f: FormulaireDefinition = await this.formulaireService.createFormulaire(CalculatorType.MacrorugoRemous); const f: FormulaireDefinition = await this.formulaireService.createFormulaire(CalculatorType.MacrorugoRemous);
const mrr = (f.currentNub as MacrorugoRemous); const mrr = (f.currentNub as MacrorugoRemous);
mrr.setPropValue("nubMacroRugo", this.formulaire.currentNub.uid); mrr.setPropValue("nubMacroRugo", this.formulaire.currentNub.uid);
......
...@@ -60,6 +60,9 @@ export class SelectFieldLineComponent implements OnInit { ...@@ -60,6 +60,9 @@ export class SelectFieldLineComponent implements OnInit {
} }
public get isValid(): boolean { public get isValid(): boolean {
if(this._select.errorMessage !== undefined) {
return false;
}
return (this._select.getValue() !== undefined); return (this._select.getValue() !== undefined);
} }
......
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