From 12a98a9bec3b8556a04fb49495709bbc0dd70acc Mon Sep 17 00:00:00 2001 From: luna <5862lunamoon@gmail.com> Date: Tue, 2 Jul 2024 10:58:32 -0700 Subject: [PATCH 1/5] added decommissioned tag to map legend --- app/frontend/src/wells/components/SearchMap.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/frontend/src/wells/components/SearchMap.vue b/app/frontend/src/wells/components/SearchMap.vue index 12907e7f8..2ce47e3d6 100644 --- a/app/frontend/src/wells/components/SearchMap.vue +++ b/app/frontend/src/wells/components/SearchMap.vue @@ -52,6 +52,7 @@ import { RESET_WELLS_SEARCH, SEARCH_WELLS } from '../../wells/store/actions.type import wellsAllLegendSrc from '../../common/assets/images/wells-all.svg' import wellsArtesianLegendSrc from '../../common/assets/images/wells-artesian.svg' +import wellsClosedLegendSrc from '../../common/assets/images/wells-closed.svg' import { mapGetters } from 'vuex' import { setupFeatureTooltips } from '../../common/mapbox/popup' @@ -88,6 +89,10 @@ export default { imageSrc: wellsArtesianLegendSrc, label: 'artesian' }, + { + imageSrc: wellsClosedLegendSrc, + label: 'decommissioned' + }, ] } ], From 78d83c4d96222dc4a1ad7e0185c7623a60c3e705 Mon Sep 17 00:00:00 2001 From: luna <5862lunamoon@gmail.com> Date: Wed, 3 Jul 2024 08:32:25 -0700 Subject: [PATCH 2/5] added closed wells image --- app/frontend/src/common/assets/images/wells-closed.svg | 5 +++++ app/frontend/src/common/mapbox/layers.js | 1 - app/frontend/src/wells/components/SearchMap.vue | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 app/frontend/src/common/assets/images/wells-closed.svg diff --git a/app/frontend/src/common/assets/images/wells-closed.svg b/app/frontend/src/common/assets/images/wells-closed.svg new file mode 100644 index 000000000..006c78d16 --- /dev/null +++ b/app/frontend/src/common/assets/images/wells-closed.svg @@ -0,0 +1,5 @@ + + + diff --git a/app/frontend/src/common/mapbox/layers.js b/app/frontend/src/common/mapbox/layers.js index 632f96959..cc34825c9 100644 --- a/app/frontend/src/common/mapbox/layers.js +++ b/app/frontend/src/common/mapbox/layers.js @@ -17,7 +17,6 @@ export const FOCUSED_WELLS_LAYER_ID = 'focused-wells' export const FOCUSED_WELLS_ARTESIAN_LAYER_ID = 'focused-wells-artesian' export const FOCUSED_WELL_IMAGE_ID = 'focused-well-image' export const FOCUSED_WELL_ARTESIAN_IMAGE_ID = 'focused-artesian-well-image' - export const SEARCHED_REGISTRIES_SOURCE_ID = 'searched-registries-source' export const SEARCHED_REGISTRIES_LAYER_ID = 'searched-registries-layer' diff --git a/app/frontend/src/wells/components/SearchMap.vue b/app/frontend/src/wells/components/SearchMap.vue index 2ce47e3d6..db8ca5b55 100644 --- a/app/frontend/src/wells/components/SearchMap.vue +++ b/app/frontend/src/wells/components/SearchMap.vue @@ -41,7 +41,7 @@ import { FOCUSED_WELL_ARTESIAN_IMAGE_ID, wellLayerFilter, SEARCHED_WELLS_LAYER_ID, - WELLS_SOURCE, + WELLS_SOURCE } from '../../common/mapbox/layers' import { LegendControl, BoxZoomControl, SearchOnMoveControl, ClearSearchCriteriaControl } from '../../common/mapbox/controls' import { createWellPopupElement } from '../popup' @@ -92,7 +92,7 @@ export default { { imageSrc: wellsClosedLegendSrc, label: 'decommissioned' - }, + } ] } ], From f05e68297ff8b47fb105e57fe9628c942184a6ff Mon Sep 17 00:00:00 2001 From: luna <5862lunamoon@gmail.com> Date: Wed, 3 Jul 2024 16:12:51 -0700 Subject: [PATCH 3/5] added conditional to colour picker and added well_status to query return --- app/backend/wells/views_v2.py | 1 + app/frontend/src/common/assets/images/wells-closed.svg | 2 +- app/frontend/src/common/mapbox/layers.js | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/backend/wells/views_v2.py b/app/backend/wells/views_v2.py index 9b6e922c8..b026ee57e 100644 --- a/app/backend/wells/views_v2.py +++ b/app/backend/wells/views_v2.py @@ -155,6 +155,7 @@ def geoJSONResponse(self): "identification_plate_number", "street_address", "city", + "well_status", "artesian_conditions", "storativity", "transmissivity", diff --git a/app/frontend/src/common/assets/images/wells-closed.svg b/app/frontend/src/common/assets/images/wells-closed.svg index 006c78d16..f3174d326 100644 --- a/app/frontend/src/common/assets/images/wells-closed.svg +++ b/app/frontend/src/common/assets/images/wells-closed.svg @@ -1,5 +1,5 @@ diff --git a/app/frontend/src/common/mapbox/layers.js b/app/frontend/src/common/mapbox/layers.js index cc34825c9..d9048fc01 100644 --- a/app/frontend/src/common/mapbox/layers.js +++ b/app/frontend/src/common/mapbox/layers.js @@ -277,12 +277,14 @@ export function wellsBaseAndArtesianLayer (options = {}) { const styles = defaultsDeep(options.styles, { 'circle-color': [ 'case', + ['==', ['get', 'well_status'], 'CLOSURE'], '#302d57', ['to-boolean', ['get', 'artesian']], '#1099FE', '#0162FE' ], 'circle-radius': 3, 'circle-stroke-color': [ 'case', + ['==', ['get', 'well_status'], 'CLOSURE'], 'transparent', ['to-boolean', ['get', 'artesian']], '#EE14CA', 'transparent' ], @@ -315,12 +317,14 @@ export function searchedWellsLayer (options = {}) { const styles = defaultsDeep(options.styles, { 'circle-color': [ 'case', + ['==', ['get', 'well_status'], 'CLOSURE'], '#302d57', ['to-boolean', ['get', 'artesian_conditions']], '#1099FE', '#0162FE' ], 'circle-radius': 5, 'circle-stroke-color': [ 'case', + ['==', ['get', 'well_status'], 'CLOSURE'], 'transparent', ['to-boolean', ['get', 'artesian_conditions']], '#EE14CA', 'black' ], From 33d74ebeb652eb1c8c5c6502d7292f735c0e690e Mon Sep 17 00:00:00 2001 From: luna <5862lunamoon@gmail.com> Date: Fri, 5 Jul 2024 13:44:23 -0700 Subject: [PATCH 4/5] added pulse for closed wells, made black outline for wells on load and search --- .../src/aquifers/components/AquiferMap.vue | 7 ++++++- .../src/aquifers/components/SingleAquiferMap.vue | 15 +++++++++------ app/frontend/src/common/mapbox/images.js | 11 +++++++++++ app/frontend/src/common/mapbox/layers.js | 9 ++++++++- app/frontend/src/wells/components/SearchMap.vue | 6 ++++-- docker-compose.yml | 2 +- 6 files changed, 39 insertions(+), 11 deletions(-) diff --git a/app/frontend/src/aquifers/components/AquiferMap.vue b/app/frontend/src/aquifers/components/AquiferMap.vue index 1cb3951a1..bb88b13a7 100755 --- a/app/frontend/src/aquifers/components/AquiferMap.vue +++ b/app/frontend/src/aquifers/components/AquiferMap.vue @@ -83,6 +83,7 @@ import observationWellInactiveLegendSrc from '../../common/assets/images/owells- import observationWellActiveLegendSrc from '../../common/assets/images/owells-active.svg' import wellsAllLegendSrc from '../../common/assets/images/wells-all.svg' import wellsArtesianLegendSrc from '../../common/assets/images/wells-artesian.svg' +import wellsClosedLegendSrc from '../../common/assets/images/wells-closed.svg' import wellsHydraulicLegendSrc from '../../common/assets/images/wells-hydraulic.svg' import { setupFeatureTooltips } from '../../common/mapbox/popup' @@ -149,13 +150,17 @@ export default { { imageSrc: wellsArtesianLegendSrc, label: 'artesian' + }, + { + imageSrc: wellsClosedLegendSrc, + label: 'decommissioned' } ] }, { show: false, id: WELLS_AQUIFER_PARAMETER_LAYER_ID, - label: 'Wells - aquifer parameters', + label: 'Wells - aquifer parameters', imageSrc: wellsHydraulicLegendSrc }, { diff --git a/app/frontend/src/aquifers/components/SingleAquiferMap.vue b/app/frontend/src/aquifers/components/SingleAquiferMap.vue index 00f05da65..c8e50e4c2 100644 --- a/app/frontend/src/aquifers/components/SingleAquiferMap.vue +++ b/app/frontend/src/aquifers/components/SingleAquiferMap.vue @@ -58,9 +58,7 @@ import { WELLS_SOURCE, AQUIFERS_SOURCE, observationWellsLayer, - WELLS_OBSERVATION_LAYER_ID, - - + WELLS_OBSERVATION_LAYER_ID } from '../../common/mapbox/layers' import { computeBoundsFromMultiPolygon } from '../../common/mapbox/geometry' import { LayersControl, LegendControl } from '../../common/mapbox/controls' @@ -77,6 +75,7 @@ import wellsHydraulicLegendSrc from '../../common/assets/images/wells-hydraulic. import wellsAllLegendSrc from '../../common/assets/images/wells-all.svg' import wellsArtesianLegendSrc from '../../common/assets/images/wells-artesian.svg' +import wellsClosedLegendSrc from '../../common/assets/images/wells-closed.svg' import uncorrelatedWellsIconSrc from '../../common/assets/images/wells-uncorrelated.svg' import emsWellsIconSrc from '../../common/assets/images/wells-ems.svg' import { setupFeatureTooltips } from '../../common/mapbox/popup' @@ -138,13 +137,17 @@ export default { { imageSrc: wellsArtesianLegendSrc, label: 'artesian' + }, + { + imageSrc: wellsClosedLegendSrc, + label: 'decommissioned' } ] }, { show: true, id: WELLS_AQUIFER_PARAMETER_LAYER_ID, - label: 'Wells - aquifer parameters', + label: 'Wells - aquifer parameters', imageSrc: wellsHydraulicLegendSrc }, { @@ -514,13 +517,13 @@ export default { const endEvents = ['zoomend', 'moveend'] endEvents.forEach(eventName => { this.map.on(eventName, (e) => { - this.updateMapLegendBasedOnVisibleElements(); + this.updateMapLegendBasedOnVisibleElements(); }) }) } }, - + watch: { aquiferId (newAquiferId, oldAquiferId) { this.setSelectedAquifer(oldAquiferId, false) diff --git a/app/frontend/src/common/mapbox/images.js b/app/frontend/src/common/mapbox/images.js index 1980798e0..56c46c355 100644 --- a/app/frontend/src/common/mapbox/images.js +++ b/app/frontend/src/common/mapbox/images.js @@ -110,6 +110,17 @@ export class PulsingArtesianWellImage extends PulsingDotImage { } } +export class PulsingClosedWellImage extends PulsingDotImage { + constructor (map) { + super(map, { + size: 90, + dotColour: 'rgba(48, 45, 87, 1)', + dotStrokeColour: 'rgba(0, 0, 0, 1)', + pulseColour: 'rgba(173, 171, 199, %d)' + }) + } +} + export function buildLeafletStyleMarker (longitude, latitude, options = {}) { const element = document.createElement('div') element.className = 'map-pin' diff --git a/app/frontend/src/common/mapbox/layers.js b/app/frontend/src/common/mapbox/layers.js index d9048fc01..d7a1bd2d9 100644 --- a/app/frontend/src/common/mapbox/layers.js +++ b/app/frontend/src/common/mapbox/layers.js @@ -17,6 +17,7 @@ export const FOCUSED_WELLS_LAYER_ID = 'focused-wells' export const FOCUSED_WELLS_ARTESIAN_LAYER_ID = 'focused-wells-artesian' export const FOCUSED_WELL_IMAGE_ID = 'focused-well-image' export const FOCUSED_WELL_ARTESIAN_IMAGE_ID = 'focused-artesian-well-image' +export const FOCUSED_WELL_CLOSED_IMAGE_ID = 'focused-closed-well-image' export const SEARCHED_REGISTRIES_SOURCE_ID = 'searched-registries-source' export const SEARCHED_REGISTRIES_LAYER_ID = 'searched-registries-layer' @@ -278,6 +279,7 @@ export function wellsBaseAndArtesianLayer (options = {}) { 'circle-color': [ 'case', ['==', ['get', 'well_status'], 'CLOSURE'], '#302d57', + ['==', ['get', 'well_status'], 'ABANDONED'], '#302d57', ['to-boolean', ['get', 'artesian']], '#1099FE', '#0162FE' ], @@ -285,8 +287,9 @@ export function wellsBaseAndArtesianLayer (options = {}) { 'circle-stroke-color': [ 'case', ['==', ['get', 'well_status'], 'CLOSURE'], 'transparent', + ['==', ['get', 'well_status'], 'ABANDONED'], 'transparent', ['to-boolean', ['get', 'artesian']], '#EE14CA', - 'transparent' + 'black' ], 'circle-stroke-width': 2.5 }) @@ -318,6 +321,7 @@ export function searchedWellsLayer (options = {}) { 'circle-color': [ 'case', ['==', ['get', 'well_status'], 'CLOSURE'], '#302d57', + ['==', ['get', 'well_status'], 'ABANDONED'], '#302d57', ['to-boolean', ['get', 'artesian_conditions']], '#1099FE', '#0162FE' ], @@ -325,6 +329,7 @@ export function searchedWellsLayer (options = {}) { 'circle-stroke-color': [ 'case', ['==', ['get', 'well_status'], 'CLOSURE'], 'transparent', + ['==', ['get', 'well_status'], 'ABANDONED'], 'transparent', ['to-boolean', ['get', 'artesian_conditions']], '#EE14CA', 'black' ], @@ -340,6 +345,8 @@ export function focusedWellsLayer (options = {}) { const layout = defaultsDeep(options.layout, { 'icon-image': [ 'case', + ['==', ['get', 'well_status'], 'CLOSURE'], FOCUSED_WELL_CLOSED_IMAGE_ID, + ['==', ['get', 'well_status'], 'ABANDONED'], FOCUSED_WELL_CLOSED_IMAGE_ID, ['to-boolean', ['get', 'artesian_conditions']], FOCUSED_WELL_ARTESIAN_IMAGE_ID, FOCUSED_WELL_IMAGE_ID ] diff --git a/app/frontend/src/wells/components/SearchMap.vue b/app/frontend/src/wells/components/SearchMap.vue index db8ca5b55..7be5afc98 100644 --- a/app/frontend/src/wells/components/SearchMap.vue +++ b/app/frontend/src/wells/components/SearchMap.vue @@ -39,13 +39,14 @@ import { focusedWellsLayer, FOCUSED_WELL_IMAGE_ID, FOCUSED_WELL_ARTESIAN_IMAGE_ID, + FOCUSED_WELL_CLOSED_IMAGE_ID, wellLayerFilter, SEARCHED_WELLS_LAYER_ID, WELLS_SOURCE } from '../../common/mapbox/layers' import { LegendControl, BoxZoomControl, SearchOnMoveControl, ClearSearchCriteriaControl } from '../../common/mapbox/controls' import { createWellPopupElement } from '../popup' -import { PulsingWellImage, PulsingArtesianWellImage } from '../../common/mapbox/images' +import { PulsingWellImage, PulsingArtesianWellImage, PulsingClosedWellImage } from '../../common/mapbox/images' import { DEFAULT_MAP_ZOOM, CENTRE_LNG_LAT_BC, buildWellsGeoJSON, convertLngLatBoundsToDirectionBounds, boundsCompletelyContains } from '../../common/mapbox/geometry' import { RESET_WELLS_SEARCH, SEARCH_WELLS } from '../../wells/store/actions.types' @@ -62,7 +63,7 @@ const WELL_FEATURE_PROPERTIES_FOR_POPUP = [ 'street_address', 'is_published' ] -const FOCUSED_WELL_PROPERTIES = WELL_FEATURE_PROPERTIES_FOR_POPUP.concat(['artesian_conditions']) +const FOCUSED_WELL_PROPERTIES = WELL_FEATURE_PROPERTIES_FOR_POPUP.concat(['artesian_conditions', 'well_status']) export default { name: 'SearchMap', @@ -205,6 +206,7 @@ export default { this.map.on('load', () => { this.map.addImage(FOCUSED_WELL_ARTESIAN_IMAGE_ID, new PulsingArtesianWellImage(this.map), { pixelRatio: 2 }) this.map.addImage(FOCUSED_WELL_IMAGE_ID, new PulsingWellImage(this.map), { pixelRatio: 2 }) + this.map.addImage(FOCUSED_WELL_CLOSED_IMAGE_ID, new PulsingClosedWellImage(this.map), { pixelRatio: 2 }) const tooltipLayers = { [WELLS_BASE_AND_ARTESIAN_LAYER_ID]: { diff --git a/docker-compose.yml b/docker-compose.yml index 667b7f406..324b316f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3.7' +# version: '3.7' # NOTE For Red Hat or other images on the internal registry please login as follows: # 1. Be logged into the BC Gov OpenShift Console # https://console.pathfinder.gov.bc.ca:8443/console/catalog) From 8e4d253f73e4b16da233e14bda7c9359d20951fa Mon Sep 17 00:00:00 2001 From: luna <5862lunamoon@gmail.com> Date: Tue, 9 Jul 2024 14:54:07 -0700 Subject: [PATCH 5/5] added warning class to mandatory field text on well submission form --- .../components/SubmissionForm/ActivitySubmissionForm.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/frontend/src/submissions/components/SubmissionForm/ActivitySubmissionForm.vue b/app/frontend/src/submissions/components/SubmissionForm/ActivitySubmissionForm.vue index c31c66667..88c504d12 100644 --- a/app/frontend/src/submissions/components/SubmissionForm/ActivitySubmissionForm.vue +++ b/app/frontend/src/submissions/components/SubmissionForm/ActivitySubmissionForm.vue @@ -50,7 +50,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
Submit activity on a well. Try a search to see if the well exists in the system before submitting a report.
-All form fields marked with a trailing asterisk are mandatory fields.
+All form fields marked with a trailing asterisk are mandatory fields.