diff --git a/src/components/molecules/ResumeListItem/ResumeListItem.tsx b/src/components/molecules/ResumeListItem/ResumeListItem.tsx index 4fd46e44..8caadb01 100644 --- a/src/components/molecules/ResumeListItem/ResumeListItem.tsx +++ b/src/components/molecules/ResumeListItem/ResumeListItem.tsx @@ -1,10 +1,10 @@ import { Box, Flex, Text } from '@chakra-ui/react'; import { Label } from '~/components/atoms/Label'; import { MemoBox } from '~/components/molecules/MemoBox'; -import { ResumeListItem } from '~/types/resume/resumeListItem'; +import { MyResume } from '~/types/resume/resumeListItem'; type ResumeListItemProps = { - data: ResumeListItem; + data: MyResume; }; const ResumeListItem = ({ data: { title, modifiedAt, position, memo } }: ResumeListItemProps) => { diff --git a/src/mocks/handlers/event/event.ts b/src/mocks/handlers/event/event.ts index fd139199..a0cc3807 100644 --- a/src/mocks/handlers/event/event.ts +++ b/src/mocks/handlers/event/event.ts @@ -7,6 +7,7 @@ import { readEventMock3, } from './event.mock'; import { environments } from '~/config/environments'; +import { FeedbackResume } from '~/types/resume/resumeListItem'; const allEvents = new Map(); allEvents.set('0', readEventMock0); @@ -14,6 +15,30 @@ allEvents.set('1', readEventMock1); allEvents.set('2', readEventMock2); allEvents.set('3', readEventMock3); +const eventResumesMock: FeedbackResume[] = [ + { + resumeTitle: '이력서 버전4', + eventId: 0, + resumeId: 0, + status: 'COMPLETE', + title: '이번 봄은 취업하자! 웹 개발 이력서 봐드립니다.', + mentorName: '손웅정', + startDate: '2024-04-02T12:00:00.000Z', + endDate: '2024-05-02T12:00:00.000Z', + }, + { + resumeTitle: 'FE 이력서 버전1', + eventId: 0, + resumeId: 0, + status: 'REJECT', + title: '백엔드 이력서 봐드립니다.', + mentorName: '손웅정', + startDate: '2024-03-02T12:00:00.000Z', + endDate: '2024-04-01T12:00:00.000Z', + rejectMessage: '직무를 잘못 보신 것 같아요! 백엔드만 첨삭합니다.', + }, +]; + export const handlers = [ http.get(`${environments.baseUrlEnv()}/v1/events`, () => { return HttpResponse.json(eventListMock); @@ -23,4 +48,8 @@ export const handlers = [ const event = allEvents.get(id); return HttpResponse.json(event); }), + // 이벤트 참여 이력서 + http.get(`${environments.baseUrlEnv()}/v1/mentees/:menteeId/events`, () => { + return HttpResponse.json(eventResumesMock); + }), ]; diff --git a/src/mocks/handlers/resume/resume.ts b/src/mocks/handlers/resume/resume.ts index a6ada4a8..2579b69e 100644 --- a/src/mocks/handlers/resume/resume.ts +++ b/src/mocks/handlers/resume/resume.ts @@ -1,5 +1,30 @@ import { HttpResponse, http } from 'msw'; import { environments } from '~/config/environments'; +import { MyResume } from '~/types/resume/resumeListItem'; + +const myResumesMock: MyResume[] = [ + { + id: 0, + title: '이력서 버전1', + modifiedAt: '2024-02-25T23:59:59.999Z', + position: 'Front-End', + memo: '', + }, + { + id: 0, + title: '이력서 버전2', + modifiedAt: '2024-03-01T23:59:59.999Z', + position: 'Front-End', + memo: '', + }, + { + id: 0, + title: '최종 이력서', + modifiedAt: '2024-05-02T23:59:59.999Z', + position: 'Front-End', + memo: '아몬드빼빼로 서합한 이력서', + }, +]; const referenceLinkMock = [ { @@ -10,8 +35,12 @@ const referenceLinkMock = [ url: 'https://github.com/resumeme/Frontend', }, ]; + const MOCK_RESUME_ID = 0; export const handlers = [ + http.get(`${environments.baseUrlEnv()}/v1/resumes`, () => { + return HttpResponse.json(myResumesMock); + }), http.post(`${environments.baseUrlEnv()}/v1/resumes`, () => { return HttpResponse.json({ id: MOCK_RESUME_ID }); }), diff --git a/src/types/resume/resumeListItem.ts b/src/types/resume/resumeListItem.ts index 0d892423..277b9a76 100644 --- a/src/types/resume/resumeListItem.ts +++ b/src/types/resume/resumeListItem.ts @@ -1,16 +1,11 @@ import { ResumeStatus } from './status'; -import { Position } from '../position'; -export type ResumeListItem = { +export type MyResume = { id: number; title: string; modifiedAt: string; - position: string; memo: string; -}; - -export type MyResume = ResumeListItem & { - position: Position[]; + position: string; }; export type FeedbackResume = {