diff --git a/app/hooks/map/index.ts b/app/hooks/map/index.ts index 7bb5a78108..73fe4dce1e 100644 --- a/app/hooks/map/index.ts +++ b/app/hooks/map/index.ts @@ -438,12 +438,12 @@ export function usePUGridLayer({ layout: { visibility: getLayerVisibility(PreGapAnalysisVisibility), }, - ...runId && { - filter: [ - 'all', - ['in', `-${runId}-`, ['get', 'valuePosition']], - ], - }, + // ...runId && { + // filter: [ + // 'all', + // ['in', `-${runId}-`, ['get', 'valuePosition']], + // ], + // }, paint: { 'fill-color': COLORS.features, 'fill-opacity': [ diff --git a/app/layout/projects/new/form/planning-area-grid-uploader/component.tsx b/app/layout/projects/new/form/planning-area-grid-uploader/component.tsx index a7ba6309d4..bbe50fdabd 100644 --- a/app/layout/projects/new/form/planning-area-grid-uploader/component.tsx +++ b/app/layout/projects/new/form/planning-area-grid-uploader/component.tsx @@ -288,6 +288,7 @@ export const PlanningAreaGridUploader: React.FC = theme="primary" size="xl" type="submit" + onClick={() => setOpened(false)} > Save diff --git a/app/layout/projects/new/form/planning-area-uploader/component.tsx b/app/layout/projects/new/form/planning-area-uploader/component.tsx index 69e84b4836..93b1800654 100644 --- a/app/layout/projects/new/form/planning-area-uploader/component.tsx +++ b/app/layout/projects/new/form/planning-area-uploader/component.tsx @@ -180,7 +180,7 @@ export const PlanningAreUploader: React.FC = ({ onClose={() => setOpened(false)} >
{ return ( diff --git a/app/layout/scenarios/show/map/component.tsx b/app/layout/scenarios/show/map/component.tsx index 982ae67654..bb607ec3bf 100644 --- a/app/layout/scenarios/show/map/component.tsx +++ b/app/layout/scenarios/show/map/component.tsx @@ -8,6 +8,7 @@ import { useSelector, useDispatch } from 'react-redux'; import { useRouter } from 'next/router'; import { getScenarioSlice } from 'store/slices/scenarios/detail'; +import { getScenarioEditSlice } from 'store/slices/scenarios/edit'; import PluginMapboxGl from '@vizzuality/layer-manager-plugin-mapboxgl'; import { LayerManager, Layer } from '@vizzuality/layer-manager-react'; @@ -47,17 +48,22 @@ export const ScenariosMap: React.FC = () => { const { pid, sid } = query; const scenarioSlice = getScenarioSlice(sid); + getScenarioEditSlice(sid); + const { setLayerSettings } = scenarioSlice.actions; const { tab, subtab, - cache, selectedSolution, highlightFeatures, layerSettings, } = useSelector((state) => state[`/scenarios/${sid}`]); + const { + cache, + } = useSelector((state) => state[`/scenarios/${sid}/edit`]); + const { data = {}, } = useProject(pid); @@ -172,6 +178,7 @@ export const ScenariosMap: React.FC = () => { }); const PUGridLayer = usePUGridLayer({ + cache, active: true, sid: sid ? `${sid}` : null, include, diff --git a/app/store/slices/scenarios/detail.ts b/app/store/slices/scenarios/detail.ts index 463c6f1b6b..2dc03dcbd2 100644 --- a/app/store/slices/scenarios/detail.ts +++ b/app/store/slices/scenarios/detail.ts @@ -6,6 +6,7 @@ interface ScenarioShowStateProps { tab: string, subtab: string, selectedSolution: Solution, + cache: number; // FEATURES highlightFeatures: string[], // SETTINGS @@ -16,6 +17,7 @@ const initialState = { tab: 'solutions', subtab: null, selectedSolution: null, + cache: Date.now(), // FEATURES highlightFeatures: [], // SETTINGS @@ -36,7 +38,9 @@ export function getScenarioSlice(id) { setSelectedSolution: (state, action: PayloadAction) => { state.selectedSolution = action.payload; }, - + setCache: (state, action: PayloadAction) => { + state.cache = action.payload; + }, // FEATURES setHighlightFeatures: (state, action: PayloadAction) => { state.highlightFeatures = action.payload;