Merge branch 'staging_environment' of gitlab.com:brandx/bxt-app into staging_environment
This commit is contained in:
commit
720e23c27e
8 changed files with 46 additions and 14 deletions
|
|
@ -148,9 +148,9 @@ export default function ButtonGroup(props: Props){
|
|||
}}>
|
||||
{b.icon
|
||||
?
|
||||
b.icon
|
||||
b.icon
|
||||
:
|
||||
<Typography sx={{fontSize: textSize}}>
|
||||
<Typography sx={{fontSize: textSize ?? 13, fontWeight: checkToggled(i) ? 650 : 500}}>
|
||||
{b.title}
|
||||
</Typography>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ export default function ComponentActions(props: Props) {
|
|||
{canEdit && (
|
||||
<MenuItem dense onClick={() => {
|
||||
openComponentSettingsDialog("remove")
|
||||
closeMoreMenu()
|
||||
setAnchorEl(null);
|
||||
}}>
|
||||
<ListItemIcon>
|
||||
<DeleteOutline className={classes.red} />
|
||||
|
|
|
|||
|
|
@ -254,15 +254,15 @@ export default function ComponentCard(props: Props) {
|
|||
size="small"
|
||||
onTouchStart={event => {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
//event.preventDefault();
|
||||
}}
|
||||
onMouseDown={event => {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
//event.preventDefault();
|
||||
}}
|
||||
onClick={event => {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
//event.preventDefault();
|
||||
}}
|
||||
disabled={!canEdit}
|
||||
onChange={(_, checked) => updateControllerState(checked)}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ interface Props {
|
|||
drawerView?: boolean;
|
||||
}
|
||||
|
||||
|
||||
|
||||
export default function GateDevice(props: Props) {
|
||||
const { gate, comprehensiveDevice, linkedCompList, drawerView } = props;
|
||||
const [{as}] = useGlobalState();
|
||||
|
|
@ -234,6 +236,7 @@ export default function GateDevice(props: Props) {
|
|||
return (
|
||||
<Select
|
||||
id="ambientSelect"
|
||||
variant="standard"
|
||||
value={ambientKey}
|
||||
style={{ fontSize: 8 }}
|
||||
onChange={e => {
|
||||
|
|
@ -266,6 +269,7 @@ export default function GateDevice(props: Props) {
|
|||
return (
|
||||
<Select
|
||||
id="tempSelect"
|
||||
variant="standard"
|
||||
value={tempKey}
|
||||
style={{ fontSize: 8 }}
|
||||
onChange={e => {
|
||||
|
|
@ -300,6 +304,7 @@ export default function GateDevice(props: Props) {
|
|||
return (
|
||||
<Select
|
||||
id="pressureSelect"
|
||||
variant="standard"
|
||||
value={pressureKey}
|
||||
style={{ fontSize: 8 }}
|
||||
onChange={e => {
|
||||
|
|
@ -335,9 +340,10 @@ export default function GateDevice(props: Props) {
|
|||
container
|
||||
direction="row"
|
||||
alignContent="center"
|
||||
width="100%"
|
||||
//alignItems="center"
|
||||
>
|
||||
<Grid size={{ sm: 12, lg: isMobile || drawerView ? 12 : 8}} style={{ padding: 10 }}>
|
||||
<Grid size={{ sm: 12, lg: isMobile || drawerView ? 12 : 4}} style={{ padding: 10 }}>
|
||||
<Box
|
||||
paddingLeft={1}
|
||||
display="flex"
|
||||
|
|
|
|||
|
|
@ -355,13 +355,13 @@ export default function GateSVG(props: Props) {
|
|||
{renderValues()}
|
||||
</g>
|
||||
<foreignObject height={20} width={120} x={10} y={83}>
|
||||
<Box style={{ position: "fixed" }}>{ambientSelector()}</Box>
|
||||
<Box sx={{ position: "fixed" }}>{ambientSelector()}</Box>
|
||||
</foreignObject>
|
||||
<foreignObject height={20} width={120} x={10} y={118}>
|
||||
<Box style={{ position: "fixed" }}>{tempChainSelector()}</Box>
|
||||
<Box sx={{ position: "fixed" }}>{tempChainSelector()}</Box>
|
||||
</foreignObject>
|
||||
<foreignObject height={20} width={120} x={10} y={153}>
|
||||
<Box style={{ position: "fixed" }}>{pressureChainSelector()}</Box>
|
||||
<Box sx={{ position: "fixed" }}>{pressureChainSelector()}</Box>
|
||||
</foreignObject>
|
||||
{pcaRed()}
|
||||
{pcaGreen()}
|
||||
|
|
|
|||
|
|
@ -339,6 +339,7 @@ export default function Gate(props: Props) {
|
|||
}}
|
||||
style={{ height: 150, width: "100%", margin: -15 }}>
|
||||
<Grid
|
||||
width="100%"
|
||||
container
|
||||
direction="row"
|
||||
spacing={2}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,20 @@ const baseTheme: ThemeOptions = {
|
|||
paper: '#f5f5f5',
|
||||
},
|
||||
},
|
||||
typography: {
|
||||
fontFamily: [
|
||||
"Open Sans",
|
||||
"-apple-system",
|
||||
"BlinkMacSystemFont",
|
||||
'"Segoe UI"',
|
||||
'"Helvetica Neue"',
|
||||
"Arial",
|
||||
"sans-serif",
|
||||
'"Apple Color Emoji"',
|
||||
'"Segoe UI Emoji"',
|
||||
'"Segoe UI Symbol"'
|
||||
].join(",")
|
||||
}
|
||||
// Add other options if needed
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -73,14 +73,19 @@ export default function AccessObject(props: Props) {
|
|||
const [teamsTotal, setTeamsTotal] = useState<number>(0);
|
||||
const [devicesOffset, setDevicesOffset] = useState<number>(0);
|
||||
const [devicesTotal, setDevicesTotal] = useState<number>(0);
|
||||
const [prevAs, setPrevAs] = useState("")
|
||||
|
||||
const close = () => {
|
||||
|
||||
const close = (restoreAs?: boolean) => {
|
||||
if(restoreAs){
|
||||
dispatch({ key: "as", value: prevAs });
|
||||
}
|
||||
closeDialogCallback();
|
||||
};
|
||||
|
||||
const getAccess = (key: number | string, name: string, url: string, useImitation = false) => {
|
||||
user.settings.useTeam = false;
|
||||
dispatch({ key: "as", value: "" });
|
||||
//dispatch({ key: "as", value: "" });
|
||||
userAPI.updateUser(user.id(), user.protobuf()).then(() => {
|
||||
info("Will no longer view as team by default");
|
||||
permissionAPI
|
||||
|
|
@ -258,6 +263,12 @@ export default function AccessObject(props: Props) {
|
|||
|
||||
useEffect(() => {
|
||||
if (isOpen && (prevSearchValue !== searchValue || prevKind !== kind || isOpen !== prevOpen)) {
|
||||
//if the user is viewing as a team record who it was
|
||||
if(as){
|
||||
setPrevAs(as)
|
||||
}
|
||||
//change as so the user is viewing as themself
|
||||
dispatch({ key: "as", value: "" });
|
||||
load();
|
||||
}
|
||||
}, [
|
||||
|
|
@ -350,12 +361,12 @@ export default function AccessObject(props: Props) {
|
|||
return (
|
||||
<ResponsiveDialog
|
||||
open={isOpen}
|
||||
onClose={close}
|
||||
onClose={() => close(true)}
|
||||
aria-labelledby="access-object-dialog"
|
||||
fullScreen>
|
||||
<AppBar position="sticky">
|
||||
<Toolbar>
|
||||
<IconButton edge="start" color="inherit" onClick={close} aria-label="close">
|
||||
<IconButton edge="start" color="inherit" onClick={() => close(true)} aria-label="close">
|
||||
<CloseIcon />
|
||||
</IconButton>
|
||||
<Typography variant="h6" noWrap>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue