Skip to content

[Fix] 사용자 부서 변경 기본값이 현재 부서와 다름 - #259

Merged
kangcheolung merged 1 commit into
developfrom
fix/254
Aug 20, 2026
Merged

[Fix] 사용자 부서 변경 기본값이 현재 부서와 다름#259
kangcheolung merged 1 commit into
developfrom
fix/254

Conversation

@kangcheolung

Copy link
Copy Markdown
Member

📌 Description

사용자·역할 화면에서 "역할 관리" 버튼으로 사용자를 선택해도 선택된 사용자의 현재 부서가 상태로 저장되지 않았다. 부서 변경 select에 value/defaultValue가 없어 항상 부서 목록의 첫 번째 옵션(개발팀)이 기본 선택됐고, 관리자가 값을 확인하지 않고 제출하면 의도치 않게 부서가 바뀌는 문제였다.

currentDepartmentId(선택 시점 baseline) / selectedDepartmentId(드롭다운 현재 값) 상태를 추가하고, 사용자 선택을 selectUser() 헬퍼로 통일해 현재 부서를 함께 저장한다. select는 이 값을 그대로 반영하고, 현재 부서와 같거나 미선택이면 제출 버튼을 비활성화한다. 직접 사용자 ID를 타이핑해 입력한 경우엔 현재 부서를 알 수 없으므로 플레이스홀더로 비워 강제 선택하게 한다.

closes #254

✅ To-do

  • selectedDepartmentId 상태 추가
  • 사용자 선택 시 해당 사용자의 현재 departmentId를 함께 저장
  • 부서 select가 선택된 사용자의 현재 부서를 반영하도록 수정
  • 현재 부서와 같으면 제출 버튼 비활성화

📒 기타

백엔드 PATCH /admin/users/{id}/department는 변경 없음. eslint, tsc --noEmit, npm run build 통과

selectedUserId만 저장하고 현재 부서는 별도로 기억하지 않아, 부서
select가 항상 목록 첫 옵션(개발팀)으로 기본 선택되던 문제를 고친다.
사용자 선택 시 현재 departmentId를 함께 저장해 select에 반영하고,
변경 전후 부서가 같거나 미선택이면 제출을 막는다.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@kangcheolung
kangcheolung requested a review from Gimini-3 August 20, 2026 17:56
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@kangcheolung, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1aec05cc-8d5c-4ba8-b56a-7049f9979b80

📥 Commits

Reviewing files that changed from the base of the PR and between 894a228 and 6f98760.

📒 Files selected for processing (1)
  • frontend/app/features/AdminPages.tsx

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kangcheolung
kangcheolung merged commit 451fa05 into develop Aug 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fix] 사용자 부서 변경 기본값이 현재 부서와 다름

1 participant