Skip to content

Commit 93111f1

Browse files
authored
Add new attributes for dangling lines expert filter (#545)
Signed-off-by: Etienne LESOT <[email protected]>
1 parent 97ad525 commit 93111f1

File tree

5 files changed

+19
-10
lines changed

5 files changed

+19
-10
lines changed

src/components/filter/expert/expert-filter-constants.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,16 @@ export const FIELDS_OPTIONS = {
10341034
dataType: DataType.NUMBER,
10351035
inputType: 'number',
10361036
},
1037+
PAIRING_KEY: {
1038+
name: FieldType.PAIRING_KEY,
1039+
label: 'pairingKey',
1040+
dataType: DataType.STRING,
1041+
},
1042+
TIE_LINE_ID: {
1043+
name: FieldType.TIE_LINE_ID,
1044+
label: 'tieLineId',
1045+
dataType: DataType.STRING,
1046+
},
10371047
};
10381048

10391049
export const fields: Record<string, Field[]> = {
@@ -1342,6 +1352,7 @@ export const fields: Record<string, Field[]> = {
13421352
FIELDS_OPTIONS.COUNTRY,
13431353
FIELDS_OPTIONS.VOLTAGE_LEVEL_ID,
13441354
FIELDS_OPTIONS.NOMINAL_VOLTAGE,
1355+
FIELDS_OPTIONS.TIE_LINE_ID,
13451356
FIELDS_OPTIONS.CONNECTED,
13461357
FIELDS_OPTIONS.P0,
13471358
FIELDS_OPTIONS.Q0,
@@ -1350,6 +1361,7 @@ export const fields: Record<string, Field[]> = {
13501361
FIELDS_OPTIONS.SHUNT_SUSCEPTANCE,
13511362
FIELDS_OPTIONS.SHUNT_CONDUCTANCE,
13521363
FIELDS_OPTIONS.PAIRED,
1364+
FIELDS_OPTIONS.PAIRING_KEY,
13531365
FIELDS_OPTIONS.PROPERTY,
13541366
FIELDS_OPTIONS.SUBSTATION_PROPERTY,
13551367
FIELDS_OPTIONS.VOLTAGE_LEVEL_PROPERTY,

src/components/filter/expert/expert-filter.type.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ export enum FieldType {
163163
CONVERTER_STATION_NOMINAL_VOLTAGE_1 = 'CONVERTER_STATION_NOMINAL_VOLTAGE_1',
164164
CONVERTER_STATION_NOMINAL_VOLTAGE_2 = 'CONVERTER_STATION_NOMINAL_VOLTAGE_2',
165165
DC_NOMINAL_VOLTAGE = 'DC_NOMINAL_VOLTAGE',
166+
PAIRING_KEY = 'PAIRING_KEY',
167+
TIE_LINE_ID = 'TIE_LINE_ID',
166168
}
167169

168170
export enum DataType {

src/components/inputs/react-query-builder/value-editor.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,7 @@ function ValueEditor(props: ValueEditorProps) {
102102
);
103103
}
104104

105-
if (
106-
field === FieldType.ID ||
107-
field === FieldType.NAME ||
108-
field === FieldType.REGULATING_TERMINAL_VL_ID ||
109-
field === FieldType.REGULATING_TERMINAL_CONNECTABLE_ID ||
110-
field === FieldType.VOLTAGE_LEVEL_ID ||
111-
field === FieldType.VOLTAGE_LEVEL_ID_1 ||
112-
field === FieldType.VOLTAGE_LEVEL_ID_2 ||
113-
field === FieldType.VOLTAGE_LEVEL_ID_3
114-
) {
105+
if (fieldData.dataType === DataType.STRING) {
115106
return <TextValueEditor {...props} />;
116107
}
117108

src/components/translations/filter-expert-en.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ const filterExpertEn = {
175175
shuntSusceptance1: 'Shunt susceptance 1 (μS)',
176176
shuntConductance2: 'Shunt conductance 2 (μS)',
177177
shuntSusceptance2: 'Shunt susceptance 2 (μS)',
178+
pairingKey: 'Xnode',
179+
tieLineId: 'Tie line ID',
178180
};
179181

180182
export default filterExpertEn;

src/components/translations/filter-expert-fr.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ const filterExpertFr = {
175175
shuntSusceptance1: 'Susceptance parallèle 1 (μS)',
176176
shuntConductance2: 'Conductance parallèle 2 (μS)',
177177
shuntSusceptance2: 'Susceptance parallèle 2 (μS)',
178+
pairingKey: 'Xnode',
179+
tieLineId: "ID de l'interconnexion",
178180
};
179181

180182
export default filterExpertFr;

0 commit comments

Comments
 (0)