diff --git a/src/features/Compute/CaseGroup/CaseButtons/CaseButtons.tsx b/src/features/Compute/CaseGroup/CaseButtons/CaseButtons.tsx index 8e7fd5bd..594fb4b2 100644 --- a/src/features/Compute/CaseGroup/CaseButtons/CaseButtons.tsx +++ b/src/features/Compute/CaseGroup/CaseButtons/CaseButtons.tsx @@ -118,7 +118,7 @@ export const CaseButtons = ({ : caseStatus === 'Created' || caseStatus === 'Waiting' || caseStatus === 'Running' - ? 'Case are running.' + ? 'Case is running.' : '' } > diff --git a/src/features/ModelView/ModelNavigationBar/ModelNavigationBar.tsx b/src/features/ModelView/ModelNavigationBar/ModelNavigationBar.tsx index ca32d5a1..e58db95f 100644 --- a/src/features/ModelView/ModelNavigationBar/ModelNavigationBar.tsx +++ b/src/features/ModelView/ModelNavigationBar/ModelNavigationBar.tsx @@ -1,10 +1,11 @@ /* eslint-disable max-lines-per-function */ import { SideBar, SidebarLinkProps } from '@equinor/eds-core-react'; import { - approve as APPROVE, + arrow_back as BACK, format_list_bulleted as FORMATLISTBULLET, + grid_on as GRID, IconData, - settings, + timeline as TIMELINE, } from '@equinor/eds-icons'; import { useLocation, useNavigate } from 'react-router-dom'; import * as Styled from './ModelNavigationBar.styled'; @@ -13,6 +14,7 @@ type MenuItems = SidebarLinkProps & { subItems?: Array<{ label: string; name: string; + type: string; href: string; icon: IconData; }>; @@ -26,6 +28,12 @@ export const ModelNavigationBar = () => { const path = tab[tab.length - 1]; const path2 = tab[tab.length - 2]; + const backItems: SidebarLinkProps = { + label: 'Back', + icon: BACK, + href: '/', + active: false, + }; const menuItems: SidebarLinkProps = { label: 'Details', icon: FORMATLISTBULLET, @@ -33,42 +41,46 @@ export const ModelNavigationBar = () => { active: false, }; - const sidebarCompute: MenuItems = { - label: 'Compute', - href: 'variogram', - icon: settings, + const objectItems: MenuItems = { + label: 'Object', + href: '', + icon: GRID, subItems: [ { - label: 'Variogram', - name: 'variogram', - href: 'compute/variogram', - icon: settings, + label: 'Compute settings', + name: 'object', + type: 'compute', + href: 'compute/object', + icon: GRID, }, { - label: 'Object', + label: 'Results', name: 'object', - href: 'compute/object', - icon: settings, + type: 'results', + href: 'results/object', + icon: GRID, }, ], }; - const sidebarResults: MenuItems = { - label: 'Results', + const variogramItems: MenuItems = { + label: 'Variogram', href: '', - icon: APPROVE, + icon: TIMELINE, subItems: [ { - label: 'Variogram', + label: 'Compute settings', name: 'variogram', - href: 'results/variogram', - icon: APPROVE, + type: 'compute', + href: 'compute/variogram', + icon: TIMELINE, }, { - label: 'Object', - name: 'object', - href: 'results/object', - icon: APPROVE, + label: 'Results', + name: 'variogram', + type: 'results', + href: 'results/variogram', + icon: TIMELINE, }, ], }; @@ -76,6 +88,13 @@ export const ModelNavigationBar = () => { return ( + { + navigate('/'); + }} + > { { - navigate('compute/variogram'); + navigate('compute/object'); }} > - {sidebarCompute.subItems?.map((item) => ( + {objectItems.subItems?.map((item) => ( { navigate(`${item.href}`); }} @@ -118,28 +129,20 @@ export const ModelNavigationBar = () => { ))} { - navigate('results/variogram'); + navigate('compute/variogram'); }} > - {sidebarResults.subItems?.map((item) => ( + {variogramItems.subItems?.map((item) => ( { navigate(`${item.href}`); }}