diff --git a/apps/cs/src/pages/organization/ui/user-organization-section.tsx b/apps/cs/src/pages/organization/ui/user-organization-section.tsx
index bbf763c73..635863780 100644
--- a/apps/cs/src/pages/organization/ui/user-organization-section.tsx
+++ b/apps/cs/src/pages/organization/ui/user-organization-section.tsx
@@ -12,6 +12,7 @@ import {
import {
Button,
Checkbox,
+ Input,
Table,
TableBody,
TableCell,
@@ -137,7 +138,7 @@ function UserOrganizationSection({ ognzSn }: UserOrganizationSectionProps) {
const filteredUserList = userList.filter(
(user) => !existingUserIds.has(user.userUnqId),
);
- setUserList([...newUserList, ...filteredUserList]);
+ setUserList([...filteredUserList, ...newUserList]);
};
const handleToggleSelectUser = useCallback((user: User) => {
@@ -250,6 +251,7 @@ function UserOrganizationSection({ ognzSn }: UserOrganizationSectionProps) {
이름
직위
직급
+ 정렬순서
최종수정자
최종수정일
@@ -294,44 +296,59 @@ const UserCells = memo(
index,
jobPositionCodeData,
jobGradeCodeData,
- }: UserCellsProps) => (
- <>
- {index + 1}
- {user.userUnqNm}
-
- {
- const mode = form.watch(`userOrganization.${index}.mode`);
- if (mode === "R") {
- form.setValue(`userOrganization.${index}.mode`, "U");
+ }: UserCellsProps) => {
+ const updateMode = (index: number) => {
+ const mode = form.watch(`userOrganization.${index}.mode`);
+ if (mode === "R") {
+ form.setValue(`userOrganization.${index}.mode`, "U");
+ }
+ };
+
+ const updateFormValue =
+ (index: number, key: keyof UserOrganizationPayload) =>
+ (value: string | number) => {
+ updateMode(index);
+ form.setValue(`userOrganization.${index}.${key}`, value);
+ };
+
+ return (
+ <>
+ {index + 1}
+ {user.userUnqNm}
+
+
+
+
+
+
+
+
+ updateFormValue(index, "sortSeq")(Number(e.target.value))
}
- form.setValue(`userOrganization.${index}.jbpsSeCd`, value);
- }}
- {...form.register(`userOrganization.${index}.jbpsSeCd`)}
- />
-
-
- {
- const mode = form.watch(`userOrganization.${index}.mode`);
- if (mode === "R") {
- form.setValue(`userOrganization.${index}.mode`, "U");
- }
- form.setValue(`userOrganization.${index}.jbgdSeCd`, value);
- }}
- {...form.register(`userOrganization.${index}.jbgdSeCd`)}
- />
-
- {user.mdfrNm}
-
- {dayjs(user.mdfcnDt).format("YYYY-MM-DD")}
-
- >
- ),
+ className="w-[6rem] !text-[1.3rem]"
+ />
+
+ {user.mdfrNm}
+
+ {dayjs(user.mdfcnDt).format("YYYY-MM-DD")}
+
+ >
+ );
+ },
);
UserCells.displayName = "UserCells";