Skip to content

Commit

Permalink
Merge branch 'fix_item_selector' of https://github.com/gridsuite/comm…
Browse files Browse the repository at this point in the history
…ons-ui into fix_item_selector
  • Loading branch information
Seddik Yengui committed Nov 5, 2024
2 parents 50fca45 + 3494f22 commit cf7b78c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gridsuite/commons-ui",
"version": "0.69.1",
"version": "0.70.0",
"description": "common react components for gridsuite applications",
"engines": {
"npm": ">=9",
Expand Down
19 changes: 19 additions & 0 deletions src/utils/types/equipmentType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ export enum EquipmentType {
VSC_CONVERTER_STATION = 'VSC_CONVERTER_STATION',
LCC_CONVERTER_STATION = 'LCC_CONVERTER_STATION',
DANGLING_LINE = 'DANGLING_LINE',
TIE_LINE = 'TIE_LINE',
DISCONNECTOR = 'DISCONNECTOR',
BREAKER = 'BREAKER',
}

// Must be equivalent as the back enum
Expand Down Expand Up @@ -149,6 +152,9 @@ export const EQUIPMENT_TYPE: Record<EquipmentType, { name: EquipmentType; tagLab
name: EquipmentType.LCC_CONVERTER_STATION,
tagLabel: 'equipment_search/lccConverterStationTag',
},
[EquipmentType.TIE_LINE]: undefined, // Not used in the UI
[EquipmentType.DISCONNECTOR]: undefined, // Not used in the UI
[EquipmentType.BREAKER]: undefined, // Not used in the UI
};

export interface Identifiable {
Expand All @@ -167,8 +173,21 @@ export interface EquipmentInfos extends Identifiable {
type: EquipmentType;
voltageLevelLabel?: string;
voltageLevelId?: string;
operatingStatus?: string;
terminal1Connected?: boolean;
terminal2Connected?: boolean;
voltageLevelId1?: string;
voltageLevelName1?: string;
voltageLevelId2?: string;
voltageLevelName2?: string;
}

export const OperatingStatus = {
IN_OPERATION: 'IN_OPERATION',
PLANNED_OUTAGE: 'PLANNED_OUTAGE',
FORCED_OUTAGE: 'FORCED_OUTAGE',
};

export const getEquipmentsInfosForSearchBar = (
equipmentsInfos: Equipment[],
getNameOrId: (e: Identifiable) => string
Expand Down

0 comments on commit cf7b78c

Please sign in to comment.