Skip to content

Commit

Permalink
fix(protocol-designer): swap copy for module new location dropdown (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader authored Jan 22, 2025
1 parent 2e858a7 commit ca8637c
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions protocol-designer/src/top-selectors/labware-locations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {
MOVABLE_TRASH_ADDRESSABLE_AREAS,
FLEX_MODULE_ADDRESSABLE_AREAS,
FLEX_STACKER_ADDRESSABLE_AREAS,
TC_MODULE_LOCATION_OT2,
TC_MODULE_LOCATION_OT3,
} from '@opentrons/shared-data'
import { COLUMN_4_SLOTS, getHasWasteChute } from '@opentrons/step-generation'
import {
Expand Down Expand Up @@ -160,14 +162,13 @@ export const getUnoccupiedLabwareLocationOptions: Selector<
: 'unknown module'
const moduleSlotInfo = modSlot ?? 'unknown slot'
const adapterSlotInfo = adapterSlot ?? 'unknown adapter'

return labwareOnAdapter == null && isAdapter
? [
...acc,
{
name:
modIdWithAdapter != null
? `${moduleSlotInfo} on ${moduleUnderAdapter} with ${adapterDisplayName}`
? `${moduleUnderAdapter} on ${moduleSlotInfo} with ${adapterDisplayName}`
: `${adapterSlotInfo} with ${adapterDisplayName}`,
value: labwareId,
},
Expand All @@ -182,14 +183,21 @@ export const getUnoccupiedLabwareLocationOptions: Selector<
const moduleHasLabware = Object.entries(labware).some(
([lwId, lwOnDeck]) => lwOnDeck.slot === modId
)
const type = moduleEntities[modId].type
const slot = modOnDeck.slot
let tcLocations
if (type === THERMOCYCLER_MODULE_TYPE) {
tcLocations =
slot === '7' ? TC_MODULE_LOCATION_OT2 : TC_MODULE_LOCATION_OT3
}
return moduleHasLabware
? acc
: [
...acc,
{
name: `${modOnDeck.slot} on ${getModuleDisplayName(
name: `${getModuleDisplayName(
moduleEntities[modId].model
)}`,
)} on ${tcLocations != null ? tcLocations : slot}`,
value: modId,
},
]
Expand Down

0 comments on commit ca8637c

Please sign in to comment.