From 2533dc7e23f57c544627487afd29e06c0cba17c8 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Fri, 3 Nov 2023 15:25:37 +0100 Subject: [PATCH] change(api): module settings - new modules --- frontend/app/layout/SideMenu.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend/app/layout/SideMenu.tsx b/frontend/app/layout/SideMenu.tsx index 48b078bf1..c733e4638 100644 --- a/frontend/app/layout/SideMenu.tsx +++ b/frontend/app/layout/SideMenu.tsx @@ -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),