Skip to content

Commit 02f0bd7

Browse files
ahiuchingausmb2268
authored andcommitted
protocol detail module location
1 parent 43bb139 commit 02f0bd7

File tree

2 files changed

+10
-19
lines changed

2 files changed

+10
-19
lines changed

app/src/organisms/Desktop/ProtocolDetails/RobotConfigurationDetails.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,19 @@ import {
1717
FLEX_USB_MODULE_FIXTURES,
1818
getCutoutDisplayName,
1919
getFixtureDisplayName,
20+
getModuleDeckLabel,
2021
getModuleDisplayName,
2122
getModuleType,
2223
getPipetteNameSpecs,
2324
MAGNETIC_BLOCK_FIXTURES,
2425
MAGNETIC_BLOCK_TYPE,
2526
SINGLE_SLOT_FIXTURES,
26-
THERMOCYCLER_MODULE_TYPE,
2727
} from '@opentrons/shared-data'
2828

2929
import { InstrumentContainer } from '/app/atoms/InstrumentContainer'
3030
import { Divider } from '/app/atoms/structure'
3131

3232
import { getRobotTypeDisplayName } from '../ProtocolsLanding/utils'
33-
import { getSlotsForThermocycler } from './utils'
3433

3534
import type { TFunction } from 'i18next'
3635
import type { ReactNode } from 'react'
@@ -167,12 +166,10 @@ export const RobotConfigurationDetails = (
167166
<Fragment key={`module_${index}`}>
168167
<Divider marginY={SPACING.spacing12} width="100%" />
169168
<RobotConfigurationDetailsItem
170-
label={`${t('slot')} ${
171-
getModuleType(module.params.model) ===
172-
THERMOCYCLER_MODULE_TYPE
173-
? getSlotsForThermocycler(robotType)
174-
: module.params.location.slotName
175-
}`}
169+
label={`${t('slot')} ${getModuleDeckLabel(
170+
getModuleType(module.params.model),
171+
module.params.location.slotName
172+
)}`}
176173
item={
177174
<>
178175
<ModuleIcon

app/src/pages/Desktop/Protocols/ProtocolPreview/SlotDetails.tsx

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ import {
66
Icon,
77
StyledText,
88
} from '@opentrons/components'
9-
import {
10-
FLEX_ROBOT_TYPE,
11-
THERMOCYCLER_MODULE_TYPE,
12-
} from '@opentrons/shared-data'
9+
import { getModuleDeckLabel } from '@opentrons/shared-data'
1310
import { getFullStackFromLabwares } from '@opentrons/step-generation'
1411

1512
import { LabwareSlotDetails } from './LabwareSlotDetails'
@@ -74,7 +71,6 @@ export function SlotDetails(props: SlotDetailsProps): JSX.Element {
7471
Object.values(wasteChuteEntities).some(
7572
trash => trash.location.split('cutout')[1] === slotId
7673
)
77-
const tcSlot = robotType === FLEX_ROBOT_TYPE ? 'A1+B1' : '7,8,10,11'
7874
return (
7975
<div className={styles.slot_container}>
8076
<div className={styles.command_step}>
@@ -105,10 +101,8 @@ export function SlotDetails(props: SlotDetailsProps): JSX.Element {
105101
<StyledText desktopStyle="bodyLargeSemiBold">Slot</StyledText>
106102
<DeckInfoLabel
107103
deckLabel={
108-
moduleOnSlot != null &&
109-
moduleEntities[moduleOnSlot[0]].type ===
110-
THERMOCYCLER_MODULE_TYPE
111-
? tcSlot
104+
moduleOnSlot != null
105+
? getModuleDeckLabel(moduleEntities[moduleOnSlot[0]].type, slotId)
112106
: slotId
113107
}
114108
/>
@@ -140,8 +134,8 @@ export function SlotDetails(props: SlotDetailsProps): JSX.Element {
140134
<TrashSlotDetails trashBinEntities={trashBinEntities} />
141135
) : null}
142136
{moduleOnSlot == null &&
143-
topMostLabwareOnSlot == null &&
144-
!isTrashOnSlot ? (
137+
topMostLabwareOnSlot == null &&
138+
!isTrashOnSlot ? (
145139
<SlotDetailsEmptyState />
146140
) : null}
147141
</div>

0 commit comments

Comments
 (0)