diff --git a/apps/app/components/issues/form.tsx b/apps/app/components/issues/form.tsx index 2b4c4778c..6b9841a73 100644 --- a/apps/app/components/issues/form.tsx +++ b/apps/app/components/issues/form.tsx @@ -117,6 +117,8 @@ export const IssueForm: FC = ({ ...defaultValues, ...initialData, project: projectId, + assignees_list: initialData?.assignees ?? [], + labels_list: initialData?.labels ?? [], }); }, [initialData, reset, projectId]); @@ -276,13 +278,6 @@ export const IssueForm: FC = ({ )} /> - ( - - )} - /> = ({ )} /> + ( + + )} + /> = ({ workspaceSlug ? () => projectService.getProjects(workspaceSlug as string) : null ); - const { setError } = useForm({ - mode: "all", - reValidateMode: "onChange", - }); - useEffect(() => { if (projects && projects.length > 0) setActiveProject(projects?.find((p) => p.id === projectId)?.id ?? projects?.[0].id ?? null); diff --git a/apps/app/components/issues/select/assignee.tsx b/apps/app/components/issues/select/assignee.tsx index 1c2df619f..414ec2e9a 100644 --- a/apps/app/components/issues/select/assignee.tsx +++ b/apps/app/components/issues/select/assignee.tsx @@ -9,9 +9,7 @@ import { Transition, Combobox } from "@headlessui/react"; // services import projectServices from "services/project.service"; // ui -import { Avatar } from "components/ui"; -// icons -import { UserIcon } from "@heroicons/react/24/outline"; +import { AssigneesList, Avatar } from "components/ui"; // fetch keys import { PROJECT_MEMBERS } from "constants/fetch-keys"; @@ -63,22 +61,10 @@ export const IssueAssigneeSelect: FC = ({ > {({ open }: any) => ( <> - Assignees - - - - {Array.isArray(value) - ? value - .map((v) => options?.find((option) => option.value === v)?.display) - .join(", ") || "Assignees" - : options?.find((option) => option.value === value)?.display || "Assignees"} - + +
+ {value && Array.isArray(value) ? : null} +
= ({ control, submitChanges, isNotAllowed ? "cursor-not-allowed" : "cursor-pointer" } items-center gap-1 text-xs`} > - -
- {value && Array.isArray(value) ? ( - - ) : null} -
-
+
+ {value && Array.isArray(value) ? ( + + ) : null} +