imported mining stuff, can add a mine and list them
This commit is contained in:
parent
7dad5217e7
commit
5fcb99ef40
36 changed files with 6622 additions and 32 deletions
|
|
@ -1,12 +1,37 @@
|
|||
import { ChevronRight, People, Person } from "@mui/icons-material";
|
||||
import ChevronLeft from "@mui/icons-material/ChevronLeft";
|
||||
import { darken, Divider, Grid2 as Grid, IconButton, lighten, List, ListItemButton, ListItemIcon, ListItemText, SwipeableDrawer, Theme, Toolbar, Tooltip, useTheme } from "@mui/material";
|
||||
import {
|
||||
darken,
|
||||
Divider,
|
||||
Grid2 as Grid,
|
||||
IconButton,
|
||||
lighten,
|
||||
List,
|
||||
ListItemButton,
|
||||
ListItemIcon,
|
||||
ListItemText,
|
||||
SwipeableDrawer,
|
||||
Theme,
|
||||
Toolbar,
|
||||
Tooltip,
|
||||
useTheme
|
||||
} from "@mui/material";
|
||||
import classNames from "classnames";
|
||||
import { useWidth } from "../hooks/useWidth";
|
||||
import { makeStyles } from "@mui/styles";
|
||||
import BindaptIcon from "../products/Bindapt/BindaptIcon";
|
||||
import { Link, useLocation } from "react-router-dom";
|
||||
import BinsIcon from "products/Bindapt/BinsIcon";
|
||||
import { useGlobalState } from "providers";
|
||||
import {
|
||||
hasTutorialPlaylist,
|
||||
IsAdaptiveAgriculture,
|
||||
IsAdCon,
|
||||
isBXT,
|
||||
IsMiVent,
|
||||
IsOmniAir
|
||||
} from "services/whiteLabel";
|
||||
import MiningIcon from "products/ventilation/MiningIcon";
|
||||
|
||||
const drawerWidth = 230;
|
||||
|
||||
|
|
@ -80,6 +105,7 @@ export default function SideNavigator(props: Props) {
|
|||
const width = useWidth();
|
||||
const classes = useStyles();
|
||||
const location = useLocation();
|
||||
const [{ user }] = useGlobalState()
|
||||
|
||||
const getClasses = (page: string) => {
|
||||
if (page === "/device") {
|
||||
|
|
@ -101,7 +127,7 @@ export default function SideNavigator(props: Props) {
|
|||
}
|
||||
|
||||
const authenticatedSideMenu = () => {
|
||||
|
||||
const isMiVent = IsMiVent();
|
||||
return (
|
||||
<List className={classes.list} component="nav">
|
||||
<Tooltip title="Bins" placement="right">
|
||||
|
|
@ -132,6 +158,22 @@ export default function SideNavigator(props: Props) {
|
|||
{open && <ListItemText primary="Devices" />}
|
||||
</ListItemButton>
|
||||
</Tooltip>
|
||||
{(isMiVent || user.hasFeature("admin")) && (
|
||||
<Tooltip title="Mines" placement="right">
|
||||
<ListItemButton
|
||||
id="tour-dashboard"
|
||||
component={Link}
|
||||
to="/mines"
|
||||
onClick={onClose}
|
||||
classes={getClasses("/mine")}
|
||||
>
|
||||
<ListItemIcon>
|
||||
<MiningIcon />
|
||||
</ListItemIcon>
|
||||
{open && <ListItemText primary="Mines" />}
|
||||
</ListItemButton>
|
||||
</Tooltip>
|
||||
)}
|
||||
<Tooltip title="Teams" placement="right">
|
||||
<ListItemButton
|
||||
id="tour-dashboard"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue