Skip to content

Commit

Permalink
Add Substation and VoltageLevel to the list of supported equipment ty…
Browse files Browse the repository at this point in the history
…pes in the expert filter form.

Signed-off-by: Florent MILLOT <millotflo@gmail.com>
  • Loading branch information
flomillot committed Jan 24, 2024
1 parent 2e0a374 commit e526760
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/components/dialogs/filter/expert/expert-filter-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit e526760

Please sign in to comment.