From 0643974a7f3c03284136de10dc5b498c224a1de7 Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Tue, 30 Apr 2024 17:18:08 -0400 Subject: [PATCH] format --- app/src/App/hooks.ts | 8 ++++---- .../SetupModuleAndDeck/ChooseModuleToConfigureModal.tsx | 9 +++++++-- .../ProtocolDetails/RobotConfigurationDetails.tsx | 6 ++++-- app/src/pages/ProtocolDetails/Hardware.tsx | 2 -- shared-data/js/constants.ts | 8 ++++++++ 5 files changed, 23 insertions(+), 10 deletions(-) diff --git a/app/src/App/hooks.ts b/app/src/App/hooks.ts index d241e782786..a7db8ed203f 100644 --- a/app/src/App/hooks.ts +++ b/app/src/App/hooks.ts @@ -132,11 +132,11 @@ export function useCurrentRunRoute(): string | null { const currentRunLink = allRuns?.links?.current ?? null const currentRun = currentRunLink != null && - typeof currentRunLink !== 'string' && - 'href' in currentRunLink + typeof currentRunLink !== 'string' && + 'href' in currentRunLink ? allRuns?.data.find( - run => run.id === currentRunLink.href.replace('/runs/', '') - ) // trim link path down to only runId + run => run.id === currentRunLink.href.replace('/runs/', '') + ) // trim link path down to only runId : null const currentRunId = currentRun?.id ?? null const { data: runRecord } = useNotifyRunQuery(currentRunId, { diff --git a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/ChooseModuleToConfigureModal.tsx b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/ChooseModuleToConfigureModal.tsx index 51688651d30..a2c967ac2a8 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/ChooseModuleToConfigureModal.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/ChooseModuleToConfigureModal.tsx @@ -194,8 +194,13 @@ interface NoUnconfiguredModulesProps { robotName: string } function NoUnconfiguredModules(props: NoUnconfiguredModulesProps): JSX.Element { - const { moduleDisplayName, displaySlotName, isOnDevice, robotName } = props - const configuredModuleMatches = ['feer'] + const { + moduleDisplayName, + configuredModuleMatches, + displaySlotName, + isOnDevice, + robotName, + } = props const { t } = useTranslation('protocol_setup') const history = useHistory() const { closeCurrentRun } = useCloseCurrentRun() diff --git a/app/src/organisms/ProtocolDetails/RobotConfigurationDetails.tsx b/app/src/organisms/ProtocolDetails/RobotConfigurationDetails.tsx index 5a7d3fc5aa0..1e9060ba04d 100644 --- a/app/src/organisms/ProtocolDetails/RobotConfigurationDetails.tsx +++ b/app/src/organisms/ProtocolDetails/RobotConfigurationDetails.tsx @@ -23,6 +23,7 @@ import { MAGNETIC_BLOCK_FIXTURES, SINGLE_SLOT_FIXTURES, THERMOCYCLER_MODULE_TYPE, + FLEX_USB_MODULE_FIXTURES, } from '@opentrons/shared-data' import { InstrumentContainer } from '../../atoms/InstrumentContainer' @@ -97,10 +98,11 @@ export const RobotConfigurationDetails = ( emptyText ) - // filter out single slot fixtures + // filter out single slot fixtures as they're implicit + // also filter out usb module fixtures as they're handled by required modules const nonStandardRequiredFixtureDetails = requiredFixtureDetails.filter( fixture => - !SINGLE_SLOT_FIXTURES.includes( + ![...SINGLE_SLOT_FIXTURES, ...FLEX_USB_MODULE_FIXTURES].includes( fixture.cutoutFixtureId as SingleSlotCutoutFixtureId ) ) diff --git a/app/src/pages/ProtocolDetails/Hardware.tsx b/app/src/pages/ProtocolDetails/Hardware.tsx index 094cf084108..c59c24e7118 100644 --- a/app/src/pages/ProtocolDetails/Hardware.tsx +++ b/app/src/pages/ProtocolDetails/Hardware.tsx @@ -18,8 +18,6 @@ import { getModuleDisplayName, getModuleType, getFixtureDisplayName, - STAGING_AREA_SLOT_WITH_MAGNETIC_BLOCK_V1_FIXTURE, - STAGING_AREA_RIGHT_SLOT_FIXTURE, GRIPPER_V1_2, } from '@opentrons/shared-data' diff --git a/shared-data/js/constants.ts b/shared-data/js/constants.ts index 0860841b1d5..71b4813c07e 100644 --- a/shared-data/js/constants.ts +++ b/shared-data/js/constants.ts @@ -500,6 +500,14 @@ export const MODULE_FIXTURES_BY_MODEL: { THERMOCYCLER_V2_FRONT_FIXTURE, ], } + +export const FLEX_USB_MODULE_FIXTURES: CutoutFixtureId[] = [ + HEATERSHAKER_MODULE_V1_FIXTURE, + TEMPERATURE_MODULE_V2_FIXTURE, + THERMOCYCLER_V2_REAR_FIXTURE, + THERMOCYCLER_V2_FRONT_FIXTURE, +] + export const MAGNETIC_BLOCK_FIXTURES: CutoutFixtureId[] = [ MAGNETIC_BLOCK_V1_FIXTURE, STAGING_AREA_SLOT_WITH_MAGNETIC_BLOCK_V1_FIXTURE,