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

@ -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");
});
};