Skip to content

Commit ca8637c

Browse files
authored
fix(protocol-designer): swap copy for module new location dropdown (#17326)
closes RQA-3882
1 parent 2e858a7 commit ca8637c

File tree

1 file changed

+12
-4
lines changed
  • protocol-designer/src/top-selectors/labware-locations

1 file changed

+12
-4
lines changed

protocol-designer/src/top-selectors/labware-locations/index.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import {
1212
MOVABLE_TRASH_ADDRESSABLE_AREAS,
1313
FLEX_MODULE_ADDRESSABLE_AREAS,
1414
FLEX_STACKER_ADDRESSABLE_AREAS,
15+
TC_MODULE_LOCATION_OT2,
16+
TC_MODULE_LOCATION_OT3,
1517
} from '@opentrons/shared-data'
1618
import { COLUMN_4_SLOTS, getHasWasteChute } from '@opentrons/step-generation'
1719
import {
@@ -160,14 +162,13 @@ export const getUnoccupiedLabwareLocationOptions: Selector<
160162
: 'unknown module'
161163
const moduleSlotInfo = modSlot ?? 'unknown slot'
162164
const adapterSlotInfo = adapterSlot ?? 'unknown adapter'
163-
164165
return labwareOnAdapter == null && isAdapter
165166
? [
166167
...acc,
167168
{
168169
name:
169170
modIdWithAdapter != null
170-
? `${moduleSlotInfo} on ${moduleUnderAdapter} with ${adapterDisplayName}`
171+
? `${moduleUnderAdapter} on ${moduleSlotInfo} with ${adapterDisplayName}`
171172
: `${adapterSlotInfo} with ${adapterDisplayName}`,
172173
value: labwareId,
173174
},
@@ -182,14 +183,21 @@ export const getUnoccupiedLabwareLocationOptions: Selector<
182183
const moduleHasLabware = Object.entries(labware).some(
183184
([lwId, lwOnDeck]) => lwOnDeck.slot === modId
184185
)
186+
const type = moduleEntities[modId].type
187+
const slot = modOnDeck.slot
188+
let tcLocations
189+
if (type === THERMOCYCLER_MODULE_TYPE) {
190+
tcLocations =
191+
slot === '7' ? TC_MODULE_LOCATION_OT2 : TC_MODULE_LOCATION_OT3
192+
}
185193
return moduleHasLabware
186194
? acc
187195
: [
188196
...acc,
189197
{
190-
name: `${modOnDeck.slot} on ${getModuleDisplayName(
198+
name: `${getModuleDisplayName(
191199
moduleEntities[modId].model
192-
)}`,
200+
)} on ${tcLocations != null ? tcLocations : slot}`,
193201
value: modId,
194202
},
195203
]

0 commit comments

Comments
 (0)