put the jd and cnh pages in, still need to test that the re-directs still function as expected with the new platform
This commit is contained in:
parent
eb7efada69
commit
424b75afb8
13 changed files with 1393 additions and 64 deletions
|
|
@ -7,7 +7,7 @@ import Logout from "pages/Logout";
|
|||
import { ErrorBoundary } from "react-error-boundary";
|
||||
import { getWhitelabel } from "services/whiteLabel";
|
||||
import Ventilation from "pages/VentEditor";
|
||||
import { useGlobalState } from "providers";
|
||||
import { useGlobalState } from "providers";
|
||||
|
||||
const DeviceHistory = lazy(() => import("pages/DeviceHistory"));
|
||||
const DevicePage = lazy(() => import("pages/Device"));
|
||||
|
|
@ -42,6 +42,8 @@ const Firmware = lazy(() => import("pages/Firmware"));
|
|||
const Nfc = lazy(() => import("pages/Nfc"));
|
||||
const Contracts = lazy(() => import("pages/Contracts"));
|
||||
const Contract = lazy(() => import("pages/Contract"));
|
||||
const JohnDeere = lazy(() => import("pages/JohnDeere"));
|
||||
const CNHi = lazy(() => import("pages/CNHi"));
|
||||
|
||||
export const appendToUrl = (appendage: number | string) => {
|
||||
const basePath = location.pathname.replace(/\/$/, "");
|
||||
|
|
@ -321,8 +323,15 @@ export default function Router() {
|
|||
<Route path="nfc" element={<Nfc />} />
|
||||
<Route path="contracts" element={<Contracts />} />
|
||||
<Route path="contracts/:contractKey" element={<Contract />} />
|
||||
|
||||
{/* Map pages */}
|
||||
|
||||
{/* integration routes */}
|
||||
{user.hasFeature("john-deere") &&
|
||||
<Route path="johndeere" element={<JohnDeere />} />
|
||||
}
|
||||
{user.hasFeature("cnhi") &&
|
||||
<Route path="cnhi" element={<CNHi />} />
|
||||
}
|
||||
{/* Map routes */}
|
||||
<Route path="visualFarm" element={<FieldMap />} />
|
||||
<Route path="aviationMap" element={<AviationMap />} />
|
||||
<Route path="constructionMap" element={<ConstructionSiteMap />} />
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ import FieldListIcon from "products/AgIcons/FieldList";
|
|||
import MarketplaceIcon from "products/CommonIcons/marketplaceIcon";
|
||||
import DataDuckIcon from "products/Bindapt/DataDuckIcon";
|
||||
import ContractsIcon from "products/CommonIcons/contractIcon";
|
||||
import JohnDeereIcon from "products/CommonIcons/johnDeereIcon";
|
||||
import CNHiIcon from "products/CommonIcons/cnhiIcon";
|
||||
|
||||
const drawerWidth = 230;
|
||||
|
||||
|
|
@ -439,6 +441,34 @@ export default function SideNavigator(props: Props) {
|
|||
{open && <ListItemText primary="Marketplace" />}
|
||||
</ListItemButton>
|
||||
</Tooltip>
|
||||
{user.hasFeature("john-deere") &&
|
||||
<Tooltip title="John Deere" placement="right">
|
||||
<ListItemButton
|
||||
id="tour-jd"
|
||||
onClick={() => goTo("/johndeere")}
|
||||
classes={getClasses("/johndeere")}
|
||||
>
|
||||
<ListItemIcon>
|
||||
<JohnDeereIcon />
|
||||
</ListItemIcon>
|
||||
{open && <ListItemText primary="John Deere" />}
|
||||
</ListItemButton>
|
||||
</Tooltip>
|
||||
}
|
||||
{user.hasFeature("cnhi") &&
|
||||
<Tooltip title="Case New Holland" placement="right">
|
||||
<ListItemButton
|
||||
id="tour-cnhi"
|
||||
onClick={() => goTo("/cnhi")}
|
||||
classes={getClasses("/cnhi")}
|
||||
>
|
||||
<ListItemIcon>
|
||||
<CNHiIcon />
|
||||
</ListItemIcon>
|
||||
{open && <ListItemText primary="Case New Holland" />}
|
||||
</ListItemButton>
|
||||
</Tooltip>
|
||||
}
|
||||
</List>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue