flipped the keys/types added to the context on the devices page to have the group after the team
This commit is contained in:
parent
7774558cac
commit
871cbf424e
2 changed files with 5 additions and 4 deletions
|
|
@ -148,7 +148,8 @@ export default function Devices() {
|
||||||
const getKeys = () => {
|
const getKeys = () => {
|
||||||
if (tab !== "all") {
|
if (tab !== "all") {
|
||||||
let keys = getContextKeys()
|
let keys = getContextKeys()
|
||||||
keys.splice(keys.length - 1, 0, tab);
|
//keys.splice(keys.length - 1, 0, getGroup().id().toString());
|
||||||
|
keys.push(getGroup().id().toString());
|
||||||
return keys
|
return keys
|
||||||
} else {
|
} else {
|
||||||
return getContextKeys()
|
return getContextKeys()
|
||||||
|
|
@ -158,7 +159,8 @@ export default function Devices() {
|
||||||
const getTypes = () => {
|
const getTypes = () => {
|
||||||
if (tab !== "all") {
|
if (tab !== "all") {
|
||||||
let types = getContextTypes()
|
let types = getContextTypes()
|
||||||
types.splice(types.length - 1, 0, "group");
|
//types.splice(types.length - 1, 0, "group");
|
||||||
|
types.push("group");
|
||||||
return types
|
return types
|
||||||
} else {
|
} else {
|
||||||
return getContextTypes()
|
return getContextTypes()
|
||||||
|
|
@ -374,7 +376,6 @@ export default function Devices() {
|
||||||
|
|
||||||
const getGroup = () => {
|
const getGroup = () => {
|
||||||
let group = groups[parseInt(tab)]
|
let group = groups[parseInt(tab)]
|
||||||
console.log(group)
|
|
||||||
return group
|
return group
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -219,7 +219,7 @@ export default function DeviceProvider(props: PropsWithChildren<Props>) {
|
||||||
(types ? "&types=" + types.toString() : "")
|
(types ? "&types=" + types.toString() : "")
|
||||||
);
|
);
|
||||||
if (as && !(types && types.length > 0 && types[0] === "team")) {
|
if (as && !(types && types.length > 0 && types[0] === "team")) {
|
||||||
pondURL(
|
url = pondURL(
|
||||||
"/devicePageData/" +
|
"/devicePageData/" +
|
||||||
id +
|
id +
|
||||||
"?as=" +
|
"?as=" +
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue