Skip to content

Commit

Permalink
fix(app): disable the factory mode complete and restart robot button …
Browse files Browse the repository at this point in the history
…when robot is busy (#15006)

passes a robotIsBusy boolean to the factory mode slideout to disable the complete and restart robot button when the robot is busy. this covers the edge case where the robot becomes busy after the slideout is opened.

closes RQA-2632
  • Loading branch information
brenthagen authored Apr 25, 2024
1 parent 7bb202e commit a153f52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import type { Dispatch } from '../../../../../redux/types'

interface FactoryModeSlideoutProps {
isExpanded: boolean
isRobotBusy: boolean
onCloseClick: () => void
robotName: string
}
Expand All @@ -43,6 +44,7 @@ interface FormValues {

export function FactoryModeSlideout({
isExpanded,
isRobotBusy,
onCloseClick,
robotName,
}: FactoryModeSlideoutProps): JSX.Element {
Expand Down Expand Up @@ -160,7 +162,8 @@ export function FactoryModeSlideout({
disabled={
(toggleValue && file == null) ||
isUploading ||
fileError != null
fileError != null ||
isRobotBusy
}
onClick={handleCompleteClick}
width="100%"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ export function RobotSettingsAdvanced({
{showFactoryModeSlideout && (
<FactoryModeSlideout
isExpanded={showFactoryModeSlideout}
isRobotBusy={isRobotBusy || isEstopNotDisengaged}
onCloseClick={() => setShowFactoryModeSlideout(false)}
robotName={robotName}
/>
Expand Down

0 comments on commit a153f52

Please sign in to comment.