imported the gate and terminal related files to prep for the aviation map
This commit is contained in:
parent
e2e061151b
commit
505cb8e3aa
25 changed files with 4868 additions and 9 deletions
|
|
@ -9,6 +9,8 @@ import { getWhitelabel } from "services/whiteLabel";
|
|||
import Ventilation from "pages/VentEditor";
|
||||
import FieldMap from "pages/FieldMap";
|
||||
import GrainBag from "pages/grainBag";
|
||||
import Terminals from "pages/Terminals";
|
||||
import Gate from "pages/Gate";
|
||||
|
||||
const DeviceHistory = lazy(() => import("pages/DeviceHistory"));
|
||||
const DevicePage = lazy(() => import("pages/Device"));
|
||||
|
|
@ -46,6 +48,7 @@ export default function Router(props: Props) {
|
|||
<Route path="groups/*" element={<GroupsRoute/>} />
|
||||
<Route path="bins/*" element={<BinsRoute/>} />
|
||||
<Route path="mines/*" element={<MinesRoute/>} />
|
||||
<Route path="terminals/*" element={<TerminalGatesRoute />} />
|
||||
</Routes>
|
||||
)
|
||||
}
|
||||
|
|
@ -151,6 +154,28 @@ export default function Router(props: Props) {
|
|||
);
|
||||
};
|
||||
|
||||
const TerminalGatesRoute = () => {
|
||||
return (
|
||||
<div>
|
||||
<Routes>
|
||||
<Route
|
||||
key="Terminal page route"
|
||||
path="" // "/settings/basic"
|
||||
element={<Terminals key={"Mines page"} />}
|
||||
/>
|
||||
<Route
|
||||
path="/:gateKey" // "/settings/basic"
|
||||
element={<Gate />}
|
||||
/>
|
||||
<Route
|
||||
path="/:gateKey/*" // "/settings/basic"
|
||||
element={<RelativeRoutes />}
|
||||
/>
|
||||
</Routes>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
const GroupsRoute = () => {
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -30,11 +30,13 @@ import {
|
|||
// IsAdCon,
|
||||
// isBXT,
|
||||
IsMiVent,
|
||||
IsOmniAir,
|
||||
// IsOmniAir
|
||||
} from "services/whiteLabel";
|
||||
import MiningIcon from "products/ventilation/MiningIcon";
|
||||
import { useAuth0 } from "@auth0/auth0-react";
|
||||
import FieldsIcon from "products/AgIcons/FieldsIcon";
|
||||
import PlaneIcon from "products/AviationIcons/PlaneIcon";
|
||||
|
||||
const drawerWidth = 230;
|
||||
|
||||
|
|
@ -140,6 +142,7 @@ export default function SideNavigator(props: Props) {
|
|||
const authenticatedSideMenu = () => {
|
||||
const isMiVent = IsMiVent();
|
||||
const isAg = IsAdaptiveAgriculture()
|
||||
const isMiPCA = IsOmniAir()
|
||||
return (
|
||||
<List className={classes.list} component="nav">
|
||||
{(isAg || user.hasFeature("admin")) && (
|
||||
|
|
@ -156,6 +159,20 @@ export default function SideNavigator(props: Props) {
|
|||
</ListItemButton>
|
||||
</Tooltip>
|
||||
)}
|
||||
{(isMiPCA || user.hasFeature("admin")) && (
|
||||
<Tooltip title="Terminals" placement="right">
|
||||
<ListItemButton
|
||||
id="tour-terminals"
|
||||
onClick={() => goTo("/terminals")}
|
||||
classes={getClasses("/terminal")}
|
||||
>
|
||||
<ListItemIcon>
|
||||
<PlaneIcon />
|
||||
</ListItemIcon>
|
||||
{open && <ListItemText primary="Terminals" />}
|
||||
</ListItemButton>
|
||||
</Tooltip>
|
||||
)}
|
||||
<Tooltip title="Devices" placement="right">
|
||||
<ListItemButton
|
||||
id="tour-dashboard"
|
||||
|
|
@ -209,7 +226,7 @@ export default function SideNavigator(props: Props) {
|
|||
{(isAg || user.hasFeature("admin")) && (
|
||||
<Tooltip title="Visual Farm" placement="right">
|
||||
<ListItemButton
|
||||
id="tour-dashboard"
|
||||
id="tour-visual-farm"
|
||||
onClick={() => goTo("/visualFarm")}
|
||||
classes={getClasses("/visualFarm")}
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue