From c0263acb8a2b33c4d8a716fb925451938bb52b3b Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Tue, 21 Feb 2023 19:12:38 +0530 Subject: [PATCH] refactor: create issue modal input fields (#310) --- apps/app/components/core/board-view/single-issue.tsx | 2 +- apps/app/components/core/list-view/single-issue.tsx | 2 +- apps/app/components/issues/form.tsx | 6 ++---- apps/app/components/issues/modal.tsx | 2 ++ apps/app/types/issues.d.ts | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/app/components/core/board-view/single-issue.tsx b/apps/app/components/core/board-view/single-issue.tsx index b8be079c5..ea1a37a7a 100644 --- a/apps/app/components/core/board-view/single-issue.tsx +++ b/apps/app/components/core/board-view/single-issue.tsx @@ -201,7 +201,6 @@ export const SingleBoardIssue: React.FC = ({
{type && !isNotAllowed && ( - Copy issue link Edit {type !== "issue" && removeIssue && ( @@ -211,6 +210,7 @@ export const SingleBoardIssue: React.FC = ({ handleDeleteIssue(issue)}> Delete permanently + Copy issue link )}
diff --git a/apps/app/components/core/list-view/single-issue.tsx b/apps/app/components/core/list-view/single-issue.tsx index b2b74a94d..7f5741037 100644 --- a/apps/app/components/core/list-view/single-issue.tsx +++ b/apps/app/components/core/list-view/single-issue.tsx @@ -195,7 +195,6 @@ export const SingleListIssue: React.FC = ({ )} {type && !isNotAllowed && ( - Copy issue link Edit {type !== "issue" && removeIssue && ( @@ -205,6 +204,7 @@ export const SingleListIssue: React.FC = ({ handleDeleteIssue(issue)}> Delete permanently + Copy issue link )} diff --git a/apps/app/components/issues/form.tsx b/apps/app/components/issues/form.tsx index 416fa8b19..cdbbc8f05 100644 --- a/apps/app/components/issues/form.tsx +++ b/apps/app/components/issues/form.tsx @@ -117,8 +117,6 @@ export const IssueForm: FC = ({ ...defaultValues, ...initialData, project: projectId, - assignees_list: initialData?.assignees ?? [], - labels_list: initialData?.labels ?? [], }); }, [initialData, reset, projectId]); @@ -276,7 +274,7 @@ export const IssueForm: FC = ({ /> ( = ({ ( )} diff --git a/apps/app/components/issues/modal.tsx b/apps/app/components/issues/modal.tsx index 85147af84..c69faa0eb 100644 --- a/apps/app/components/issues/modal.tsx +++ b/apps/app/components/issues/modal.tsx @@ -192,6 +192,8 @@ export const CreateUpdateIssueModal: React.FC = ({ const payload: Partial = { ...formData, + assignees_list: formData.assignees, + labels_list: formData.labels, description: formData.description ?? "", description_html: formData.description_html ?? "

", }; diff --git a/apps/app/types/issues.d.ts b/apps/app/types/issues.d.ts index 14cc79bbc..16489abc1 100644 --- a/apps/app/types/issues.d.ts +++ b/apps/app/types/issues.d.ts @@ -55,7 +55,7 @@ export interface IIssueLink { } export interface IIssue { - assignees: string[] | null; + assignees: string[]; assignee_details: IUser[]; assignees_list: string[]; attachments: any[];