fix: issue relation mutation and draft issue (#2340)
* fix: issue relation mutation and draft issue * fix: 'New Issue' in gantt view fix: emoji select going under * fix: profile page typo
This commit is contained in:
parent
d9bd07886f
commit
cecdf890de
13 changed files with 268 additions and 184 deletions
|
|
@ -14,7 +14,7 @@ import { ExistingIssuesListModal } from "components/core";
|
|||
import { XMarkIcon } from "@heroicons/react/24/outline";
|
||||
import { BlockedIcon } from "components/icons";
|
||||
// types
|
||||
import { BlockeIssueDetail, IIssue, ISearchIssueResponse, UserAuth } from "types";
|
||||
import { BlockeIssueDetail, IIssue, ISearchIssueResponse } from "types";
|
||||
|
||||
type Props = {
|
||||
issueId?: string;
|
||||
|
|
@ -41,6 +41,9 @@ export const SidebarBlockedSelect: React.FC<Props> = ({
|
|||
setIsBlockedModalOpen(false);
|
||||
};
|
||||
|
||||
const blockedByIssue =
|
||||
watch("related_issues")?.filter((i) => i.relation_type === "blocked_by") || [];
|
||||
|
||||
const onSubmit = async (data: ISearchIssueResponse[]) => {
|
||||
if (data.length === 0) {
|
||||
setToastAlert({
|
||||
|
|
@ -80,18 +83,13 @@ export const SidebarBlockedSelect: React.FC<Props> = ({
|
|||
})
|
||||
.then((response) => {
|
||||
submitChanges({
|
||||
related_issues: [
|
||||
...watch("related_issues")?.filter((i) => i.relation_type !== "blocked_by"),
|
||||
...response,
|
||||
],
|
||||
related_issues: [...watch("related_issues"), ...response],
|
||||
});
|
||||
});
|
||||
|
||||
handleClose();
|
||||
};
|
||||
|
||||
const blockedByIssue = watch("related_issues")?.filter((i) => i.relation_type === "blocked_by");
|
||||
|
||||
return (
|
||||
<>
|
||||
<ExistingIssuesListModal
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import issuesService from "services/issues.service";
|
|||
import { XMarkIcon } from "@heroicons/react/24/outline";
|
||||
import { BlockerIcon } from "components/icons";
|
||||
// types
|
||||
import { BlockeIssueDetail, IIssue, ISearchIssueResponse, UserAuth } from "types";
|
||||
import { BlockeIssueDetail, IIssue, ISearchIssueResponse } from "types";
|
||||
|
||||
type Props = {
|
||||
issueId?: string;
|
||||
|
|
|
|||
|
|
@ -75,10 +75,8 @@ export const SidebarDuplicateSelect: React.FC<Props> = (props) => {
|
|||
})),
|
||||
],
|
||||
})
|
||||
.then((response) => {
|
||||
submitChanges({
|
||||
related_issues: [...watch("related_issues"), ...(response ?? [])],
|
||||
});
|
||||
.then(() => {
|
||||
submitChanges();
|
||||
});
|
||||
|
||||
handleClose();
|
||||
|
|
|
|||
|
|
@ -75,10 +75,8 @@ export const SidebarRelatesSelect: React.FC<Props> = (props) => {
|
|||
})),
|
||||
],
|
||||
})
|
||||
.then((response) => {
|
||||
submitChanges({
|
||||
related_issues: [...watch("related_issues"), ...(response ?? [])],
|
||||
});
|
||||
.then(() => {
|
||||
submitChanges();
|
||||
});
|
||||
|
||||
handleClose();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue