From 8c007dcd0bdb492f343de6b4c7411aeb46435d25 Mon Sep 17 00:00:00 2001 From: "mathias.chouet" <mathias.chouet@irstea.fr> Date: Thu, 11 Apr 2019 15:39:54 +0200 Subject: [PATCH] =?UTF-8?q?Travailr=20sur=20#189=20:=20ajout=20du=20module?= =?UTF-8?q?=20Passe=20=C3=A0=20bassin=20-=20chute?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pab-chute/pab-chute.config.json | 29 +++++++++++++++++++ .../calculators/pab-chute/pab-chute.en.json | 6 ++++ .../calculators/pab-chute/pab-chute.fr.json | 6 ++++ .../services/formulaire/formulaire.service.ts | 4 +++ src/locale/messages.en.json | 2 ++ src/locale/messages.fr.json | 2 ++ 6 files changed, 49 insertions(+) create mode 100644 src/app/calculators/pab-chute/pab-chute.config.json create mode 100644 src/app/calculators/pab-chute/pab-chute.en.json create mode 100644 src/app/calculators/pab-chute/pab-chute.fr.json diff --git a/src/app/calculators/pab-chute/pab-chute.config.json b/src/app/calculators/pab-chute/pab-chute.config.json new file mode 100644 index 000000000..7dfaaf76b --- /dev/null +++ b/src/app/calculators/pab-chute/pab-chute.config.json @@ -0,0 +1,29 @@ +[ + { + "id": "fs_chute", + "type": "fieldset", + "option": "cal", + "fields": [ + { + "type": "input", + "id": "Z1", + "unit": "m" + }, + { + "type": "input", + "id": "Z2", + "unit": "m" + }, + { + "type": "input", + "id": "DH", + "unit": "m" + } + ] + }, + { + "type": "options", + "idCal": "DH", + "help": "pab/chute" + } +] \ No newline at end of file diff --git a/src/app/calculators/pab-chute/pab-chute.en.json b/src/app/calculators/pab-chute/pab-chute.en.json new file mode 100644 index 000000000..1e58e682f --- /dev/null +++ b/src/app/calculators/pab-chute/pab-chute.en.json @@ -0,0 +1,6 @@ +{ + "fs_chute": "Basin dimensions", + "Z1": "Upstream height", + "Z2": "Downstream height", + "DH": "Fall" +} \ No newline at end of file diff --git a/src/app/calculators/pab-chute/pab-chute.fr.json b/src/app/calculators/pab-chute/pab-chute.fr.json new file mode 100644 index 000000000..dc3b62754 --- /dev/null +++ b/src/app/calculators/pab-chute/pab-chute.fr.json @@ -0,0 +1,6 @@ +{ + "fs_chute": "Dimensions du bassin", + "Z1": "Cote amont", + "Z2": "Cote aval", + "DH": "Chute" +} \ No newline at end of file diff --git a/src/app/services/formulaire/formulaire.service.ts b/src/app/services/formulaire/formulaire.service.ts index 79f728dcb..d8a6e6830 100644 --- a/src/app/services/formulaire/formulaire.service.ts +++ b/src/app/services/formulaire/formulaire.service.ts @@ -173,6 +173,7 @@ export class FormulaireService extends Observable { let f: FormulaireDefinition; switch (ct) { case CalculatorType.ConduiteDistributrice: + case CalculatorType.PabChute: case CalculatorType.PabDimensions: case CalculatorType.PabPuissance: case CalculatorType.MacroRugo: @@ -378,6 +379,9 @@ export class FormulaireService extends Observable { case CalculatorType.MacroRugo: return "app/calculators/macrorugo/macrorugo."; + case CalculatorType.PabChute: + return "app/calculators/pab-chute/pab-chute."; + default: throw new Error("FormulaireService.getConfigPathPrefix() : valeur de CalculatorType " + ct + " non implémentée"); } diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json index 8f555f490..0a6edaaad 100644 --- a/src/locale/messages.en.json +++ b/src/locale/messages.en.json @@ -155,6 +155,8 @@ "INFO_OPTION_NONE": "None", "INFO_OPTION_NONE_F": "None", "INFO_OUVRAGE": "Structure", + "INFO_PABCHUTE_TITRE": "Fish ladder: fall", + "INFO_PABCHUTE_TITRE_COURT": "FL: fall", "INFO_PABDIMENSIONS_TITRE": "Fish ladder: dimensions", "INFO_PABDIMENSIONS_TITRE_COURT": "FL: dimensions", "INFO_PABPUISSANCE_TITRE": "Fish ladder: dissipated power", diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json index 5d719c76a..d1457e74f 100644 --- a/src/locale/messages.fr.json +++ b/src/locale/messages.fr.json @@ -155,6 +155,8 @@ "INFO_OPTION_NONE": "Aucun", "INFO_OPTION_NONE_F": "Aucune", "INFO_OUVRAGE": "Ouvrage", + "INFO_PABCHUTE_TITRE": "Passe à bassin : chute", + "INFO_PABCHUTE_TITRE_COURT": "PAB : chute", "INFO_PABDIMENSIONS_TITRE": "Passe à bassin : dimensions", "INFO_PABDIMENSIONS_TITRE_COURT": "PAB : dimensions", "INFO_PABPUISSANCE_TITRE": "Passe à bassin : puissance dissipée", -- GitLab