Skip to content

Commit

Permalink
further js cleanup for systemLocation
Browse files Browse the repository at this point in the history
  • Loading branch information
CaseyBatten committed Jan 17, 2025
1 parent 02c7464 commit 81cec84
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions labware-library/src/localization/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const CATEGORY_LABELS_BY_CATEGORY = {
other: 'Other',
adapter: 'Adapter',
lid: 'Lid',
system: 'System',
}

export const PLURAL_CATEGORY_LABELS_BY_CATEGORY = {
Expand All @@ -24,6 +25,7 @@ export const PLURAL_CATEGORY_LABELS_BY_CATEGORY = {
lid: 'Lid',
trash: 'Trashes',
other: 'Other',
system: 'System',
}

export const WELL_TYPE_BY_CATEGORY = {
Expand Down
3 changes: 3 additions & 0 deletions protocol-designer/src/pages/ProtocolOverview/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ export const getUnusedStagingAreas = (
command =>
(command.commandType === 'loadLabware' &&
command.params.location !== 'offDeck' &&
command.params.location !== 'systemLocation' &&
'addressableAreaName' in command.params.location &&
command.params.location.addressableAreaName === location) ||
(command.commandType === 'moveLabware' &&
command.params.newLocation !== 'offDeck' &&
command.params.newLocation !== 'systemLocation' &&
'addressableAreaName' in command.params.newLocation &&
command.params.newLocation.addressableAreaName === location)
)
Expand Down Expand Up @@ -131,6 +133,7 @@ export const getUnusedTrash = (
)) ||
(command.commandType === 'moveLabware' &&
command.params.newLocation !== 'offDeck' &&
command.params.newLocation !== 'systemLocation' &&
'addressableAreaName' in command.params.newLocation &&
command.params.newLocation.addressableAreaName ===
'gripperWasteChute')
Expand Down
1 change: 1 addition & 0 deletions protocol-designer/src/step-forms/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ export const getUnoccupiedSlotForTrash = (
const location = command.params.location
if (
location !== 'offDeck' &&
location !== 'systemLocation' &&
location !== null &&
'slotName' in location
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const getMoveLabwareError = (
labware == null ||
newLocation == null ||
newLocation === 'offDeck' ||
newLocation === 'systemLocation' ||
!getLabwareDefIsStandard(labware?.def)
)
return null
Expand Down

0 comments on commit 81cec84

Please sign in to comment.