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);
|
||||
};
|
||||
|
||||
const getGroupKey = () => {
|
||||
return parseInt(tab+1)
|
||||
const getGroup = () => {
|
||||
let group = groups[parseInt(tab)]
|
||||
return group
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
setGroupPermissions([])
|
||||
if (tab === "all") return
|
||||
groupAPI.getGroupPermissions(getGroupKey()).then(resp => {
|
||||
groupAPI.getGroupPermissions(getGroup().id()).then(resp => {
|
||||
console.log(resp)
|
||||
setGroupPermissions(resp.data.permissions)
|
||||
})
|
||||
|
|
@ -160,7 +161,7 @@ export default function Devices() {
|
|||
if (tab !== "all") {
|
||||
let keys = getContextKeys()
|
||||
//keys.splice(keys.length - 1, 0, getGroup().id().toString());
|
||||
keys.push(getGroupKey().toString());
|
||||
keys.push(getGroup().id().toString());
|
||||
return keys
|
||||
} else {
|
||||
return getContextKeys()
|
||||
|
|
@ -380,11 +381,6 @@ export default function Devices() {
|
|||
)
|
||||
}
|
||||
|
||||
const getGroup = () => {
|
||||
let group = groups[parseInt(tab+1)]
|
||||
return group
|
||||
}
|
||||
|
||||
const mobile = (row: Device) => {
|
||||
return (
|
||||
<Box sx={{ margin: 2 }}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue