From 054d627b71125a0b679cfcd32b2c9a27c73359cb Mon Sep 17 00:00:00 2001 From: Irwan Fathurrahman Date: Tue, 19 Nov 2024 10:29:44 +0700 Subject: [PATCH] Fix color bugs for overriden predefined (#321) --- django_project/_commit_hash.txt | 2 +- django_project/_version.txt | 2 +- .../Dashboard/Form/IndicatorLayers/IndicatorStyle/index.jsx | 2 +- django_project/frontend/src/utils/referenceLayer.jsx | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/django_project/_commit_hash.txt b/django_project/_commit_hash.txt index 12c3ae745..9052858ed 100644 --- a/django_project/_commit_hash.txt +++ b/django_project/_commit_hash.txt @@ -1 +1 @@ -24aac4bc3175037479ab01decf2b01e9f0e5e42e \ No newline at end of file +158730d76e51290ce01ac8d3c45d299d961bbae2 \ No newline at end of file diff --git a/django_project/_version.txt b/django_project/_version.txt index 359a5b952..10bf840ed 100644 --- a/django_project/_version.txt +++ b/django_project/_version.txt @@ -1 +1 @@ -2.0.0 \ No newline at end of file +2.0.1 \ No newline at end of file diff --git a/django_project/frontend/src/pages/Admin/Dashboard/Form/IndicatorLayers/IndicatorStyle/index.jsx b/django_project/frontend/src/pages/Admin/Dashboard/Form/IndicatorLayers/IndicatorStyle/index.jsx index e68b278d5..a6f110226 100644 --- a/django_project/frontend/src/pages/Admin/Dashboard/Form/IndicatorLayers/IndicatorStyle/index.jsx +++ b/django_project/frontend/src/pages/Admin/Dashboard/Form/IndicatorLayers/IndicatorStyle/index.jsx @@ -211,7 +211,7 @@ export const IndicatorStyle = forwardRef( updateData() }} valuesUrl={`/api/indicator/${indicator.id}/values/flat/`} - defaultStyleRules={indicator?.style ? indicator?.style : []} + defaultStyleRules={dataLayer.style ? dataLayer.style : indicator?.style ? indicator?.style : []} selectableInput={batch !== null} /> : null } diff --git a/django_project/frontend/src/utils/referenceLayer.jsx b/django_project/frontend/src/utils/referenceLayer.jsx index 2f3ac555c..ada560975 100644 --- a/django_project/frontend/src/utils/referenceLayer.jsx +++ b/django_project/frontend/src/utils/referenceLayer.jsx @@ -91,6 +91,8 @@ export function returnValueByGeometry( allData = allData.filter(row => filteredGeometries.includes(row.concept_uuid)) } allData = UpdateStyleData(allData, config) + } else if (layer.override_style) { + allData = UpdateStyleData(allData, layer) } const byGeometry = {}