Skip to content

Commit

Permalink
update filename generation
Browse files Browse the repository at this point in the history
  • Loading branch information
chienleng committed Sep 10, 2024
1 parent 789687f commit 5aaaea5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/routes/scenarios/stores/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ export default function () {
);

const filterShortName = derived(
[selectedRegion, selectedFuelTechGroup, singleSelectionData],
([$selectedRegion, $selectedFuelTechGroup, $singleSelectionData]) => {
[selectedRegion, selectedFuelTechGroup, singleSelectionData, isScenarioViewSection],
([$selectedRegion, $selectedFuelTechGroup, $singleSelectionData, $isScenarioViewSection]) => {
const region = regionsWithShortLabels[$selectedRegion];
const fuelTechGroup = $selectedFuelTechGroup;
const model = $singleSelectionData?.model;
const scenario = $singleSelectionData?.scenario;
const pathway = $singleSelectionData?.pathway;

return `${region}-${model}-${scenario}-${pathway}`;
return $isScenarioViewSection ? `${region}` : `${region}-${model}-${scenario}-${pathway}`;
}
);

Expand Down

0 comments on commit 5aaaea5

Please sign in to comment.