Skip to content

Commit

Permalink
fix(app): do not render maintenance modal when starting LPC from ODD (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
shlokamin authored Jun 12, 2023
1 parent c4aae62 commit d5e5674
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 69 deletions.
61 changes: 0 additions & 61 deletions app/src/organisms/ProtocolSetupLabwarePositionCheck/index.tsx

This file was deleted.

14 changes: 6 additions & 8 deletions app/src/pages/OnDeviceDisplay/ProtocolSetup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {

import { StyledText } from '../../atoms/text'
import { Skeleton } from '../../atoms/Skeleton'
import { useMaintenanceRunTakeover } from '../../organisms/TakeoverModal'
import {
useAttachedModules,
useLPCDisabledReason,
Expand All @@ -45,7 +46,6 @@ import { ProtocolSetupModules } from '../../organisms/ProtocolSetupModules'
import { ProtocolSetupLiquids } from '../../organisms/ProtocolSetupLiquids'
import { ProtocolSetupInstruments } from '../../organisms/ProtocolSetupInstruments'
import { useLaunchLPC } from '../../organisms/LabwarePositionCheck/useLaunchLPC'
import { ProtocolSetupLabwarePositionCheck } from '../../organisms/ProtocolSetupLabwarePositionCheck'
import { getUnmatchedModulesForProtocol } from '../../organisms/ProtocolSetupModules/utils'
import { ConfirmCancelRunModal } from '../../organisms/OnDeviceDisplay/RunningProtocol'
import {
Expand Down Expand Up @@ -223,6 +223,7 @@ function PrepareToRun({
protocolRecord?.data.files[0].name
const mostRecentAnalysis = useMostRecentCompletedAnalysis(runId)
const { launchLPC, LPCWizard } = useLaunchLPC(runId)
const { setODDMaintenanceFlowInProgress } = useMaintenanceRunTakeover()

const { play } = useRunControls(runId)

Expand Down Expand Up @@ -405,7 +406,10 @@ function PrepareToRun({
disabled={protocolModulesInfo.length === 0}
/>
<ProtocolSetupStep
onClickSetupStep={launchLPC}
onClickSetupStep={() => {
setODDMaintenanceFlowInProgress()
launchLPC()
}}
title={t('labware_position_check')}
detail={t(
lpcDisabledReason != null ? 'currently_unavailable' : 'recommended'
Expand Down Expand Up @@ -474,12 +478,6 @@ export function ProtocolSetup(): JSX.Element {
labware: (
<ProtocolSetupLabware runId={runId} setSetupScreen={setSetupScreen} />
),
lpc: (
<ProtocolSetupLabwarePositionCheck
runId={runId}
setSetupScreen={setSetupScreen}
/>
),
liquids: (
<ProtocolSetupLiquids runId={runId} setSetupScreen={setSetupScreen} />
),
Expand Down

0 comments on commit d5e5674

Please sign in to comment.