chore: issue relation modal and issue peek overview mutation fix (#3482)
* fix: resolve addtocycle and addtomodule mutation in peek overview and issue sidebar * fix: issue relation modal fix for all issues peek overview * fix: cycle and module mutation in issue detail and issue peek overview * fix: updated the issue actions for cycle and module mutation in peek overview * chore: module issue store updated * chore: existing isssue modal improvement and build error fix --------- Co-authored-by: gurusainath <gurusainath007@gmail.com>
This commit is contained in:
parent
9ecdcc6fde
commit
212f2b54f8
11 changed files with 59 additions and 81 deletions
|
|
@ -90,6 +90,8 @@ export const IssueRelationSelect: React.FC<TIssueRelationSelect> = observer((pro
|
|||
return (
|
||||
<>
|
||||
<ExistingIssuesListModal
|
||||
workspaceSlug={workspaceSlug}
|
||||
projectId={projectId}
|
||||
isOpen={isRelationModalOpen === relationKey}
|
||||
handleClose={() => toggleRelationModal(null)}
|
||||
searchParams={{ issue_relation: true, issue_id: issueId }}
|
||||
|
|
|
|||
|
|
@ -120,23 +120,12 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = (props) => {
|
|||
},
|
||||
addIssueToCycle: async (workspaceSlug: string, projectId: string, cycleId: string, issueIds: string[]) => {
|
||||
try {
|
||||
await addIssueToCycle(workspaceSlug, projectId, cycleId, issueIds)
|
||||
.then((res) => {
|
||||
updateIssue(workspaceSlug, projectId, res.id, res);
|
||||
fetchIssue(workspaceSlug, projectId, res.id);
|
||||
setToastAlert({
|
||||
title: "Cycle added to issue successfully",
|
||||
type: "success",
|
||||
message: "Issue added to issue successfully",
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
setToastAlert({
|
||||
type: "error",
|
||||
title: "Error!",
|
||||
message: "Selected issues could not be added to the cycle. Please try again.",
|
||||
});
|
||||
});
|
||||
await addIssueToCycle(workspaceSlug, projectId, cycleId, issueIds);
|
||||
setToastAlert({
|
||||
title: "Cycle added to issue successfully",
|
||||
type: "success",
|
||||
message: "Issue added to issue successfully",
|
||||
});
|
||||
} catch (error) {
|
||||
setToastAlert({
|
||||
title: "Cycle add to issue failed",
|
||||
|
|
@ -163,23 +152,12 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = (props) => {
|
|||
},
|
||||
addIssueToModule: async (workspaceSlug: string, projectId: string, moduleId: string, issueIds: string[]) => {
|
||||
try {
|
||||
await addIssueToModule(workspaceSlug, projectId, moduleId, issueIds)
|
||||
.then((res) => {
|
||||
updateIssue(workspaceSlug, projectId, res.id, res);
|
||||
fetchIssue(workspaceSlug, projectId, res.id);
|
||||
setToastAlert({
|
||||
title: "Module added to issue successfully",
|
||||
type: "success",
|
||||
message: "Module added to issue successfully",
|
||||
});
|
||||
})
|
||||
.catch(() =>
|
||||
setToastAlert({
|
||||
type: "error",
|
||||
title: "Error!",
|
||||
message: "Selected issues could not be added to the module. Please try again.",
|
||||
})
|
||||
);
|
||||
await addIssueToModule(workspaceSlug, projectId, moduleId, issueIds);
|
||||
setToastAlert({
|
||||
title: "Module added to issue successfully",
|
||||
type: "success",
|
||||
message: "Module added to issue successfully",
|
||||
});
|
||||
} catch (error) {
|
||||
setToastAlert({
|
||||
title: "Module add to issue failed",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue