From 953bef31b89ca86f888edcdaba4981ee8b03d348 Mon Sep 17 00:00:00 2001 From: StevenHosper Date: Thu, 7 Nov 2024 15:34:32 +0100 Subject: [PATCH 1/3] [BROSTAR]: groundLevelPosition should not be required (templates fixes) Fixes #141 --- api/bro_upload/templates/registration_GMW_Construction.html | 2 +- api/bro_upload/templates/registration_GMW_GroundLevel.html | 4 +++- api/bro_upload/templates/registration_GMW_Lengthening.html | 5 +++++ api/bro_upload/templates/replace_GMW_Construction.html | 2 +- api/bro_upload/templates/replace_GMW_GroundLevel.html | 2 +- api/bro_upload/templates/replace_GMW_Lengthening.html | 5 +++++ 6 files changed, 16 insertions(+), 4 deletions(-) diff --git a/api/bro_upload/templates/registration_GMW_Construction.html b/api/bro_upload/templates/registration_GMW_Construction.html index 0d0e2c4..b5bb029 100644 --- a/api/bro_upload/templates/registration_GMW_Construction.html +++ b/api/bro_upload/templates/registration_GMW_Construction.html @@ -16,7 +16,7 @@ {{ sourcedocs_data.initialFunction }} {{ sourcedocs_data.numberOfMonitoringTubes }} {{ sourcedocs_data.groundLevelStable }} -{% if sourcedocs_data.wellStability %} +{% if sourcedocs_data.groundLevelStable == "nee" %} {{ sourcedocs_data.wellStability }} {% endif %} {{ sourcedocs_data.owner }} diff --git a/api/bro_upload/templates/registration_GMW_GroundLevel.html b/api/bro_upload/templates/registration_GMW_GroundLevel.html index 3a3d3c5..362ba4e 100644 --- a/api/bro_upload/templates/registration_GMW_GroundLevel.html +++ b/api/bro_upload/templates/registration_GMW_GroundLevel.html @@ -14,8 +14,10 @@ {{ sourcedocs_data.eventDate }} - {{ sourcedocs_data.wellStability }} {{ sourcedocs_data.groundLevelStable }} +{% if sourcedocs_data.groundLevelStable == "nee" %} + {{ sourcedocs_data.wellStability }} +{% endif %} {{ sourcedocs_data.groundLevelPosition }} {{ sourcedocs_data.groundLevelPositioningMethod }} diff --git a/api/bro_upload/templates/registration_GMW_Lengthening.html b/api/bro_upload/templates/registration_GMW_Lengthening.html index 3f402e4..c0b6666 100644 --- a/api/bro_upload/templates/registration_GMW_Lengthening.html +++ b/api/bro_upload/templates/registration_GMW_Lengthening.html @@ -22,6 +22,11 @@ {{ monitoringtube.tubeNumber }} {{ monitoringtube.variableDiameter }} +{% if monitoringtube.tubeTopDiameter %} + {{ monitoringtube.tubeTopDiameter }} +{% else %} + +{% endif %} {{ monitoringtube.tubeTopPosition }} {{ monitoringtube.tubeTopPositioningMethod }} {{ monitoringtube.tubeMaterial }} diff --git a/api/bro_upload/templates/replace_GMW_Construction.html b/api/bro_upload/templates/replace_GMW_Construction.html index 62619aa..6b8b10c 100644 --- a/api/bro_upload/templates/replace_GMW_Construction.html +++ b/api/bro_upload/templates/replace_GMW_Construction.html @@ -18,7 +18,7 @@ {{ sourcedocs_data.initialFunction }} {{ sourcedocs_data.numberOfMonitoringTubes }} {{ sourcedocs_data.groundLevelStable }} -{% if sourcedocs_data.wellStability %} +{% if sourcedocs_data.groundLevelStable == "nee" %} {{ sourcedocs_data.wellStability }} {% endif %} {{ sourcedocs_data.owner }} diff --git a/api/bro_upload/templates/replace_GMW_GroundLevel.html b/api/bro_upload/templates/replace_GMW_GroundLevel.html index 849a76e..e5265a4 100644 --- a/api/bro_upload/templates/replace_GMW_GroundLevel.html +++ b/api/bro_upload/templates/replace_GMW_GroundLevel.html @@ -16,7 +16,7 @@ {{ sourcedocs_data.eventDate }} {{ sourcedocs_data.groundLevelStable }} -{% if sourcedocs_data.wellStability %} +{% if sourcedocs_data.groundLevelStable == "nee" %} {{ sourcedocs_data.wellStability }} {% endif %} {{ sourcedocs_data.groundLevelPosition }} diff --git a/api/bro_upload/templates/replace_GMW_Lengthening.html b/api/bro_upload/templates/replace_GMW_Lengthening.html index 580fe3f..bd167e5 100644 --- a/api/bro_upload/templates/replace_GMW_Lengthening.html +++ b/api/bro_upload/templates/replace_GMW_Lengthening.html @@ -23,6 +23,11 @@ {{ monitoringtube.tubeNumber }} {{ monitoringtube.variableDiameter }} +{% if monitoringtube.tubeTopDiameter %} + {{ monitoringtube.tubeTopDiameter }} +{% else %} + +{% endif %} {{ monitoringtube.tubeTopPosition }} {{ monitoringtube.tubeTopPositioningMethod }} {{ monitoringtube.tubeMaterial }} From d5cf6d6f204f14a01061acac6863cf94e8ad48d3 Mon Sep 17 00:00:00 2001 From: StevenHosper Date: Thu, 7 Nov 2024 15:35:42 +0100 Subject: [PATCH 2/3] update CHANGES.md --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 40035f2..f89a6d6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,7 +3,7 @@ ## 0.58 (unreleased) -- Nothing changed yet. +- Improve templates ## 0.57 (2024-11-07) From ee3973503464e3b07aa4a193ce9a809057e4f064 Mon Sep 17 00:00:00 2001 From: StevenHosper Date: Thu, 7 Nov 2024 15:49:02 +0100 Subject: [PATCH 3/3] lengthening fix --- api/bro_upload/templates/registration_GMW_Lengthening.html | 2 -- api/bro_upload/templates/replace_GMW_Lengthening.html | 2 -- api/tests/xml_strings/GMW_Lenghtening_XML.py | 1 + 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/api/bro_upload/templates/registration_GMW_Lengthening.html b/api/bro_upload/templates/registration_GMW_Lengthening.html index c0b6666..80f9fa6 100644 --- a/api/bro_upload/templates/registration_GMW_Lengthening.html +++ b/api/bro_upload/templates/registration_GMW_Lengthening.html @@ -24,8 +24,6 @@ {{ monitoringtube.variableDiameter }} {% if monitoringtube.tubeTopDiameter %} {{ monitoringtube.tubeTopDiameter }} -{% else %} - {% endif %} {{ monitoringtube.tubeTopPosition }} {{ monitoringtube.tubeTopPositioningMethod }} diff --git a/api/bro_upload/templates/replace_GMW_Lengthening.html b/api/bro_upload/templates/replace_GMW_Lengthening.html index bd167e5..1a71485 100644 --- a/api/bro_upload/templates/replace_GMW_Lengthening.html +++ b/api/bro_upload/templates/replace_GMW_Lengthening.html @@ -25,8 +25,6 @@ {{ monitoringtube.variableDiameter }} {% if monitoringtube.tubeTopDiameter %} {{ monitoringtube.tubeTopDiameter }} -{% else %} - {% endif %} {{ monitoringtube.tubeTopPosition }} {{ monitoringtube.tubeTopPositioningMethod }} diff --git a/api/tests/xml_strings/GMW_Lenghtening_XML.py b/api/tests/xml_strings/GMW_Lenghtening_XML.py index 39f7967..47bf822 100644 --- a/api/tests/xml_strings/GMW_Lenghtening_XML.py +++ b/api/tests/xml_strings/GMW_Lenghtening_XML.py @@ -20,6 +20,7 @@ 2 nee + 1.700 onbekend pvc