Skip to content

Commit

Permalink
fix(ui-config): remove unused item menu
Browse files Browse the repository at this point in the history
  • Loading branch information
skamril committed Jan 15, 2024
1 parent 57e7259 commit f88db1a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 90 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ import { useMemo, useState } from "react";
import { useOutletContext } from "react-router";
import { useTranslation } from "react-i18next";
import { StudyMetadata } from "../../../../../common/types";
import UnderConstruction from "../../../../common/page/UnderConstruction";
import PropertiesView from "../../../../common/PropertiesView";
import SplitLayoutView from "../../../../common/SplitLayoutView";
import ListElement from "../common/ListElement";
import AdequacyPatch from "./AdequacyPatch";
import AdvancedParameters from "./AdvancedParameters";
import General from "./General";
import Optimization from "./Optimization";
import RegionalDistricts from "./RegionalDistricts";
import TimeSeriesManagement from "./TimeSeriesManagement";
import TableMode from "../../../../common/TableMode";

Expand All @@ -28,13 +26,12 @@ function Configuration() {
[
{ id: 0, name: "General" },
{ id: 1, name: "Time-series management" },
{ id: 2, name: "Regional districts" },
{ id: 3, name: "Optimization preferences" },
Number(study.version) >= 830 && { id: 4, name: "Adequacy Patch" },
{ id: 5, name: "Advanced parameters" },
{ id: 6, name: t("study.configuration.economicOpt") },
{ id: 7, name: t("study.configuration.geographicTrimmingAreas") },
{ id: 8, name: t("study.configuration.geographicTrimmingLinks") },
{ id: 2, name: "Optimization preferences" },
Number(study.version) >= 830 && { id: 3, name: "Adequacy Patch" },
{ id: 4, name: "Advanced parameters" },
{ id: 5, name: t("study.configuration.economicOpt") },
{ id: 6, name: t("study.configuration.geographicTrimmingAreas") },
{ id: 7, name: t("study.configuration.geographicTrimmingLinks") },
].filter(Boolean),
[study.version, t],
);
Expand All @@ -59,13 +56,11 @@ function Configuration() {
{R.cond([
[R.equals(0), () => <General />],
[R.equals(1), () => <TimeSeriesManagement />],
[R.equals(1), () => <UnderConstruction />],
[R.equals(2), () => <RegionalDistricts />],
[R.equals(3), () => <Optimization />],
[R.equals(4), () => <AdequacyPatch />],
[R.equals(5), () => <AdvancedParameters />],
[R.equals(2), () => <Optimization />],
[R.equals(3), () => <AdequacyPatch />],
[R.equals(4), () => <AdvancedParameters />],
[
R.equals(6),
R.equals(5),
() => (
<TableMode
studyId={study.id}
Expand All @@ -83,7 +78,7 @@ function Configuration() {
),
],
[
R.equals(7),
R.equals(6),
() => (
<TableMode
studyId={study.id}
Expand All @@ -93,7 +88,7 @@ function Configuration() {
),
],
[
R.equals(8),
R.equals(7),
() => (
<TableMode
studyId={study.id}
Expand Down
66 changes: 0 additions & 66 deletions webapp/src/components/common/page/UnderConstruction.tsx

This file was deleted.

0 comments on commit f88db1a

Please sign in to comment.