Skip to content

Commit

Permalink
Display robot as busy if it is in a mission
Browse files Browse the repository at this point in the history
  • Loading branch information
aeshub committed Oct 18, 2022
1 parent 197ecf8 commit 6ce3d42
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/RobotCards/RobotStatusCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function RobotStatusCard({ robot }: RobotProps) {
let path = `mission`
navigate(path)
}
if (robot.status == RobotStatus.MissionInProgress) {
if (robot.status == RobotStatus.Busy) {
return (
<HoverableStyledCard variant="default" style={{ boxShadow: tokens.elevation.raised }} onClick={goToMission}>
{cardContent({ robot })}
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/RobotCards/RobotStatusChip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface StatusProps {
enum StatusColors {
Available = '#A1DAA0',
Offline = '#F7F7F7',
MissionInProgress = '#FFC67A',
Busy = '#FFC67A',
}

export function RobotStatusChip({ status }: StatusProps) {
Expand All @@ -19,8 +19,8 @@ export function RobotStatusChip({ status }: StatusProps) {
chipColor = StatusColors.Available
break
}
case RobotStatus.MissionInProgress: {
chipColor = StatusColors.MissionInProgress
case RobotStatus.Busy: {
chipColor = StatusColors.Busy
break
}
default: {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/models/Robot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { VideoStream } from './VideoStream'
export enum RobotStatus {
Available = 'Available',
Offline = 'Offline',
MissionInProgress = 'Mission in progress',
Busy = 'Busy',
}

export enum RobotType {
Expand Down

0 comments on commit 6ce3d42

Please sign in to comment.