Skip to content

Commit

Permalink
fix(protocol-designer): fix command summary for dispensing into trash…
Browse files Browse the repository at this point in the history
…/waste chute

fix RQA-3517
  • Loading branch information
shiyaochen authored and shiyaochen committed Nov 5, 2024
1 parent 86f6547 commit 8150acb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions protocol-designer/src/pages/Designer/ProtocolSteps/StepSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
} from '@opentrons/components'
import { getModuleDisplayName } from '@opentrons/shared-data'
import {
getAdditionalEquipmentEntities,
getLabwareEntities,
getModuleEntities,
} from '../../../step-forms/selectors'
Expand Down Expand Up @@ -80,6 +81,9 @@ export function StepSummary(props: StepSummaryProps): JSX.Element | null {
const { t } = useTranslation(['protocol_steps', 'application'])

const labwareNicknamesById = useSelector(getLabwareNicknamesById)
const additionalEquipmentEntities = useSelector(
getAdditionalEquipmentEntities
)

const labwareEntities = useSelector(getLabwareEntities)
const modules = useSelector(getModuleEntities)
Expand Down Expand Up @@ -316,14 +320,18 @@ export function StepSummary(props: StepSummaryProps): JSX.Element | null {
dispense_wells as string[],
flatten(labwareEntities[dispense_labware]?.def.ordering)
)

const isTrashBin =
additionalEquipmentEntities[dispense_labware]?.name === 'trashBin'

stepSummaryContent = (
<StyledTrans
i18nKey={`protocol_steps:move_liquid.${moveLiquidType}`}
values={{
sourceWells: aspirateWellsDisplay,
destinationWells: dispenseWellsDisplay,
destinationWells: isTrashBin ? '' : dispenseWellsDisplay,
source: sourceLabwareName,
destination: destinationLabwareName,
destination: isTrashBin ? 'Trash bin' : destinationLabwareName,
}}
tagText={`${volume} ${t('application:units.microliter')}`}
/>
Expand Down

0 comments on commit 8150acb

Please sign in to comment.