@@ -17,7 +17,6 @@ import { SmallScreenInfoText } from 'utils/InfoText'
1717import { phone_width } from 'utils/constants'
1818import { InstallationContext } from 'components/Contexts/InstallationContext'
1919import { StyledTableCell , StyledTableRow } from 'components/Styles/StyledComponents'
20- import { IconData } from '@equinor/eds-icons'
2120
2221const StyledIcon = styled ( Icon ) `
2322 display: flex;
@@ -42,20 +41,12 @@ const StyledTable = styled.div`
4241 }
4342 max-width: fit-content;
4443`
45- const StyledContent = styled . div `
46- display: grid;
47- grid-template-columns: 14px auto;
48- align-items: center;
49- gap: 4px;
50- color: ${ tokens . colors . text . static_icons__secondary . hex } ;
51- `
5244const Centered = styled . div `
5345 display: flex;
5446 justify-content: center;
5547`
5648
5749enum InspectionTableColumns {
58- Status = 'Status' ,
5950 Name = 'Name' ,
6051 Description = 'Description' ,
6152 LastCompleted = 'LastCompleted' ,
@@ -67,9 +58,6 @@ const HideColumnsOnSmallScreen = styled.div`
6758 display: none;
6859 }
6960 @media (max-width: ${ phone_width } ) {
70- #${ InspectionTableColumns . Status } {
71- display: none;
72- }
7361 #${ InspectionTableColumns . Description } {
7462 display: none;
7563 }
@@ -103,46 +91,14 @@ interface IMissionRowProps {
10391
10492const MissionRow = ( { mission, openDialog, setMissions, openScheduledDialog } : IMissionRowProps ) => {
10593 const { TranslateText } = useLanguageContext ( )
106- const { ongoingMissions , missionQueue } = useMissionsContext ( )
94+ const { missionQueue } = useMissionsContext ( )
10795 const { enabledRobots } = useAssetContext ( )
10896 const { installation } = useContext ( InstallationContext )
10997 const navigate = useNavigate ( )
11098
11199 const isScheduled = missionQueue . map ( ( m ) => m . missionId ) . includes ( mission . id )
112- const isOngoing = ongoingMissions . map ( ( m ) => m . missionId ) . includes ( mission . id )
113100 const isScheduleButtonDisabled = enabledRobots . length === 0
114101
115- let status : React . ReactNode
116- if ( isOngoing ) {
117- status = (
118- < StyledContent >
119- < Icon name = { Icons . Ongoing } size = { 16 } />
120- { TranslateText ( 'InProgress' ) }
121- </ StyledContent >
122- )
123- } else if ( isScheduled ) {
124- status = (
125- < StyledContent >
126- < Icon name = { Icons . Queued } size = { 16 } />
127- { TranslateText ( 'Queued' ) }
128- </ StyledContent >
129- )
130- } else {
131- const iconData : IconData = {
132- name : 'empty' ,
133- prefix : 'eds' ,
134- height : '24' ,
135- width : '24' ,
136- svgPathData : '' ,
137- }
138- status = (
139- < StyledContent >
140- < Icon data = { iconData } size = { 16 } />
141- { TranslateText ( 'Idle' ) }
142- </ StyledContent >
143- )
144- }
145-
146102 const lastCompleted = mission . lastSuccessfulRun ?. endTime
147103 ? formatDateTime ( mission . lastSuccessfulRun . endTime )
148104 : TranslateText ( 'Never' )
@@ -151,7 +107,6 @@ const MissionRow = ({ mission, openDialog, setMissions, openScheduledDialog }: I
151107
152108 return (
153109 < StyledTableRow key = { mission . id } >
154- < Table . Cell id = { InspectionTableColumns . Status } > { status } </ Table . Cell >
155110 < Table . Cell id = { InspectionTableColumns . Name } >
156111 < Typography
157112 link
0 commit comments