Merge branch 'staging_environment' into dev_environment
This commit is contained in:
commit
0433f18492
1 changed files with 5 additions and 9 deletions
|
|
@ -120,14 +120,15 @@ export default function Devices() {
|
||||||
setGroups(newGroups);
|
setGroups(newGroups);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getGroupKey = () => {
|
const getGroup = () => {
|
||||||
return parseInt(tab+1)
|
let group = groups[parseInt(tab)]
|
||||||
|
return group
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setGroupPermissions([])
|
setGroupPermissions([])
|
||||||
if (tab === "all") return
|
if (tab === "all") return
|
||||||
groupAPI.getGroupPermissions(getGroupKey()).then(resp => {
|
groupAPI.getGroupPermissions(getGroup().id()).then(resp => {
|
||||||
console.log(resp)
|
console.log(resp)
|
||||||
setGroupPermissions(resp.data.permissions)
|
setGroupPermissions(resp.data.permissions)
|
||||||
})
|
})
|
||||||
|
|
@ -160,7 +161,7 @@ export default function Devices() {
|
||||||
if (tab !== "all") {
|
if (tab !== "all") {
|
||||||
let keys = getContextKeys()
|
let keys = getContextKeys()
|
||||||
//keys.splice(keys.length - 1, 0, getGroup().id().toString());
|
//keys.splice(keys.length - 1, 0, getGroup().id().toString());
|
||||||
keys.push(getGroupKey().toString());
|
keys.push(getGroup().id().toString());
|
||||||
return keys
|
return keys
|
||||||
} else {
|
} else {
|
||||||
return getContextKeys()
|
return getContextKeys()
|
||||||
|
|
@ -380,11 +381,6 @@ export default function Devices() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const getGroup = () => {
|
|
||||||
let group = groups[parseInt(tab+1)]
|
|
||||||
return group
|
|
||||||
}
|
|
||||||
|
|
||||||
const mobile = (row: Device) => {
|
const mobile = (row: Device) => {
|
||||||
return (
|
return (
|
||||||
<Box sx={{ margin: 2 }}>
|
<Box sx={{ margin: 2 }}>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue