From 2b6387b10d4f6a6f03e65c8eda4fbd809b32c64b Mon Sep 17 00:00:00 2001 From: JJIIIINN Date: Mon, 4 Dec 2023 15:01:31 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=A0=84=EC=86=A1=20=EC=83=81=ED=83=9C?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80=20=EB=B0=8F=20page=20=EC=95=88=20?= =?UTF-8?q?=EB=84=98=EC=96=B4=EA=B0=80=EB=8A=94=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Apis/Recruitments/response.ts | 21 +++++++-------- .../RecruitmentForm/Table/index.tsx | 27 +++++++++---------- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/src/Apis/Recruitments/response.ts b/src/Apis/Recruitments/response.ts index 5af5a56..73202ac 100644 --- a/src/Apis/Recruitments/response.ts +++ b/src/Apis/Recruitments/response.ts @@ -3,18 +3,17 @@ export interface RecruitmentFormResponse { } export interface RecruitmentFormType { - id: string; - company_id: string; - recruitment_status: string; + application_approved_count: number; + application_requested_count: number; + company_id: number; company_name: string; company_type: string; - recruitment_job: string; - recruitment_count: number; - application_requested_count: number; - application_approved_count: number; - start: string; - end: string; - military_support: boolean; + end_date: string; + hiring_jobs: string; + id: number; + start_date: string; + status: string; + total_hiring_count: number; } export interface RecruitmentFormDetailResponse { @@ -43,5 +42,5 @@ export interface AreasType { tech: string[]; hiring: number; major_task: string; - preferential_treatment: string | null; + preferential_treatment: string | null; } diff --git a/src/Components/RecruitmentForm/Table/index.tsx b/src/Components/RecruitmentForm/Table/index.tsx index 32d7b0e..f6e434f 100644 --- a/src/Components/RecruitmentForm/Table/index.tsx +++ b/src/Components/RecruitmentForm/Table/index.tsx @@ -32,7 +32,8 @@ export function RecruitmentFormTable({ }: PropsType) { const { append } = useToastStore(); - const { recruitmentFormQueryString, setRecruitmentFormQueryString } = useRecruitmentFormQueryString(); + const { recruitmentFormQueryString, setRecruitmentFormQueryString } = + useRecruitmentFormQueryString(); /** 지원서 length입니다. */ const dataLength = recruitmentForm?.recruitments.length; @@ -114,16 +115,17 @@ export function RecruitmentFormTable({ /** 데이터 테이블입니다. */ const tableAllDatas: JSX.Element[][] = recruitmentForm?.recruitments .map((recruitment) => { - const job = recruitment.recruitment_job.split(',').join(' / '); + const job = recruitment.hiring_jobs.split(',').join(' / '); const clickCheckBox = () => { - if (clickedData.includes(recruitment.id)) { + if (clickedData.includes(recruitment.id.toString())) { setClickedData( clickedData.filter( - (clickedDataId) => clickedDataId !== recruitment.id + (clickedDataId) => + clickedDataId !== recruitment.id.toString() ) ); } else { - setClickedData([...clickedData, recruitment.id]); + setClickedData([...clickedData, recruitment.id.toString()]); } }; @@ -145,14 +147,11 @@ export function RecruitmentFormTable({ }; return [ , - <_.ContentText status={recruitment.recruitment_status}> - {getValueByKey( - companyStatus, - recruitment.recruitment_status - )} + <_.ContentText status={recruitment.status}> + {getValueByKey(companyStatus, recruitment.status)} , // 상태 <_.ContentText click={1}> @@ -166,7 +165,7 @@ export function RecruitmentFormTable({ {companyType[recruitment.company_type]} , // 구분 <_.ContentText> - {recruitment.recruitment_count}명 + {recruitment.total_hiring_count}명 , // 모집 인원 수 <_.ContentText onClick={() => @@ -186,8 +185,8 @@ export function RecruitmentFormTable({ > {recruitment.application_approved_count}명 , // 지원자 수 - <_.ContentText>{recruitment.start}, // 모집 시작 날짜 - <_.ContentText>{recruitment.end}, // 모집 종료 날짜 + <_.ContentText>{recruitment.start_date}, // 모집 시작 날짜 + <_.ContentText>{recruitment.end_date}, // 모집 종료 날짜 ]; }) .concat(emptyTableDataArray);