From 6bda4f2d9f0b7bc86a05929352a066c513d12101 Mon Sep 17 00:00:00 2001 From: Lim Hyeong Jun <100831607+hyeongjun6364@users.noreply.github.com> Date: Fri, 11 Apr 2025 20:58:55 +0900 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20api=20=ED=95=84=EB=93=9C=EB=AA=85?= =?UTF-8?q?=EC=97=90=20=EB=94=B0=EB=A5=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/avatar/AvatarList.tsx | 2 +- src/components/manageProjects/Card.tsx | 2 +- src/models/manageMyProject.ts | 27 ++++++++++++++++--- .../manage/myProjectList/MyProjectList.tsx | 2 +- src/routes/AppRoutes.tsx | 2 +- 5 files changed, 27 insertions(+), 8 deletions(-) diff --git a/src/components/common/avatar/AvatarList.tsx b/src/components/common/avatar/AvatarList.tsx index 281d2419..49b46197 100644 --- a/src/components/common/avatar/AvatarList.tsx +++ b/src/components/common/avatar/AvatarList.tsx @@ -20,7 +20,7 @@ function AvatarList({ avatars, size = '33px', maxCount = 8 }: AvatarListProps) { key={avatar.skillTagId} size={size} image={`${import.meta.env.VITE_APP_IMAGE_CDN_URL}/${formatImgPath( - avatar.SkillTag.img + avatar.img )}?w=62&h=62&fit=crop&crop=entropy&q=60`} /> ))} diff --git a/src/components/manageProjects/Card.tsx b/src/components/manageProjects/Card.tsx index cf0b0fa8..701998ae 100644 --- a/src/components/manageProjects/Card.tsx +++ b/src/components/manageProjects/Card.tsx @@ -14,7 +14,7 @@ function Card({ project }: CardProps) { {project.title} {formatEndDate}까지 {project.totalMember}명 - + {project.isDone && 모집 종료} diff --git a/src/models/manageMyProject.ts b/src/models/manageMyProject.ts index 71c80dc4..fa587ccd 100644 --- a/src/models/manageMyProject.ts +++ b/src/models/manageMyProject.ts @@ -1,14 +1,33 @@ import { SkillTag } from './tags'; -//model export interface ManagedProject { id: number; title: string; + description: string; totalMember: number; - recruitmentEndDate: string; - isDone: boolean; + startDate: string; + estimatedPeriod: string; + authorId: number; + views: number; isBeginner: boolean; - ProjectSkillTag: ProjectSkillTag[]; + isDone: boolean; + recruitmentStartDate: string; + recruitmentEndDate: string; + createAt: string; + updateAt: string; + methodType: MethodType; + positions: PositionTag[]; + skills: ProjectSkillTag[]; +} + +export interface MethodType { + id: number; + name: string; +} + +export interface PositionTag { + id: number; + name: string; } export interface ProjectSkillTag { diff --git a/src/pages/manage/myProjectList/MyProjectList.tsx b/src/pages/manage/myProjectList/MyProjectList.tsx index a7eb51fd..71c3dc48 100644 --- a/src/pages/manage/myProjectList/MyProjectList.tsx +++ b/src/pages/manage/myProjectList/MyProjectList.tsx @@ -12,7 +12,7 @@ const MyProjectList = () => { 모집 프로젝트 리스트 - + ); }; diff --git a/src/routes/AppRoutes.tsx b/src/routes/AppRoutes.tsx index 3ebd4126..ea68e69a 100644 --- a/src/routes/AppRoutes.tsx +++ b/src/routes/AppRoutes.tsx @@ -221,7 +221,7 @@ const AppRoutes = () => { const newRouteList = routeList.map((item) => { return { ...item, - errorElement: , + //errorElement: , }; }); From f54cb7145eea6fd8faecb672e05d87dfb4387b8a Mon Sep 17 00:00:00 2001 From: Lim Hyeong Jun <100831607+hyeongjun6364@users.noreply.github.com> Date: Tue, 15 Apr 2025 17:07:17 +0900 Subject: [PATCH 2/5] =?UTF-8?q?feat:=20=EC=97=90=EB=9F=AC=EB=B0=94?= =?UTF-8?q?=EC=9A=B4=EB=8D=94=EB=A6=AC=20=EC=B2=98=EB=A6=AC=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/wifi.svg | 3 + src/components/common/error/ErrorBoundary.tsx | 63 +++++++++++++++++++ .../common/error/ErrorFallBack.styled.ts | 25 ++++++++ src/components/common/error/ErrorFallback.tsx | 46 ++++++++++++++ .../common/error/QueryErrorBoundary.tsx | 20 ++++++ 5 files changed, 157 insertions(+) create mode 100644 src/assets/wifi.svg create mode 100644 src/components/common/error/ErrorBoundary.tsx create mode 100644 src/components/common/error/ErrorFallBack.styled.ts create mode 100644 src/components/common/error/ErrorFallback.tsx create mode 100644 src/components/common/error/QueryErrorBoundary.tsx diff --git a/src/assets/wifi.svg b/src/assets/wifi.svg new file mode 100644 index 00000000..9de92094 --- /dev/null +++ b/src/assets/wifi.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/common/error/ErrorBoundary.tsx b/src/components/common/error/ErrorBoundary.tsx new file mode 100644 index 00000000..75e13786 --- /dev/null +++ b/src/components/common/error/ErrorBoundary.tsx @@ -0,0 +1,63 @@ +import { Component, createElement, ReactNode } from 'react'; +import { ErrorBoundaryContext } from '../../../context/ErrorBoundaryContext'; + +/* eslint-disable @typescript-eslint/no-explicit-any */ + +interface ErrorBoundaryProps { + children: ReactNode; + fallback: React.ElementType; + onReset?: () => void; +} + +interface ErrorBoundaryState { + hasError: boolean; + error: any; +} + +const initialState = { + hasError: false, + error: null, +}; + +class ErrorBoundary extends Component { + constructor(props: ErrorBoundaryProps) { + super(props); + + this.resetErrorBoundary = this.resetErrorBoundary.bind(this); + this.state = initialState; + } + + static getDerivedStateFromError(error: Error) { + return { hasError: true, error }; + } + + componentDidCatch(error: Error, errorInfo: any) { + console.error('error', error, errorInfo); + } + + resetErrorBoundary() { + const { onReset } = this.props; + onReset?.(); + this.setState(initialState); + } + + render() { + const { hasError, error } = this.state; + const { children, fallback } = this.props; + let childrenToRender: ReactNode = children; + + if (hasError) { + const FallbackComponent = fallback; + childrenToRender = ; + } + + return createElement( + ErrorBoundaryContext.Provider, + { + value: { hasError, error, resetErrorBoundary: this.resetErrorBoundary }, + }, + childrenToRender + ); + } +} +export default ErrorBoundary; diff --git a/src/components/common/error/ErrorFallBack.styled.ts b/src/components/common/error/ErrorFallBack.styled.ts new file mode 100644 index 00000000..c1ef74e4 --- /dev/null +++ b/src/components/common/error/ErrorFallBack.styled.ts @@ -0,0 +1,25 @@ +import styled from 'styled-components'; + +export const Container = styled.div` + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + height: 100vh; +`; + +export const ErrorMessage = styled.h1` + font-size: 24px; + font-weight: 700; + color: ${({ theme }) => theme.color.red}; +`; + +export const ErrorDescription = styled.p` + font-size: 16px; + color: ${({ theme }) => theme.color.deepGrey}; + margin-bottom: 32px; +`; + +export const Button = styled.button` + margin-top: 16px; +`; diff --git a/src/components/common/error/ErrorFallback.tsx b/src/components/common/error/ErrorFallback.tsx new file mode 100644 index 00000000..b3668005 --- /dev/null +++ b/src/components/common/error/ErrorFallback.tsx @@ -0,0 +1,46 @@ +import { useContext } from 'react'; +import { ErrorBoundaryContext } from '../../../context/ErrorBoundaryContext'; +import * as S from './ErrorFallBack.styled'; +import wifi from '../../../assets/wifi.svg'; +import Button from '../Button/Button'; +import { HTTP_ERROR_MESSAGES } from '../../../constants/httpMessage'; +import { AxiosError } from 'axios'; + +interface ErrorFallBackProps { + error: AxiosError; +} + +const getErrorMessage = (statusCode: number | 'unknown') => { + const errorMessage = HTTP_ERROR_MESSAGES[statusCode]; + return errorMessage ?? HTTP_ERROR_MESSAGES.unknown; +}; + +const ErrorFallback = ({ error }: ErrorFallBackProps) => { + const { title, description } = getErrorMessage( + error.response?.status ?? 'unknown' + ); + + const context = useContext(ErrorBoundaryContext); + if (!context) return null; + + const { resetErrorBoundary } = context; + + return ( + + wifi + {title} + {description} + + + + ); +}; + +export default ErrorFallback; diff --git a/src/components/common/error/QueryErrorBoundary.tsx b/src/components/common/error/QueryErrorBoundary.tsx new file mode 100644 index 00000000..38e70e22 --- /dev/null +++ b/src/components/common/error/QueryErrorBoundary.tsx @@ -0,0 +1,20 @@ +import { useQueryErrorResetBoundary } from '@tanstack/react-query'; +import type { PropsWithChildren } from 'react'; +import ErrorBoundary from './ErrorBoundary'; +import ErrorFallback from './ErrorFallback'; + +export default function QueryErrorBoundary({ children }: PropsWithChildren) { + const { reset } = useQueryErrorResetBoundary(); + + return ( + { + const { error } = props; + return ; + }} + > + {children} + + ); +} From ed6f3cf644ba18093295d09a48f1d7f4794a9656 Mon Sep 17 00:00:00 2001 From: Lim Hyeong Jun <100831607+hyeongjun6364@users.noreply.github.com> Date: Tue, 15 Apr 2025 17:07:46 +0900 Subject: [PATCH 3/5] =?UTF-8?q?feat:=20=EC=97=90=EB=9F=AC=20context=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/context/ErrorBoundaryContext.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/context/ErrorBoundaryContext.tsx diff --git a/src/context/ErrorBoundaryContext.tsx b/src/context/ErrorBoundaryContext.tsx new file mode 100644 index 00000000..a9cce381 --- /dev/null +++ b/src/context/ErrorBoundaryContext.tsx @@ -0,0 +1,11 @@ +import { createContext } from 'react'; +/* eslint-disable @typescript-eslint/no-explicit-any */ + +export type ErrorBoundaryContextType = { + hasError: boolean; + error: any; + resetErrorBoundary: (...args: any[]) => void; +}; + +export const ErrorBoundaryContext = + createContext(null); From 36446b685e5c7599190287fc036a9b342bda081f Mon Sep 17 00:00:00 2001 From: Lim Hyeong Jun <100831607+hyeongjun6364@users.noreply.github.com> Date: Tue, 15 Apr 2025 17:08:11 +0900 Subject: [PATCH 4/5] =?UTF-8?q?feat:=20http=EB=B3=84=20status=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=EB=A9=94=EC=84=B8=EC=A7=80=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/constants/httpMessage.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/constants/httpMessage.ts diff --git a/src/constants/httpMessage.ts b/src/constants/httpMessage.ts new file mode 100644 index 00000000..29f22e86 --- /dev/null +++ b/src/constants/httpMessage.ts @@ -0,0 +1,25 @@ +export const HTTP_ERROR_MESSAGES: Record< + number | 'unknown', + { title: string; description: string } +> = { + 400: { + title: '잘못된 요청입니다.', + description: '확인 후 다시 시도해 주세요.', + }, + 500: { + title: '서버에 오류가 발생했어요!', + description: '잠시 후 다시 시도해 주세요.', + }, + unknown: { + title: '오류가 발생했어요!', + description: '잠시 후 다시 시도해 주세요.', + }, +} as const; + +export const HTTP_STATUS_CODE = { + OK: 200, + NO_CONTENT: 204, + BAD_REQUEST: 400, + NOT_FOUND: 404, + INTERNAL_SERVER_ERROR: 500, +} as const; From d03f56f9e7b6be8cf25a8d8712c2e2d43fbfd5c9 Mon Sep 17 00:00:00 2001 From: Lim Hyeong Jun <100831607+hyeongjun6364@users.noreply.github.com> Date: Tue, 15 Apr 2025 17:09:08 +0900 Subject: [PATCH 5/5] =?UTF-8?q?refactor:=20API=20=ED=95=84=EB=93=9C?= =?UTF-8?q?=EB=AA=85=20=EB=B3=80=EA=B2=BD=EC=97=90=20=EB=94=B0=EB=A5=B8=20?= =?UTF-8?q?=ED=83=80=EC=9E=85,=ED=95=84=EB=93=9C=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 2 + src/api/applicant.api.ts | 23 +- src/api/myProjectList.api.ts | 8 +- src/components/common/avatar/AvatarList.tsx | 7 +- .../manageProjects/ProjectHeader.tsx | 4 +- .../manageProjects/RecruitmentDate.tsx | 4 +- .../applicantInfo/ApplicantInfo.tsx | 4 +- .../applicantList/ApplicantItem.tsx | 2 +- .../applicantList/ApplicantList.tsx | 2 +- .../passNonPassList/PassNonPassItem.tsx | 6 +- .../passNonPassList/PassNonPassList.tsx | 4 +- src/hooks/useApllicantList.ts | 4 +- src/hooks/useApplicantInfo.ts | 9 +- src/hooks/useManagedProjects.ts | 4 +- src/mock/applicant.ts | 14 +- src/mock/manageProjectList.ts | 4 +- src/mock/mockApplicantData.json | 215 +++--- src/mock/mockApplicantsData.json | 615 ++--------------- src/mock/mockPassNonPassListData.json | 225 ++---- src/mock/mockProjectDetail.json | 108 ++- src/mock/mockProjectList.json | 641 +++++++++--------- src/models/applicant.ts | 15 +- src/models/manageMyProject.ts | 7 +- .../MyProjectVolunteersPass.tsx | 9 +- .../myProjectVolunteer/MyProjectVolunteer.tsx | 5 +- src/routes/AppRoutes.tsx | 127 ++-- 26 files changed, 731 insertions(+), 1337 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 40d2e725..49a55f70 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -7,6 +7,8 @@ import { SearchFilteringProvider } from './context/SearchFilteringContext'; const queryClient = new QueryClient({ defaultOptions: { queries: { + throwOnError: true, + //retry: 0, gcTime: 20000, }, }, diff --git a/src/api/applicant.api.ts b/src/api/applicant.api.ts index b1bf3110..639284b9 100644 --- a/src/api/applicant.api.ts +++ b/src/api/applicant.api.ts @@ -1,16 +1,16 @@ -import { ApplicantInfo } from '../models/applicant'; +import { ApiApplicantInfo, ApiApplicants } from '../models/applicant'; import { httpClient } from './http.api'; export const getApplicantList = async (projectId: number) => { - const response = await httpClient.get( - `/project/${projectId}/applicant` + const response = await httpClient.get( + `/project/${projectId}/applicants` ); return response.data; }; export const getApplicantInfo = async (projectId: number, userId: number) => { - const response = await httpClient.get( - `/project/${projectId}/applicant/${userId}` + const response = await httpClient.get( + `/project/${projectId}/applicants/${userId}` ); return response.data; }; @@ -20,16 +20,21 @@ export const patchPassNonPassStatus = async ( projectId: number, userId: number ) => { - const response = await httpClient.patch( - `/project/${projectId}/applicant/${userId}/status`, - data + const requestBody = { + applicantUserId: userId, + status: data.status, + }; + const response = await httpClient.put( + `/project/${projectId}/applicant`, + requestBody ); + return response.data; }; export const getPassNonPassList = async (projectId: number) => { const response = await httpClient.get( - `/project/${projectId}/applicant/summary` + `/project/${projectId}/applicants/results` ); return response.data; }; diff --git a/src/api/myProjectList.api.ts b/src/api/myProjectList.api.ts index 415a989a..4371c0fc 100644 --- a/src/api/myProjectList.api.ts +++ b/src/api/myProjectList.api.ts @@ -1,14 +1,14 @@ -import { ManagedProject } from '../models/manageMyProject'; +import { ManagedProject, ApiManagedProjects } from '../models/manageMyProject'; import { httpClient } from './http.api'; export const getMyProjectLists = async () => { - const response = await httpClient.get(`/project/my`); + const response = await httpClient.get(`/project/my`); return response.data; }; export const patchSendResult = async (projectId: number) => { - const response = await httpClient.patch( - `/project/${projectId}/is-done` + const response = await httpClient.put( + `/project/${projectId}/close` ); return response.data; }; diff --git a/src/components/common/avatar/AvatarList.tsx b/src/components/common/avatar/AvatarList.tsx index 49b46197..5377257e 100644 --- a/src/components/common/avatar/AvatarList.tsx +++ b/src/components/common/avatar/AvatarList.tsx @@ -1,10 +1,9 @@ import * as S from './AvatarList.styled'; -import { ProjectSkillTag } from '../../../models/manageMyProject'; import Avatar from './Avatar'; -import { UserSkillTag } from '../../../models/applicant'; import { formatImgPath } from '../../../util/formatImgPath'; +import { SkillTag } from '../../../models/tags'; export interface AvatarListProps { - avatars: ProjectSkillTag[] | UserSkillTag[] | null; + avatars: SkillTag[] | null; size?: string; maxCount?: number; } @@ -17,7 +16,7 @@ function AvatarList({ avatars, size = '33px', maxCount = 8 }: AvatarListProps) { {displayAvatars.map((avatar) => ( { return ( - {applicantInfo.User.nickname} 스킬셋 - + 경력 @@ -27,7 +26,6 @@ const ApplicantInfo = ({ applicantInfo }: ApplicantInfoProps) => { {data.name} - {data.role} ))} - ); diff --git a/src/components/manageProjects/applicantList/ApplicantItem.tsx b/src/components/manageProjects/applicantList/ApplicantItem.tsx index cc26be3e..5a085eaf 100644 --- a/src/components/manageProjects/applicantList/ApplicantItem.tsx +++ b/src/components/manageProjects/applicantList/ApplicantItem.tsx @@ -33,7 +33,7 @@ function ApplicantItem({ onClick={() => onClick(applicantData.userId)} $passStatus={applicantData.status} > - {applicantData.User.nickname} + {applicantData.user.nickname} ); diff --git a/src/components/manageProjects/applicantList/ApplicantList.tsx b/src/components/manageProjects/applicantList/ApplicantList.tsx index ca8e52ba..631e693e 100644 --- a/src/components/manageProjects/applicantList/ApplicantList.tsx +++ b/src/components/manageProjects/applicantList/ApplicantList.tsx @@ -14,7 +14,7 @@ function ApplicantList({ }: ApplicantListProps) { return ( - {applicantsData.map((data) => ( + {applicantsData?.map((data) => ( void; handleUserInfo: (userId: number) => void; } @@ -20,7 +20,7 @@ function PassNonPassItem({ return ( handleUserInfo(userInfo.userId)}> - {userInfo.User.nickname} + {userInfo.user.nickname} void; } diff --git a/src/hooks/useApllicantList.ts b/src/hooks/useApllicantList.ts index 4b25cb53..0e57a166 100644 --- a/src/hooks/useApllicantList.ts +++ b/src/hooks/useApllicantList.ts @@ -1,10 +1,10 @@ import { useQuery } from '@tanstack/react-query'; import { applicantKey } from './queries/keys'; import { getApplicantList } from '../api/applicant.api'; -import { ApplicantInfo } from '../models/applicant'; +import { ApiApplicants } from '../models/applicant'; export const useApllicantList = (projectId: number) => { - const { data, isLoading } = useQuery({ + const { data, isLoading } = useQuery({ queryKey: [applicantKey.all, projectId], queryFn: () => getApplicantList(projectId), staleTime: 1 * 60 * 1000, diff --git a/src/hooks/useApplicantInfo.ts b/src/hooks/useApplicantInfo.ts index 347ad1c8..b247f46a 100644 --- a/src/hooks/useApplicantInfo.ts +++ b/src/hooks/useApplicantInfo.ts @@ -3,13 +3,14 @@ import { useEffect, useState } from 'react'; import { useQuery } from '@tanstack/react-query'; import { applicantKey } from './queries/keys'; import { useLocation } from 'react-router-dom'; +import { ApiApplicantInfo } from '../models/applicant'; export const useApplicantInfo = (projectId: number) => { const [selectedApplicant, setSelectedUser] = useState(null); const location = useLocation(); const userId = new URLSearchParams(location.search).get('userId'); - const { data } = useQuery({ + const { data } = useQuery({ queryKey: [applicantKey.info, projectId, selectedApplicant], queryFn: () => getApplicantInfo(projectId, selectedApplicant!), enabled: !!selectedApplicant, @@ -24,5 +25,9 @@ export const useApplicantInfo = (projectId: number) => { handleSelectedApplicant(Number(userId)); }, [location.search]); - return { applicantInfo: data, selectedApplicant, handleSelectedApplicant }; + return { + applicantInfo: data?.data, + selectedApplicant, + handleSelectedApplicant, + }; }; diff --git a/src/hooks/useManagedProjects.ts b/src/hooks/useManagedProjects.ts index 27be96bf..193daa84 100644 --- a/src/hooks/useManagedProjects.ts +++ b/src/hooks/useManagedProjects.ts @@ -1,10 +1,10 @@ -import { ManagedProject } from '../models/manageMyProject'; +import { ApiManagedProjects } from '../models/manageMyProject'; import { getMyProjectLists } from '../api/myProjectList.api'; import { useQuery } from '@tanstack/react-query'; import { managedProjectKey } from './queries/keys'; export const useManagedProjects = () => { - const { data, isLoading } = useQuery({ + const { data, isLoading } = useQuery({ queryKey: managedProjectKey.managedProjectList, queryFn: () => getMyProjectLists(), staleTime: 1 * 60 * 1000, diff --git a/src/mock/applicant.ts b/src/mock/applicant.ts index 4651315d..093eefe0 100644 --- a/src/mock/applicant.ts +++ b/src/mock/applicant.ts @@ -4,16 +4,16 @@ import mockApplicantData from './mockApplicantData.json'; import mockPassNonPassListData from './mockPassNonPassListData.json'; export const applicantList = http.get( - `${import.meta.env.VITE_API_BASE_URL}/project/:projectId/applicant`, + `${import.meta.env.VITE_API_BASE_URL}/project/:projectId/applicants`, () => { return HttpResponse.json(mockApplicantsData, { - status: 200, + status: 400, }); } ); export const applicantInfo = http.get( - `${import.meta.env.VITE_API_BASE_URL}/project/:projectId/applicant/:userId`, + `${import.meta.env.VITE_API_BASE_URL}/project/:projectId/applicants/:userId`, () => { return HttpResponse.json(mockApplicantData, { status: 200, @@ -22,7 +22,7 @@ export const applicantInfo = http.get( ); export const passNonPassList = http.get( - `${import.meta.env.VITE_API_BASE_URL}/project/:projectId/applicant/summary`, + `${import.meta.env.VITE_API_BASE_URL}/project/:projectId/applicants/results`, () => { return HttpResponse.json(mockPassNonPassListData, { status: 200, @@ -30,10 +30,8 @@ export const passNonPassList = http.get( } ); -export const passNonPass = http.patch( - `${ - import.meta.env.VITE_API_BASE_URL - }/project/:projectId/applicant/:userId/status`, +export const passNonPass = http.put( + `${import.meta.env.VITE_API_BASE_URL}/project/:projectId/applicant`, () => { return HttpResponse.json( { message: '합/불합 상태가 수정되었습니다.' }, diff --git a/src/mock/manageProjectList.ts b/src/mock/manageProjectList.ts index 64124788..44554fc7 100644 --- a/src/mock/manageProjectList.ts +++ b/src/mock/manageProjectList.ts @@ -10,8 +10,8 @@ export const myProjectList = http.get( } ); -export const sendResult = http.patch( - `${import.meta.env.VITE_API_BASE_URL}/project/:projectId/is-done`, +export const sendResult = http.put( + `${import.meta.env.VITE_API_BASE_URL}/project/:projectId/close`, () => { return HttpResponse.json( { message: '지원자들에게 결과를 전송했어요' }, diff --git a/src/mock/mockApplicantData.json b/src/mock/mockApplicantData.json index 094ee385..69ee27cd 100644 --- a/src/mock/mockApplicantData.json +++ b/src/mock/mockApplicantData.json @@ -1,94 +1,129 @@ { - "id": 7, - "userId": 8, - "projectId": 6, - "message": "하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말하고싶은말", - "email": "lhj6364@naver.com", - "phoneNumber": "010-1111-1111", - "career": [ - { - "name": "NAVER", - "role": "FrontEnd", - "periodEnd": "2024-01-01", - "periodStart": "2025-01-11" - }, - { - "name": "TOSS", - "role": "FrontEnd", - "periodEnd": "2024-01-01", - "periodStart": "2025-01-11" - }, - { - "name": "우아한형제들", - "role": "FrontEnd", - "periodEnd": "2024-01-01", - "periodStart": "2025-01-11" - } - ], - "status": "REJECTED", - "createdAt": "2025-01-08T17:54:43.000Z", - "updatedAt": "2025-01-10T09:29:06.000Z", - "User": { - "id": 8, - "nickname": "김개발1", - "email": "devpals@mail.com", - "bio": "새로운 소개글입니다.", - "profileImg": "프로필이미지", - "UserSkillTag": [ - { - "userId": 8, - "skillTagId": 1, - "createdAt": "2025-01-13T09:26:01.000Z", - "SkillTag": { - "id": 1, - "name": "JavaScript", - "img": "https://devpals-imgs.s3.ap-northeast-2.amazonaws.com/skill-tags/JavaScript.png", - "createdAt": "2025-01-02T15:07:03.000Z" - } - }, - { - "userId": 8, - "skillTagId": 1, - "createdAt": "2025-01-13T09:26:01.000Z", - "SkillTag": { - "id": 1, - "name": "JavaScript", - "img": "https://devpals-imgs.s3.ap-northeast-2.amazonaws.com/skill-tags/TypeScript.png", - "createdAt": "2025-01-02T15:07:03.000Z" - } - }, - { - "userId": 8, - "skillTagId": 1, - "createdAt": "2025-01-13T09:26:01.000Z", - "SkillTag": { - "id": 1, - "name": "JavaScript", - "img": "https://devpals-imgs.s3.ap-northeast-2.amazonaws.com/skill-tags/React.png", - "createdAt": "2025-01-02T15:07:03.000Z" - } - }, - { - "userId": 8, - "skillTagId": 1, - "createdAt": "2025-01-13T09:26:01.000Z", - "SkillTag": { - "id": 1, - "name": "JavaScript", - "img": "https://devpals-imgs.s3.ap-northeast-2.amazonaws.com/skill-tags/Java.png", - "createdAt": "2025-01-02T15:07:03.000Z" - } - }, - { - "userId": 8, - "skillTagId": 1, - "createdAt": "2025-01-13T09:26:01.000Z", - "SkillTag": { - "id": 1, - "name": "JavaScript", - "img": "https://devpals-imgs.s3.ap-northeast-2.amazonaws.com/skill-tags/Svelte.png", - "createdAt": "2025-01-02T15:07:03.000Z" - } + "success": true, + "message": "지원서 조회 성공", + "data": { + "email": "skaehgus119@gmail.com", + "phoneNumber": "010-0000-0000", + "message": "뽑아주세요.", + "skills": [ + { + "id": 2, + "name": "Django", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Django.png" + }, + { + "id": 5, + "name": "GraphQL", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/GraphQL.png" + }, + { + "id": 6, + "name": "JavaScript", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/JavaScript.png" + }, + { + "id": 3, + "name": "Express", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Express.png" + }, + { + "id": 7, + "name": "Next.js", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Next.js.png" + }, + { + "id": 4, + "name": "Figma", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Figma.png" + }, + { + "id": 8, + "name": "Node.js", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Node.js.png" + }, + { + "id": 13, + "name": "Sass", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Sass.png" + }, + { + "id": 12, + "name": "Flutter", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Flutter.png" + }, + { + "id": 11, + "name": "C++", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/C%2B%2B.png" + }, + { + "id": 21, + "name": "Go", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Go.png" + }, + { + "id": 26, + "name": "Nest.js", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Nest.js.png" + }, + { + "id": 16, + "name": "MongoDB", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/MongoDB.png" + }, + { + "id": 17, + "name": "Kotlin", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Kotlin.png" + }, + { + "id": 22, + "name": "Docker", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Docker.png" + }, + { + "id": 27, + "name": "Ruby", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Ruby.png" + }, + { + "id": 28, + "name": "Unity", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Unity.png" + }, + { + "id": 25, + "name": "Java", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Java.png" + }, + { + "id": 20, + "name": "Firebase", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Firebase.png" + }, + { + "id": 15, + "name": "PHP", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/PHP.png" + }, + { + "id": 10, + "name": "Swift", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Swift.png" + } + ], + "career": [ + { + "name": "Google", + "role": "Software Engineer", + "periodStart": "2020-01-01", + "periodEnd": "2022-01-01" + }, + { + "name": "Google", + "role": "Software Engineer", + "periodStart": "2020-01-01", + "periodEnd": "2022-01-01" } ] } diff --git a/src/mock/mockApplicantsData.json b/src/mock/mockApplicantsData.json index 28b47d1e..4ed7f2e4 100644 --- a/src/mock/mockApplicantsData.json +++ b/src/mock/mockApplicantsData.json @@ -1,563 +1,52 @@ -[ - { - "id": 7, - "userId": 1, - "projectId": 6, - "message": "기획자에게 하고 싶은 말", - "email": "devpals@mail.com", - "phoneNumber": "010-9999-0000", - "career": null, - "status": "", - "createdAt": "2025-01-08T17:54:43.000Z", - "updatedAt": "2025-01-09T09:01:59.000Z", - "User": { - "id": 8, - "nickname": "김개발1", - "email": "devpals@mail.com", - "bio": null, - "profileImg": "프로필 이미지 주소", - "UserSkillTag": [ - { - "userId": 8, - "skillTagId": 28, - "createdAt": "2025-01-08T11:57:17.000Z", - "SkillTag": { - "id": 28, - "name": "Figma", - "img": "스킬 태그 이미지 주소", - "createdAt": "2025-01-02T15:11:15.000Z" - } - }, - {} - ] - } - }, - { - "id": 7, - "userId": 2, - "projectId": 6, - "message": "기획자에게 하고 싶은 말", - "email": "devpals@mail.com", - "phoneNumber": "010-9999-0000", - "career": null, - "status": "REJECTED", - "createdAt": "2025-01-08T17:54:43.000Z", - "updatedAt": "2025-01-09T09:01:59.000Z", - "User": { - "id": 2, - "nickname": "김개발2", - "email": "devpals@mail.com", - "bio": null, - "profileImg": "프로필 이미지 주소", - "UserSkillTag": [ - { - "userId": 2, - "skillTagId": 28, - "createdAt": "2025-01-08T11:57:17.000Z", - "SkillTag": { - "id": 28, - "name": "Figma", - "img": "스킬 태그 이미지 주소", - "createdAt": "2025-01-02T15:11:15.000Z" - } - }, - {} - ] - } - }, - { - "id": 7, - "userId": 10, - "projectId": 6, - "message": "기획자에게 하고 싶은 말", - "email": "devpals@mail.com", - "phoneNumber": "010-9999-0000", - "career": null, - "status": "SUCCESS", - "createdAt": "2025-01-08T17:54:43.000Z", - "updatedAt": "2025-01-09T09:01:59.000Z", - "User": { - "id": 10, - "nickname": "김개발3", - "email": "devpals@mail.com", - "bio": null, - "profileImg": "프로필 이미지 주소", - "UserSkillTag": [ - { - "userId": 10, - "skillTagId": 28, - "createdAt": "2025-01-08T11:57:17.000Z", - "SkillTag": { - "id": 28, - "name": "Figma", - "img": "스킬 태그 이미지 주소", - "createdAt": "2025-01-02T15:11:15.000Z" - } - }, - {} - ] - } - }, - { - "id": 7, - "userId": 11, - "projectId": 6, - "message": "기획자에게 하고 싶은 말", - "email": "devpals@mail.com", - "phoneNumber": "010-9999-0000", - "career": null, - "status": "", - "createdAt": "2025-01-08T17:54:43.000Z", - "updatedAt": "2025-01-09T09:01:59.000Z", - "User": { - "id": 11, - "nickname": "김개발4", - "email": "devpals@mail.com", - "bio": null, - "profileImg": "프로필 이미지 주소", - "UserSkillTag": [ - { - "userId": 11, - "skillTagId": 28, - "createdAt": "2025-01-08T11:57:17.000Z", - "SkillTag": { - "id": 28, - "name": "Figma", - "img": "스킬 태그 이미지 주소", - "createdAt": "2025-01-02T15:11:15.000Z" - } - }, - {} - ] - } - }, - { - "id": 7, - "userId": 12, - "projectId": 6, - "message": "기획자에게 하고 싶은 말", - "email": "devpals@mail.com", - "phoneNumber": "010-9999-0000", - "career": null, - "status": "REJECTED", - "createdAt": "2025-01-08T17:54:43.000Z", - "updatedAt": "2025-01-09T09:01:59.000Z", - "User": { - "id": 12, - "nickname": "김개발5", - "email": "devpals@mail.com", - "bio": null, - "profileImg": "프로필 이미지 주소", - "UserSkillTag": [ - { - "userId": 12, - "skillTagId": 28, - "createdAt": "2025-01-08T11:57:17.000Z", - "SkillTag": { - "id": 28, - "name": "Figma", - "img": "스킬 태그 이미지 주소", - "createdAt": "2025-01-02T15:11:15.000Z" - } - }, - {} - ] - } - }, - { - "id": 7, - "userId": 13, - "projectId": 6, - "message": "기획자에게 하고 싶은 말", - "email": "devpals@mail.com", - "phoneNumber": "010-9999-0000", - "career": null, - "status": "SUCCESS", - "createdAt": "2025-01-08T17:54:43.000Z", - "updatedAt": "2025-01-09T09:01:59.000Z", - "User": { - "id": 13, - "nickname": "김개발6", - "email": "devpals@mail.com", - "bio": null, - "profileImg": "프로필 이미지 주소", - "UserSkillTag": [ - { - "userId": 13, - "skillTagId": 28, - "createdAt": "2025-01-08T11:57:17.000Z", - "SkillTag": { - "id": 28, - "name": "Figma", - "img": "스킬 태그 이미지 주소", - "createdAt": "2025-01-02T15:11:15.000Z" - } - }, - {} - ] - } - }, - { - "id": 7, - "userId": 14, - "projectId": 6, - "message": "기획자에게 하고 싶은 말", - "email": "devpals@mail.com", - "phoneNumber": "010-9999-0000", - "career": null, - "status": "", - "createdAt": "2025-01-08T17:54:43.000Z", - "updatedAt": "2025-01-09T09:01:59.000Z", - "User": { - "id": 14, - "nickname": "김개발7", - "email": "devpals@mail.com", - "bio": null, - "profileImg": "프로필 이미지 주소", - "UserSkillTag": [ - { - "userId": 14, - "skillTagId": 28, - "createdAt": "2025-01-08T11:57:17.000Z", - "SkillTag": { - "id": 28, - "name": "Figma", - "img": "스킬 태그 이미지 주소", - "createdAt": "2025-01-02T15:11:15.000Z" - } - }, - {} - ] - } - }, - { - "id": 7, - "userId": 15, - "projectId": 6, - "message": "기획자에게 하고 싶은 말", - "email": "devpals@mail.com", - "phoneNumber": "010-9999-0000", - "career": null, - "status": "REJECTED", - "createdAt": "2025-01-08T17:54:43.000Z", - "updatedAt": "2025-01-09T09:01:59.000Z", - "User": { - "id": 15, - "nickname": "김개발8", - "email": "devpals@mail.com", - "bio": null, - "profileImg": "프로필 이미지 주소", - "UserSkillTag": [ - { - "userId": 15, - "skillTagId": 28, - "createdAt": "2025-01-08T11:57:17.000Z", - "SkillTag": { - "id": 28, - "name": "Figma", - "img": "스킬 태그 이미지 주소", - "createdAt": "2025-01-02T15:11:15.000Z" - } - }, - {} - ] - } - }, - { - "id": 7, - "userId": 16, - "projectId": 6, - "message": "기획자에게 하고 싶은 말", - "email": "devpals@mail.com", - "phoneNumber": "010-9999-0000", - "career": null, - "status": "SUCCESS", - "createdAt": "2025-01-08T17:54:43.000Z", - "updatedAt": "2025-01-09T09:01:59.000Z", - "User": { - "id": 16, - "nickname": "김개발9", - "email": "devpals@mail.com", - "bio": null, - "profileImg": "프로필 이미지 주소", - "UserSkillTag": [ - { - "userId": 16, - "skillTagId": 28, - "createdAt": "2025-01-08T11:57:17.000Z", - "SkillTag": { - "id": 28, - "name": "Figma", - "img": "스킬 태그 이미지 주소", - "createdAt": "2025-01-02T15:11:15.000Z" - } - }, - {} - ] - } - }, - { - "id": 7, - "userId": 17, - "projectId": 6, - "message": "기획자에게 하고 싶은 말", - "email": "devpals@mail.com", - "phoneNumber": "010-9999-0000", - "career": null, - "status": "SUCCESS", - "createdAt": "2025-01-08T17:54:43.000Z", - "updatedAt": "2025-01-09T09:01:59.000Z", - "User": { - "id": 17, - "nickname": "김개발10", - "email": "devpals@mail.com", - "bio": null, - "profileImg": "프로필 이미지 주소", - "UserSkillTag": [ - { - "userId": 17, - "skillTagId": 28, - "createdAt": "2025-01-08T11:57:17.000Z", - "SkillTag": { - "id": 28, - "name": "Figma", - "img": "스킬 태그 이미지 주소", - "createdAt": "2025-01-02T15:11:15.000Z" - } - }, - {} - ] - } - }, - { - "id": 7, - "userId": 18, - "projectId": 6, - "message": "기획자에게 하고 싶은 말", - "email": "devpals@mail.com", - "phoneNumber": "010-9999-0000", - "career": null, - "status": "SUCCESS", - "createdAt": "2025-01-08T17:54:43.000Z", - "updatedAt": "2025-01-09T09:01:59.000Z", - "User": { - "id": 18, - "nickname": "김개발", - "email": "devpals@mail.com", - "bio": null, - "profileImg": "프로필 이미지 주소", - "UserSkillTag": [ - { - "userId": 18, - "skillTagId": 28, - "createdAt": "2025-01-08T11:57:17.000Z", - "SkillTag": { - "id": 28, - "name": "Figma", - "img": "스킬 태그 이미지 주소", - "createdAt": "2025-01-02T15:11:15.000Z" - } - }, - {} - ] - } - }, - { - "id": 7, - "userId": 19, - "projectId": 6, - "message": "기획자에게 하고 싶은 말", - "email": "devpals@mail.com", - "phoneNumber": "010-9999-0000", - "career": null, - "status": "SUCCESS", - "createdAt": "2025-01-08T17:54:43.000Z", - "updatedAt": "2025-01-09T09:01:59.000Z", - "User": { - "id": 19, - "nickname": "김개발", - "email": "devpals@mail.com", - "bio": null, - "profileImg": "프로필 이미지 주소", - "UserSkillTag": [ - { - "userId": 19, - "skillTagId": 28, - "createdAt": "2025-01-08T11:57:17.000Z", - "SkillTag": { - "id": 28, - "name": "Figma", - "img": "스킬 태그 이미지 주소", - "createdAt": "2025-01-02T15:11:15.000Z" - } - }, - {} - ] - } - }, - { - "id": 7, - "userId": 20, - "projectId": 6, - "message": "기획자에게 하고 싶은 말", - "email": "devpals@mail.com", - "phoneNumber": "010-9999-0000", - "career": null, - "status": "SUCCESS", - "createdAt": "2025-01-08T17:54:43.000Z", - "updatedAt": "2025-01-09T09:01:59.000Z", - "User": { - "id": 20, - "nickname": "김개발", - "email": "devpals@mail.com", - "bio": null, - "profileImg": "프로필 이미지 주소", - "UserSkillTag": [ - { - "userId": 20, - "skillTagId": 28, - "createdAt": "2025-01-08T11:57:17.000Z", - "SkillTag": { - "id": 28, - "name": "Figma", - "img": "스킬 태그 이미지 주소", - "createdAt": "2025-01-02T15:11:15.000Z" - } - }, - {} - ] - } - }, - { - "id": 7, - "userId": 21, - "projectId": 6, - "message": "기획자에게 하고 싶은 말", - "email": "devpals@mail.com", - "phoneNumber": "010-9999-0000", - "career": null, - "status": "SUCCESS", - "createdAt": "2025-01-08T17:54:43.000Z", - "updatedAt": "2025-01-09T09:01:59.000Z", - "User": { - "id": 21, - "nickname": "김개발", - "email": "devpals@mail.com", - "bio": null, - "profileImg": "프로필 이미지 주소", - "UserSkillTag": [ - { - "userId": 21, - "skillTagId": 28, - "createdAt": "2025-01-08T11:57:17.000Z", - "SkillTag": { - "id": 28, - "name": "Figma", - "img": "스킬 태그 이미지 주소", - "createdAt": "2025-01-02T15:11:15.000Z" - } - }, - {} - ] - } - }, - { - "id": 7, - "userId": 22, - "projectId": 6, - "message": "기획자에게 하고 싶은 말", - "email": "devpals@mail.com", - "phoneNumber": "010-9999-0000", - "career": null, - "status": "SUCCESS", - "createdAt": "2025-01-08T17:54:43.000Z", - "updatedAt": "2025-01-09T09:01:59.000Z", - "User": { - "id": 22, - "nickname": "김개발", - "email": "devpals@mail.com", - "bio": null, - "profileImg": "프로필 이미지 주소", - "UserSkillTag": [ - { - "userId": 22, - "skillTagId": 28, - "createdAt": "2025-01-08T11:57:17.000Z", - "SkillTag": { - "id": 28, - "name": "Figma", - "img": "스킬 태그 이미지 주소", - "createdAt": "2025-01-02T15:11:15.000Z" - } - }, - {} - ] - } - }, - { - "id": 7, - "userId": 23, - "projectId": 6, - "message": "기획자에게 하고 싶은 말", - "email": "devpals@mail.com", - "phoneNumber": "010-9999-0000", - "career": null, - "status": "SUCCESS", - "createdAt": "2025-01-08T17:54:43.000Z", - "updatedAt": "2025-01-09T09:01:59.000Z", - "User": { - "id": 23, - "nickname": "김개발20", - "email": "devpals@mail.com", - "bio": null, - "profileImg": "프로필 이미지 주소", - "UserSkillTag": [ - { - "userId": 23, - "skillTagId": 28, - "createdAt": "2025-01-08T11:57:17.000Z", - "SkillTag": { - "id": 28, - "name": "Figma", - "img": "스킬 태그 이미지 주소", - "createdAt": "2025-01-02T15:11:15.000Z" - } - }, - {} - ] - } - }, - { - "id": 7, - "userId": 24, - "projectId": 6, - "message": "기획자에게 하고 싶은 말", - "email": "devpals@mail.com", - "phoneNumber": "010-9999-0000", - "career": null, - "status": "SUCCESS", - "createdAt": "2025-01-08T17:54:43.000Z", - "updatedAt": "2025-01-09T09:01:59.000Z", - "User": { - "id": 24, - "nickname": "김개발", - "email": "devpals@mail.com", - "bio": null, - "profileImg": "프로필 이미지 주소", - "UserSkillTag": [ - { - "userId": 24, - "skillTagId": 28, - "createdAt": "2025-01-08T11:57:17.000Z", - "SkillTag": { - "id": 28, - "name": "Figma", - "img": "스킬 태그 이미지 주소", - "createdAt": "2025-01-02T15:11:15.000Z" - } - }, - {} - ] - } - } -] +{ + "success": true, + "message": "성공적으로 처리되었습니다.", + "data": [ + { + "id": 0, + "userId": 0, + "projectId": 0, + "message": "string", + "email": "string", + "phoneNumber": "string", + "career": [ + { + "name": "string", + "role": "string", + "periodStart": "2025-04-11", + "periodEnd": "2025-04-11" + } + ], + "status": "ACCEPTED", + "createAt": "2025-04-11T12:16:52.124Z", + "updatedAt": "2025-04-11T12:16:52.124Z", + "user": { + "id": 0, + "nickname": "hj" + } + }, + { + "id": 0, + "userId": 1, + "projectId": 0, + "message": "string", + "email": "string", + "phoneNumber": "string", + "career": [ + { + "name": "string", + "role": "string", + "periodStart": "2025-04-11", + "periodEnd": "2025-04-11" + } + ], + "status": "REJECTED", + "createAt": "2025-04-11T12:16:52.124Z", + "updatedAt": "2025-04-11T12:16:52.124Z", + "user": { + "id": 1, + "nickname": "lhj" + } + } + ] +} diff --git a/src/mock/mockPassNonPassListData.json b/src/mock/mockPassNonPassListData.json index 58882751..ea9c011f 100644 --- a/src/mock/mockPassNonPassListData.json +++ b/src/mock/mockPassNonPassListData.json @@ -1,182 +1,49 @@ { - "accepted": [ - { - "id": 18, - "userId": 1, - "projectId": 72, - "message": null, - "email": null, - "phoneNumber": null, - "career": null, - "status": "ACCEPTED", - "createdAt": "2025-01-23T09:08:13.000Z", - "updatedAt": "2025-01-23T09:08:13.000Z", - "User": { - "id": 1, - "nickname": "Jeny" - } - }, - { - "id": 18, - "userId": 2, - "projectId": 72, - "message": null, - "email": null, - "phoneNumber": null, - "career": null, - "status": "ACCEPTED", - "createdAt": "2025-01-23T09:08:13.000Z", - "updatedAt": "2025-01-23T09:08:13.000Z", - "User": { - "id": 2, - "nickname": "Jeny1" - } - }, - { - "id": 18, - "userId": 3, - "projectId": 72, - "message": null, - "email": null, - "phoneNumber": null, - "career": null, - "status": "ACCEPTED", - "createdAt": "2025-01-23T09:08:13.000Z", - "updatedAt": "2025-01-23T09:08:13.000Z", - "User": { - "id": 3, - "nickname": "Jeny3" - } - }, - { - "id": 18, - "userId": 4, - "projectId": 72, - "message": null, - "email": null, - "phoneNumber": null, - "career": null, - "status": "ACCEPTED", - "createdAt": "2025-01-23T09:08:13.000Z", - "updatedAt": "2025-01-23T09:08:13.000Z", - "User": { - "id": 4, - "nickname": "Jeny" - } - }, - { - "id": 18, - "userId": 5, - "projectId": 72, - "message": null, - "email": null, - "phoneNumber": null, - "career": null, - "status": "ACCEPTED", - "createdAt": "2025-01-23T09:08:13.000Z", - "updatedAt": "2025-01-23T09:08:13.000Z", - "User": { - "id": 5, - "nickname": "Jeny1" - } - }, - { - "id": 18, - "userId": 6, - "projectId": 72, - "message": null, - "email": null, - "phoneNumber": null, - "career": null, - "status": "ACCEPTED", - "createdAt": "2025-01-23T09:08:13.000Z", - "updatedAt": "2025-01-23T09:08:13.000Z", - "User": { - "id": 6, - "nickname": "Jeny" - } - }, - { - "id": 18, - "userId": 7, - "projectId": 72, - "message": null, - "email": null, - "phoneNumber": null, - "career": null, - "status": "ACCEPTED", - "createdAt": "2025-01-23T09:08:13.000Z", - "updatedAt": "2025-01-23T09:08:13.000Z", - "User": { + "success": true, + "message": "공고 합격자/불합격자 목록 가져오기 성공", + "data": { + "accepted": [ + { "id": 7, - "nickname": "Jeny1" - } - }, - { - "id": 18, - "userId": 8, - "projectId": 72, - "message": null, - "email": null, - "phoneNumber": null, - "career": null, - "status": "ACCEPTED", - "createdAt": "2025-01-23T09:08:13.000Z", - "updatedAt": "2025-01-23T09:08:13.000Z", - "User": { - "id": 8, - "nickname": "Jeny" - } - }, - { - "id": 18, - "userId": 9, - "projectId": 72, - "message": null, - "email": null, - "phoneNumber": null, - "career": null, - "status": "ACCEPTED", - "createdAt": "2025-01-23T09:08:13.000Z", - "updatedAt": "2025-01-23T09:08:13.000Z", - "User": { - "id": 9, - "nickname": "Jeny1" - } - } - ], - "rejected": [ - { - "id": 19, - "userId": 10, - "projectId": 72, - "message": null, - "email": null, - "phoneNumber": null, - "career": null, - "status": "REJECTED", - "createdAt": "2025-01-23T09:08:20.000Z", - "updatedAt": "2025-01-23T09:08:20.000Z", - "User": { - "id": 10, - "nickname": "룰루" - } - }, - { - "id": 20, - "userId": 23, - "projectId": 72, - "message": null, - "email": null, - "phoneNumber": null, - "career": null, - "status": "REJECTED", - "createdAt": "2025-01-23T09:08:25.000Z", - "updatedAt": "2025-01-23T09:08:25.000Z", - "User": { - "id": 11, - "nickname": "김개발20" - } - } - ] + "userId": 2, + "projectId": 40, + "message": "뽑아주세요.", + "email": "skaehus119@gmail.com", + "phoneNumber": "010-0000-0000", + "career": [ + { + "name": "Google", + "role": "Software Engineer", + "periodStart": "2020-01-01", + "periodEnd": "2022-01-01" + } + ], + "status": "ACCEPTED", + "createAt": "2025-04-11T15:42:20.889291", + "updatedAt": "2025-04-11T15:42:20.889291", + "user": { + "id": 2, + "nickname": "DoHyun", + "email": "skaehgus119@gmail.com", + "bio": "새로운 소개글입니다.", + "profileImg": "https://devpal.s3.ap-northeast-2.amazonaws.com/devpals_user2_profile.jpeg", + "userSkillTags": [ + { + "id": 1, + "name": "Spring", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Spring.png", + "createdAt": "2025-03-25T19:05:55.506164" + }, + { + "id": 2, + "name": "Django", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Django.png", + "createdAt": "2025-03-25T19:07:04.306443" + } + ] + } + } + ], + "rejected": [] + } } diff --git a/src/mock/mockProjectDetail.json b/src/mock/mockProjectDetail.json index 052edf9a..1fa5ed29 100644 --- a/src/mock/mockProjectDetail.json +++ b/src/mock/mockProjectDetail.json @@ -1,74 +1,48 @@ { - "id": 6, - "title": "클론코딩 사이드 프로젝트 모집 공고", - "description": "string", - "totalMember": 3, - "startDate": "2025-01-25T00:00:00.000Z", - "estimatedPeriod": "3개월", - "methodId": 1, - "authorId": 8, - "views": 1, - "isBeginner": true, - "isDone": false, - "recruitmentEndDate": "2025-02-15T00:00:00.000Z", - "recruitmentStartDate": "2025-01-06T00:00:00.000Z", - "createdAt": "2025-01-06T07:05:01.000Z", - "updatedAt": "2025-01-06T07:05:01.000Z", - "User": { - "id": 8, - "nickname": "김개발", - "email": "devpals@mail.com", - "bio": null, - "profileImg": "프로필 이미지 주소", - "createdAt": "2025-01-04T06:39:31.000Z", - "updatedAt": "2025-01-08T18:15:13.000Z" - }, - "ProjectSkillTag": [ - { - "projectId": 10, - "skillTagId": 1, - "SkillTag": { - "id": 1, - "name": "JavaScript", - "img": "스킬 태그 이미지 주소", - "createdAt": "2025-01-02T15:07:03.000Z" - } + "success": true, + "message": "프로젝트 상세 내용조회 성공", + "data": { + "id": 41, + "title": "AI 기반 추천 시스템 개발", + "description": "사용자 데이터를 분석하여 맞춤형 추천을 제공하는 AI 기반 시스템을 개발합니다.", + "totalMember": 5, + "startDate": "2025-04-01", + "estimatedPeriod": "3 months", + "isBeginner": true, + "isDone": false, + "recruitmentStartDate": "2025-03-20", + "recruitmentEndDate": "2025-04-01", + "views": 0, + "user": { + "id": 4, + "nickname": "test", + "img": null }, - { - "projectId": 10, - "skillTagId": 2, - "SkillTag": { + "methodType": { + "id": 2, + "name": "오프라인" + }, + "positions": [ + { + "id": 1, + "name": "프론트엔드" + }, + { "id": 2, - "name": "TypeScript", - "img": "스킬 태그 이미지 주소", - "createdAt": "2025-01-02T15:07:23.000Z" + "name": "백엔드" } - } - ], - "Method": { - "id": 1, - "name": "온라인", - "createdAt": "2025-01-02T12:36:01.000Z" - }, - "ProjectPositionTag": [ - { - "projectId": 10, - "positionTagId": 1, - "PositionTag": { + ], + "skills": [ + { "id": 1, - "name": "백엔드", - "createdAt": "2025-01-02T12:19:48.000Z" - } - }, - { - "projectId": 10, - "positionTagId": 2, - "PositionTag": { - "id": 2, - "name": "프론트엔드", - "createdAt": "2025-01-02T12:19:51.000Z" + "name": "Spring", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Spring.png" + }, + { + "id": 5, + "name": "GraphQL", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/GraphQL.png" } - } - ], - "Applicant": [] + ] + } } diff --git a/src/mock/mockProjectList.json b/src/mock/mockProjectList.json index c40b54c9..92e28d4e 100644 --- a/src/mock/mockProjectList.json +++ b/src/mock/mockProjectList.json @@ -1,352 +1,335 @@ { "success": true, - "message": "프로젝트 목록 조회 성공", - "data": { - "currentPage": 1, - "lastPage": 1, - "total": 6, - "projects": [ - { - "id": 49, - "title": "ㅇㄹㄴㄷㄹㄴㅇㄹㄷㄴㅇㄹㄷㄴㅇㄹㄷㄴㄹ", - "description": "ㅗㄹㅅ홓롱솔홍소ㄱㅅ롤소", - "totalMember": 3, - "startDate": "2012-02-12", - "estimatedPeriod": "6개월", - "isBeginner": true, - "isDone": false, - "recruitmentStartDate": "2025-04-01", - "recruitmentEndDate": "2025-04-10", - "views": 0, - "user": { - "id": 4, - "nickname": "test", - "img": null + "message": "내 프로젝트 조회 성공", + "data": [ + { + "id": 40, + "title": "AI 기반 추천 시스템 개발", + "description": "사용자 데이터를 분석하여 맞춤형 추천을 제공하는 AI 기반 시스템을 개발합니다.", + "totalMember": 5, + "startDate": "2025-04-01", + "estimatedPeriod": "3개월", + "authorId": 4, + "views": 0, + "isBeginner": true, + "isDone": false, + "recruitmentStartDate": "2025-03-20", + "recruitmentEndDate": "2025-04-01", + "createAt": "2025-04-09T19:50:14.124536", + "updateAt": "2025-04-09T19:50:14.124536", + "methodType": { + "id": 2, + "name": "오프라인" + }, + "positions": [ + { + "id": 1, + "name": "프론트엔드" }, - "methodType": { + { + "id": 3, + "name": "디자이너" + } + ], + "skills": [ + { "id": 2, - "name": "오프라인" + "name": "Django", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Django.png" }, - "positions": [ - { - "id": 1, - "name": "프론트엔드" - } - ], - "skills": [ - { - "id": 1, - "name": "Spring", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Spring.png" - } - ] - }, - { - "id": 40, - "title": "AI 기반 추천 시스템 개발", - "description": "사용자 데이터를 분석하여 맞춤형 추천을 제공하는 AI 기반 시스템을 개발합니다.", - "totalMember": 5, - "startDate": "2025-04-01", - "estimatedPeriod": "3개월", - "isBeginner": true, - "isDone": false, - "recruitmentStartDate": "2025-03-20", - "recruitmentEndDate": "2025-04-01", - "views": 0, - "user": { - "id": 4, - "nickname": "test", - "img": null + { + "id": 5, + "name": "GraphQL", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/GraphQL.png" }, - "methodType": { - "id": 2, - "name": "오프라인" + { + "id": 6, + "name": "JavaScript", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/JavaScript.png" }, - "positions": [ - { - "id": 1, - "name": "프론트엔드" - }, - { - "id": 3, - "name": "디자이너" - } - ], - "skills": [ - { - "id": 2, - "name": "Django", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Django.png" - }, - { - "id": 5, - "name": "GraphQL", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/GraphQL.png" - }, - { - "id": 6, - "name": "JavaScript", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/JavaScript.png" - }, - { - "id": 3, - "name": "Express", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Express.png" - }, - { - "id": 7, - "name": "Next.js", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Next.js.png" - }, - { - "id": 4, - "name": "Figma", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Figma.png" - }, - { - "id": 8, - "name": "Node.js", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Node.js.png" - }, - { - "id": 13, - "name": "Sass", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Sass.png" - }, - { - "id": 12, - "name": "Flutter", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Flutter.png" - }, - { - "id": 11, - "name": "C++", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/C%2B%2B.png" - }, - { - "id": 21, - "name": "Go", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Go.png" - }, - { - "id": 26, - "name": "Nest.js", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Nest.js.png" - }, - { - "id": 16, - "name": "MongoDB", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/MongoDB.png" - }, - { - "id": 17, - "name": "Kotlin", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Kotlin.png" - }, - { - "id": 22, - "name": "Docker", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Docker.png" - }, - { - "id": 27, - "name": "Ruby", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Ruby.png" - }, - { - "id": 28, - "name": "Unity", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Unity.png" - }, - { - "id": 25, - "name": "Java", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Java.png" - }, - { - "id": 20, - "name": "Firebase", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Firebase.png" - }, - { - "id": 15, - "name": "PHP", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/PHP.png" - }, - { - "id": 10, - "name": "Swift", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Swift.png" - } - ] - }, - { - "id": 41, - "title": "AI 기반 추천 시스템 개발", - "description": "사용자 데이터를 분석하여 맞춤형 추천을 제공하는 AI 기반 시스템을 개발합니다.", - "totalMember": 5, - "startDate": "2025-04-01", - "estimatedPeriod": "3 months", - "isBeginner": true, - "isDone": false, - "recruitmentStartDate": "2025-03-20", - "recruitmentEndDate": "2025-04-01", - "views": 0, - "user": { + { + "id": 3, + "name": "Express", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Express.png" + }, + { + "id": 7, + "name": "Next.js", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Next.js.png" + }, + { "id": 4, - "nickname": "test", - "img": null + "name": "Figma", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Figma.png" }, - "methodType": { - "id": 2, - "name": "오프라인" + { + "id": 8, + "name": "Node.js", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Node.js.png" + }, + { + "id": 13, + "name": "Sass", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Sass.png" + }, + { + "id": 12, + "name": "Flutter", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Flutter.png" + }, + { + "id": 11, + "name": "C++", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/C%2B%2B.png" + }, + { + "id": 21, + "name": "Go", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Go.png" + }, + { + "id": 26, + "name": "Nest.js", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Nest.js.png" + }, + { + "id": 16, + "name": "MongoDB", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/MongoDB.png" + }, + { + "id": 17, + "name": "Kotlin", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Kotlin.png" + }, + { + "id": 22, + "name": "Docker", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Docker.png" }, - "positions": [ - { - "id": 1, - "name": "프론트엔드" - }, - { - "id": 2, - "name": "백엔드" - } - ], - "skills": [ - { - "id": 1, - "name": "Spring", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Spring.png" - }, - { - "id": 5, - "name": "GraphQL", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/GraphQL.png" - } - ] + { + "id": 27, + "name": "Ruby", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Ruby.png" + }, + { + "id": 28, + "name": "Unity", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Unity.png" + }, + { + "id": 25, + "name": "Java", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Java.png" + }, + { + "id": 20, + "name": "Firebase", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Firebase.png" + }, + { + "id": 15, + "name": "PHP", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/PHP.png" + }, + { + "id": 10, + "name": "Swift", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Swift.png" + } + ] + }, + { + "id": 41, + "title": "AI 기반 추천 시스템 개발", + "description": "사용자 데이터를 분석하여 맞춤형 추천을 제공하는 AI 기반 시스템을 개발합니다.", + "totalMember": 5, + "startDate": "2025-04-01", + "estimatedPeriod": "3 months", + "authorId": 4, + "views": 0, + "isBeginner": true, + "isDone": false, + "recruitmentStartDate": "2025-03-20", + "recruitmentEndDate": "2025-04-01", + "createAt": "2025-04-09T20:01:14.377744", + "updateAt": "2025-04-09T20:01:14.377744", + "methodType": { + "id": 2, + "name": "오프라인" }, - { - "id": 42, - "title": "AI 기반 추천 시스템 개발", - "description": "사용자 데이터를 분석하여 맞춤형 추천을 제공하는 AI 기반 시스템을 개발합니다.", - "totalMember": 5, - "startDate": "2025-04-01", - "estimatedPeriod": "3 months", - "isBeginner": true, - "isDone": false, - "recruitmentStartDate": "2025-03-20", - "recruitmentEndDate": "2025-04-01", - "views": 0, - "user": { - "id": 4, - "nickname": "test", - "img": null + "positions": [ + { + "id": 1, + "name": "프론트엔드" }, - "methodType": { + { + "id": 2, + "name": "백엔드" + } + ], + "skills": [ + { "id": 1, - "name": "온라인" + "name": "Spring", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Spring.png" }, - "positions": [ - { - "id": 1, - "name": "프론트엔드" - }, - { - "id": 3, - "name": "디자이너" - } - ], - "skills": [ - { - "id": 1, - "name": "Spring", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Spring.png" - }, - { - "id": 3, - "name": "Express", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Express.png" - } - ] + { + "id": 5, + "name": "GraphQL", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/GraphQL.png" + } + ] + }, + { + "id": 42, + "title": "AI 기반 추천 시스템 개발", + "description": "사용자 데이터를 분석하여 맞춤형 추천을 제공하는 AI 기반 시스템을 개발합니다.", + "totalMember": 5, + "startDate": "2025-04-01", + "estimatedPeriod": "3 months", + "authorId": 4, + "views": 0, + "isBeginner": true, + "isDone": false, + "recruitmentStartDate": "2025-03-20", + "recruitmentEndDate": "2025-04-01", + "createAt": "2025-04-09T20:01:56.482866", + "updateAt": "2025-04-09T20:01:56.482866", + "methodType": { + "id": 1, + "name": "온라인" }, - { - "id": 43, - "title": "AI 기반 추천 시스템 개발", - "description": "사용자 데이터를 분석하여 맞춤형 추천을 제공하는 AI 기반 시스템을 개발합니다.", - "totalMember": 5, - "startDate": "2025-04-01", - "estimatedPeriod": "3 months", - "isBeginner": true, - "isDone": false, - "recruitmentStartDate": "2025-03-20", - "recruitmentEndDate": "2025-04-01", - "views": 0, - "user": { - "id": 4, - "nickname": "test", - "img": null + "positions": [ + { + "id": 1, + "name": "프론트엔드" }, - "methodType": { + { + "id": 3, + "name": "디자이너" + } + ], + "skills": [ + { "id": 1, - "name": "온라인" + "name": "Spring", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Spring.png" }, - "positions": [ - { - "id": 1, - "name": "프론트엔드" - }, - { - "id": 3, - "name": "디자이너" - } - ], - "skills": [ - { - "id": 1, - "name": "Spring", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Spring.png" - }, - { - "id": 3, - "name": "Express", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Express.png" - } - ] + { + "id": 3, + "name": "Express", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Express.png" + } + ] + }, + { + "id": 43, + "title": "AI 기반 추천 시스템 개발", + "description": "사용자 데이터를 분석하여 맞춤형 추천을 제공하는 AI 기반 시스템을 개발합니다.", + "totalMember": 5, + "startDate": "2025-04-01", + "estimatedPeriod": "3 months", + "authorId": 4, + "views": 0, + "isBeginner": true, + "isDone": false, + "recruitmentStartDate": "2025-03-20", + "recruitmentEndDate": "2025-04-01", + "createAt": "2025-04-09T11:58:08.471603", + "updateAt": "2025-04-09T11:58:08.471617", + "methodType": { + "id": 1, + "name": "온라인" }, - { - "id": 45, - "title": "string", - "description": "string", - "totalMember": 0, - "startDate": "2025-04-09", - "estimatedPeriod": "string", - "isBeginner": true, - "isDone": true, - "recruitmentStartDate": "2025-04-09", - "recruitmentEndDate": "2025-04-09", - "views": 0, - "user": { - "id": 4, - "nickname": "test", - "img": null + "positions": [ + { + "id": 1, + "name": "프론트엔드" }, - "methodType": { + { + "id": 3, + "name": "디자이너" + } + ], + "skills": [ + { "id": 1, - "name": "온라인" + "name": "Spring", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Spring.png" }, - "positions": [ - { - "id": 3, - "name": "디자이너" - } - ], - "skills": [ - { - "id": 2, - "name": "Django", - "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Django.png" - } - ] - } - ] - } + { + "id": 3, + "name": "Express", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Express.png" + } + ] + }, + { + "id": 45, + "title": "string", + "description": "string", + "totalMember": 0, + "startDate": "2025-04-09", + "estimatedPeriod": "string", + "authorId": 4, + "views": 0, + "isBeginner": true, + "isDone": true, + "recruitmentStartDate": "2025-04-09", + "recruitmentEndDate": "2025-04-09", + "createAt": "2025-04-09T12:02:39.330476", + "updateAt": "2025-04-09T12:02:39.330487", + "methodType": { + "id": 1, + "name": "온라인" + }, + "positions": [ + { + "id": 3, + "name": "디자이너" + } + ], + "skills": [ + { + "id": 2, + "name": "Django", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Django.png" + } + ] + }, + { + "id": 49, + "title": "ㅇㄹㄴㄷㄹㄴㅇㄹㄷㄴㅇㄹㄷㄴㅇㄹㄷㄴㄹ", + "description": "ㅗㄹㅅ홓롱솔홍소ㄱㅅ롤소", + "totalMember": 3, + "startDate": "2012-02-12", + "estimatedPeriod": "6개월", + "authorId": 4, + "views": 0, + "isBeginner": true, + "isDone": true, + "recruitmentStartDate": "2025-04-01", + "recruitmentEndDate": "2025-04-10", + "createAt": "2025-04-09T12:10:32.077696", + "updateAt": "2025-04-09T12:10:32.077708", + "methodType": { + "id": 2, + "name": "오프라인" + }, + "positions": [ + { + "id": 1, + "name": "프론트엔드" + } + ], + "skills": [ + { + "id": 1, + "name": "Spring", + "img": "https://devpal.s3.ap-northeast-2.amazonaws.com/Spring.png" + } + ] + } + ] } diff --git a/src/models/applicant.ts b/src/models/applicant.ts index e0ba3fe9..633c44c3 100644 --- a/src/models/applicant.ts +++ b/src/models/applicant.ts @@ -1,3 +1,4 @@ +import { ApiCommonType } from './apiCommon'; import { SkillTag } from './tags'; export interface ApplicantInfo { @@ -7,7 +8,11 @@ export interface ApplicantInfo { career: Career[]; email: string; status: string; - User: UserInfo; + skills: SkillTag[]; + user: { + id: string; + nickname: string; + }; } export interface UserInfo { @@ -28,3 +33,11 @@ export interface Career { periodEnd: string; periodStart: string; } + +export interface ApiApplicants extends ApiCommonType { + data: ApplicantInfo[]; +} + +export interface ApiApplicantInfo extends ApiCommonType { + data: ApplicantInfo; +} diff --git a/src/models/manageMyProject.ts b/src/models/manageMyProject.ts index fa587ccd..8a8a1cd9 100644 --- a/src/models/manageMyProject.ts +++ b/src/models/manageMyProject.ts @@ -1,3 +1,4 @@ +import { ApiCommonType } from './apiCommon'; import { SkillTag } from './tags'; export interface ManagedProject { @@ -17,7 +18,7 @@ export interface ManagedProject { updateAt: string; methodType: MethodType; positions: PositionTag[]; - skills: ProjectSkillTag[]; + skills: SkillTag[]; } export interface MethodType { @@ -35,3 +36,7 @@ export interface ProjectSkillTag { skillTagId: number; SkillTag: SkillTag; } + +export interface ApiManagedProjects extends ApiCommonType { + data: ManagedProject[]; +} diff --git a/src/pages/manage/myProjectParticipantsPass/MyProjectVolunteersPass.tsx b/src/pages/manage/myProjectParticipantsPass/MyProjectVolunteersPass.tsx index 15d83b7e..ee6aa736 100644 --- a/src/pages/manage/myProjectParticipantsPass/MyProjectVolunteersPass.tsx +++ b/src/pages/manage/myProjectParticipantsPass/MyProjectVolunteersPass.tsx @@ -45,8 +45,9 @@ const MyProjectVolunteersPass = () => { onSubmit={handleSendResult} disabled={projectData?.isDone} /> - {passNonPassListData?.accepted.length > 0 || - passNonPassListData?.rejected.length > 0 ? ( + {passNonPassListData.data && + (passNonPassListData.data.accepted.length > 0 || + passNonPassListData.data.rejected.length > 0) ? ( 합격자 리스트 @@ -54,7 +55,7 @@ const MyProjectVolunteersPass = () => { )} @@ -64,7 +65,7 @@ const MyProjectVolunteersPass = () => { )} diff --git a/src/pages/manage/myProjectVolunteer/MyProjectVolunteer.tsx b/src/pages/manage/myProjectVolunteer/MyProjectVolunteer.tsx index 7f671530..d238e614 100644 --- a/src/pages/manage/myProjectVolunteer/MyProjectVolunteer.tsx +++ b/src/pages/manage/myProjectVolunteer/MyProjectVolunteer.tsx @@ -49,7 +49,8 @@ const MyProjectVolunteer = () => { {projectData && } - {isApplicantLoading || (applicantsData && applicantsData.length > 0) ? ( + {isApplicantLoading || + (applicantsData && applicantsData.data?.length > 0) ? ( 지원자 리스트 @@ -57,7 +58,7 @@ const MyProjectVolunteer = () => { )} diff --git a/src/routes/AppRoutes.tsx b/src/routes/AppRoutes.tsx index ea68e69a..6ecf5662 100644 --- a/src/routes/AppRoutes.tsx +++ b/src/routes/AppRoutes.tsx @@ -10,6 +10,7 @@ import { ROUTES } from '../constants/routes'; import useAuthStore from '../store/authStore'; import ProtectRoute from '../components/common/ProtectRoute'; import NotFoundPage from '../pages/notFoundPage/NotFoundPage'; +import QueryErrorBoundary from '../components/common/error/QueryErrorBoundary'; const Login = lazy(() => import('../pages/login/Login')); const Register = lazy(() => import('../pages/register/Register')); const ChangePassword = lazy( @@ -85,55 +86,65 @@ const AppRoutes = () => { { path: ROUTES.main, element: ( - - - + + + + + ), }, { path: ROUTES.createProject, element: ( - - - - - + + + + + + + ), }, { path: `${ROUTES.apply}/:projectId`, element: ( - - - - - + + + + + + + ), }, { path: `${ROUTES.projectDetail}/:projectId`, element: ( - }> - - - - + + }> + + + + + ), }, { path: `${ROUTES.modifyProject}/:projectId`, element: ( - - - - - + + + + + + + ), }, { path: ROUTES.manageProjectsRoot, element: ( - <> + }> @@ -141,19 +152,21 @@ const AppRoutes = () => { - + ), }, { path: ROUTES.mypage, element: ( - - }> - - - - - + + + }> + + + + + + ), children: [ { @@ -173,13 +186,15 @@ const AppRoutes = () => { { path: `${ROUTES.userpage}/:userId`, element: ( - - }> - - - - - + + + }> + + + + + + ), children: [ { @@ -195,25 +210,29 @@ const AppRoutes = () => { { path: `${ROUTES.manageProjectsRoot}/:projectId`, element: ( - - }> - - - - - + + + }> + + + + + + ), }, { path: `${ROUTES.manageProjectsPassNonPass}/:projectId`, element: ( - - }> - - - - - + + + }> + + + + + + ), }, ]; @@ -221,7 +240,7 @@ const AppRoutes = () => { const newRouteList = routeList.map((item) => { return { ...item, - //errorElement: , + errorElement: , }; });