diff --git a/src/bin/BinSettings.tsx b/src/bin/BinSettings.tsx index c574c96..e540b20 100644 --- a/src/bin/BinSettings.tsx +++ b/src/bin/BinSettings.tsx @@ -47,7 +47,7 @@ import { RadiansToDegrees, TriangleOppositeLength } from "common/TrigFunctions"; -// import FanPicker from "fans/fanPicker"; +import FanPicker from "fans/fanPicker"; import { GrainOptions, ToGrainOption } from "grain"; import GrainDescriber from "grain/GrainDescriber"; import GrainTransaction from "grain/GrainTransaction"; @@ -1109,19 +1109,18 @@ export default function BinSettings(props: Props) { const fanPicker = () => { return ( - // { - // if (fanId !== undefined) { - // //set the fan id in the bin settings form - // form.fanId = fanId; - // //remove the old fan from the bin - // form.fan = null; - // } - // }} - // fanID={form.fanId} - // useCardView - // /> - null + { + if (fanId !== undefined) { + //set the fan id in the bin settings form + form.fanId = fanId; + //remove the old fan from the bin + form.fan = null; + } + }} + fanID={form.fanId} + useCardView + /> ); }; diff --git a/src/component/ComponentForm.tsx b/src/component/ComponentForm.tsx index 0f477b6..7b7b406 100644 --- a/src/component/ComponentForm.tsx +++ b/src/component/ComponentForm.tsx @@ -30,6 +30,7 @@ import { extension, getMeasurements, hasDimensions, + hasFan, isController, isMultiSensor, primaryMeasurement @@ -45,6 +46,7 @@ import { makeStyles } from "@mui/styles"; import { getDistanceUnit } from "utils"; import { GrainOptions } from "grain"; import CompModes from "component/ComponentMode.json"; +import FanPicker from "fans/fanPicker"; const useStyles = makeStyles((theme: Theme) => { return ({ @@ -874,8 +876,8 @@ export default function ComponentForm(props: Props) { disabled={!canEdit} /> {/* TODO-CS: Change this to have a parameter in the extensions that gets checked rather then checking for the component type */} - {/*hasFan(component.type()) && (*/} - {/* { component.settings.fanId = fanID; @@ -890,8 +892,8 @@ export default function ComponentForm(props: Props) { ); } }} - /> */} - {/* )} */} + /> + )} {component.settings.type === quack.ComponentType.COMPONENT_TYPE_GRAIN_CABLE && grainSelect()} {component.settings.type === quack.ComponentType.COMPONENT_TYPE_GRAIN_CABLE && (