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";
|
import useToast from "hooks/use-toast";
|
||||||
// components
|
// components
|
||||||
import { IssueForm } from "components/issues";
|
import { IssueForm } from "components/issues";
|
||||||
// common
|
|
||||||
import { renderDateFormat } from "helpers/date-time.helper";
|
|
||||||
// types
|
// types
|
||||||
import type { IIssue, IssueResponse } from "types";
|
import type { IIssue, IssueResponse } from "types";
|
||||||
// fetch keys
|
// fetch keys
|
||||||
@ -52,7 +50,10 @@ export const CreateUpdateIssueModal: React.FC<IssuesModalProps> = ({
|
|||||||
const [activeProject, setActiveProject] = useState<string | null>(null);
|
const [activeProject, setActiveProject] = useState<string | null>(null);
|
||||||
|
|
||||||
const router = useRouter();
|
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 { user } = useUser();
|
||||||
const { setToastAlert } = useToast();
|
const { setToastAlert } = useToast();
|
||||||
|
@ -282,13 +282,13 @@ const SingleCycle: React.FC<UserAuth> = (props) => {
|
|||||||
title="Create a new issue"
|
title="Create a new issue"
|
||||||
description="Click to create a new issue inside the cycle."
|
description="Click to create a new issue inside the cycle."
|
||||||
Icon={PlusIcon}
|
Icon={PlusIcon}
|
||||||
action={() => openCreateIssueModal()}
|
action={openCreateIssueModal}
|
||||||
/>
|
/>
|
||||||
<EmptySpaceItem
|
<EmptySpaceItem
|
||||||
title="Add an existing issue"
|
title="Add an existing issue"
|
||||||
description="Open list"
|
description="Open list"
|
||||||
Icon={ListBulletIcon}
|
Icon={ListBulletIcon}
|
||||||
action={() => openIssuesListModal()}
|
action={openIssuesListModal}
|
||||||
/>
|
/>
|
||||||
</EmptySpace>
|
</EmptySpace>
|
||||||
</div>
|
</div>
|
||||||
|
@ -303,13 +303,13 @@ const SingleModule: React.FC<UserAuth> = (props) => {
|
|||||||
title="Create a new issue"
|
title="Create a new issue"
|
||||||
description="Click to create a new issue inside the module."
|
description="Click to create a new issue inside the module."
|
||||||
Icon={PlusIcon}
|
Icon={PlusIcon}
|
||||||
action={() => openCreateIssueModal()}
|
action={openCreateIssueModal}
|
||||||
/>
|
/>
|
||||||
<EmptySpaceItem
|
<EmptySpaceItem
|
||||||
title="Add an existing issue"
|
title="Add an existing issue"
|
||||||
description="Open list"
|
description="Open list"
|
||||||
Icon={ListBulletIcon}
|
Icon={ListBulletIcon}
|
||||||
action={() => openIssuesListModal()}
|
action={openIssuesListModal}
|
||||||
/>
|
/>
|
||||||
</EmptySpace>
|
</EmptySpace>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user