From d7d7fe55dddce3f991f486013898a32b22bade3f Mon Sep 17 00:00:00 2001 From: Stanislas Polu Date: Mon, 18 Dec 2023 10:18:48 +0100 Subject: [PATCH] move my assistants up for builders, members up for admin (#2908) --- front/components/sparkle/navigation.tsx | 45 ++++++++++++------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/front/components/sparkle/navigation.tsx b/front/components/sparkle/navigation.tsx index 609522803378..e405a40553b9 100644 --- a/front/components/sparkle/navigation.tsx +++ b/front/components/sparkle/navigation.tsx @@ -97,7 +97,7 @@ export const topNavigation = ({ id: "assistants", label: "Assistants", icon: RobotIcon, - href: `/w/${owner.sId}/builder/assistants`, + href: `/w/${owner.sId}/assistant/assistants`, current: current === "assistants", sizing: "hug", hasSeparator: true, @@ -109,7 +109,7 @@ export const topNavigation = ({ icon: Cog6ToothIcon, href: owner.role === "admin" - ? `/w/${owner.sId}/workspace` + ? `/w/${owner.sId}/members` : `/w/${owner.sId}/a`, current: current === "admin", sizing: "hug", @@ -170,18 +170,7 @@ export const subNavigationAssistants = ({ }) => { const nav: SidebarNavigation[] = []; - const assistantMenus: SparkleAppLayoutNavigation[] = [ - { - id: "workspace_assistants", - label: "Workspace Assistants", - icon: RobotSharedIcon, - href: `/w/${owner.sId}/builder/assistants`, - current: current === "workspace_assistants", - subMenuLabel: - current === "workspace_assistants" ? subMenuLabel : undefined, - subMenu: current === "workspace_assistants" ? subMenu : undefined, - }, - ]; + const assistantMenus: SparkleAppLayoutNavigation[] = []; if (owner.role === "builder" || owner.role === "admin") { assistantMenus.push({ @@ -196,6 +185,16 @@ export const subNavigationAssistants = ({ }); } + assistantMenus.push({ + id: "workspace_assistants", + label: "Workspace Assistants", + icon: RobotSharedIcon, + href: `/w/${owner.sId}/builder/assistants`, + current: current === "workspace_assistants", + subMenuLabel: current === "workspace_assistants" ? subMenuLabel : undefined, + subMenu: current === "workspace_assistants" ? subMenu : undefined, + }); + nav.push({ id: "assistants", label: null, @@ -257,6 +256,15 @@ export const subNavigationAdmin = ({ label: null, variant: "secondary", menus: [ + { + id: "members", + label: "Members", + icon: UsersIcon, + href: `/w/${owner.sId}/members`, + current: current === "members", + subMenuLabel: current === "members" ? subMenuLabel : undefined, + subMenu: current === "members" ? subMenu : undefined, + }, { id: "workspace", label: "Workspace", @@ -275,15 +283,6 @@ export const subNavigationAdmin = ({ subMenuLabel: current === "subscription" ? subMenuLabel : undefined, subMenu: current === "subscription" ? subMenu : undefined, }, - { - id: "members", - label: "Members", - icon: UsersIcon, - href: `/w/${owner.sId}/members`, - current: current === "members", - subMenuLabel: current === "members" ? subMenuLabel : undefined, - subMenu: current === "members" ? subMenu : undefined, - }, ], }); }