forked from github/plane
fix: toast alert content
This commit is contained in:
parent
66bc3df480
commit
d87e149f72
@ -105,12 +105,6 @@ export const ExistingIssuesListModal: React.FC<Props> = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleClose();
|
handleClose();
|
||||||
|
|
||||||
setToastAlert({
|
|
||||||
title: "Success",
|
|
||||||
type: "success",
|
|
||||||
message: `Issue${selectedIssues.length > 1 ? "s" : ""} added successfully`,
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -9,6 +9,8 @@ import useSWR, { mutate } from "swr";
|
|||||||
import { Disclosure, Transition } from "@headlessui/react";
|
import { Disclosure, Transition } from "@headlessui/react";
|
||||||
// services
|
// services
|
||||||
import issuesService from "services/issues.service";
|
import issuesService from "services/issues.service";
|
||||||
|
// hooks
|
||||||
|
import useToast from "hooks/use-toast";
|
||||||
// contexts
|
// contexts
|
||||||
import { useProjectMyMembership } from "contexts/project-member.context";
|
import { useProjectMyMembership } from "contexts/project-member.context";
|
||||||
// components
|
// components
|
||||||
@ -38,6 +40,8 @@ export const SubIssuesList: FC<Props> = ({ parentIssue, user, disabled = false }
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { workspaceSlug } = router.query;
|
const { workspaceSlug } = router.query;
|
||||||
|
|
||||||
|
const { setToastAlert } = useToast();
|
||||||
|
|
||||||
const { memberRole } = useProjectMyMembership();
|
const { memberRole } = useProjectMyMembership();
|
||||||
|
|
||||||
const { data: subIssuesResponse } = useSWR(
|
const { data: subIssuesResponse } = useSWR(
|
||||||
@ -56,6 +60,13 @@ export const SubIssuesList: FC<Props> = ({ parentIssue, user, disabled = false }
|
|||||||
|
|
||||||
await issuesService
|
await issuesService
|
||||||
.addSubIssues(workspaceSlug as string, parentIssue.project, parentIssue.id, payload)
|
.addSubIssues(workspaceSlug as string, parentIssue.project, parentIssue.id, payload)
|
||||||
|
.then(() =>
|
||||||
|
setToastAlert({
|
||||||
|
title: "Success",
|
||||||
|
type: "success",
|
||||||
|
message: "Issues added successfully",
|
||||||
|
})
|
||||||
|
)
|
||||||
.finally(() => mutate(SUB_ISSUES(parentIssue.id)));
|
.finally(() => mutate(SUB_ISSUES(parentIssue.id)));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user