diff --git a/src/app/components/generic-calculator/calculator.component.ts b/src/app/components/generic-calculator/calculator.component.ts index 8aec6d7b541f5ca2cbd430ac1cabc91744c30801..e0977639ffddec1deb081027d2bdbe1e05828f4f 100644 --- a/src/app/components/generic-calculator/calculator.component.ts +++ b/src/app/components/generic-calculator/calculator.component.ts @@ -583,7 +583,6 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe res = res && pstr.getChildren().length > 0; break; } - res = res && this._formulaire.currentNub.isComputable(); } @@ -1031,7 +1030,7 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe } 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 { @@ -1274,7 +1273,6 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe } public async generateBackwaterInPAM() { - console.log("generateBackwaterInPAM") const f: FormulaireDefinition = await this.formulaireService.createFormulaire(CalculatorType.MacrorugoRemous); const mrr = (f.currentNub as MacrorugoRemous); mrr.setPropValue("nubMacroRugo", this.formulaire.currentNub.uid); diff --git a/src/app/components/select-field-line/select-field-line.component.ts b/src/app/components/select-field-line/select-field-line.component.ts index 7142ef8708d89b933f3ae8068f7c8d15cee5bebf..a86c9c7cf06e58ca19bc75b019e0d8a1afcfdde7 100644 --- a/src/app/components/select-field-line/select-field-line.component.ts +++ b/src/app/components/select-field-line/select-field-line.component.ts @@ -60,6 +60,9 @@ export class SelectFieldLineComponent implements OnInit { } public get isValid(): boolean { + if(this._select.errorMessage !== undefined) { + return false; + } return (this._select.getValue() !== undefined); }