got rid of material-ui references and fixed fan icon import

This commit is contained in:
Carter 2025-03-18 11:40:16 -06:00
parent c84f6194fa
commit 65eeb9e8b4
20 changed files with 163 additions and 94 deletions

View file

@ -13,7 +13,6 @@ import {
Radio,
Box
} from "@mui/material";
//import { blue } from "@material-ui/core/colors";
import { blue } from "@mui/material/colors";
import ResponsiveDialog from "common/ResponsiveDialog";
import React, { useState, useEffect } from "react";

View file

@ -19,7 +19,6 @@ import {
Theme,
Typography
} from "@mui/material";
// import { Alert, AlertTitle, Skeleton } from "@material-ui/lab";
import { GrainOptions, MoistureToHumidity } from "grain";
import GrainDryingChart, { GrainDryingPoint } from "charts/GrainDryingChart";
import SearchSelect, { Option } from "common/SearchSelect";

View file

@ -1,32 +1,31 @@
import {
createStyles,
IconButton,
ListItemIcon,
ListItemText,
makeStyles,
Menu,
MenuItem,
Tooltip
} from "@material-ui/core";
import SettingsIcon from "@material-ui/icons/Settings";
import MoreIcon from "@material-ui/icons/MoreVert";
} from "@mui/material";
import SettingsIcon from "@mui/icons-material/Settings";
import MoreIcon from "@mui/icons-material/MoreVert";
import React, { useState } from "react";
import ObjectUsersIcon from "@material-ui/icons/AccountCircle";
import ObjectTeamsIcon from "@material-ui/icons/SupervisedUserCircle";
import ObjectUsersIcon from "@mui/icons-material/AccountCircle";
import ObjectTeamsIcon from "@mui/icons-material/SupervisedUserCircle";
import ObjectUsers from "user/ObjectUsers";
import { pond } from "protobuf-ts/pond";
import { Scope } from "models";
import ObjectTeams from "teams/ObjectTeams";
import RemoveSelfFromObject from "user/RemoveSelfFromObject";
import ShareObject from "user/ShareObject";
import { blue } from "@material-ui/core/colors";
import RemoveSelfIcon from "@material-ui/icons/ExitToApp";
import { Share } from "@material-ui/icons";
import { blue } from "@mui/material/colors";
import RemoveSelfIcon from "@mui/icons-material/ExitToApp";
import { Share } from "@mui/icons-material";
import { GrainBag } from "models/GrainBag";
import GrainBagSettings from "./grainBagSettings";
import { makeStyles } from "@mui/styles";
const useStyles = makeStyles(() => {
return createStyles({
return ({
shareIcon: {
color: blue["500"],
"&:hover": {
@ -87,7 +86,6 @@ export default function GrainBagActions(props: Props) {
setOpenState({ ...openState, share: true });
setAnchorEl(null);
}}
button
dense>
<ListItemIcon>
<Share className={classes.blueIcon} />
@ -99,8 +97,7 @@ export default function GrainBagActions(props: Props) {
onClick={() => {
setOpenState({ ...openState, users: true });
setAnchorEl(null);
}}
button>
}}>
<ListItemIcon>
<ObjectUsersIcon />
</ListItemIcon>
@ -111,8 +108,7 @@ export default function GrainBagActions(props: Props) {
onClick={() => {
setOpenState({ ...openState, teams: true });
setAnchorEl(null);
}}
button>
}}>
<ListItemIcon>
<ObjectTeamsIcon />
</ListItemIcon>
@ -123,8 +119,7 @@ export default function GrainBagActions(props: Props) {
onClick={() => {
setOpenState({ ...openState, removeSelf: true });
setAnchorEl(null);
}}
button>
}}>
<ListItemIcon>
<RemoveSelfIcon className={classes.red} />
</ListItemIcon>

View file

@ -1,11 +1,11 @@
import { Box, Card, CircularProgress, Typography } from "@material-ui/core";
import { Box, Card, CircularProgress, Typography } from "@mui/material";
import BarGraph, { BarData } from "charts/BarGraph";
import GrainDescriber from "grain/GrainDescriber";
import { GrainBag } from "models/GrainBag";
import moment, { Moment } from "moment";
import { pond } from "protobuf-ts/pond";
import { useGrainBagAPI, useSnackbar } from "providers";
import React, { useEffect, useState } from "react";
import { useEffect, useState } from "react";
import { getGrainUnit } from "utils";
interface Props {
@ -61,7 +61,7 @@ export default function GrainBagInventoryGraph(props: Props) {
}
setData(barData);
})
.catch(err => {
.catch(_err => {
openSnack("There was a problem retrieving inventory information");
})
.finally(() => {

View file

@ -1,16 +1,14 @@
import {
Box,
Card,
Grid,
Grid2 as Grid,
Slider,
makeStyles,
createStyles,
Typography,
IconButton,
Theme,
useTheme,
darken
} from "@material-ui/core";
} from "@mui/material";
import GrainDescriber from "grain/GrainDescriber";
import GrainTransaction from "grain/GrainTransaction";
import { useMobile } from "hooks";
@ -19,10 +17,11 @@ import { round } from "lodash";
import { GrainBag } from "models/GrainBag";
import moment from "moment";
import { pond } from "protobuf-ts/pond";
import React, { useEffect, useState } from "react";
import { useEffect, useState } from "react";
import { getThemeType } from "theme";
import { getGrainUnit } from "utils";
import GrainBagSVG from "./grainBagSVG";
import { makeStyles } from "@mui/styles";
interface Props {
grainBag: GrainBag;
@ -36,7 +35,7 @@ enum zIndexPriority {
}
const useStyles = makeStyles((theme: Theme) => {
return createStyles({
return ({
grainOVerlay: {
position: "absolute",
height: "10%",
@ -293,14 +292,14 @@ export default function GrainBagVisualizer(props: Props) {
return (
<Card raised className={classes.cardContent}>
<Grid container justify="flex-start" alignItems="stretch">
<Grid item xs sm md style={{ position: "relative" }}>
<Grid container justifyContent="flex-start" alignItems="stretch">
<Grid style={{ position: "relative" }}>
{overview()}
</Grid>
<Grid item style={{ position: "relative" }}>
<Grid style={{ position: "relative" }}>
{visual()}
</Grid>
<Grid item>{controls()}</Grid>
<Grid>{controls()}</Grid>
</Grid>
{/* dialog for grain inventory transactions */}
<GrainTransaction

View file

@ -24,14 +24,10 @@ import {
} from "@mui/material";
import { makeStyles } from "@mui/styles";
import CancelSubmit from "common/CancelSubmit";
// import { darken, lighten } from "@material-ui/core/styles/colorManipulator";
// import { Theme } from "@material-ui/core/styles/createMuiTheme";
import DeleteButton from "common/DeleteButton";
import Loader from "common/Loader";
import ResponsiveDialog from "common/ResponsiveDialog";
import SearchBar from "common/SearchBar";
// import SearchBar from "common/SearchBar";
// import RemoveGroup from "group/RemoveGroup";
import { useDeviceAPI, useGroupAPI, usePrevious, useSnackbar } from "hooks";
import { Device, Group } from "models";
import { filterDevices } from "pbHelpers/Device";

View file

@ -1,5 +1,3 @@
// import { useTheme, Theme } from "@material-ui/core";
import { Theme, useTheme } from "@mui/material";
export function useThemeType() {

View file

@ -22,7 +22,6 @@ import {
} from "@mui/material";
import AddIcon from "@mui/icons-material/AddCircle";
import RemoveIcon from "@mui/icons-material/RemoveCircle";
// import { TimePicker } from "@material-ui/pickers";
import classNames from "classnames";
import DeleteButton from "common/DeleteButton";
import ResponsiveDialog from "common/ResponsiveDialog";
@ -557,7 +556,7 @@ export default function InteractionSettings(props: Props) {
setInteraction(updatedInteraction);
};
const toggleReport = (event: any) => {
const toggleReport = (_event: any) => {
let updatedInteraction = Interaction.clone(interaction);
let notifications = or(
interaction.settings.notifications,
@ -568,7 +567,7 @@ export default function InteractionSettings(props: Props) {
setInteraction(updatedInteraction);
};
const toggleNotify = (event: any) => {
const toggleNotify = (_event: any) => {
let updatedInteraction = Interaction.clone(interaction);
let notifications = or(
updatedInteraction.settings.notifications,

View file

@ -15,7 +15,6 @@ import {
Typography
} from "@mui/material";
import { Settings } from "@mui/icons-material";
// import { ToggleButton, ToggleButtonGroup } from "@material-ui/lab";
import { useInteractionsAPI, usePrevious, useSnackbar } from "hooks";
import { cloneDeep } from "lodash";
import { Component, Device, Interaction } from "models";
@ -156,7 +155,7 @@ export default function InteractionsOverview(props: Props) {
step={measurement.step()}
track={false}
value={measurement.toDisplay(condition.value ? condition.value : 0)}
onChange={(event, value) =>
onChange={(_event, value) =>
updateConditionValue(source, interactionIndex, conditionIndex, value)
}
/>
@ -202,14 +201,14 @@ export default function InteractionsOverview(props: Props) {
) => {
interactionsAPI
.updateInteraction(Number(deviceID), settings)
.then((response: any) => {
.then((_response: any) => {
let updatedDirtyInteractions = cloneDeep(dirtyInteractions);
updatedDirtyInteractions.set(index, false);
setDirtyInteractions(updatedDirtyInteractions);
success("Successfully updated the interaction for " + component.name());
refreshCallback();
})
.catch((err: any) => {
.catch((_err: any) => {
error("Error occurred while updating the interaction for " + component.name());
});
};

View file

@ -29,9 +29,6 @@ import {
Typography
} from "@mui/material";
import { ExpandMore, RemoveCircle as RemoveIcon, AddCircle as AddIcon } from "@mui/icons-material";
//import RemoveIcon from "@material-ui/icons/RemoveCircle";
//import { ExpandMore } from "@material-ui/icons";
//import AddIcon from "@material-ui/icons/AddCircle";
import ResponsiveDialog from "common/ResponsiveDialog";
import { Option } from "common/SearchSelect";
import classNames from "classnames";
@ -47,11 +44,8 @@ import { useNotificationAPI } from "providers/pond/notificationAPI";
import React, { useEffect, useState } from "react";
import { capitalize, cloneDeep } from "lodash";
import { timeOfDayDescriptor } from "pbHelpers/Interaction";
//import { TimePicker } from "@material-ui/pickers";
import { TimePicker } from "@mui/x-date-pickers";
//import { getThemeType } from "theme";
import { getThemeType } from "theme/themeType";
//import { green, red } from "@material-ui/core/colors";
import { green, red } from "@mui/material/colors";
import { makeStyles } from "@mui/styles";
@ -251,7 +245,7 @@ export default function ObjectAlerts(props: Props) {
setRecentNotifications(resp.data.notifications);
setTotalNotifications(resp.data.total);
})
.catch(err => {})
.catch(_err => {})
.finally(() => {
setNotificationsLoading(false);
});
@ -303,7 +297,7 @@ export default function ObjectAlerts(props: Props) {
setRecentNotifications([...c]);
}
})
.catch(err => {})
.catch(_err => {})
.finally(() => {
setNotificationsLoading(false);
});
@ -373,10 +367,10 @@ export default function ObjectAlerts(props: Props) {
});
interactionsAPI
.addInteractionToComponents(compIds, newAlert)
.then(resp => {
.then(_resp => {
openSnack("interaction added to selected components");
})
.catch(err => {
.catch(_err => {
openSnack("there was a problem adding the interaction to the selected components");
});
setNewAlertOpen(false);

View file

@ -1,5 +1,4 @@
//import { Button, Grid, InputAdornment, TextField } from "@material-ui/core";
import { Button, Grid, InputAdornment, TextField } from "@mui/material";
import { Button, Grid2 as Grid, InputAdornment, TextField } from "@mui/material";
import SearchSelect, { Option } from "common/SearchSelect";
import { GrainOptions } from "grain";
import { pond } from "protobuf-ts/pond";
@ -77,7 +76,7 @@ export default function BulkBinSettings(props: Props) {
openSnack("Successfully updated " + resp.data.successfull + " bins");
}
})
.catch(err => {
.catch(_err => {
openSnack("Failed to update bins");
});
};
@ -86,7 +85,7 @@ export default function BulkBinSettings(props: Props) {
<React.Fragment>
<Grid container direction="row" spacing={2} alignContent="center" alignItems="center">
{/* first row */}
<Grid item xs={gridItemWidth}>
<Grid size={{ xs: gridItemWidth }}>
<TextField
fullWidth
label="Bin Name"
@ -96,7 +95,7 @@ export default function BulkBinSettings(props: Props) {
}}
/>
</Grid>
<Grid item xs={gridItemWidth}>
<Grid size={{ xs: gridItemWidth }}>
<SearchSelect
label="Grain Type"
selected={grainOption}
@ -111,7 +110,7 @@ export default function BulkBinSettings(props: Props) {
options={GrainOptions()}
/>
</Grid>
<Grid item xs={gridItemWidth}>
<Grid size={{ xs: gridItemWidth }}>
<TextField
fullWidth
label="Grain Variant"
@ -122,7 +121,7 @@ export default function BulkBinSettings(props: Props) {
/>
</Grid>
{/* second row */}
<Grid item xs={gridItemWidth}>
<Grid size={{ xs: gridItemWidth }}>
<TextField
fullWidth
label="Custom Grain"
@ -132,7 +131,7 @@ export default function BulkBinSettings(props: Props) {
}}
/>
</Grid>
<Grid item xs={gridItemWidth}>
<Grid size={{ xs: gridItemWidth }}>
<TextField
fullWidth
label="Bushels"
@ -143,7 +142,7 @@ export default function BulkBinSettings(props: Props) {
}}
/>
</Grid>
<Grid item xs={gridItemWidth}>
<Grid size={{ xs: gridItemWidth }}>
<TextField
fullWidth
label="Capacity"
@ -155,7 +154,7 @@ export default function BulkBinSettings(props: Props) {
/>
</Grid>
{/* last row */}
<Grid item xs={gridItemWidth}>
<Grid size={{ xs: gridItemWidth }}>
<TextField
fullWidth
label="Bin Height"
@ -173,7 +172,7 @@ export default function BulkBinSettings(props: Props) {
}}
/>
</Grid>
<Grid item xs={gridItemWidth}>
<Grid size={{ xs: gridItemWidth }}>
<TextField
fullWidth
label="Bin Diameter"
@ -191,7 +190,7 @@ export default function BulkBinSettings(props: Props) {
}}
/>
</Grid>
<Grid item xs={gridItemWidth}>
<Grid size={{ xs: gridItemWidth }}>
<TextField
fullWidth
label="High Temp Warning"
@ -211,7 +210,7 @@ export default function BulkBinSettings(props: Props) {
}}
/>
</Grid>
<Grid item xs={gridItemWidth}>
<Grid size={{ xs: gridItemWidth }}>
<TextField
fullWidth
label="Low Temp Warning"
@ -231,7 +230,7 @@ export default function BulkBinSettings(props: Props) {
}}
/>
</Grid>
<Grid item xs={gridItemWidth}>
<Grid size={{ xs: gridItemWidth }}>
<Button
variant="contained"
color="primary"

View file

@ -1,4 +1,3 @@
//import { Button, Grid, TextField } from "@material-ui/core";
import { Button, Grid2 as Grid, TextField } from "@mui/material";
import SearchSelect, { Option } from "common/SearchSelect";
import { GrainOptions } from "grain";
@ -68,7 +67,7 @@ export default function BulkGrainBagSettings(props: Props) {
openSnack("Successfully updated " + resp.data.successfull + " bins");
}
})
.catch(err => {
.catch(_err => {
openSnack("Failed to update bins");
});
};

View file

@ -28,16 +28,12 @@ import {
import BinActions from "bin/BinActions";
import BinHistory from "bin/BinHistory";
import { useComponentAPI, useMobile } from "hooks";
// import { useHistory } from "react-router";
import { Bin as IBin, binScope } from "models";
// import { MatchParams } from "navigation/Routes";
import { pond, quack } from "protobuf-ts/pond";
import { useBinAPI, useGlobalState } from "providers";
import React, { useCallback, useEffect, useRef, useState } from "react";
// import { useRouteMatch } from "react-router";
import PageContainer from "./PageContainer";
import { Component, Device, Interaction } from "models";
// import { ToggleButton, ToggleButtonGroup } from "@material-ui/lab";
import BinLightIcon from "assets/products/bindapt/binLight.png";
import BinDarkIcon from "assets/products/bindapt/binDark.png";
import NotesIcon from "@mui/icons-material/Notes";
@ -214,7 +210,7 @@ export default function Bin(props: Props) {
const [binPresets, setBinPresets] = useState<DevicePreset[]>([]);
const [missedCableReadings, setMissedCableReadings] = useState(0);
const handleChange = (event: React.ChangeEvent<{}>, newValue: number) => {
const handleChange = (_event: React.ChangeEvent<{}>, newValue: number) => {
setValue(newValue);
};
@ -482,7 +478,7 @@ export default function Bin(props: Props) {
// return true;
// };
const refresh = (showSnack?: boolean) => {
const refresh = (_showSnack?: boolean) => {
// binAPI.getBin(bin.key()).then(resp => {
// let bin = IBin.any(resp.data);
// setBin(bin);

View file

@ -51,7 +51,6 @@ import BinUtilizationChart from "charts/BinUtilizationChart";
import GrainDescriber, { grainName } from "grain/GrainDescriber";
// import GrainBagList from "grainBag/grainBagList";
// import GrainBagSettings from "grainBag/grainBagSettings";
// import { ToggleButton, ToggleButtonGroup } from "@material-ui/lab";
import { useMobile, useWidth } from "hooks";
import { Dictionary } from "lodash";
// import { Bin, Interaction, BinYard as BinYardModel } from "models";

View file

@ -1,5 +1,4 @@
// import Grid2 from "@material-ui/core/Grid2";
import Graph, {
import {
GraphComponent,
GraphOrientation,
GraphPoint,
@ -8,7 +7,6 @@ import Graph, {
} from "common/Graph";
import { Range } from "common/RangeInput";
import { Option } from "common/SearchSelect";
import GPSMap from "component/GPS";
import { Interaction } from "models";
import {
AirQuality,
@ -48,7 +46,6 @@ import { multilineCapCableData } from "./ComponentTypes/CapacitorCable";
import { findInteractionsAsSource } from "pbHelpers/Interaction";
import { pond } from "protobuf-ts/pond";
import { quack } from "protobuf-ts/quack";
import React from "react";
import { notNull, or } from "utils/types";
import { emptyComponentId } from "./Component";
@ -63,7 +60,6 @@ import { LineData, Point } from "charts/measurementCharts/MultiLineGraph";
import moment, { Moment } from "moment";
import { avg } from "utils";
import { Airflow } from "./ComponentTypes/Airflow";
import { Grid2 } from "@mui/material";
const COMPONENT_TYPE_MAP = new Map<quack.ComponentType, Function>([
[quack.ComponentType.COMPONENT_TYPE_INVALID, Invalid],
@ -240,7 +236,7 @@ export function unitMeasurementSummary(
});
//if nodes are excluded splice them out of the val array so they are not displayed in the summary
if (excludedNodes) {
vals.forEach((val, i) => {
vals.forEach((_val, i) => {
if (excludedNodes.includes(i)) {
vals.splice(i, 1);
}

110
src/pbHelpers/Fan.ts Normal file
View file

@ -0,0 +1,110 @@
import { pond } from "protobuf-ts/pond";
import { getThemeType } from "theme";
import inLineDarkIcon from "assets/components/inLineAerationDark.png";
import inLineLightIcon from "assets/components/inLineAerationLight.png";
import lowSpeedDark from "assets/components/lowSpeedCentrifugalFanDark.png";
import lowSpeedLight from "assets/components/lowSpeedCentrifugalFanLight.png";
import highSpeedDark from "assets/components/fullCentrifugalFanDark.png";
import highSpeedLight from "assets/components/fullCentrifugalFanLight.png";
interface FanSizeDescriber {
key: pond.FanHp;
label: string;
numerical: number;
}
const getFanSizeDescribers = (): FanSizeDescriber[] => {
return [
{ key: pond.FanHp.FAN_HP_UNKNOWN, label: "Unknown", numerical: 0 },
{ key: pond.FanHp.FAN_HP_THREE, label: "3HP", numerical: 3 },
{ key: pond.FanHp.FAN_HP_FIVE, label: "5HP", numerical: 5 },
{ key: pond.FanHp.FAN_HP_SEVENPOINTFIVE, label: "7HP", numerical: 7 },
{ key: pond.FanHp.FAN_HP_SEVEN, label: "7.5HP", numerical: 7.5 },
{ key: pond.FanHp.FAN_HP_TEN, label: "10HP", numerical: 10 },
{ key: pond.FanHp.FAN_HP_FIFTEEN, label: "15HP", numerical: 15 },
{ key: pond.FanHp.FAN_HP_TWENTY, label: "20HP", numerical: 20 },
{ key: pond.FanHp.FAN_HP_TWENTYFIVE, label: "25HP", numerical: 25 },
{ key: pond.FanHp.FAN_HP_THIRTY, label: "30HP", numerical: 30 }
];
};
interface FanTypeDescriber {
key: pond.FanType;
label: string;
sizes: pond.FanHp[];
}
const getFanTypeDescribers = (): FanTypeDescriber[] => {
return [
{ key: pond.FanType.FAN_TYPE_UNKNOWN, label: "Unknown", sizes: [] },
{
key: pond.FanType.FAN_TYPE_CENTRIFUGAL_INLINE,
label: "In-line Aeration",
sizes: [
pond.FanHp.FAN_HP_THREE,
pond.FanHp.FAN_HP_FIVE,
pond.FanHp.FAN_HP_SEVEN,
pond.FanHp.FAN_HP_TEN
]
},
{
key: pond.FanType.FAN_TYPE_CENTRIFUGAL_HIGH_SPEED,
label: "High Speed Centrifugal",
sizes: [
pond.FanHp.FAN_HP_THREE,
pond.FanHp.FAN_HP_FIVE,
pond.FanHp.FAN_HP_SEVENPOINTFIVE,
pond.FanHp.FAN_HP_TEN
]
},
{
key: pond.FanType.FAN_TYPE_CENTRIFUGAL_LOW_SPEED,
label: "Low Speed Centrifugal",
sizes: [
pond.FanHp.FAN_HP_FIVE,
pond.FanHp.FAN_HP_SEVENPOINTFIVE,
pond.FanHp.FAN_HP_TEN,
pond.FanHp.FAN_HP_FIFTEEN,
pond.FanHp.FAN_HP_TWENTY,
pond.FanHp.FAN_HP_TWENTYFIVE,
pond.FanHp.FAN_HP_THIRTY
]
}
];
};
export function GetFanTypes(): FanTypeDescriber[] {
return getFanTypeDescribers();
}
function getFanTypeDescriber(type: pond.FanType): FanTypeDescriber | undefined {
const fanTypes = getFanTypeDescribers();
return fanTypes.find(t => t.key === type);
}
export function GetFanTypeSizes(type: pond.FanType): FanSizeDescriber[] {
let options: FanSizeDescriber[] = [];
let typeDesc = getFanTypeDescriber(type);
if (typeDesc) {
let matches = typeDesc.sizes;
options = getFanSizeDescribers().filter(s => matches.includes(s.key));
}
return options;
}
export function getFanIcon(type: pond.FanType): string {
switch (type) {
case pond.FanType.FAN_TYPE_CENTRIFUGAL_INLINE:
if (getThemeType() === "light") return inLineLightIcon;
return inLineDarkIcon;
case pond.FanType.FAN_TYPE_CENTRIFUGAL_HIGH_SPEED:
if (getThemeType() === "light") return highSpeedLight;
return highSpeedDark;
case pond.FanType.FAN_TYPE_CENTRIFUGAL_LOW_SPEED:
if (getThemeType() === "light") return lowSpeedLight;
return lowSpeedDark;
}
return "";
}

View file

@ -1,5 +1,3 @@
//import { Avatar, ButtonBase, createStyles, makeStyles, Theme, Tooltip } from "@material-ui/core";
//import { Tune as PresetsIcon, ViewList as ComponentsIcon } from "@material-ui/icons";
import { Avatar, ButtonBase, Theme, Tooltip } from "@mui/material";
import { Tune as PresetsIcon, ViewList as ComponentsIcon } from "@mui/icons-material";
import { makeStyles } from "@mui/styles";

View file

@ -18,7 +18,6 @@ import {
ListItemText,
Tab,
Tabs,
TextField,
Theme,
Tooltip,
Typography
@ -29,7 +28,6 @@ import {
LinkOff,
RemoveCircle as RemoveCircleIcon
} from "@mui/icons-material";
// import { MobileDateTimePicker } from "@material-ui/pickers";
import ResponsiveDialog from "common/ResponsiveDialog";
import { usePermissionAPI, usePrevious, useSnackbar } from "hooks";
import { cloneDeep } from "lodash";

View file

@ -12,7 +12,6 @@ import {
FormControlLabel,
FormGroup,
FormLabel,
Grid,
Grid2,
IconButton,
List,
@ -27,8 +26,6 @@ import {
Typography,
useTheme
} from "@mui/material";
// import { Theme } from "@material-ui/core/styles/createMuiTheme";
// import { PaletteColor } from "@material-ui/core/styles/createPalette";
import RemoveUserIcon from "@mui/icons-material/RemoveCircle";
import EditIcon from "@mui/icons-material/EditOutlined";
import ShareIcon from "@mui/icons-material/Share";
@ -220,7 +217,7 @@ export default function ObjectUsers(props: Props) {
console.log(users);
permissionAPI
.updatePermissions(scope, users)
.then((response: any) => {
.then((_response: any) => {
success("Users were sucessfully updated for " + label);
close();
refreshCallback();

View file

@ -23,7 +23,6 @@ import CounterclockwiseIcon from "@mui/icons-material/RotateLeft";
import { useGlobalState, useMineAPI } from "providers";
import { Component, Device } from "models";
import { Sensor } from "./drawable/Sensor";
// import { ToggleButton } from "@material-ui/lab";
import { VentTBreak } from "./drawable/VentTBreak";
import InteractionSettings from "interactions/InteractionSettings";
import { UnitMeasurement } from "models/UnitMeasurement";