change(api): module settings - new modules
This commit is contained in:
parent
5f18d7a719
commit
2533dc7e23
1 changed files with 11 additions and 1 deletions
|
|
@ -45,6 +45,15 @@ function SideMenu(props: Props) {
|
|||
|
||||
return sourceMenu.map(category => {
|
||||
const updatedItems = category.items.map(item => {
|
||||
if (isEnterprise) {
|
||||
if (item.key === MENU.BOOKMARKS) {
|
||||
return { ...item, hidden: true };
|
||||
}
|
||||
|
||||
if (item.key === MENU.VAULT) {
|
||||
return { ...item, hidden: false };
|
||||
}
|
||||
}
|
||||
if (item.hidden) return item;
|
||||
|
||||
const isHidden = [
|
||||
|
|
@ -56,7 +65,7 @@ function SideMenu(props: Props) {
|
|||
(item.key === MENU.SESSIONS && modules.includes(MODULES.OFFLINE_RECORDINGS)),
|
||||
(item.key === MENU.ALERTS && modules.includes(MODULES.ALERTS)),
|
||||
(item.isAdmin && !isAdmin),
|
||||
(item.isEnterprise && !isEnterprise)
|
||||
(item.isEnterprise && !isEnterprise),
|
||||
].some(cond => cond);
|
||||
|
||||
return { ...item, hidden: isHidden };
|
||||
|
|
@ -87,6 +96,7 @@ function SideMenu(props: Props) {
|
|||
[MENU.EXIT]: () => props.history.push(withSiteId(routes.sessions(), siteId)),
|
||||
[MENU.SESSIONS]: () => withSiteId(routes.sessions(), siteId),
|
||||
[MENU.BOOKMARKS]: () => withSiteId(routes.bookmarks(), siteId),
|
||||
[MENU.VAULT]: () => withSiteId(routes.bookmarks(), siteId),
|
||||
[MENU.NOTES]: () => withSiteId(routes.notes(), siteId),
|
||||
[MENU.LIVE_SESSIONS]: () => withSiteId(routes.assist(), siteId),
|
||||
[MENU.STATS]: () => withSiteId(routes.assistStats(), siteId),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue