diff --git a/packages/be-gateway/src/routes/project/index.ts b/packages/be-gateway/src/routes/project/index.ts index 31eecbbf..e3e6f2db 100644 --- a/packages/be-gateway/src/routes/project/index.ts +++ b/packages/be-gateway/src/routes/project/index.ts @@ -271,11 +271,13 @@ router.post('/project', async (req: AuthRequest, res) => { console.log('done') delCache([CKEY.USER_PROJECT, userId]) - console.log('delete cache done') + + const retData: Project = { ...result, projectViewId: firstProjectView.id } + console.log('delete cache done', retData) res.json({ status: 200, - data: result + data: retData }) }) diff --git a/packages/ui-app/app/[orgID]/ProjectSidebar.tsx b/packages/ui-app/app/[orgID]/ProjectSidebar.tsx index 4a2c2faf..58c6137a 100644 --- a/packages/ui-app/app/[orgID]/ProjectSidebar.tsx +++ b/packages/ui-app/app/[orgID]/ProjectSidebar.tsx @@ -7,17 +7,17 @@ import ProjectList from '@/features/Project/Nav/index' import { HiOutlineBriefcase, HiOutlineChartPie, + HiOutlineChevronLeft, HiOutlineServerStack, - HiOutlineCog6Tooth, - HiOutlineStar, - HiOutlineVideoCamera + HiOutlineVideoCamera, } from 'react-icons/hi2' import { Button, Scrollbar } from '@shared/ui' import { AiOutlinePlus } from 'react-icons/ai' import ProjectAddModal from '@/features/Project/Add/ProjectAddModal' -import Favorites from '@/features/Favorites' import { useMemo, useState } from 'react' import { useMenuStore } from '@/store/menu' +import OrgSection from 'packages/ui-app/layouts/OrgSection' +import { getLocalCache } from '@shared/libs' function ViewAllBtn() { return ( @@ -44,32 +44,24 @@ function ProjectSidebarContainer({ orgID }: { orgID: string }) { const { setVisible: setMenuVisible } = useMenuStore() const pathname = usePathname() const { push } = useRouter() - const [open, setOpen] = useState(false) if (pathname.includes('/sign-in') || pathname.includes('/sign-up')) { return null } const menus = [ + // { + // title: 'Back', + // href: `/organization`, + // icon: HiArrowLeft, + // active: false + // }, { title: 'My works', href: `/${orgID}/my-works`, icon: HiOutlineBriefcase, active: pathname.includes('/my-works') }, - { - title: 'Meeting', - href: `/${orgID}/meeting`, - icon: HiOutlineVideoCamera, - active: pathname.includes('/meeting') - }, - { - title: 'Favorites', - // href: `/${orgID}/favorites`, - icon: HiOutlineStar, - active: pathname.includes('/favorites'), - children: Favorites - }, { title: 'Projects', href: `/${orgID}/project`, @@ -78,27 +70,45 @@ function ProjectSidebarContainer({ orgID }: { orgID: string }) { active: pathname.includes('/project/') || pathname.includes('/project'), children: ProjectList }, + { + title: 'Meeting', + href: `/${orgID}/meeting`, + icon: HiOutlineVideoCamera, + active: pathname.includes('/meeting') + }, + // { + // title: 'Favorites', + // // href: `/${orgID}/favorites`, + // icon: HiOutlineStar, + // active: pathname.includes('/favorites'), + // children: Favorites + // }, { title: 'Reports', href: `/${orgID}/report`, icon: HiOutlineChartPie, active: pathname.includes(`${orgID}/report`) }, - { - title: 'Settings', - href: `/${orgID}/setting/people`, - icon: HiOutlineCog6Tooth, - active: pathname.includes(`${orgID}/setting`) - } + // { + // title: 'Settings', + // href: `/${orgID}/setting/people`, + // icon: HiOutlineCog6Tooth, + // active: pathname.includes(`${orgID}/setting`) + // } ] return ( <> -