fixed teamlist not listing when using a team as context

This commit is contained in:
Carter 2025-05-07 14:57:04 -06:00
parent 9041482131
commit 7130cce26b
2 changed files with 12 additions and 5 deletions

View file

@ -57,7 +57,14 @@ const useStyles = makeStyles((theme: Theme) => {
margin: theme.spacing(1), margin: theme.spacing(1),
marginLeft: theme.spacing(2), marginLeft: theme.spacing(2),
display: "flex", display: "flex",
width: theme.spacing(26) width: theme.spacing(32)
// justifyContent: "center",
},
tagsCellContainer: {
margin: theme.spacing(1),
marginLeft: theme.spacing(2),
display: "flex",
width: theme.spacing(24)
// justifyContent: "center", // justifyContent: "center",
}, },
green: { green: {
@ -328,8 +335,8 @@ export default function Devices() {
<Box className={classes.descriptionCellContainer}> <Box className={classes.descriptionCellContainer}>
<Tooltip title={device.settings?.description}> <Tooltip title={device.settings?.description}>
<span> <span>
{description.length > 32 {description.length > 36
? description.substring(0, 32) + "..." ? description.substring(0, 36) + "..."
: description} : description}
</span> </span>
</Tooltip> </Tooltip>
@ -341,7 +348,7 @@ export default function Devices() {
title: "Tags", title: "Tags",
render: (device: Device) => { render: (device: Device) => {
return ( return (
<Grid2 container spacing={1} className={classes.descriptionCellContainer}> <Grid2 container spacing={1} className={classes.tagsCellContainer}>
{device.status.tags.map((tag: pond.TagSettings) => ( {device.status.tags.map((tag: pond.TagSettings) => (
<Grid2 key={"device-"+device.id()+"-tag-"+tag.key}> <Grid2 key={"device-"+device.id()+"-tag-"+tag.key}>
<TagUI tag={Tag.any({ settings: tag })} /> <TagUI tag={Tag.any({ settings: tag })} />

View file

@ -80,7 +80,7 @@ export default function TeamList() {
viewAs = undefined viewAs = undefined
} }
teamAPI teamAPI
.listTeams(limit, limit * page, undefined, "name", undefined, undefined, viewAs, search) .listTeams(limit, limit * page, undefined, "name", undefined, undefined, " ", search)
.then(resp => { .then(resp => {
setTotal(resp.data.total ? resp.data.total : 0); setTotal(resp.data.total ? resp.data.total : 0);
let newTeams: Team[] = [] let newTeams: Team[] = []