diff --git a/app/src/organisms/QuickTransferFlow/SelectDestWells.tsx b/app/src/organisms/QuickTransferFlow/SelectDestWells.tsx index 71378fb6eb2..f92461b5a55 100644 --- a/app/src/organisms/QuickTransferFlow/SelectDestWells.tsx +++ b/app/src/organisms/QuickTransferFlow/SelectDestWells.tsx @@ -10,12 +10,17 @@ import { LegacyStyledText, JUSTIFY_CENTER, } from '@opentrons/components' +import { getAllDefinitions } from '@opentrons/shared-data' import { getTopPortalEl } from '../../App/portal' import { Modal } from '../../molecules/Modal' import { ChildNavigation } from '../../organisms/ChildNavigation' import { useToaster } from '../../organisms/ToasterOven' import { WellSelection } from '../../organisms/WellSelection' +import { + CIRCULAR_WELL_96_PLATE_DEFINITION_URI, + RECTANGULAR_WELL_96_PLATE_DEFINITION_URI, +} from './SelectSourceWells' import type { SmallButton } from '../../atoms/buttons' import type { ModalHeaderBaseProps } from '../../molecules/Modal/types' @@ -107,9 +112,17 @@ export function SelectDestWells(props: SelectDestWellsProps): JSX.Element { setSelectedWells({}) }, } - const labwareDefinition = + let labwareDefinition = state.destination === 'source' ? state.source : state.destination - + if (labwareDefinition?.parameters.format === '96Standard') { + const allDefinitions = getAllDefinitions() + if (Object.values(labwareDefinition.wells)[0].shape === 'circular') { + labwareDefinition = allDefinitions[CIRCULAR_WELL_96_PLATE_DEFINITION_URI] + } else { + labwareDefinition = + allDefinitions[RECTANGULAR_WELL_96_PLATE_DEFINITION_URI] + } + } return ( <> {createPortal( diff --git a/app/src/organisms/QuickTransferFlow/SelectSourceWells.tsx b/app/src/organisms/QuickTransferFlow/SelectSourceWells.tsx index d7628bbcefe..32869fe0a05 100644 --- a/app/src/organisms/QuickTransferFlow/SelectSourceWells.tsx +++ b/app/src/organisms/QuickTransferFlow/SelectSourceWells.tsx @@ -7,6 +7,7 @@ import { POSITION_FIXED, SPACING, } from '@opentrons/components' +import { getAllDefinitions } from '@opentrons/shared-data' import { ChildNavigation } from '../../organisms/ChildNavigation' import { WellSelection } from '../../organisms/WellSelection' @@ -24,6 +25,11 @@ interface SelectSourceWellsProps { dispatch: React.Dispatch } +export const CIRCULAR_WELL_96_PLATE_DEFINITION_URI = + 'opentrons/thermoscientificnunc_96_wellplate_2000ul/1' +export const RECTANGULAR_WELL_96_PLATE_DEFINITION_URI = + 'opentrons/usascientific_96_wellplate_2.4ml_deep/1' + export function SelectSourceWells(props: SelectSourceWellsProps): JSX.Element { const { onNext, onBack, state, dispatch } = props const { i18n, t } = useTranslation(['quick_transfer', 'shared']) @@ -50,6 +56,20 @@ export function SelectSourceWells(props: SelectSourceWellsProps): JSX.Element { setSelectedWells({}) }, } + let displayLabwareDefinition = state.source + if (state.source?.parameters.format === '96Standard') { + const allDefinitions = getAllDefinitions() + if (Object.values(state.source.wells)[0].shape === 'circular') { + displayLabwareDefinition = + allDefinitions[CIRCULAR_WELL_96_PLATE_DEFINITION_URI] + console.log('circle') + } else { + displayLabwareDefinition = + allDefinitions[RECTANGULAR_WELL_96_PLATE_DEFINITION_URI] + console.log('rect') + } + console.log(displayLabwareDefinition) + } return ( <> @@ -71,14 +91,14 @@ export function SelectSourceWells(props: SelectSourceWellsProps): JSX.Element { left="0" width="100%" > - {state.source != null ? ( + {state.source != null && displayLabwareDefinition != null ? ( { setSelectedWells(prevWells => without(Object.keys(prevWells), ...wells).reduce(