From 952eb871df73a999a9055c4c577bb0261261c889 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Tue, 20 Feb 2024 20:11:59 +0530 Subject: [PATCH 1/2] [WEB-462] fix: inbox mutation (#3720) * fix: inbox issue status mutation * fix: sidebar inbox issue count fix * fix: inbox issue mutation fix --- web/components/project/sidebar-list-item.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/components/project/sidebar-list-item.tsx b/web/components/project/sidebar-list-item.tsx index b8e4b9edab..f899a9b31b 100644 --- a/web/components/project/sidebar-list-item.tsx +++ b/web/components/project/sidebar-list-item.tsx @@ -105,7 +105,7 @@ export const ProjectSidebarListItem: React.FC = observer((props) => { const actionSectionRef = useRef(null); - const inboxesMap = currentProjectDetails?.inbox_view ? getInboxesByProjectId(currentProjectDetails.id) : undefined; + const inboxesMap = project?.inbox_view ? getInboxesByProjectId(projectId) : undefined; const inboxDetails = inboxesMap && inboxesMap.length > 0 ? getInboxById(inboxesMap[0]) : undefined; const handleAddToFavorites = () => { From 95871b0049f77572239ea9a17967941a1f71f28a Mon Sep 17 00:00:00 2001 From: Lakhan Baheti <94619783+1akhanBaheti@users.noreply.github.com> Date: Tue, 20 Feb 2024 20:16:45 +0530 Subject: [PATCH 2/2] [WEB-472] fix: Page title for global view (#3723) * fix: Page title for global view * fix: global-view-id type --- .../workspace-views/[globalViewId].tsx | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/web/pages/[workspaceSlug]/workspace-views/[globalViewId].tsx b/web/pages/[workspaceSlug]/workspace-views/[globalViewId].tsx index 43a0ad4943..85e9074811 100644 --- a/web/pages/[workspaceSlug]/workspace-views/[globalViewId].tsx +++ b/web/pages/[workspaceSlug]/workspace-views/[globalViewId].tsx @@ -1,20 +1,37 @@ import { ReactElement } from "react"; +import { useRouter } from "next/router"; +import { observer } from "mobx-react"; // layouts import { AppLayout } from "layouts/app-layout"; +// hooks +import { useGlobalView, useWorkspace } from "hooks/store"; // components import { GlobalViewsHeader } from "components/workspace"; import { AllIssueLayoutRoot } from "components/issues"; import { GlobalIssuesHeader } from "components/headers"; +import { PageHead } from "components/core"; // types import { NextPageWithLayout } from "lib/types"; -import { observer } from "mobx-react"; -import { useWorkspace } from "hooks/store"; -import { PageHead } from "components/core"; +// constants +import { DEFAULT_GLOBAL_VIEWS_LIST } from "constants/workspace"; const GlobalViewIssuesPage: NextPageWithLayout = observer(() => { + // router + const router = useRouter(); + const { globalViewId } = router.query; + // store hooks const { currentWorkspace } = useWorkspace(); + const { getViewDetailsById } = useGlobalView(); // derived values - const pageTitle = currentWorkspace?.name ? `${currentWorkspace?.name} - Views` : undefined; + const globalViewDetails = globalViewId ? getViewDetailsById(globalViewId.toString()) : undefined; + const defaultView = DEFAULT_GLOBAL_VIEWS_LIST.find((view) => view.key === globalViewId); + const pageTitle = + currentWorkspace?.name && defaultView?.label + ? `${currentWorkspace?.name} - ${defaultView?.label}` + : currentWorkspace?.name && globalViewDetails?.name + ? `${currentWorkspace?.name} - ${globalViewDetails?.name}` + : undefined; + return ( <>