From 7717e0885d86cec9130eab1e1251c3805ae7cdde Mon Sep 17 00:00:00 2001 From: ncdiehl11 Date: Wed, 7 Aug 2024 17:01:34 -0400 Subject: [PATCH] show thermocycler slots when applicable --- .../SetupLabware/LabwareStackModal.tsx | 31 ++++++++++++++++--- .../SetupLabware/SetupLabwareMap.tsx | 1 + 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLabware/LabwareStackModal.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLabware/LabwareStackModal.tsx index 83fdf1d9260..80bd38a3255 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLabware/LabwareStackModal.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLabware/LabwareStackModal.tsx @@ -23,9 +23,17 @@ import { getLocationInfoNames } from '../utils/getLocationInfoNames' import { getSlotLabwareDefinition } from '../utils/getSlotLabwareDefinition' import { Divider } from '../../../../atoms/structure' import { getModuleImage } from '../SetupModuleAndDeck/utils' -import { getModuleDisplayName } from '@opentrons/shared-data' +import { + FLEX_ROBOT_TYPE, + getModuleDisplayName, + getModuleType, + TC_MODULE_LOCATION_OT2, + TC_MODULE_LOCATION_OT3, +} from '@opentrons/shared-data' import tiprackAdapter from '../../../../assets/images/labware/opentrons_flex_96_tiprack_adapter.png' +import type { RobotType } from '@opentrons/shared-data' + const HIDE_SCROLLBAR = css` ::-webkit-scrollbar { display: none; @@ -36,12 +44,13 @@ interface LabwareStackModalProps { labwareIdTop: string runId: string closeModal: () => void + robotType?: RobotType } export const LabwareStackModal = ( props: LabwareStackModalProps ): JSX.Element | null => { - const { labwareIdTop, runId, closeModal } = props + const { labwareIdTop, runId, closeModal, robotType = FLEX_ROBOT_TYPE } = props const { t } = useTranslation('protocol_setup') const isOnDevice = useSelector(getIsOnDevice) const protocolData = useMostRecentCompletedAnalysis(runId) @@ -60,6 +69,14 @@ export const LabwareStackModal = ( const topDefinition = getSlotLabwareDefinition(labwareIdTop, commands) const adapterDef = getSlotLabwareDefinition(adapterId ?? '', commands) + const isModuleThermocycler = + moduleModel == null + ? false + : getModuleType(moduleModel) === 'thermocyclerModuleType' + const thermocyclerLocation = + robotType === FLEX_ROBOT_TYPE + ? TC_MODULE_LOCATION_OT3 + : TC_MODULE_LOCATION_OT2 const moduleDisplayName = moduleModel != null ? getModuleDisplayName(moduleModel) : null ?? '' const tiprackAdapterImg = ( @@ -80,7 +97,9 @@ export const LabwareStackModal = ( header={{ title: ( - + ), @@ -156,7 +175,11 @@ export const LabwareStackModal = ( onClose={closeModal} closeOnOutsideClick title={t('stacked_slot')} - titleElement1={} + titleElement1={ + + } titleElement2={} childrenPadding={0} marginLeft="0" diff --git a/app/src/organisms/Devices/ProtocolRun/SetupLabware/SetupLabwareMap.tsx b/app/src/organisms/Devices/ProtocolRun/SetupLabware/SetupLabwareMap.tsx index ae8f3bbea02..5525823a438 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupLabware/SetupLabwareMap.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupLabware/SetupLabwareMap.tsx @@ -164,6 +164,7 @@ export function SetupLabwareMap({ closeModal={() => { setLabwareStackDetailsLabwareId(null) }} + robotType={robotType} /> )}