From e5267600a5151fb9b27d4498921b2772b19ddaf2 Mon Sep 17 00:00:00 2001 From: Florent MILLOT Date: Wed, 24 Jan 2024 15:47:57 +0100 Subject: [PATCH] Add Substation and VoltageLevel to the list of supported equipment types in the expert filter form. Signed-off-by: Florent MILLOT --- .../dialogs/filter/expert/expert-filter-form.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/dialogs/filter/expert/expert-filter-form.tsx b/src/components/dialogs/filter/expert/expert-filter-form.tsx index c4162d454..993a8a4a1 100644 --- a/src/components/dialogs/filter/expert/expert-filter-form.tsx +++ b/src/components/dialogs/filter/expert/expert-filter-form.tsx @@ -22,7 +22,12 @@ import InputWithPopupConfirmation from '../../../utils/rhf-inputs/select-inputs/ import { SelectInput } from '@gridsuite/commons-ui'; import { useFormContext, useWatch } from 'react-hook-form'; import { testQuery } from './expert-filter-utils'; -import { Generator, Load } from '../../../../utils/equipment-types'; +import { + Generator, + Load, + Substation, + VoltageLevel, +} from '../../../../utils/equipment-types'; import { COMBINATOR_OPTIONS, EXPERT_FILTER_EQUIPMENTS, @@ -76,7 +81,12 @@ export const expertFilterSchema = { }; function isSupportedEquipmentType(equipmentType: string): boolean { - return equipmentType === Generator.type || equipmentType === Load.type; + return ( + equipmentType === Generator.type || + equipmentType === Load.type || + equipmentType === VoltageLevel.type || + equipmentType === Substation.type + ); } const defaultQuery = {