[#44] Feat/44/워크스페이스관리페이지 - #47
Merged
Hidden character warning
The head ref may contain hidden characters: "Feat/44/\uc6cc\ud06c\uc2a4\ud398\uc774\uc2a4\uad00\ub9ac\ud398\uc774\uc9c0"
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
❓이슈
📝 Description
/workspace/{workspaceId}/settings페이지를 반응형으로 구현합니다.워크스페이스 어드민이 이름·색상 변경, 멤버 강퇴, 초대 취소/추가, 워크스페이스 삭제를 한 페이지에서 수행할 수 있습니다.
추가로 프로필 이미지가 없는 유저에 대해 기존 아이콘 대신 이니셜 아바타를 표시하도록
Avatar,HeaderUserProfile컴포넌트를 수정했습니다.📝 구현 상세
API 레이어 (
apis/workspace/)기존 파일에 아래 엔드포인트들을 추가했습니다.
GET/api/v1/workspaces/{workspaceId}/members?status={status}PATCH/api/v1/workspaces/{workspaceId}/settingsDELETE/api/v1/workspaces/{workspaceId}/members/{userId}DELETE/api/v1/workspaces/{workspaceId}멤버 강퇴와 초대 취소는 동일한
DELETE /members/{userId}엔드포인트를 공유하므로useDeleteWorkspaceMember훅 하나로 두 케이스를 처리합니다.status=ACCEPTED이면 강퇴,status=PENDING이면 초대 취소로 동작합니다.에러 상태코드별로
403 / 404 / 기타케이스를 분기해 의미 있는 에러 메시지를 throw합니다.페이지 (
settings/page.tsx)페이지는 4개의
<section>으로 구성됩니다.Section 1 — 워크스페이스 설정 수정
useGetWorkspace로 현재 이름·색상을 가져와 초기값으로 사용합니다.name,colorstate가 원본과 달라졌을 때만isSettingsChanged가true가 되어 변경 버튼이 활성화됩니다.invalidateQueries로 워크스페이스 상세 및 목록 캐시를 갱신해 화면에 즉시 반영됩니다.Section 2 — 멤버 조회 및 강퇴
useGetWorkspaceMembers(workspaceId, 'ACCEPTED')로 멤버 목록을 조회합니다.kickedIds배열에 추가하고 렌더 시 filter로 제거해 별도 refetch 없이 즉시 반영합니다.role === 'ADMIN'인 멤버는 삭제 버튼을 렌더링하지 않습니다.Avatar컴포넌트를 사용합니다.Section 3 — 초대 내역 및 초대
useGetWorkspaceMembers(workspaceId, 'PENDING')으로 대기 초대 목록을 조회합니다.cancelledIds로 즉시 제거합니다.InviteModal을 재사용합니다.Section 4 — 워크스페이스 삭제
ConfirmModal확인 후DELETE /workspaces/{workspaceId}요청을 보냅니다./workspace로 이동합니다.이니셜 아바타 (
Avatar.tsx,HeaderUserProfile.tsx)프로필 이미지가 없을 때 기존
profile아이콘 대신bg-blue-100배경에text-blue-200색상으로 유저 이름 첫 글자를 표시하는 원형 div로 변경했습니다.토스트 & 에러 처리
모든 API 요청의
onSuccess/onError콜백에서toast.success/toast.error를 호출합니다. 에러 메시지는 서비스 레이어에서 throw한 메시지를 우선 사용하고, 없으면 기본 메시지로 폴백합니다.🌀 PR Type
어떤 변경 사항이 있나요?
✅ Checklist
PR Checklist
PR이 다음 요구 사항을 충족하는지 확인하세요.
Test Checklist