-
Notifications
You must be signed in to change notification settings - Fork 0
회원 상세 조회 페이지 구현 ( #issue feat/#340 ) #344
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 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
e8e502d
feat : 사용자 기본 정보 데이터 모델에 새로운 속성 추가
layout-SY 2a4925d
style : "회원 전체 조회" 시 로딩 스피너 위치 변경
layout-SY bc42a7d
feat : "회원 상세 조회" 구현
layout-SY dbf4a4a
feat : "회원 전체 조회"에서 회원 강퇴 버튼 추가
layout-SY 0c2256f
feat : "회원 전체 조회" API 맞게 코드 수정
layout-SY be234b3
feat : Sidebar 가로 길이를 admin 페이지와 user 페이지에서 다르게 적용
layout-SY a719c80
feat : "회원 상세 조회" 페이지에서 "회원 전체 조회" 목록으로 이동하는 버튼 추가
layout-SY 1154cce
review : 리뷰 사항 적용
layout-SY b9caaba
feat : "참여한/생성한" 프로젝트 카드에서 관리자 페이지에 렌더링 됐을 경우 새창 이동
layout-SY 306ae0b
chore: conflict resolved
layout-SY 38fbc5a
chore : conflict resolved
layout-SY 1a018d0
feat : "로그인 여부"가 아닌 회원 id를 쿼리의 enabled 옵션 조건으로 변경
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| import type { ApiCommonBasicType } from '../../../models/apiCommon'; | ||
| import type { | ||
| ApiAdminInquiry, | ||
| ApiAdminInquiryDetail, | ||
| InquiryAnswerBody, | ||
| } from '../../../models/inquiry'; | ||
| import { httpClient } from '../../http.api'; | ||
|
|
||
| export const getAllInquiries = async () => { | ||
| try { | ||
| const response = await httpClient.get<ApiAdminInquiry>(`/inquiry`); | ||
| return response.data.data; | ||
| } catch (e) { | ||
| console.error('전체 문의 조회 에러', e); | ||
| throw e; | ||
| } | ||
| }; | ||
|
|
||
| export const getInquiryDetail = async (id: string) => { | ||
| try { | ||
| const response = await httpClient.get<ApiAdminInquiryDetail>( | ||
| `/inquiry/${id}` | ||
| ); | ||
|
|
||
| return response.data.data; | ||
| } catch (e) { | ||
| console.error(e); | ||
| throw e; | ||
| } | ||
| }; | ||
|
|
||
| export const postInquiryAnswer = async ({ id, answer }: InquiryAnswerBody) => { | ||
| try { | ||
| await httpClient.post<ApiCommonBasicType>(`/inquiry/${id}/answer`, { | ||
| answer, | ||
| }); | ||
| } catch (e) { | ||
| console.error(e); | ||
| throw e; | ||
| } | ||
| }; | ||
|
|
||
| export const patchInquiryAnswer = async ({ id, answer }: InquiryAnswerBody) => { | ||
| try { | ||
| await httpClient.patch<ApiCommonBasicType>(`/inquiry/${id}/answer`, { | ||
| answer, | ||
| }); | ||
| } catch (e) { | ||
| console.error(e); | ||
| throw e; | ||
| } | ||
| }; | ||
|
|
||
| export const deleteInquiry = async (id: string) => { | ||
| try { | ||
| await httpClient.delete<ApiCommonBasicType>(`/inquiry/${id}`); | ||
| } catch (e) { | ||
| console.error(e); | ||
| throw e; | ||
| } | ||
| }; |
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,30 @@ | ||
| import type { ApiCommonBasicType } from '../../../models/apiCommon'; | ||
| import type { WriteBody } from '../../../models/customerService'; | ||
| import { httpClient } from '../../http.api'; | ||
|
|
||
| export const postNotice = async (formData: WriteBody) => { | ||
| try { | ||
| await httpClient.post<ApiCommonBasicType>(`/notice`, formData); | ||
| } catch (e) { | ||
| console.error(e); | ||
| throw e; | ||
| } | ||
| }; | ||
|
|
||
| export const putNotice = async (id: string, formData: WriteBody) => { | ||
| try { | ||
| await httpClient.put<ApiCommonBasicType>(`/notice/${id}`, formData); | ||
| } catch (e) { | ||
| console.error(e); | ||
| throw e; | ||
| } | ||
| }; | ||
|
|
||
| export const deleteNotice = async (id: string) => { | ||
| try { | ||
| await httpClient.delete<ApiCommonBasicType>(`/notice/${id}`); | ||
| } catch (e) { | ||
| console.error(e); | ||
| throw e; | ||
| } | ||
| }; |
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,69 @@ | ||
| import type { ApiCommonBasicType } from '../../models/apiCommon'; | ||
| import type { TagFormType } from '../../models/tags'; | ||
| import { httpClient } from '../http.api'; | ||
|
|
||
| export const postSkillTag = async (formData: FormData) => { | ||
| try { | ||
| await httpClient.post<ApiCommonBasicType>(`/skill-tag`, formData); | ||
| } catch (e) { | ||
| console.error(e); | ||
| throw e; | ||
| } | ||
| }; | ||
|
|
||
| export const putSkillTag = async ({ | ||
| formData, | ||
| id, | ||
| }: { | ||
| formData: FormData; | ||
| id: number; | ||
| }) => { | ||
| try { | ||
| await httpClient.put<ApiCommonBasicType>(`/skill-tag/${id}`, formData); | ||
| } catch (e) { | ||
| console.error(e); | ||
| throw e; | ||
| } | ||
| }; | ||
|
|
||
| export const deleteSkillTag = async (id: number) => { | ||
| try { | ||
| await httpClient.delete<ApiCommonBasicType>(`/skill-tag/${id}`); | ||
| } catch (e) { | ||
| console.error(e); | ||
| throw e; | ||
| } | ||
| }; | ||
|
|
||
| export const postPositionTag = async (name: string) => { | ||
| try { | ||
| await httpClient.post<ApiCommonBasicType>(`/position-tag`, { name }); | ||
| } catch (e) { | ||
| console.error(e); | ||
| throw e; | ||
| } | ||
| }; | ||
|
|
||
| export const putPositionTag = async ({ | ||
| name, | ||
| id, | ||
| }: { | ||
| name: string; | ||
| id: number; | ||
| }) => { | ||
| try { | ||
| await httpClient.put<ApiCommonBasicType>(`/position-tag/${id}`, { name }); | ||
| } catch (e) { | ||
| console.error(e); | ||
| throw e; | ||
| } | ||
| }; | ||
|
|
||
| export const deletePositionTag = async (id: number) => { | ||
| try { | ||
| await httpClient.delete<ApiCommonBasicType>(`/position-tag/${id}`); | ||
| } catch (e) { | ||
| console.error(e); | ||
| throw e; | ||
| } | ||
| }; | ||
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,84 @@ | ||
| import styled from 'styled-components'; | ||
| import { SendButton } from '../../user/customerService/inquiry/Inquiry.styled'; | ||
|
|
||
| export const CRUDContainer = styled.form` | ||
| width: 100%; | ||
| height: 100%; | ||
| `; | ||
|
|
||
| export const CRUDWrapper = styled.div` | ||
| width: 70%; | ||
| height: 100%; | ||
| display: flex; | ||
| gap: 1rem; | ||
| font-size: 1.2rem; | ||
| justify-content: space-between; | ||
| `; | ||
|
|
||
| export const InfoContainer = styled.div` | ||
| display: flex; | ||
| height: 100%; | ||
| flex-direction: column; | ||
| gap: 1.5rem; | ||
| justify-content: center; | ||
| /* align-items: center; */ | ||
| `; | ||
|
|
||
| export const CRUDButtonWrapper = styled.div` | ||
| display: grid; | ||
| gap: 1rem; | ||
| `; | ||
|
|
||
| export const CRUDButton = styled(SendButton)` | ||
| height: 2.3rem; | ||
| `; | ||
|
|
||
| export const CRUDTitleWrapper = styled.div` | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 1rem; | ||
| `; | ||
|
|
||
| export const CRUDTitleHead = styled.span``; | ||
|
|
||
| export const CRUDTitle = styled.input` | ||
| border-bottom: 1px solid ${({ theme }) => theme.color.placeholder}; | ||
| padding-left: 0.3rem; | ||
| font-size: 1rem; | ||
| `; | ||
|
|
||
| export const CRUDDefaultButton = styled.button` | ||
| svg { | ||
| width: 1rem; | ||
| height: 1rem; | ||
| } | ||
| `; | ||
|
|
||
| export const CRUDImgWrapper = styled.div` | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 1rem; | ||
| `; | ||
|
|
||
| export const CRUDImgHead = styled.span``; | ||
|
|
||
| export const CRUDImg = styled.img` | ||
| width: 3rem; | ||
| border: 1px solid ${({ theme }) => theme.color.grey}; | ||
| `; | ||
|
|
||
| export const CRUDImgExplore = styled(SendButton)` | ||
| cursor: pointer; | ||
| border-radius: ${({ theme }) => theme.borderRadius.primary}; | ||
| padding: 0.4rem 1rem; | ||
| `; | ||
|
|
||
| export const CRUDImgExplain = styled.span` | ||
| max-width: 10rem; | ||
| `; | ||
|
|
||
| export const CRUDImgInput = styled.input` | ||
| visibility: hidden; | ||
| width: 0; | ||
| height: 0; | ||
| `; |
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
포지션 태그 API에 입력 검증을 추가하세요.
빈 문자열이나 유효하지 않은 이름에 대한 검증이 필요합니다.
export const postPositionTag = async (name: string) => { + if (!name || name.trim().length === 0) { + throw new Error('Tag name cannot be empty'); + } try { - await httpClient.post<ApiCommonBasicType>(`/position-tag`, { name }); + await httpClient.post<ApiCommonBasicType>(`/position-tag`, { name: name.trim() }); } catch (e) { console.error(e); throw e; } };📝 Committable suggestion
🤖 Prompt for AI Agents