1
0
forked from baron/baron-sso

adminfront 사용자 관리 추가 수정 (대표 조직 독점 선택 및 보호)

- 한맥가족 대표 조직(isOwner) 선택 시 독점(Exclusive) 선택 로직 적용
- 주 소속(isPrimary) 테넌트의 경우 대표 조직 해제 불가하도록 Switch 비활성화 처리
- UserDetailPage 및 UserCreatePage 공통 로직 보정
This commit is contained in:
2026-05-08 15:09:58 +09:00
parent 262c988226
commit 8bf8520d62
2 changed files with 19 additions and 6 deletions

View File

@@ -290,9 +290,15 @@ function UserCreatePage() {
patch: Partial<UserAppointment>,
) => {
setAdditionalAppointments((current) =>
current.map((appointment, currentIndex) =>
currentIndex === index ? { ...appointment, ...patch } : appointment,
),
current.map((appointment, currentIndex) => {
if (currentIndex === index) {
return { ...appointment, ...patch };
}
if (patch.isOwner === true) {
return { ...appointment, isOwner: false };
}
return appointment;
}),
);
};

View File

@@ -536,9 +536,15 @@ function UserDetailPage() {
patch: Partial<UserAppointment>,
) => {
setAdditionalAppointments((current) =>
current.map((appointment, currentIndex) =>
currentIndex === index ? { ...appointment, ...patch } : appointment,
),
current.map((appointment, currentIndex) => {
if (currentIndex === index) {
return { ...appointment, ...patch };
}
if (patch.isOwner === true) {
return { ...appointment, isOwner: false };
}
return appointment;
}),
);
};
@@ -1168,6 +1174,7 @@ function UserDetailPage() {
isOwner: checked === true,
})
}
disabled={appointment.isPrimary}
aria-label={t(
"ui.admin.users.detail.form.appointment_owner",
"대표 조직",