finished refactoring the object alerts into object interactions
This commit is contained in:
parent
bb92077d0b
commit
c9d2eac6c3
5 changed files with 86 additions and 28 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { Add, ExpandMore } from "@mui/icons-material";
|
||||
import { Accordion, AccordionDetails, AccordionSummary, Box, Grid2, IconButton, List, ListItem, ListSubheader, Typography } from "@mui/material";
|
||||
import { Accordion, AccordionDetails, AccordionSummary, Box, Button, Grid2, IconButton, List, ListItem, ListSubheader, Typography } from "@mui/material";
|
||||
import { Component } from "models";
|
||||
import { describeMeasurement } from "pbHelpers/MeasurementDescriber";
|
||||
import { pond, quack } from "protobuf-ts/pond";
|
||||
|
|
@ -71,7 +71,13 @@ export default function Alerts(props: Props){
|
|||
Alerts
|
||||
</Typography>
|
||||
{addNew &&
|
||||
<IconButton disabled={!permissions.includes(pond.Permission.PERMISSION_WRITE)} onClick={()=>{addNew()}} color="primary"><Add /></IconButton>
|
||||
<Button
|
||||
disabled={!permissions.includes(pond.Permission.PERMISSION_WRITE)}
|
||||
onClick={()=>{addNew()}}
|
||||
variant="contained"
|
||||
color="primary">
|
||||
<Add /> Alert
|
||||
</Button>
|
||||
}
|
||||
</ListSubheader>
|
||||
{alerts.map((alert, i) => (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue