feat: 사용자 추가 기능 작업

This commit is contained in:
2025-04-23 04:41:39 +09:00
parent d1677af87b
commit aa8edc71c7
2 changed files with 10 additions and 2 deletions
@@ -100,7 +100,9 @@ function AdditionalUserDialog({
취소
</Button>
</DialogClose>
<Button onClick={handleAddUsers}>추가</Button>
<DialogClose asChild>
<Button onClick={handleAddUsers}>추가</Button>
</DialogClose>
</DialogFooter>
</DialogContent>
</Dialog>
@@ -98,7 +98,13 @@ function UserOrganizationSection({ ognzSn }: UserOrganizationSectionProps) {
jbgdSeCd: "",
sortSeq: 0,
}));
setUserList([...newUserList, ...userList]);
const filteredUserList = userList.filter(
(existingUser) =>
!newUserList.some(
(newUser) => newUser.userUnqId === existingUser.userUnqId,
),
);
setUserList([...newUserList, ...filteredUserList]);
};
const handleToggleSelectUser = useCallback((user: User) => {