-
Notifications
You must be signed in to change notification settings - Fork 0
관리자 "회원 전체 조회" 페이지 구현 ( issue #330 ) #330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
17c0a5a
feat : "미리보기"와 "전체 조회" API 구분
layout-SY efb41d8
feat : "회원 전체 조회 미리보기"에서 useQuery의 select 옵션을 통해 데이터의 상위 5개만 출력
layout-SY 8d80351
feat : mock 통신 함수 "미리보기"와 "회원 전체 조회" 구분
layout-SY bad5752
refactor : 타입 네이밍 수정
layout-SY 27d61e7
feat : "회원 전체 조회" mock 데이터 추가
layout-SY c0ba886
feat : "회원 전체 조회" 모델 추가
layout-SY e82178e
feat : "회원 전체 조회"의 회원 카드 리스트 구현
layout-SY bc1addd
style : "회원 전체 조회" 카드 스타일 수정
layout-SY 616fd08
feat : 검색 및 페이지네이션에 맞게 모델 수정
layout-SY 9b8156f
feat : SearchBar를 통해 검색 구현
layout-SY 2c552db
feat : "회원 전체 조회" 페이지 구현
layout-SY 4af6e42
feat : 변경된 API에 맞게 mock 데이터 수정
layout-SY 890fe34
Merge branch 'develop' of https://github.com/devpalsPlus/frontend int…
layout-SY f03682a
Merge branch 'develop' of https://github.com/devpalsPlus/frontend int…
layout-SY e2781b4
feat : 리뷰 사항 적용
layout-SY 8a6b4dc
feat : 색에 theme 적용
layout-SY 76912bd
refactor : searchBar의 상태 및 코드 hook화
layout-SY 671e812
feat : searchBar에 "작성하기" 버튼 분기 생성
layout-SY 37c542f
feat : UserCard 테두리 색 변경
layout-SY 2818825
feat : searchBar에서 검색 후 뒤로 가기 했을 때 전체 리스트 나오게 설정
layout-SY 7d6e27d
feat : searchBar에 검색한 내용을 유지하기 위한 value 롤백
layout-SY File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| import styled from 'styled-components'; | ||
| import { UserState } from '../../../models/auth'; | ||
|
|
||
| export const Container = styled.div` | ||
| width: 240px; | ||
| display: flex; | ||
| flex-direction: column; | ||
| border: 1px solid ${({ theme }) => theme.color.grey}; | ||
| border-radius: ${({ theme }) => theme.borderRadius.primary}; | ||
| padding: 10px; | ||
| `; | ||
|
|
||
| export const ProfileHeader = styled.div` | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| `; | ||
|
|
||
| export const NickName = styled.p` | ||
| margin-top: 5px; | ||
| `; | ||
|
|
||
| export const MainContentArea = styled.div` | ||
| padding: 15px; | ||
| `; | ||
|
|
||
| export const TextLabel = styled.label` | ||
| display: inline-block; | ||
| font-size: 14px; | ||
| opacity: 0.3; | ||
| word-break: break-word; | ||
| white-space: pre-wrap; | ||
| `; | ||
|
|
||
| export const TextContent = styled.p<{ | ||
| $userState?: UserState; | ||
| }>` | ||
| font-size: 14px; | ||
| color: ${({ theme, $userState }) => | ||
| $userState === UserState.ONLINE | ||
| ? theme.color.green | ||
| : $userState === UserState.OFFLINE | ||
| ? theme.color.blue | ||
| : $userState === UserState.SUSPENDED | ||
| ? theme.color.red | ||
| : theme.color.white}; | ||
| margin-left: 15px; | ||
| `; | ||
|
|
||
| export const SkillTagArea = styled.div` | ||
| display: flex; | ||
| gap: 4px; | ||
| margin-left: 15px; | ||
| `; | ||
|
|
||
| export const SkillTag = styled.img` | ||
| width: 29px; | ||
| height: 29px; | ||
| border: 1px solid ${({ theme }) => theme.color.grey}; | ||
| border-radius: 50%; | ||
| `; |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| import React from 'react'; | ||
| import * as S from './UserCard.styled'; | ||
| import Avatar from '../../common/avatar/Avatar'; | ||
| import { type AllUser } from '../../../models/auth'; | ||
|
|
||
| interface UserCardProps { | ||
| userData: AllUser; | ||
| } | ||
|
|
||
| const UserCard = ({ userData }: UserCardProps) => { | ||
| return ( | ||
| <S.Container> | ||
| <S.ProfileHeader> | ||
| <Avatar image={userData.user.img} size='46px' /> | ||
| <S.NickName>{userData.user.nickname}</S.NickName> | ||
| </S.ProfileHeader> | ||
| <S.MainContentArea> | ||
| <S.TextLabel>이메일</S.TextLabel> | ||
| <S.TextContent>{userData.email}</S.TextContent> | ||
| <S.TextLabel>회원 상태</S.TextLabel> | ||
| <S.TextContent $userState={userData.userState}> | ||
| {userData.userState} | ||
| </S.TextContent> | ||
| <S.TextLabel>경고 횟수</S.TextLabel> | ||
| <S.TextContent> | ||
| {userData.reportedCount === 0 | ||
| ? '없음' | ||
| : `${userData.reportedCount}번`} | ||
| </S.TextContent> | ||
| <S.TextLabel>포지션</S.TextLabel> | ||
| <S.TextContent> | ||
| {userData.position.map((position) => position.name).join(', ')} | ||
| </S.TextContent> | ||
| <S.TextLabel>대표 스킬</S.TextLabel> | ||
| <S.SkillTagArea> | ||
| {userData.skill.map((skillTag) => ( | ||
| <S.SkillTag key={skillTag.id} src={skillTag.img} /> | ||
| ))} | ||
| </S.SkillTagArea> | ||
| <S.TextLabel>계정 생성 날짜</S.TextLabel> | ||
| <S.TextContent>{userData.createdAt}</S.TextContent> | ||
| </S.MainContentArea> | ||
| </S.Container> | ||
| ); | ||
| }; | ||
|
|
||
| export default UserCard; |
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
적절한 도메인의 상수를 사용해주세요.
검색바 컴포넌트에서 고객 서비스 관련 상수(
MODAL_MESSAGE_CUSTOMER_SERVICE)를 사용하고 있습니다. 또한 placeholder와 에러 메시지가 동일한 것은 UX 관점에서 혼란스러울 수 있습니다.관리자 검색바 전용 상수를 만들어주세요:
그리고 적용:
Also applies to: 56-56
🤖 Prompt for AI Agents