Skip to content

Commit

Permalink
feat(ui-thematic-trimming): add missing variables in the TT table (v8.6)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent-laporte-pro committed Apr 2, 2024
1 parent 4382b1b commit 3c85021
Showing 1 changed file with 68 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as R from "ramda";
import { StudyMetadata } from "../../../../../../../../common/types";
import client from "../../../../../../../../services/api/client";

// noinspection SpellCheckingInspection
export interface ThematicTrimmingFormFields {
ovCost: boolean;
opCost: boolean;
Expand Down Expand Up @@ -51,7 +52,7 @@ export interface ThematicTrimmingFormFields {
congProbPlus: boolean;
congProbMinus: boolean;
hurdleCost: boolean;
// For study versions >= 810
// Study version >= 810
resGenerationByPlant?: boolean;
miscDtg2?: boolean;
miscDtg3?: boolean;
Expand All @@ -65,11 +66,44 @@ export interface ThematicTrimmingFormFields {
renw2?: boolean;
renw3?: boolean;
renw4?: boolean;
// For study versions >= 830
// Study version >= 830
dens?: boolean;
profitByPlant?: boolean;
// Study version >= 860
stsInjByPlant?: boolean;
stsWithdrawalByPlant?: boolean;
stsLvlByPlant?: boolean;
stsCashflowByCluster?: boolean;
pspOpenInjection?: boolean;
pspOpenWithdrawal?: boolean;
pspOpenLevel?: boolean;
pspClosedInjection?: boolean;
pspClosedWithdrawal?: boolean;
pspClosedLevel?: boolean;
pondageInjection?: boolean;
pondageWithdrawal?: boolean;
pondageLevel?: boolean;
batteryInjection?: boolean;
batteryWithdrawal?: boolean;
batteryLevel?: boolean;
other1Injection?: boolean;
other1Withdrawal?: boolean;
other1Level?: boolean;
other2Injection?: boolean;
other2Withdrawal?: boolean;
other2Level?: boolean;
other3Injection?: boolean;
other3Withdrawal?: boolean;
other3Level?: boolean;
other4Injection?: boolean;
other4Withdrawal?: boolean;
other4Level?: boolean;
other5Injection?: boolean;
other5Withdrawal?: boolean;
other5Level?: boolean;
}

// noinspection SpellCheckingInspection
const keysMap: Record<keyof ThematicTrimmingFormFields, string> = {
ovCost: "OV. COST",
opCost: "OP. COST",
Expand Down Expand Up @@ -136,6 +170,38 @@ const keysMap: Record<keyof ThematicTrimmingFormFields, string> = {
// Study version >= 830
dens: "DENS",
profitByPlant: "Profit by plant",
// Study version >= 860
stsInjByPlant: "STS inj by plant",
stsWithdrawalByPlant: "STS withdrawal by plant",
stsLvlByPlant: "STS lvl by plant",
stsCashflowByCluster: "STS Cashflow By Cluster",
pspOpenInjection: "PSP_open_injection",
pspOpenWithdrawal: "PSP_open_withdrawal",
pspOpenLevel: "PSP_open_level",
pspClosedInjection: "PSP_closed_injection",
pspClosedWithdrawal: "PSP_closed_withdrawal",
pspClosedLevel: "PSP_closed_level",
pondageInjection: "Pondage_injection",
pondageWithdrawal: "Pondage_withdrawal",
pondageLevel: "Pondage_level",
batteryInjection: "Battery_injection",
batteryWithdrawal: "Battery_withdrawal",
batteryLevel: "Battery_level",
other1Injection: "Other1_injection",
other1Withdrawal: "Other1_withdrawal",
other1Level: "Other1_level",
other2Injection: "Other2_injection",
other2Withdrawal: "Other2_withdrawal",
other2Level: "Other2_level",
other3Injection: "Other3_injection",
other3Withdrawal: "Other3_withdrawal",
other3Level: "Other3_level",
other4Injection: "Other4_injection",
other4Withdrawal: "Other4_withdrawal",
other4Level: "Other4_level",
other5Injection: "Other5_injection",
other5Withdrawal: "Other5_withdrawal",
other5Level: "Other5_level",
};

// Allow to support all study versions by using directly the server config
Expand Down

0 comments on commit 3c85021

Please sign in to comment.