[WEB-927, WEB-928] fix: inbox issue bug fixes and improvement (#4160)

* chore: inbox duplicate issue modal improvement

* chore: handled tab navigation in inbox issues and handled cross project inbox issues

* chore: fetch inbox issue activity once the issue is updated in inbox issue

* chore: disable duplicate inbox issue actions

* chore: duplicate issue mutation in the inbox issue

* chore: inbox create modal sidebar tab change updated

* chore: multiple date selection in the inbox issue filters

* chore: code refactor

* chore: removed project dependancy on the inbox store structure

---------

Co-authored-by: Anmol Singh Bhatia <anmolsinghbhatia@plane.so>
This commit is contained in:
guru_sainath 2024-04-10 16:08:31 +05:30 committed by GitHub
parent d0cb00f28a
commit f45c2d12fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 96 additions and 108 deletions

View file

@ -1,4 +1,4 @@
import { ReactElement } from "react";
import { ReactElement, useEffect } from "react";
import { observer } from "mobx-react";
import { useRouter } from "next/router";
// components
@ -9,7 +9,7 @@ import { InboxIssueRoot } from "@/components/inbox";
// constants
import { EmptyStateType } from "@/constants/empty-state";
// hooks
import { useProject } from "@/hooks/store";
import { useProject, useProjectInbox } from "@/hooks/store";
// layouts
import { AppLayout } from "@/layouts/app-layout";
// types
@ -18,9 +18,10 @@ import { NextPageWithLayout } from "@/lib/types";
const ProjectInboxPage: NextPageWithLayout = observer(() => {
/// router
const router = useRouter();
const { workspaceSlug, projectId, inboxIssueId } = router.query;
const { workspaceSlug, projectId, currentTab: navigationTab, inboxIssueId } = router.query;
// hooks
const { currentProjectDetails } = useProject();
const { currentTab, handleCurrentTab } = useProjectInbox();
if (!workspaceSlug || !projectId) return <></>;
@ -38,6 +39,10 @@ const ProjectInboxPage: NextPageWithLayout = observer(() => {
// derived values
const pageTitle = currentProjectDetails?.name ? `${currentProjectDetails?.name} - Inbox` : "Plane - Inbox";
useEffect(() => {
if (navigationTab && currentTab != navigationTab) handleCurrentTab(navigationTab === "open" ? "open" : "closed");
}, [currentTab, navigationTab, handleCurrentTab]);
return (
<div className="flex h-full flex-col">
<PageHead title={pageTitle} />