From 6ebb6a711e59c4038995f31289b87073cd2ba669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr> Date: Mon, 13 Mar 2023 11:32:11 +0100 Subject: [PATCH 1/4] update jalhyd_branch to 343-courbe-de-remous-rendre-facultatif-l-une-des-deux-conditions-limites-en-cote refs #610 --- jalhyd_branch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jalhyd_branch b/jalhyd_branch index 50cc6a0b1..c8375d882 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 -- GitLab From 8b389e25ba2b9601d4be4c94d9117f4fd321fae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr> Date: Wed, 15 Mar 2023 12:23:49 +0100 Subject: [PATCH 2/4] feat: add nub computability to form validity refs #610 --- src/app/components/generic-calculator/calculator.component.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/components/generic-calculator/calculator.component.ts b/src/app/components/generic-calculator/calculator.component.ts index cc7754383..1ef35884a 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; -- GitLab From 536b449e8c0f10086e9a067f32ec1884cf245d56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr> Date: Thu, 16 Mar 2023 11:19:42 +0100 Subject: [PATCH 3/4] refactor: backwater curves calculator JSON definition: add allowEmpty to Z1,Z2 refs #610 --- src/app/calculators/courberemous/config.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/app/calculators/courberemous/config.json b/src/app/calculators/courberemous/config.json index d1682af8b..14ee8981c 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 + } ] }, { -- GitLab From 8c92831b561973f8f353c8120a7cc09fd0cf370b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr> Date: Thu, 16 Mar 2023 13:11:19 +0100 Subject: [PATCH 4/4] fix: form validity not updated after closing variable mode parameter dialog refs #610 --- src/app/components/field-set/field-set.component.ts | 2 +- .../components/generic-input/generic-input.component.ts | 7 ++++--- .../param-field-line/param-field-line.component.ts | 4 ++++ src/app/components/param-values/param-values.component.ts | 4 ++++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/app/components/field-set/field-set.component.ts b/src/app/components/field-set/field-set.component.ts index 62b39960f..889b28d60 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-input/generic-input.component.ts b/src/app/components/generic-input/generic-input.component.ts index 281a11332..0054b643d 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 2dbe5a333..43cea6de7 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 d39e310fe..b77eff7ad 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" + }); } }); } -- GitLab