From 7ca256ccc3927db4639bd60ce181ef215109b10b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr>
Date: Sat, 8 Oct 2022 09:23:07 +0200
Subject: [PATCH 1/4] refactor: modify parallel structures (add rectangular
 weir/orifice, rename rectangular gate to rectangular bottom gate)

refs #511
---
 DEVELOPERS.md                                     | 4 ++--
 src/app/calculators/parallelstructure/config.json | 2 +-
 src/locale/messages.en.json                       | 3 ++-
 src/locale/messages.fr.json                       | 3 ++-
 4 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/DEVELOPERS.md b/DEVELOPERS.md
index 82e88bb26..4a6b1d4d7 100644
--- a/DEVELOPERS.md
+++ b/DEVELOPERS.md
@@ -575,7 +575,7 @@ Dans la configuration du module, dans le "fieldset_template", ajouter un sélect
     "id": "fs_ouvrage",
     "type": "fieldset_template",
     "calcType": "Structure",
-    "defaultStructType": "VanneRectangulaire",
+    "defaultStructType": "VanneFondRectangulaire",
     "defaultLoiDebit": "GateCem88v",
     "fields": [
         {
@@ -594,7 +594,7 @@ Dans la configuration du module, dans le "fieldset_template", ajouter un sélect
                 "SeuilRectangulaire_WeirVillemonte": "structures/kivi.html",
                 "SeuilRectangulaire_WeirSubmergedLarinier": "structures/fente_noyee.html",
                 "SeuilRectangulaire_WeirCunge80": "structures/cunge_80.html",
-                "VanneRectangulaire_GateCunge80": "structures/cunge_80.html",
+                "VanneFondRectangulaire_GateCunge80": "structures/cunge_80.html",
                 "SeuilTriangulaire_TriangularWeirFree": "structures/dever_triang.html",
                 "SeuilTriangulaire_TriangularWeirBroad": "structures/dever_triang.html",
                 "SeuilTriangulaireTrunc_TriangularTruncWeirFree": "structures/dever_triang_tronque.html"
diff --git a/src/app/calculators/parallelstructure/config.json b/src/app/calculators/parallelstructure/config.json
index 3ac1aef2c..0e8c2886d 100644
--- a/src/app/calculators/parallelstructure/config.json
+++ b/src/app/calculators/parallelstructure/config.json
@@ -13,7 +13,7 @@
         "id": "fs_ouvrage",
         "type": "fieldset_template",
         "calcType": "Structure",
-        "defaultStructType": "VanneRectangulaire",
+        "defaultStructType": "VanneFondRectangulaire",
         "defaultLoiDebit": "GateCem88v",
         "fields": [
             {
diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json
index 56a2f105b..2501dfefb 100755
--- a/src/locale/messages.en.json
+++ b/src/locale/messages.en.json
@@ -359,9 +359,10 @@
     "INFO_LIB_STRUCT_CONTAINER": "Devices",
     "INFO_LIB_STRUCTURE_ORIFICE": "Orifice",
     "INFO_LIB_STRUCTURE_SEUILRECTANGULAIRE": "Rectangular weir",
+    "INFO_LIB_STRUCTURE_SEUILORIFICERECTANGULAIRE": "Rectangular weir/orifice",
     "INFO_LIB_STRUCTURE_SEUILTRIANGULAIRE": "Triangular weir",
     "INFO_LIB_STRUCTURE_SEUILTRIANGULAIRETRUNC": "Truncated triangular weir",
-    "INFO_LIB_STRUCTURE_VANNERECTANGULAIRE": "Rectangular gate",
+    "INFO_LIB_STRUCTURE_VANNEFONDRECTANGULAIRE": "Rectangular bottom gate",
     "INFO_LIB_STRUCTURE_N_COURT": "D",
     "INFO_LIB_TAU0": "Tractive force",
     "INFO_LIB_TOR": "Supercritical water line",
diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json
index 225b0751e..a0387005d 100755
--- a/src/locale/messages.fr.json
+++ b/src/locale/messages.fr.json
@@ -360,9 +360,10 @@
     "INFO_LIB_STRUCT_CONTAINER": "Ouvrages",
     "INFO_LIB_STRUCTURE_ORIFICE": "Orifice",
     "INFO_LIB_STRUCTURE_SEUILRECTANGULAIRE": "Seuil rectangulaire",
+    "INFO_LIB_STRUCTURE_SEUILORIFICERECTANGULAIRE": "Seuil/orifice rectangulaire",
     "INFO_LIB_STRUCTURE_SEUILTRIANGULAIRE": "Seuil triangulaire",
     "INFO_LIB_STRUCTURE_SEUILTRIANGULAIRETRUNC": "Seuil triangulaire tronqué",
-    "INFO_LIB_STRUCTURE_VANNERECTANGULAIRE": "Vanne rectangulaire",
+    "INFO_LIB_STRUCTURE_VANNEFONDRECTANGULAIRE": "Vanne de fond rectangulaire",
     "INFO_LIB_STRUCTURE_N_COURT": "O",
     "INFO_LIB_TAU0": "Force tractrice",
     "INFO_LIB_TOR": "Ligne d'eau torrentielle",
-- 
GitLab


From c045816412e1a65f258f3e79a09b30102a4d5311 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr>
Date: Mon, 10 Oct 2022 08:21:28 +0200
Subject: [PATCH 2/4] update jalhyd_branch to 326 issue

refs #511
---
 jalhyd_branch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jalhyd_branch b/jalhyd_branch
index 626e97d71..dba811dbb 100644
--- a/jalhyd_branch
+++ b/jalhyd_branch
@@ -1 +1 @@
-devel
\ No newline at end of file
+326-ouvrages-modifier-les-types-d-ouvrages
-- 
GitLab


From 77b1700261c1e3d09082cf3b6c9f0519fe2aa110 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr>
Date: Mon, 10 Oct 2022 14:37:00 +0200
Subject: [PATCH 3/4] fix(e2e): wrong structure selected after adding
 rectangular weir/orifice

refs #511
---
 e2e/ouvrages-empty-fields.e2e-spec.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/e2e/ouvrages-empty-fields.e2e-spec.ts b/e2e/ouvrages-empty-fields.e2e-spec.ts
index d653ecbc3..7961a4d88 100644
--- a/e2e/ouvrages-empty-fields.e2e-spec.ts
+++ b/e2e/ouvrages-empty-fields.e2e-spec.ts
@@ -117,7 +117,7 @@ describe("ngHyd - check that created/cloned structures have empty fields - ", ()
         // change 2nd structure type to rectangular gate
         const selects = await element.all(by.css("mat-select#select_structure"));
         const structSelect2 = selects[1];
-        await calcPage.changeSelectValue(structSelect2, 4);
+        await calcPage.changeSelectValue(structSelect2, 5);
         await browser.sleep(200);
 
         // check empty fields
-- 
GitLab


From 43e869c3469e575c0dc6fa19a0f065a60eb504e2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr>
Date: Tue, 11 Oct 2022 14:53:31 +0200
Subject: [PATCH 4/4] fix: parallel structures: wrong default structure in
 select

refs #511
---
 src/app/calculators/parallelstructure/config.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/app/calculators/parallelstructure/config.json b/src/app/calculators/parallelstructure/config.json
index 0e8c2886d..26c3cf9a4 100644
--- a/src/app/calculators/parallelstructure/config.json
+++ b/src/app/calculators/parallelstructure/config.json
@@ -13,7 +13,7 @@
         "id": "fs_ouvrage",
         "type": "fieldset_template",
         "calcType": "Structure",
-        "defaultStructType": "VanneFondRectangulaire",
+        "defaultStructType": "SeuilOrificeRectangulaire",
         "defaultLoiDebit": "GateCem88v",
         "fields": [
             {
-- 
GitLab