diff --git a/jalhyd_branch b/jalhyd_branch index 50cc6a0b1d745d24a600141a8d4218324a03332e..c8375d882015b74a13a4efd4a1693afde5aad1c3 100644 --- a/jalhyd_branch +++ b/jalhyd_branch @@ -1 +1 @@ -342-solveur-multimodule-le-module-existe-toujours-apres-suppression +343-courbe-de-remous-rendre-facultatif-l-une-des-deux-conditions-limites-en-cote diff --git a/src/app/calculators/courberemous/config.json b/src/app/calculators/courberemous/config.json index d1682af8b8ab5bdec0470f3f45f807410931babd..14ee8981ce2957e684510c9b379e975ea1d7c916 100644 --- a/src/app/calculators/courberemous/config.json +++ b/src/app/calculators/courberemous/config.json @@ -44,8 +44,14 @@ "type": "fieldset", "fields": [ "Q", - "Z1", - "Z2" + { + "id": "Z1", + "allowEmpty": true + }, + { + "id": "Z2", + "allowEmpty": true + } ] }, { diff --git a/src/app/components/field-set/field-set.component.ts b/src/app/components/field-set/field-set.component.ts index 62b39960f24fd4f2e18e1d4c95c9e5b8dda162c1..889b28d60f4dc9f93d981e8536aeb1113eb9abc4 100644 --- a/src/app/components/field-set/field-set.component.ts +++ b/src/app/components/field-set/field-set.component.ts @@ -265,7 +265,7 @@ export class FieldSetComponent implements DoCheck { * réception d'un événement de validité de ParamFieldLineComponent */ public onParamLineValid(event: boolean) { - this.updateValidity(); + this.updateValidity(true); } /** diff --git a/src/app/components/generic-calculator/calculator.component.ts b/src/app/components/generic-calculator/calculator.component.ts index cc775438308d59e10aa2f7efbd49560c9881c146..1ef35884ab522bff373dfa7a30e504cc51d532b8 100644 --- a/src/app/components/generic-calculator/calculator.component.ts +++ b/src/app/components/generic-calculator/calculator.component.ts @@ -568,6 +568,8 @@ export class GenericCalculatorComponent implements OnInit, DoCheck, AfterViewChe res = res && pstr.getChildren().length > 0; break; } + + res = res && this._formulaire.currentNub.isComputable(); } this._isUIValid.value = res; diff --git a/src/app/components/generic-input/generic-input.component.ts b/src/app/components/generic-input/generic-input.component.ts index 281a11332a7c288641ab2719a9f18a1d11c9ccf2..0054b643d07eca347080b5cd1a53d38c5b9df85e 100644 --- a/src/app/components/generic-input/generic-input.component.ts +++ b/src/app/components/generic-input/generic-input.component.ts @@ -119,9 +119,10 @@ export abstract class GenericInputComponentDirective implements OnChanges { */ private setAndEmitValid() { this._isValid.value = this._isValidUI && this._isValidModel; - if (this._isValid.changed) { - this.change.emit({ "action": "valid", "value": this._isValid.value }); - } + // if (this._isValid.changed) + // { + this.change.emit({ "action": "valid", "value": this._isValid.value }); + // } } /** diff --git a/src/app/components/param-field-line/param-field-line.component.ts b/src/app/components/param-field-line/param-field-line.component.ts index 2dbe5a3335f1a02e7b1c480ee157a8ad14a8aba4..43cea6de730381b4fd523ce661b5ed94f4a0863a 100644 --- a/src/app/components/param-field-line/param-field-line.component.ts +++ b/src/app/components/param-field-line/param-field-line.component.ts @@ -347,6 +347,10 @@ export class ParamFieldLineComponent implements OnChanges { case "cancelvar": // cancel button clicked in DialogEditParamValuesComponent this.param.loadObjectRepresentation(this.paramBackup); break; + + case "okvar": + this.emitValidity(); + break; } } diff --git a/src/app/components/param-values/param-values.component.ts b/src/app/components/param-values/param-values.component.ts index d39e310fecdaf7f8eb44affcae5ed76b9c24b9b5..b77eff7ade61558e17c7825455cb3a22f6b2b5f5 100644 --- a/src/app/components/param-values/param-values.component.ts +++ b/src/app/components/param-values/param-values.component.ts @@ -74,6 +74,10 @@ export class ParamValuesComponent implements AfterViewInit, Observer { this.change.emit({ action: "cancelvar" }); + } else { + this.change.emit({ + action: "okvar" + }); } }); }