Skip to content

Commit

Permalink
fix(protocol-designer): fix newlocation display name in StepSummary (#…
Browse files Browse the repository at this point in the history
…16727)

For moveLabware StepSummary, we need grab the correct newLocation
display name if the newLocation is not a slot. Here, I check for the
newLocation type and retrieve the appropriate display name.

Closes RQA-3420
  • Loading branch information
ncdiehl11 authored Nov 7, 2024
1 parent 5acdd65 commit bd03905
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"multiAspirate": "Consolidate path",
"multiDispense": "Distribute path",
"new_location": "New location",
"off_deck": "Off-Deck",
"pause": {
"untilResume": "Pausing until manually told to resume",
"untilTemperature": "<text>Pausing until</text><semiBoldText>{{module}}</semiBoldText><text>reaches</text><tag/>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,14 @@ export function StepSummary(props: StepSummaryProps): JSX.Element | null {
case 'moveLabware':
const { labware, newLocation, useGripper } = currentStep
const labwareName = labwareNicknamesById[labware]
let newLocationName = newLocation
if (newLocation in modules) {
newLocationName = getModuleDisplayName(modules[newLocation].model)
} else if (newLocation in labwareEntities) {
newLocationName = labwareNicknamesById[newLocation]
} else if (newLocation === 'offDeck') {
newLocationName = t('off_deck')
}
stepSummaryContent = (
<StyledTrans
i18nKey={
Expand All @@ -282,7 +290,7 @@ export function StepSummary(props: StepSummaryProps): JSX.Element | null {
values={{
labware: labwareName,
}}
tagText={newLocation}
tagText={newLocationName}
/>
)
break
Expand Down

0 comments on commit bd03905

Please sign in to comment.