From 877ce7bb9140ff4983cbc061b3cb5899af422515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr> Date: Mon, 12 Dec 2022 08:51:32 +0100 Subject: [PATCH 01/14] update jalhyd_branch to 334-restructurer-lechapt-et-calmon-pour-de-nouvelles-lois-de-pertes-de-charge refs #585 --- jalhyd_branch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jalhyd_branch b/jalhyd_branch index ad8cc6ff7..0bd0de843 100644 --- a/jalhyd_branch +++ b/jalhyd_branch @@ -1 +1 @@ -330-prebarrage-puissance-dissipee-negative +334-restructurer-lechapt-et-calmon-pour-de-nouvelles-lois-de-pertes-de-charge -- GitLab From 88d2ffdc60c402403248439101fdbf0f667047a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr> Date: Wed, 14 Dec 2022 17:13:57 +0100 Subject: [PATCH 02/14] refactor: application start page: rename Lechapt-Calmon calculator to Pressure loss refs #585 --- .../config.json | 21 ++++++++++++++----- .../{lechaptcalmon => pressureloss}/en.json | 2 ++ .../{lechaptcalmon => pressureloss}/fr.json | 2 ++ .../calculator-list.component.ts | 3 ++- src/app/config.json | 2 +- src/locale/messages.en.json | 1 + src/locale/messages.fr.json | 1 + 7 files changed, 25 insertions(+), 7 deletions(-) rename src/app/calculators/{lechaptcalmon => pressureloss}/config.json (54%) rename src/app/calculators/{lechaptcalmon => pressureloss}/en.json (91%) rename src/app/calculators/{lechaptcalmon => pressureloss}/fr.json (91%) diff --git a/src/app/calculators/lechaptcalmon/config.json b/src/app/calculators/pressureloss/config.json similarity index 54% rename from src/app/calculators/lechaptcalmon/config.json rename to src/app/calculators/pressureloss/config.json index 1b440a6ae..00befe99f 100644 --- a/src/app/calculators/lechaptcalmon/config.json +++ b/src/app/calculators/pressureloss/config.json @@ -1,6 +1,21 @@ [ { - "id": "fs_materiau", + "id": "fs_pressureloss_law", + "type": "fieldset", + "fields": [ + { + "id": "select_pressureloss_law", + "type": "select", + "property": "pressureLossType", + "default": "LechaptCalmon", + "help": { + "0": "hyd_en_charge/lechapt-calmon.html" + } + } + ] + }, + { + "id": "fs_lechaptcalmon", "type": "fieldset", "fields": [ { @@ -24,9 +39,5 @@ "Lg", "Ks" ] - }, - { - "type": "options", - "help": "hyd_en_charge/lechapt-calmon.html" } ] \ No newline at end of file diff --git a/src/app/calculators/lechaptcalmon/en.json b/src/app/calculators/pressureloss/en.json similarity index 91% rename from src/app/calculators/lechaptcalmon/en.json rename to src/app/calculators/pressureloss/en.json index 729994b0e..e93afd9bf 100644 --- a/src/app/calculators/lechaptcalmon/en.json +++ b/src/app/calculators/pressureloss/en.json @@ -1,4 +1,6 @@ { + "fs_pressureloss_law": "Pressure loss", + "select_pressureloss_law": "Pressure loss law", "fs_materiau": "Type of material", "select_material": "Choice of material", "MATERIAL_0": "Unlined cast iron - Coarse concrete (corrosive water)", diff --git a/src/app/calculators/lechaptcalmon/fr.json b/src/app/calculators/pressureloss/fr.json similarity index 91% rename from src/app/calculators/lechaptcalmon/fr.json rename to src/app/calculators/pressureloss/fr.json index 89884cabd..17965675c 100644 --- a/src/app/calculators/lechaptcalmon/fr.json +++ b/src/app/calculators/pressureloss/fr.json @@ -1,4 +1,6 @@ { + "fs_pressureloss_law": "Perte de charge", + "select_pressureloss_law": "Loi de perte de charge", "fs_materiau": "Type du matériau", "select_material": "Choix du matériau", "MATERIAL_0": "Fonte ou acier non revêtus - Béton grossier (eau corrosive)", diff --git a/src/app/components/calculator-list/calculator-list.component.ts b/src/app/components/calculator-list/calculator-list.component.ts index ec0ec059a..b62c4f2e4 100644 --- a/src/app/components/calculator-list/calculator-list.component.ts +++ b/src/app/components/calculator-list/calculator-list.component.ts @@ -120,7 +120,8 @@ export class CalculatorListComponent implements OnInit { CalculatorType.CloisonAval, CalculatorType.YAXN, CalculatorType.PbBassin, - CalculatorType.PbCloison + CalculatorType.PbCloison, + CalculatorType.LechaptCalmon ].includes(t) ) { unusedTheme.calculators.push({ diff --git a/src/app/config.json b/src/app/config.json index 97f3c60d6..1bc488230 100644 --- a/src/app/config.json +++ b/src/app/config.json @@ -63,7 +63,7 @@ "path": "en-charge.jpg", "credits": "Catherine Tailleux / Inrae" }, - "calculators": [ 1, 0 ] + "calculators": [ 35, 0 ] }, { "name": "LOIS_D_OUVRAGES", diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json index 6ac8ce559..c88ae52e5 100755 --- a/src/locale/messages.en.json +++ b/src/locale/messages.en.json @@ -261,6 +261,7 @@ "INFO_LECHAPTCALMON_DESCRIPTION": "pipe flow circular headloss", "INFO_LECHAPTCALMON_TITRE_COURT": "Lechapt-C.", "INFO_LECHAPTCALMON_TITRE": "Lechapt-Calmon", + "INFO_PRESSURELOSS_TITRE": "Pressure loss", "INFO_LIB_ABSCISSE": "Abscissa (m)", "INFO_LIB_ALTITUDE": "Altitude (m)", "INFO_LIB_LENGTHS": "Every length", diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json index 241353236..70fd109ee 100755 --- a/src/locale/messages.fr.json +++ b/src/locale/messages.fr.json @@ -261,6 +261,7 @@ "INFO_LECHAPTCALMON_DESCRIPTION": "Hydraulique en charge conduite colebrook", "INFO_LECHAPTCALMON_TITRE_COURT": "Lechapt-C.", "INFO_LECHAPTCALMON_TITRE": "Lechapt-Calmon", + "INFO_PRESSURELOSS_TITRE": "Perte de charge", "INFO_LIB_ABSCISSE": "Abscisse (m)", "INFO_LIB_ALTITUDE": "Altitude (m)", "INFO_LIB_LENGTHS": "Toutes les longueurs", -- GitLab From f11b78e934c021c011ddeaa79aebb589f8a28bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr> Date: Thu, 15 Dec 2022 11:27:26 +0100 Subject: [PATCH 03/14] fix(e2e): exclude LechaptCalmon calculator refs #585 --- e2e/tested_calctypes.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e2e/tested_calctypes.ts b/e2e/tested_calctypes.ts index cdd1fc766..590416318 100644 --- a/e2e/tested_calctypes.ts +++ b/e2e/tested_calctypes.ts @@ -1,7 +1,9 @@ // cannot import JaLHyd here :/ // @WARNING keep in sync if CalculatorType enum order changes in JaLHyd export const testedCalcTypes = [ - 0, 1, 2, 3, 4, 5, 6, + 0, + // omit 1 - LechaptCalmon + 2, 3, 4, 5, 6, // omit 7 - Structure 8, 9, 10, 11, 12, 13, // omit 14 -Section -- GitLab From 232fb2a7df237267fbd1705678e6ca05e1e22c06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr> Date: Thu, 15 Dec 2022 11:29:38 +0100 Subject: [PATCH 04/14] feat: add FormulaireDefinition.parseSelectDefaultValue() refs #585 --- .../formulaire/definition/form-definition.ts | 19 +++++++++++++++++++ src/app/formulaire/definition/form-section.ts | 14 ++------------ 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/app/formulaire/definition/form-definition.ts b/src/app/formulaire/definition/form-definition.ts index 475c630c8..f2141323a 100644 --- a/src/app/formulaire/definition/form-definition.ts +++ b/src/app/formulaire/definition/form-definition.ts @@ -25,6 +25,7 @@ import { ServiceFactory } from "../../services/service-factory"; import { SelectEntry } from "../elements/select/select-entry"; import { SelectField } from "../elements/select/select-field"; import { DeepSelectFieldIterator } from "../form-iterator/deep-selectfield-iterator"; +import { ConfigParser } from "./config-parser"; /** * classe de base pour tous les formulaires @@ -146,6 +147,24 @@ export abstract class FormulaireDefinition extends FormulaireNode implements Obs Session.getInstance().deleteNub(sn); } + /** + * parse calculator JSON configuration for select default value + * @param selectId select id, ie. "id" field value + * @return select "default" field value + */ + protected parseSelectDefaultValue(json: {}, selectId: string): string { + const jp = new ConfigParser(json); + for (const fs of jp.forAll("fieldset")) { + const fsp = new ConfigParser(fs["fields"]); + for (const sel of fsp.forAll("select")) { + if (sel["id"] === selectId) { + return sel["default"]; + } + } + } + return undefined; + } + /** * prepare options parsing */ diff --git a/src/app/formulaire/definition/form-section.ts b/src/app/formulaire/definition/form-section.ts index 7ef1534e1..8f8be0af9 100644 --- a/src/app/formulaire/definition/form-section.ts +++ b/src/app/formulaire/definition/form-section.ts @@ -3,7 +3,6 @@ import { FieldSet } from "../elements/fieldset"; import { ServiceFactory } from "../../services/service-factory"; import { IObservable, Session, SectionNub, Props, CalculatorType, Prop_NullParameters, acSection } from "jalhyd"; -import { ConfigParser } from "./config-parser"; import { SectionType } from "jalhyd"; export class FormulaireSection extends FormulaireFixedVar { @@ -16,17 +15,8 @@ export class FormulaireSection extends FormulaireFixedVar { */ private parseDefaultSectionType() { if (this._defaultSectionType === undefined) { - const jp = new ConfigParser(this._jsonConfig); - for (const fs of jp.forAll("fieldset")) { - const fsp = new ConfigParser(fs["fields"]); - for (const sel of fsp.forAll("select")) { - if (sel["id"] === "select_section") { - const st = sel["default"]; - this._defaultSectionType = SectionType[st]; - return; - } - } - } + const def = this.parseSelectDefaultValue(this._jsonConfig, "select_section"); + this._defaultSectionType = SectionType[def]; } } -- GitLab From 786bbb81cafe92b3d97b88862d5ae7f90fcb2aa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr> Date: Thu, 15 Dec 2022 13:48:23 +0100 Subject: [PATCH 05/14] feat: add pressure loss form refs #585 --- .../definition/form-pressureloss.ts | 24 +++++++++++++++++++ src/app/services/formulaire.service.ts | 5 ++++ 2 files changed, 29 insertions(+) create mode 100644 src/app/formulaire/definition/form-pressureloss.ts diff --git a/src/app/formulaire/definition/form-pressureloss.ts b/src/app/formulaire/definition/form-pressureloss.ts new file mode 100644 index 000000000..4ba8f55dd --- /dev/null +++ b/src/app/formulaire/definition/form-pressureloss.ts @@ -0,0 +1,24 @@ +import { PressureLoss, Props, PressureLossType } from "jalhyd"; +import { FormulaireFixedVar } from "./form-fixedvar"; + +/** + * Formulaire pour la perte de charge + */ +export class FormulairePressureLoss extends FormulaireFixedVar { + public preparseConfig(json: {}) { + super.preparseConfig(json); + + // get pressure loss law select default value + const dft: string = this.parseSelectDefaultValue(json, "select_pressureloss_law"); + this.defaultProperties["pressureLossType"] = PressureLossType[dft]; + } + + public initNub(props?: Props) { + if (props === undefined) { + props = new Props(); + } + props.setPropValue("calcType", this.calculatorType); + props.setPropValue("pressureLossType", this.defaultProperties["pressureLossType"]); + super.initNub(props); + } +} diff --git a/src/app/services/formulaire.service.ts b/src/app/services/formulaire.service.ts index 19022be0b..c7486a1b1 100644 --- a/src/app/services/formulaire.service.ts +++ b/src/app/services/formulaire.service.ts @@ -57,6 +57,7 @@ import { FormulaireVerificateur } from "../formulaire/definition/form-verificate import { FormulaireEspece } from "../formulaire/definition/form-espece"; import { FormulairePrebarrage } from "../formulaire/definition/form-prebarrage"; import { ServiceFactory } from "./service-factory"; +import { FormulairePressureLoss } from "app/formulaire/definition/form-pressureloss"; @Injectable() export class FormulaireService extends Observable { @@ -346,6 +347,10 @@ export class FormulaireService extends Observable { f = new FormulairePrebarrage(); break; + case CalculatorType.PressureLoss: + f = new FormulairePressureLoss(); + break; + default: f = new FormulaireFixedVar(); } -- GitLab From c047d84112f58dc8b519a6d911caa93c64d21381 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr> Date: Thu, 15 Dec 2022 14:17:37 +0100 Subject: [PATCH 06/14] fix: do not load translation files for Lechapt-Calmon calculor (now, it's a child nub) refs #585 --- src/app/services/internationalisation.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/services/internationalisation.service.ts b/src/app/services/internationalisation.service.ts index af0f2d42e..ba7e4cf84 100644 --- a/src/app/services/internationalisation.service.ts +++ b/src/app/services/internationalisation.service.ts @@ -62,7 +62,8 @@ export class I18nService extends Observable implements Observer { public async setLanguage(code: string) { /** excluded calculators */ const childCalculatorType: CalculatorType[] = [ - CalculatorType.Section, CalculatorType.Structure, CalculatorType.CloisonAval, CalculatorType.YAXN + CalculatorType.Section, CalculatorType.Structure, CalculatorType.CloisonAval, CalculatorType.YAXN, + CalculatorType.LechaptCalmon ]; // ensure 2-letter language code -- GitLab From 528f5808c337b03a9258c02af305d1b918c3462c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr> Date: Thu, 15 Dec 2022 14:24:16 +0100 Subject: [PATCH 07/14] pressure loss: add translations for short title/description refs #585 --- src/locale/messages.en.json | 2 ++ src/locale/messages.fr.json | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json index c88ae52e5..fb955b4d2 100755 --- a/src/locale/messages.en.json +++ b/src/locale/messages.en.json @@ -261,6 +261,8 @@ "INFO_LECHAPTCALMON_DESCRIPTION": "pipe flow circular headloss", "INFO_LECHAPTCALMON_TITRE_COURT": "Lechapt-C.", "INFO_LECHAPTCALMON_TITRE": "Lechapt-Calmon", + "INFO_PRESSURELOSS_TITRE_DESCRIPTION": "Headloss in a pipe flow", + "INFO_PRESSURELOSS_TITRE_COURT": "Press. loss", "INFO_PRESSURELOSS_TITRE": "Pressure loss", "INFO_LIB_ABSCISSE": "Abscissa (m)", "INFO_LIB_ALTITUDE": "Altitude (m)", diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json index 70fd109ee..81d52af76 100755 --- a/src/locale/messages.fr.json +++ b/src/locale/messages.fr.json @@ -261,6 +261,8 @@ "INFO_LECHAPTCALMON_DESCRIPTION": "Hydraulique en charge conduite colebrook", "INFO_LECHAPTCALMON_TITRE_COURT": "Lechapt-C.", "INFO_LECHAPTCALMON_TITRE": "Lechapt-Calmon", + "INFO_PRESSURELOSS_TITRE_DESCRIPTION": "Pertes dans une conduite en charge", + "INFO_PRESSURELOSS_TITRE_COURT": "Perte de ch.", "INFO_PRESSURELOSS_TITRE": "Perte de charge", "INFO_LIB_ABSCISSE": "Abscisse (m)", "INFO_LIB_ALTITUDE": "Altitude (m)", -- GitLab From 666e455a89a5c56cede264c76b1a63b3310fc1ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr> Date: Thu, 15 Dec 2022 14:35:05 +0100 Subject: [PATCH 08/14] fix: SelectFieldFactory.newSelectField(): syntax error in error message refs #585 --- src/app/formulaire/elements/select/select-field-factory.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/formulaire/elements/select/select-field-factory.ts b/src/app/formulaire/elements/select/select-field-factory.ts index 49fed0c91..8c3072db3 100644 --- a/src/app/formulaire/elements/select/select-field-factory.ts +++ b/src/app/formulaire/elements/select/select-field-factory.ts @@ -72,7 +72,7 @@ export class SelectFieldFactory { return new SelectFieldNubProperty(parent); default: - throw new Error("unknown select id ${id}"); + throw new Error(`unknown select id ${json["id"]}`); } } } -- GitLab From 63a416ce798f76c261358cb3b8b037b983d6cec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr> Date: Thu, 15 Dec 2022 14:45:50 +0100 Subject: [PATCH 09/14] fix: pressure loss calculator JSON configuration: bad select id refs #585 --- src/app/calculators/pressureloss/config.json | 2 +- src/app/calculators/pressureloss/en.json | 2 +- src/app/calculators/pressureloss/fr.json | 2 +- src/app/formulaire/definition/form-pressureloss.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/calculators/pressureloss/config.json b/src/app/calculators/pressureloss/config.json index 00befe99f..18f6ed008 100644 --- a/src/app/calculators/pressureloss/config.json +++ b/src/app/calculators/pressureloss/config.json @@ -4,7 +4,7 @@ "type": "fieldset", "fields": [ { - "id": "select_pressureloss_law", + "id": "select_pressurelosstype", "type": "select", "property": "pressureLossType", "default": "LechaptCalmon", diff --git a/src/app/calculators/pressureloss/en.json b/src/app/calculators/pressureloss/en.json index e93afd9bf..d2ffa6aeb 100644 --- a/src/app/calculators/pressureloss/en.json +++ b/src/app/calculators/pressureloss/en.json @@ -1,6 +1,6 @@ { "fs_pressureloss_law": "Pressure loss", - "select_pressureloss_law": "Pressure loss law", + "select_pressurelosstype": "Pressure loss law", "fs_materiau": "Type of material", "select_material": "Choice of material", "MATERIAL_0": "Unlined cast iron - Coarse concrete (corrosive water)", diff --git a/src/app/calculators/pressureloss/fr.json b/src/app/calculators/pressureloss/fr.json index 17965675c..17cde6a02 100644 --- a/src/app/calculators/pressureloss/fr.json +++ b/src/app/calculators/pressureloss/fr.json @@ -1,6 +1,6 @@ { "fs_pressureloss_law": "Perte de charge", - "select_pressureloss_law": "Loi de perte de charge", + "select_pressurelosstype": "Loi de perte de charge", "fs_materiau": "Type du matériau", "select_material": "Choix du matériau", "MATERIAL_0": "Fonte ou acier non revêtus - Béton grossier (eau corrosive)", diff --git a/src/app/formulaire/definition/form-pressureloss.ts b/src/app/formulaire/definition/form-pressureloss.ts index 4ba8f55dd..60c98da99 100644 --- a/src/app/formulaire/definition/form-pressureloss.ts +++ b/src/app/formulaire/definition/form-pressureloss.ts @@ -9,7 +9,7 @@ export class FormulairePressureLoss extends FormulaireFixedVar { super.preparseConfig(json); // get pressure loss law select default value - const dft: string = this.parseSelectDefaultValue(json, "select_pressureloss_law"); + const dft: string = this.parseSelectDefaultValue(json, "select_pressurelosstype"); this.defaultProperties["pressureLossType"] = PressureLossType[dft]; } -- GitLab From 407ca9af897aaaf46217148b8b143a596be00c23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr> Date: Thu, 15 Dec 2022 14:46:55 +0100 Subject: [PATCH 10/14] select field factory: add pressure loss law select refs #585 --- src/app/formulaire/elements/select/select-field-factory.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/formulaire/elements/select/select-field-factory.ts b/src/app/formulaire/elements/select/select-field-factory.ts index 8c3072db3..afb4246e0 100644 --- a/src/app/formulaire/elements/select/select-field-factory.ts +++ b/src/app/formulaire/elements/select/select-field-factory.ts @@ -69,6 +69,7 @@ export class SelectFieldFactory { case "select_section": case "select_sppoperation": case "select_unit": + case "select_pressurelosstype": return new SelectFieldNubProperty(parent); default: -- GitLab From e921c0ea82bfe53d9a172bddfa8c506c10847227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr> Date: Thu, 15 Dec 2022 14:59:56 +0100 Subject: [PATCH 11/14] pressure loss: add translation for law select entry refs #585 --- src/app/calculators/pressureloss/en.json | 2 ++ src/app/calculators/pressureloss/fr.json | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/app/calculators/pressureloss/en.json b/src/app/calculators/pressureloss/en.json index d2ffa6aeb..04967c221 100644 --- a/src/app/calculators/pressureloss/en.json +++ b/src/app/calculators/pressureloss/en.json @@ -1,6 +1,8 @@ { "fs_pressureloss_law": "Pressure loss", "select_pressurelosstype": "Pressure loss law", + "PRESSURELOSSTYPE_0": "Lechapt-Calmon", + "fs_materiau": "Type of material", "select_material": "Choice of material", "MATERIAL_0": "Unlined cast iron - Coarse concrete (corrosive water)", diff --git a/src/app/calculators/pressureloss/fr.json b/src/app/calculators/pressureloss/fr.json index 17cde6a02..d1b06625f 100644 --- a/src/app/calculators/pressureloss/fr.json +++ b/src/app/calculators/pressureloss/fr.json @@ -1,6 +1,8 @@ { "fs_pressureloss_law": "Perte de charge", "select_pressurelosstype": "Loi de perte de charge", + "PRESSURELOSSTYPE_0": "Lechapt-Calmon", + "fs_materiau": "Type du matériau", "select_material": "Choix du matériau", "MATERIAL_0": "Fonte ou acier non revêtus - Béton grossier (eau corrosive)", -- GitLab From d10a3b2a2db749cc8d5105841bd271484b3380d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr> Date: Thu, 15 Dec 2022 15:09:14 +0100 Subject: [PATCH 12/14] pressure loss JSON configuration: merge select and Lechapt-Calmon fieldsets refs #585 --- src/app/calculators/pressureloss/config.json | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/app/calculators/pressureloss/config.json b/src/app/calculators/pressureloss/config.json index 18f6ed008..7160ed307 100644 --- a/src/app/calculators/pressureloss/config.json +++ b/src/app/calculators/pressureloss/config.json @@ -11,13 +11,7 @@ "help": { "0": "hyd_en_charge/lechapt-calmon.html" } - } - ] - }, - { - "id": "fs_lechaptcalmon", - "type": "fieldset", - "fields": [ + }, { "id": "select_material", "type": "select", -- GitLab From 3b91b900cd66c03e037ba2fe9e93e3244c963224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr> Date: Fri, 16 Dec 2022 13:10:51 +0100 Subject: [PATCH 13/14] pressure loss: set info_child_type translations refs #585 --- src/locale/messages.en.json | 1 + src/locale/messages.fr.json | 1 + 2 files changed, 2 insertions(+) diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json index fb955b4d2..5130406b1 100755 --- a/src/locale/messages.en.json +++ b/src/locale/messages.en.json @@ -233,6 +233,7 @@ "INFO_CHILD_TYPE_SECTION": "section", "INFO_CHILD_TYPE_SECTION_PLUR": "sections", "INFO_CHILD_TYPE_SECTION_SHORT": "S", + "INFO_CHILD_TYPE_LECHAPTCALMON": "Lechapt-Calmon", "INFO_DIALOG_PARSIM_DESC": "Choose a combination of values to generate the simulation", "INFO_FIELDSET_ADD": "Add", "INFO_FIELDSET_COPY": "Copy", diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json index 81d52af76..f487a29c0 100755 --- a/src/locale/messages.fr.json +++ b/src/locale/messages.fr.json @@ -233,6 +233,7 @@ "INFO_CHILD_TYPE_SECTION": "section", "INFO_CHILD_TYPE_SECTION_PLUR": "sections", "INFO_CHILD_TYPE_SECTION_SHORT": "S", + "INFO_CHILD_TYPE_LECHAPTCALMON": "Lechapt-Calmon", "INFO_DIALOG_PARSIM_DESC": "Choisir une combinaison de valeurs pour générer la simulation", "INFO_FIELDSET_ADD": "Ajouter", "INFO_FIELDSET_COPY": "Copier", -- GitLab From 8401a3cdf6172a6f8265bfb3be7e1880781aa464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr> Date: Mon, 9 Jan 2023 13:10:46 +0100 Subject: [PATCH 14/14] fix: pressure loss JSON configuration: rename Ks to Kloc refs #585 --- src/app/calculators/pressureloss/config.json | 4 ++-- src/app/calculators/pressureloss/en.json | 4 ++-- src/app/calculators/pressureloss/fr.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/calculators/pressureloss/config.json b/src/app/calculators/pressureloss/config.json index 7160ed307..e74c60cd9 100644 --- a/src/app/calculators/pressureloss/config.json +++ b/src/app/calculators/pressureloss/config.json @@ -31,7 +31,7 @@ "D", "J", "Lg", - "Ks" + "Kloc" ] } -] \ No newline at end of file +] diff --git a/src/app/calculators/pressureloss/en.json b/src/app/calculators/pressureloss/en.json index 04967c221..3ed24c3c7 100644 --- a/src/app/calculators/pressureloss/en.json +++ b/src/app/calculators/pressureloss/en.json @@ -20,7 +20,7 @@ "fs_hydraulique": "Hydraulic features", "D": "Pipe diameter", "J": "Total head loss", - "Ks": "Singular head loss coefficient", + "Kloc": "Singular head loss coefficient", "Lg": "Pipe length", "fs_param_calc": "Calculation parameters", "Jl": "Linear head loss", @@ -29,4 +29,4 @@ "UNIT_JL": "m", "UNIT_V": "m/s" -} \ No newline at end of file +} diff --git a/src/app/calculators/pressureloss/fr.json b/src/app/calculators/pressureloss/fr.json index d1b06625f..9028496a3 100644 --- a/src/app/calculators/pressureloss/fr.json +++ b/src/app/calculators/pressureloss/fr.json @@ -20,7 +20,7 @@ "fs_hydraulique": "Caractéristiques hydrauliques", "D": "Diamètre du tuyau", "J": "Perte de charge totale", - "Ks": "Coefficient de perte de charge singulière", + "Kloc": "Coefficient de perte de charge singulière", "Lg": "Longueur du tuyau", "fs_param_calc": "Paramètres de calcul", "Jl": "Perte de charge linéaire", @@ -29,4 +29,4 @@ "UNIT_JL": "m", "UNIT_V": "m/s" -} \ No newline at end of file +} -- GitLab