fix: module and cycle create issue in calendar view mutation fix (#1079)

This commit is contained in:
Anmol Singh Bhatia 2023-05-19 16:15:06 +05:30 committed by GitHub
parent ae1eb9527a
commit e3a114cd69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,12 +138,12 @@ export const CreateUpdateIssueModal: React.FC<IssuesModalProps> = ({
const createIssue = async (payload: Partial<IIssue>) => { const createIssue = async (payload: Partial<IIssue>) => {
await issuesService await issuesService
.createIssues(workspaceSlug as string, activeProject ?? "", payload) .createIssues(workspaceSlug as string, activeProject ?? "", payload)
.then((res) => { .then(async (res) => {
mutate(PROJECT_ISSUES_LIST_WITH_PARAMS(activeProject ?? "", params)); mutate(PROJECT_ISSUES_LIST_WITH_PARAMS(activeProject ?? "", params));
if (issueView === "calendar") mutate(calendarFetchKey); if (payload.cycle && payload.cycle !== "") await addIssueToCycle(res.id, payload.cycle);
if (payload.module && payload.module !== "") await addIssueToModule(res.id, payload.module);
if (payload.cycle && payload.cycle !== "") addIssueToCycle(res.id, payload.cycle); if (issueView === "calendar") mutate(calendarFetchKey);
if (payload.module && payload.module !== "") addIssueToModule(res.id, payload.module);
if (!createMore) handleClose(); if (!createMore) handleClose();