mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: create issue modal bug
This commit is contained in:
parent
563921d0cf
commit
4f85773a48
@ -17,8 +17,6 @@ import useUser from "hooks/use-user";
|
||||
import useToast from "hooks/use-toast";
|
||||
// components
|
||||
import { IssueForm } from "components/issues";
|
||||
// common
|
||||
import { renderDateFormat } from "helpers/date-time.helper";
|
||||
// types
|
||||
import type { IIssue, IssueResponse } from "types";
|
||||
// fetch keys
|
||||
@ -52,7 +50,10 @@ export const CreateUpdateIssueModal: React.FC<IssuesModalProps> = ({
|
||||
const [activeProject, setActiveProject] = useState<string | null>(null);
|
||||
|
||||
const router = useRouter();
|
||||
const { workspaceSlug, projectId } = router.query;
|
||||
const { workspaceSlug, projectId, cycleId, moduleId } = router.query;
|
||||
|
||||
if (cycleId) prePopulateData = { ...prePopulateData, cycle: cycleId as string };
|
||||
if (moduleId) prePopulateData = { ...prePopulateData, module: moduleId as string };
|
||||
|
||||
const { user } = useUser();
|
||||
const { setToastAlert } = useToast();
|
||||
|
@ -282,13 +282,13 @@ const SingleCycle: React.FC<UserAuth> = (props) => {
|
||||
title="Create a new issue"
|
||||
description="Click to create a new issue inside the cycle."
|
||||
Icon={PlusIcon}
|
||||
action={() => openCreateIssueModal()}
|
||||
action={openCreateIssueModal}
|
||||
/>
|
||||
<EmptySpaceItem
|
||||
title="Add an existing issue"
|
||||
description="Open list"
|
||||
Icon={ListBulletIcon}
|
||||
action={() => openIssuesListModal()}
|
||||
action={openIssuesListModal}
|
||||
/>
|
||||
</EmptySpace>
|
||||
</div>
|
||||
|
@ -303,13 +303,13 @@ const SingleModule: React.FC<UserAuth> = (props) => {
|
||||
title="Create a new issue"
|
||||
description="Click to create a new issue inside the module."
|
||||
Icon={PlusIcon}
|
||||
action={() => openCreateIssueModal()}
|
||||
action={openCreateIssueModal}
|
||||
/>
|
||||
<EmptySpaceItem
|
||||
title="Add an existing issue"
|
||||
description="Open list"
|
||||
Icon={ListBulletIcon}
|
||||
action={() => openIssuesListModal()}
|
||||
action={openIssuesListModal}
|
||||
/>
|
||||
</EmptySpace>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user