diff --git a/app/src/App/hooks.ts b/app/src/App/hooks.ts index a7db8ed203f..8dbed39afc0 100644 --- a/app/src/App/hooks.ts +++ b/app/src/App/hooks.ts @@ -144,6 +144,8 @@ export function useCurrentRunRoute(): string | null { enabled: currentRunId != null, }) + console.log('currentRunId') + const runStatus = runRecord?.data.status const runActions = runRecord?.data.actions if (runRecord == null || runStatus == null || runActions == null) return null diff --git a/app/src/assets/localization/en/protocol_setup.json b/app/src/assets/localization/en/protocol_setup.json index 21a05f2c228..9406bbe16f5 100644 --- a/app/src/assets/localization/en/protocol_setup.json +++ b/app/src/assets/localization/en/protocol_setup.json @@ -39,7 +39,7 @@ "calibration_status": "calibration status", "calibration": "Calibration", "cancel_and_restart_to_edit": "Cancel the run and restart setup to edit", - "cancel_protocol_and_edit_deck_config": "Cancel protocol and edit deck configuration", + "exit_to_deck_configuration": "Exit to deck configuration", "choose_enum": "Choose {{displayName}}", "closing": "Closing...", "complete_setup_before_proceeding": "complete setup before continuing run", @@ -197,6 +197,7 @@ "pipette_offset_cal_description": "This measures a pipette’s X, Y and Z values in relation to the pipette mount and the deck. Pipette Offset Calibration relies on Deck Calibration and Tip Length Calibration. ", "pipette_offset_cal": "Pipette Offset Calibration", "placement": "Placement", + "plug_in_module_to_configure": "Plug in a {{module}} to add it to the slot", "plug_in_required_module_plural": "Plug in and power up the required modules to continue", "plug_in_required_module": "Plug in and power up the required module to continue", "prepare_to_run": "Prepare to run", @@ -250,7 +251,8 @@ "slot_number": "Slot Number", "status": "Status", "step": "STEP {{index}}", - "there_are_no_unconfigured_modules": "There are no un-configured {{module}} connected to the robot. Plug one in or remove an existing {{module}}, move it to the right place, and update the deck configuration.", + "there_are_no_unconfigured_modules": "No {{module}} is connected. Attach one and place it in {{slot}}", + "there_are_other_configured_modules": "A {{module}} is already configured in a different slot. Exit run setup and update your deck configuration to move to an already connected module. Or attach another {{module}} to continue setup.", "tip_length_cal_description_bullet": "Perform Tip Length Calibration for each new tip type used on a pipette.", "tip_length_cal_description": "This measures the Z distance between the bottom of the tip and the pipette’s nozzle. If you redo the tip length calibration for the tip you used to calibrate a pipette, you will also have to redo that Pipette Offset Calibration.", "tip_length_cal_title": "Tip Length Calibration", diff --git a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/ChooseModuleToConfigureModal.tsx b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/ChooseModuleToConfigureModal.tsx index b7b28d53f76..51688651d30 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/ChooseModuleToConfigureModal.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/ChooseModuleToConfigureModal.tsx @@ -5,12 +5,16 @@ import { useHistory } from 'react-router-dom' import { useModulesQuery } from '@opentrons/react-api-client' import { ALIGN_CENTER, + BORDERS, + COLORS, DIRECTION_COLUMN, DIRECTION_ROW, Flex, - PrimaryButton, + Icon, SPACING, + SecondaryButton, StyledText, + TEXT_ALIGN_CENTER, TYPOGRAPHY, } from '@opentrons/components' import { @@ -28,6 +32,7 @@ import { SmallButton } from '../../../../atoms/buttons' import { useCloseCurrentRun } from '../../../ProtocolUpload/hooks' import type { ModuleModel, DeckDefinition } from '@opentrons/shared-data' +import type { AttachedModule } from '@opentrons/api-client' const EQUIPMENT_POLL_MS = 5000 interface ModuleFixtureOption { @@ -58,19 +63,23 @@ export const ChooseModuleToConfigureModal = ( displaySlotName, } = props const { t } = useTranslation(['protocol_setup', 'shared']) - const history = useHistory() - const { closeCurrentRun } = useCloseCurrentRun() const attachedModules = useModulesQuery({ refetchInterval: EQUIPMENT_POLL_MS })?.data?.data ?? [] const deckConfig = useNotifyDeckConfigurationQuery()?.data ?? [] - const unconfiguredModuleMatches = - attachedModules.filter( - attachedMod => - attachedMod.moduleModel === requiredModuleModel && - !deckConfig.some( - ({ opentronsModuleSerialNumber }) => - attachedMod.serialNumber === opentronsModuleSerialNumber - ) + const [configuredModuleMatches, unconfiguredModuleMatches] = + attachedModules.reduce<[AttachedModule[], AttachedModule[]]>( + (acc, attachedMod) => { + if (attachedMod.moduleModel === requiredModuleModel) { + return deckConfig.some( + ({ opentronsModuleSerialNumber }) => + attachedMod.serialNumber === opentronsModuleSerialNumber + ) + ? [[...acc[0], attachedMod], acc[1]] + : [acc[0], [...acc[1], attachedMod]] + } + return acc + }, + [[], []] ) ?? [] const connectedOptions: ModuleFixtureOption[] = unconfiguredModuleMatches.map( @@ -103,31 +112,8 @@ export const ChooseModuleToConfigureModal = ( ) } ) - const handleCancelRun = (): void => { - closeCurrentRun() - } - const handleNavigateToDeviceDetails = (): void => { - history.push(`/devices/${robotName}`) - } - const emptyState = ( - - - {t('there_are_no_unconfigured_modules', { - module: getModuleDisplayName(requiredModuleModel), - })} - - {isOnDevice ? ( - - ) : ( - - {t('update_deck_config')} - - )} - - ) + + const moduleDisplayName = getModuleDisplayName(requiredModuleModel) const contents = fixtureOptions.length > 0 ? ( @@ -138,7 +124,15 @@ export const ChooseModuleToConfigureModal = ( ) : ( - emptyState + ) return createPortal( @@ -153,11 +147,7 @@ export const ChooseModuleToConfigureModal = ( > - + {contents} @@ -195,3 +185,86 @@ export const ChooseModuleToConfigureModal = ( getTopPortalEl() ) } + +interface NoUnconfiguredModulesProps { + moduleDisplayName: string + displaySlotName: string + configuredModuleMatches: AttachedModule[] + isOnDevice: boolean + robotName: string +} +function NoUnconfiguredModules(props: NoUnconfiguredModulesProps): JSX.Element { + const { moduleDisplayName, displaySlotName, isOnDevice, robotName } = props + const configuredModuleMatches = ['feer'] + const { t } = useTranslation('protocol_setup') + const history = useHistory() + const { closeCurrentRun } = useCloseCurrentRun() + const handleCancelRun = (): void => { + closeCurrentRun() + } + const handleNavigateToDeviceDetails = (): void => { + history.push(`/devices/${robotName}`) + } + const exitButton = isOnDevice ? ( + + ) : ( + + {t('exit_to_deck_configuration')} + + ) + + const loadingBlock = ( + + + + {t('plug_in_module_to_configure', { module: moduleDisplayName })} + + + ) + return ( + + {configuredModuleMatches.length > 0 ? ( + <> + + {t('there_are_other_configured_modules', { + module: moduleDisplayName, + })} + + {loadingBlock} + {exitButton} + + ) : ( + <> + + {t('there_are_no_unconfigured_modules', { + module: moduleDisplayName, + slot: displaySlotName, + })} + + {loadingBlock} + + )} + + ) +} diff --git a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/SetupFixtureList.tsx b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/SetupFixtureList.tsx index 6e87f3b1c89..3e1b2ebdee9 100644 --- a/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/SetupFixtureList.tsx +++ b/app/src/organisms/Devices/ProtocolRun/SetupModuleAndDeck/SetupFixtureList.tsx @@ -17,7 +17,6 @@ import { TYPOGRAPHY, } from '@opentrons/components' import { - FLEX_MODULE_ADDRESSABLE_AREAS, FLEX_ROBOT_TYPE, FLEX_USB_MODULE_ADDRESSABLE_AREAS, SINGLE_SLOT_FIXTURES, @@ -51,11 +50,11 @@ export const SetupFixtureList = (props: SetupFixtureListProps): JSX.Element => { return ( <> {deckConfigCompatibility.map(cutoutConfigAndCompatibility => { - // filter out all fixtures that only provide usb module addressable areas + // filter out all fixtures that only provide usb module addressable areas // (i.e. everything but MagBlockV1 and StagingAreaWithMagBlockV1) - // as they're handled in the Modules Table - return cutoutConfigAndCompatibility.requiredAddressableAreas.every(raa => - FLEX_USB_MODULE_ADDRESSABLE_AREAS.includes(raa) + // as they're handled in the Modules Table + return cutoutConfigAndCompatibility.requiredAddressableAreas.every( + raa => FLEX_USB_MODULE_ADDRESSABLE_AREAS.includes(raa) ) ? null : ( ) : null} - + WASTE_CHUTE_ADDRESSABLE_AREAS.includes(aa) ) - ) - { + ) { // match number of channels to provided waste chute addressable area if ( pipetteChannels === 1 && diff --git a/app/src/organisms/ProtocolDetails/RobotConfigurationDetails.tsx b/app/src/organisms/ProtocolDetails/RobotConfigurationDetails.tsx index 0e9f164c841..5a7d3fc5aa0 100644 --- a/app/src/organisms/ProtocolDetails/RobotConfigurationDetails.tsx +++ b/app/src/organisms/ProtocolDetails/RobotConfigurationDetails.tsx @@ -179,19 +179,18 @@ export const RobotConfigurationDetails = ( label={getCutoutDisplayName(fixture.cutoutId)} item={ <> - {MAGNETIC_BLOCK_FIXTURES.includes(fixture.cutoutFixtureId) - ? ( - - ) : null} + {MAGNETIC_BLOCK_FIXTURES.includes(fixture.cutoutFixtureId) ? ( + + ) : null} {getFixtureDisplayName(fixture.cutoutFixtureId)} diff --git a/app/src/organisms/ProtocolDetails/index.tsx b/app/src/organisms/ProtocolDetails/index.tsx index 0bd4cf23869..68a30c6ba64 100644 --- a/app/src/organisms/ProtocolDetails/index.tsx +++ b/app/src/organisms/ProtocolDetails/index.tsx @@ -191,7 +191,7 @@ const ReadMoreContent = (props: ReadMoreContentProps): JSX.Element => { ) } -interface ProtocolDetailsProps extends StoredProtocolData { } +interface ProtocolDetailsProps extends StoredProtocolData {} export function ProtocolDetails( props: ProtocolDetailsProps @@ -238,10 +238,13 @@ export function ProtocolDetails( const requiredModuleDetails = mostRecentAnalysis?.commands != null - ? map(parseInitialLoadedModulesBySlot(mostRecentAnalysis.commands)).filter(loadedModule => ( - // filter out magnetic block which is already handled by the required fixture details - getModuleType(loadedModule.params.model) !== MAGNETIC_BLOCK_TYPE - )) + ? map( + parseInitialLoadedModulesBySlot(mostRecentAnalysis.commands) + ).filter( + loadedModule => + // filter out magnetic block which is already handled by the required fixture details + getModuleType(loadedModule.params.model) !== MAGNETIC_BLOCK_TYPE + ) : [] const requiredFixtureDetails = getSimplestDeckConfigForProtocol( @@ -253,24 +256,24 @@ export function ProtocolDetails( const requiredLabwareDetails = mostRecentAnalysis != null ? map({ - ...parseInitialLoadedLabwareByModuleId( - mostRecentAnalysis.commands != null - ? mostRecentAnalysis.commands - : [] - ), - ...parseInitialLoadedLabwareBySlot( - mostRecentAnalysis.commands != null - ? mostRecentAnalysis.commands - : [] - ), - ...parseInitialLoadedLabwareByAdapter( - mostRecentAnalysis.commands != null - ? mostRecentAnalysis.commands - : [] - ), - }).filter( - labware => labware.result?.definition?.parameters?.format !== 'trash' - ) + ...parseInitialLoadedLabwareByModuleId( + mostRecentAnalysis.commands != null + ? mostRecentAnalysis.commands + : [] + ), + ...parseInitialLoadedLabwareBySlot( + mostRecentAnalysis.commands != null + ? mostRecentAnalysis.commands + : [] + ), + ...parseInitialLoadedLabwareByAdapter( + mostRecentAnalysis.commands != null + ? mostRecentAnalysis.commands + : [] + ), + }).filter( + labware => labware.result?.definition?.parameters?.format !== 'trash' + ) : [] const protocolDisplayName = getProtocolDisplayName( @@ -376,14 +379,14 @@ export function ProtocolDetails( <> {showDeckViewModal ? createPortal( - setShowDeckViewModal(false)} - > - {deckMap} - , - getTopPortalEl() - ) + setShowDeckViewModal(false)} + > + {deckMap} + , + getTopPortalEl() + ) : null} {analysisStatus !== 'loading' && - mostRecentAnalysis != null && - mostRecentAnalysis.errors.length > 0 ? ( + mostRecentAnalysis != null && + mostRecentAnalysis.errors.length > 0 ? ( e.detail)} @@ -662,9 +665,11 @@ export function ProtocolDetails( {contentsByTabName[currentTab]} diff --git a/app/src/organisms/ProtocolSetupDeckConfiguration/index.tsx b/app/src/organisms/ProtocolSetupDeckConfiguration/index.tsx index 5032ddb088b..c3c65e6318f 100644 --- a/app/src/organisms/ProtocolSetupDeckConfiguration/index.tsx +++ b/app/src/organisms/ProtocolSetupDeckConfiguration/index.tsx @@ -7,12 +7,9 @@ import { DIRECTION_COLUMN, Flex, JUSTIFY_CENTER, - ModuleOnDeck, SPACING, } from '@opentrons/components' import { - FLEX_CUTOUT_BY_SLOT_ID, - FLEX_MODULE_ADDRESSABLE_AREAS, FLEX_ROBOT_TYPE, FLEX_SINGLE_SLOT_BY_CUTOUT_ID, MAGNETIC_BLOCK_V1_FIXTURE, @@ -35,6 +32,7 @@ import type { DeckConfiguration, ModuleModel, } from '@opentrons/shared-data' +import type { ModuleOnDeck } from '@opentrons/components' import type { SetupScreens } from '../../pages/ProtocolSetup' interface ProtocolSetupDeckConfigurationProps { @@ -78,35 +76,46 @@ export function ProtocolSetupDeckConfiguration({ : config ) - console.log('simplestDeckConfig', simplestDeckConfig) - console.log('targetDeckConfig', targetDeckConfig) - console.log('mergedDeckConfig', mergedDeckConfig) const [ currentDeckConfig, setCurrentDeckConfig, ] = React.useState(mergedDeckConfig) - const modulesOnDeck = currentDeckConfig.reduce((acc, cutoutConfig) => { - const matchingFixtureIdsAndModel = Object.entries(MODULE_FIXTURES_BY_MODEL).find(([_moduleModel, moduleFixtureIds]) => moduleFixtureIds.includes(cutoutConfig.cutoutFixtureId)) - if (matchingFixtureIdsAndModel != null){ - const [matchingModel] = matchingFixtureIdsAndModel - return [ - ...acc, - { - moduleModel: matchingModel as ModuleModel, - moduleLocation: { slotName: FLEX_SINGLE_SLOT_BY_CUTOUT_ID[cutoutConfig.cutoutId] }, - } - ] - } else if (cutoutConfig.cutoutFixtureId === STAGING_AREA_SLOT_WITH_MAGNETIC_BLOCK_V1_FIXTURE) { - return [ - ...acc, - { - moduleModel: MAGNETIC_BLOCK_V1_FIXTURE, - moduleLocation: { slotName: FLEX_SINGLE_SLOT_BY_CUTOUT_ID[cutoutConfig.cutoutId] }, - } - ] - } - return acc - }, []) + const modulesOnDeck = currentDeckConfig.reduce( + (acc, cutoutConfig) => { + const matchingFixtureIdsAndModel = Object.entries( + MODULE_FIXTURES_BY_MODEL + ).find(([_moduleModel, moduleFixtureIds]) => + moduleFixtureIds.includes(cutoutConfig.cutoutFixtureId) + ) + if (matchingFixtureIdsAndModel != null) { + const [matchingModel] = matchingFixtureIdsAndModel + return [ + ...acc, + { + moduleModel: matchingModel as ModuleModel, + moduleLocation: { + slotName: FLEX_SINGLE_SLOT_BY_CUTOUT_ID[cutoutConfig.cutoutId], + }, + }, + ] + } else if ( + cutoutConfig.cutoutFixtureId === + STAGING_AREA_SLOT_WITH_MAGNETIC_BLOCK_V1_FIXTURE + ) { + return [ + ...acc, + { + moduleModel: MAGNETIC_BLOCK_V1_FIXTURE, + moduleLocation: { + slotName: FLEX_SINGLE_SLOT_BY_CUTOUT_ID[cutoutConfig.cutoutId], + }, + }, + ] + } + return acc + }, + [] + ) const { updateDeckConfiguration } = useUpdateDeckConfigurationMutation() const handleClickConfirm = (): void => { diff --git a/app/src/organisms/ProtocolSetupModulesAndDeck/FixtureTable.tsx b/app/src/organisms/ProtocolSetupModulesAndDeck/FixtureTable.tsx index c7760e5a3fc..e0d5381911c 100644 --- a/app/src/organisms/ProtocolSetupModulesAndDeck/FixtureTable.tsx +++ b/app/src/organisms/ProtocolSetupModulesAndDeck/FixtureTable.tsx @@ -88,7 +88,7 @@ export function FixtureTable({ <> {sortedDeckConfigCompatibility.map((fixtureCompatibility, index) => { // filter out all fixtures that only provide module addressable areas (e.g. everything but StagingAreaWithMagBlockV1) - // as they're handled in the Modules Table + // as they're handled in the Modules Table return fixtureCompatibility.requiredAddressableAreas.every(raa => FLEX_USB_MODULE_ADDRESSABLE_AREAS.includes(raa) ) ? null : ( diff --git a/app/src/organisms/ProtocolSetupModulesAndDeck/index.tsx b/app/src/organisms/ProtocolSetupModulesAndDeck/index.tsx index 98c57d69e01..ee7fe44617f 100644 --- a/app/src/organisms/ProtocolSetupModulesAndDeck/index.tsx +++ b/app/src/organisms/ProtocolSetupModulesAndDeck/index.tsx @@ -34,6 +34,9 @@ import { useNotifyDeckConfigurationQuery } from '../../resources/deck_configurat import type { CutoutId, CutoutFixtureId } from '@opentrons/shared-data' import type { SetupScreens } from '../../pages/ProtocolSetup' +import { useRunStatus } from '../RunTimeControl/hooks' +import { RUN_STATUS_STOPPED } from '@opentrons/api-client' +import { useHistory } from 'react-router-dom' const ATTACHED_MODULE_POLL_MS = 5000 const DECK_CONFIG_POLL_MS = 5000 @@ -55,7 +58,13 @@ export function ProtocolSetupModulesAndDeck({ setProvidedFixtureOptions, }: ProtocolSetupModulesAndDeckProps): JSX.Element { const { i18n, t } = useTranslation('protocol_setup') - + const history = useHistory() + const runStatus = useRunStatus(runId) + React.useEffect(() => { + if (runStatus === RUN_STATUS_STOPPED) { + history.push('/protocols') + } + }, [runStatus, history]) const [ showSetupInstructionsModal, setShowSetupInstructionsModal, diff --git a/app/src/pages/ProtocolDetails/Hardware.tsx b/app/src/pages/ProtocolDetails/Hardware.tsx index 7bde87ecbec..9abf32f7524 100644 --- a/app/src/pages/ProtocolDetails/Hardware.tsx +++ b/app/src/pages/ProtocolDetails/Hardware.tsx @@ -99,7 +99,10 @@ const useHardwareName = (protocolHardware: ProtocolHardware): string => { let displayFixtureId = protocolHardware.cutoutFixtureId // Only show staging area as a requirement for the staging area with mag block fixture, // as mag block requirement is handled as a part of modules, we don't want to list it twice - if (protocolHardware.cutoutFixtureId === STAGING_AREA_SLOT_WITH_MAGNETIC_BLOCK_V1_FIXTURE) { + if ( + protocolHardware.cutoutFixtureId === + STAGING_AREA_SLOT_WITH_MAGNETIC_BLOCK_V1_FIXTURE + ) { displayFixtureId = STAGING_AREA_RIGHT_SLOT_FIXTURE } return getFixtureDisplayName(displayFixtureId) diff --git a/app/src/pages/Protocols/hooks/index.ts b/app/src/pages/Protocols/hooks/index.ts index cb9a0e43758..658a8adfc48 100644 --- a/app/src/pages/Protocols/hooks/index.ts +++ b/app/src/pages/Protocols/hooks/index.ts @@ -68,7 +68,9 @@ export type ProtocolHardware = | ProtocolFixture const DECK_CONFIG_REFETCH_INTERVAL = 5000 -const USB_MODULE_ADDRESSABLE_AREAS = FLEX_MODULE_ADDRESSABLE_AREAS.filter(aa => !MAGNETIC_BLOCK_ADDRESSABLE_AREAS.includes(aa)) +const USB_MODULE_ADDRESSABLE_AREAS = FLEX_MODULE_ADDRESSABLE_AREAS.filter( + aa => !MAGNETIC_BLOCK_ADDRESSABLE_AREAS.includes(aa) +) export const useRequiredProtocolHardwareFromAnalysis = ( analysis: CompletedProtocolAnalysis | null @@ -102,17 +104,18 @@ export const useRequiredProtocolHardwareFromAnalysis = ( const requiredGripper: ProtocolGripper[] = getProtocolUsesGripper(analysis) ? [ - { - hardwareType: 'gripper', - connected: - attachedInstruments.some(i => i.instrumentType === 'gripper') ?? - false, - }, - ] + { + hardwareType: 'gripper', + connected: + attachedInstruments.some(i => i.instrumentType === 'gripper') ?? + false, + }, + ] : [] - const requiredModules: ProtocolModule[] = analysis.modules.filter(m => getModuleType(m.model) !== MAGNETIC_MODULE_TYPE).map( - ({ location, model }) => { + const requiredModules: ProtocolModule[] = analysis.modules + .filter(m => getModuleType(m.model) !== MAGNETIC_MODULE_TYPE) + .map(({ location, model }) => { const cutoutIdForSlotName = getCutoutIdForSlotName( location.slotName, deckDef @@ -129,10 +132,10 @@ export const useRequiredProtocolHardwareFromAnalysis = ( mf => mf.expectOpentronsModuleSerialNumber ) ? attachedModules.some( - m => - m.moduleModel === model && - m.serialNumber === configuredModuleSerialNumber - ) + m => + m.moduleModel === model && + m.serialNumber === configuredModuleSerialNumber + ) : true return { hardwareType: 'module', @@ -145,8 +148,7 @@ export const useRequiredProtocolHardwareFromAnalysis = ( cutoutFixtureId !== getCutoutFixtureIdsForModuleModel(model)[0] ), } - } - ) + }) const requiredPipettes: ProtocolPipette[] = analysis.pipettes.map( ({ mount, pipetteName }) => ({ @@ -177,7 +179,7 @@ export const useRequiredProtocolHardwareFromAnalysis = ( ) const requiredFixtures = requiredDeckConfigCompatibility - // filter out all fixtures that only provide usb module addressable areas + // filter out all fixtures that only provide usb module addressable areas // as they're handled in the requiredModules section via hardwareType === 'module' .filter( ({ requiredAddressableAreas }) => diff --git a/components/src/hardware-sim/BaseDeck/BaseDeck.tsx b/components/src/hardware-sim/BaseDeck/BaseDeck.tsx index 94b343bdd49..db72c865cd3 100644 --- a/components/src/hardware-sim/BaseDeck/BaseDeck.tsx +++ b/components/src/hardware-sim/BaseDeck/BaseDeck.tsx @@ -115,10 +115,9 @@ export function BaseDeck(props: BaseDeckProps): JSX.Element { ) const stagingAreaFixtures = deckConfig.filter( fixture => - ( - fixture.cutoutFixtureId === STAGING_AREA_RIGHT_SLOT_FIXTURE || - fixture.cutoutFixtureId === STAGING_AREA_SLOT_WITH_MAGNETIC_BLOCK_V1_FIXTURE - ) && + (fixture.cutoutFixtureId === STAGING_AREA_RIGHT_SLOT_FIXTURE || + fixture.cutoutFixtureId === + STAGING_AREA_SLOT_WITH_MAGNETIC_BLOCK_V1_FIXTURE) && STAGING_AREA_CUTOUTS.includes(fixture.cutoutId) ) const trashBinFixtures = deckConfig.filter( @@ -264,7 +263,7 @@ export function BaseDeck(props: BaseDeckProps): JSX.Element { wellFill={nestedLabwareWellFill} shouldRotateAdapterOrientation={ inferModuleOrientationFromXCoordinate(slotPosition[0]) === - 'left' && moduleModel === HEATERSHAKER_MODULE_V1 + 'left' && moduleModel === HEATERSHAKER_MODULE_V1 } /> ) : null} @@ -286,7 +285,7 @@ export function BaseDeck(props: BaseDeckProps): JSX.Element { !('slotName' in labwareLocation) || // for legacy protocols that list fixed trash as a labware, do not render definition.parameters.loadName === - 'opentrons_1_trash_3200ml_fixed' + 'opentrons_1_trash_3200ml_fixed' ) { return null } diff --git a/shared-data/js/constants.ts b/shared-data/js/constants.ts index 390d9b310a0..0860841b1d5 100644 --- a/shared-data/js/constants.ts +++ b/shared-data/js/constants.ts @@ -502,7 +502,7 @@ export const MODULE_FIXTURES_BY_MODEL: { } export const MAGNETIC_BLOCK_FIXTURES: CutoutFixtureId[] = [ MAGNETIC_BLOCK_V1_FIXTURE, - STAGING_AREA_SLOT_WITH_MAGNETIC_BLOCK_V1_FIXTURE + STAGING_AREA_SLOT_WITH_MAGNETIC_BLOCK_V1_FIXTURE, ] export const SINGLE_SLOT_FIXTURES: CutoutFixtureId[] = [ diff --git a/shared-data/js/helpers/getSimplestFlexDeckConfig.ts b/shared-data/js/helpers/getSimplestFlexDeckConfig.ts index 7b635999ed9..750eb1631b6 100644 --- a/shared-data/js/helpers/getSimplestFlexDeckConfig.ts +++ b/shared-data/js/helpers/getSimplestFlexDeckConfig.ts @@ -46,7 +46,7 @@ export function getSimplestDeckConfigForProtocol( protocolAnalysis != null ? getAddressableAreasInProtocol(protocolAnalysis, deckDef) : [] - console.log('AA', addressableAreas) + console.log('AA', addressableAreas) const simplestDeckConfig = addressableAreas.reduce< CutoutConfigProtocolSpec[] >((acc, addressableArea) => {