From 9537624de5aa5fb9f0df58efd9844fd161e615df Mon Sep 17 00:00:00 2001 From: YIMSEBIN Date: Fri, 1 Nov 2024 02:09:24 +0900 Subject: [PATCH 01/10] =?UTF-8?q?feat:=20=EA=B7=BC=EB=A1=9C=EA=B3=84?= =?UTF-8?q?=EC=95=BD=EC=84=9C=20=EB=8B=A4=EC=9A=B4=EB=A1=9C=EB=93=9C=20API?= =?UTF-8?q?=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/contract/hooks/useGetContractImg.tsx | 15 +++++++++++++ .../employee/myPage/MyRecruitCard.tsx | 21 ++++++++++++++++++- src/types/index.d.ts | 2 +- 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 src/apis/contract/hooks/useGetContractImg.tsx diff --git a/src/apis/contract/hooks/useGetContractImg.tsx b/src/apis/contract/hooks/useGetContractImg.tsx new file mode 100644 index 0000000..78df441 --- /dev/null +++ b/src/apis/contract/hooks/useGetContractImg.tsx @@ -0,0 +1,15 @@ +import { getDynamicAPIPath } from '@/apis/apiPath'; +import { clientInstance } from '@/apis/instance'; +import { useQuery } from '@tanstack/react-query'; + +export const getContractImgPath = (applyId: number) => `${getDynamicAPIPath.downloadContract(applyId)}`; +const getContractImg = async (applyId: number) => { + const res = await clientInstance.get(getContractImgPath(applyId)); + return res.data; +}; + +export const useGetContractImg = (applyId: number) => + useQuery({ + queryKey: [getContractImgPath], + queryFn: () => getContractImg(applyId), + }); diff --git a/src/features/employee/myPage/MyRecruitCard.tsx b/src/features/employee/myPage/MyRecruitCard.tsx index 0f4786e..1fbe36d 100644 --- a/src/features/employee/myPage/MyRecruitCard.tsx +++ b/src/features/employee/myPage/MyRecruitCard.tsx @@ -3,6 +3,7 @@ import styled from '@emotion/styled'; import { MyRecruitListProps, StateProps, TextProps } from '@/types'; import { useNavigate } from 'react-router-dom'; import ROUTE_PATH from '@/routes/path'; +import { useGetContractImg } from '@/apis/contract/hooks/useGetContractImg'; type DesignProps = { design: 'default' | 'outlined' | 'textbutton' | 'deactivate'; @@ -18,7 +19,7 @@ function getStateStyle(state: StateProps): DesignProps { case 'Waiting': return { design: 'outlined', text: '지원서 검토중' }; case 'Completed': - return { design: 'deactivate', text: '채용 완료' }; + return { design: 'outlined', text: '근로계약서 다운로드' }; default: return { design: 'deactivate' }; // 상태가 정의되지 않은 경우 } @@ -28,10 +29,26 @@ type Props = { myRecruit: MyRecruitListProps; }; +type DownloadContractProps = { + imageUrl: string; + imageUrlV: string; +}; + export default function MyRecruitCard({ myRecruit }: Props) { const { image, title, area, state, applyId } = myRecruit; const buttonStyle = getStateStyle(state); const navigate = useNavigate(); + // 근로계약서 이미지 다운로드 + const downloadContract = () => { + const { data: imgURLs } = useGetContractImg(applyId); + const imgData: DownloadContractProps = imgURLs; + const link = document.createElement('a'); + link.href = imgData.imageUrlV; + link.download = 'downloaded_image'; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + }; return ( { if (state == 'LetsSign') { navigate(ROUTE_PATH.CONTRACT.EMPLOYEE.replace(':applyId', applyId.toString())); + } else if (state == 'Completed') { + downloadContract(); } }} > diff --git a/src/types/index.d.ts b/src/types/index.d.ts index cc00f42..6c9dfde 100644 --- a/src/types/index.d.ts +++ b/src/types/index.d.ts @@ -32,7 +32,7 @@ export const State = { LetsSign: '근로계약서 서명하기', Closed: '채용 마감', Waiting: '지원서 검토중', - Completed: '채용 완료', + Completed: '근로계약서 다운로드', } as const; export type StateProps = keyof typeof State; From 78d10cc4e7dee132abae994c675058c8180f0d15 Mon Sep 17 00:00:00 2001 From: YIMSEBIN Date: Wed, 6 Nov 2024 00:29:16 +0900 Subject: [PATCH 02/10] =?UTF-8?q?fix:=20=ED=8F=B4=EB=8D=94=EA=B5=AC?= =?UTF-8?q?=EC=A1=B0=20=EC=A0=95=EB=A6=AC=20=EB=B0=8F=20=ED=9B=85=20?= =?UTF-8?q?=EC=9D=B4=EB=A6=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/registerCompany/{ => hooks}/useRegisterCompany.ts | 2 +- src/apis/registerCompany/{ => mocks}/registerCompany.mock.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/apis/registerCompany/{ => hooks}/useRegisterCompany.ts (93%) rename src/apis/registerCompany/{ => mocks}/registerCompany.mock.ts (78%) diff --git a/src/apis/registerCompany/useRegisterCompany.ts b/src/apis/registerCompany/hooks/useRegisterCompany.ts similarity index 93% rename from src/apis/registerCompany/useRegisterCompany.ts rename to src/apis/registerCompany/hooks/useRegisterCompany.ts index b8a6d43..7e1ff82 100644 --- a/src/apis/registerCompany/useRegisterCompany.ts +++ b/src/apis/registerCompany/hooks/useRegisterCompany.ts @@ -17,7 +17,7 @@ export const postCompany = async (req: CompanyRequestData) => { return response.data; }; -export const useFetchPostCompany = () => +export const usePostCompany = () => useMutation({ mutationFn: postCompany, }); diff --git a/src/apis/registerCompany/registerCompany.mock.ts b/src/apis/registerCompany/mocks/registerCompany.mock.ts similarity index 78% rename from src/apis/registerCompany/registerCompany.mock.ts rename to src/apis/registerCompany/mocks/registerCompany.mock.ts index 8bed0c8..ae6e0ba 100644 --- a/src/apis/registerCompany/registerCompany.mock.ts +++ b/src/apis/registerCompany/mocks/registerCompany.mock.ts @@ -1,5 +1,5 @@ import { http, HttpResponse } from 'msw'; -import { getPostCompanyPath } from './useRegisterCompany'; +import { getPostCompanyPath } from '../hooks/useRegisterCompany'; export const registerCompanyMockHandler = [ http.post(getPostCompanyPath(), async ({ request }) => { From 28447451cb1d590791bee10675406f3765388d8d Mon Sep 17 00:00:00 2001 From: YIMSEBIN Date: Wed, 6 Nov 2024 00:30:14 +0900 Subject: [PATCH 03/10] =?UTF-8?q?fix:=20=ED=9B=85=20=EC=9D=B4=EB=A6=84=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/postNotice/hooks/usePostNotice.ts | 4 ++-- src/mocks/handlers.ts | 2 +- src/pages/postNotice/PostNotice.tsx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/apis/postNotice/hooks/usePostNotice.ts b/src/apis/postNotice/hooks/usePostNotice.ts index 3d99f8b..1a7d598 100644 --- a/src/apis/postNotice/hooks/usePostNotice.ts +++ b/src/apis/postNotice/hooks/usePostNotice.ts @@ -2,7 +2,7 @@ import { APIPath } from '@/apis/apiPath'; import { clientInstance } from '@/apis/instance'; import { useMutation } from '@tanstack/react-query'; -export type NoticeRequestData = { +type NoticeRequestData = { title?: string; companyScale?: string; area?: string; @@ -26,7 +26,7 @@ export const postNotice = async (req: NoticeRequestData) => { return response.data; }; -export const useFetchPostNotice = () => +export const usePostNotice = () => useMutation({ mutationFn: postNotice, }); diff --git a/src/mocks/handlers.ts b/src/mocks/handlers.ts index 0f2dc43..ff2d73e 100644 --- a/src/mocks/handlers.ts +++ b/src/mocks/handlers.ts @@ -10,7 +10,7 @@ import { foreignerMockHandler } from '@/apis/applicants/mocks/foreignerMockHandl import { visaMockHandler } from '@/apis/applicants/mocks/visaMockHandler'; import { postApplyMockHandler } from '@apis/apply/postApply.mock'; import { recruitmentsDetailMockHandler } from '@apis/recruitmentsDetail/recruitmentsDetailMockHandler'; -import { registerCompanyMockHandler } from '@/apis/registerCompany/registerCompany.mock'; +import { registerCompanyMockHandler } from '@/apis/registerCompany/mocks/registerCompany.mock'; import { contractsMockHandler } from '@/apis/contract/mock/contract.mock'; import { closeRecruitmentMockHandler } from '@/apis/recruitments/mocks/closeRecruitmentMockHandler'; diff --git a/src/pages/postNotice/PostNotice.tsx b/src/pages/postNotice/PostNotice.tsx index acec63a..9c4a31c 100644 --- a/src/pages/postNotice/PostNotice.tsx +++ b/src/pages/postNotice/PostNotice.tsx @@ -1,4 +1,4 @@ -import { useFetchPostNotice } from '@/apis/postNotice/hooks/usePostNotice'; +import { usePostNotice } from '@/apis/postNotice/hooks/usePostNotice'; import { Button, Flex, Input, Typo } from '@/components/common'; import Layout from '@/features/layout'; import ROUTE_PATH from '@/routes/path'; @@ -7,7 +7,7 @@ import { useState } from 'react'; import { useNavigate } from 'react-router-dom'; export default function PostNotice() { - const mutation = useFetchPostNotice(); + const mutation = usePostNotice(); const navigate = useNavigate(); const [inputs, setInputs] = useState({ From 2a156af8109b2051b634c04efa665e2c3e4d9a90 Mon Sep 17 00:00:00 2001 From: YIMSEBIN Date: Wed, 6 Nov 2024 00:31:03 +0900 Subject: [PATCH 04/10] =?UTF-8?q?fix:=20default=5Finputs=20=EC=BB=B4?= =?UTF-8?q?=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EB=B0=96=EC=97=90=20=EC=A0=95?= =?UTF-8?q?=EC=9D=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/registerCompany/RegisterCompany.tsx | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/pages/registerCompany/RegisterCompany.tsx b/src/pages/registerCompany/RegisterCompany.tsx index f461f5b..e5445a4 100644 --- a/src/pages/registerCompany/RegisterCompany.tsx +++ b/src/pages/registerCompany/RegisterCompany.tsx @@ -1,4 +1,4 @@ -import { useFetchPostCompany } from '@/apis/registerCompany/useRegisterCompany'; +import { usePostCompany } from '@/apis/registerCompany/hooks/useRegisterCompany'; import { Button, Flex, Input, Typo } from '@/components/common'; import Layout from '@/features/layout'; import ROUTE_PATH from '@/routes/path'; @@ -6,17 +6,18 @@ import styled from '@emotion/styled'; import { useState } from 'react'; import { useNavigate } from 'react-router-dom'; +const default_inputs = { + name: '', + industryOccupation: '', + brand: '', + revenuePerYear: 0, + logoImage: '', +}; + export default function RegisterCompany() { - const mutation = useFetchPostCompany(); + const mutation = usePostCompany(); const navigate = useNavigate(); - - const [inputs, setInputs] = useState({ - name: '', - industryOccupation: '', - brand: '', - revenuePerYear: 0, - logoImage: '', - }); + const [inputs, setInputs] = useState({ ...default_inputs }); const { name, industryOccupation, brand, revenuePerYear, logoImage } = inputs; From 3ffbe6db119394e73eacd1bbf2511ef852248915 Mon Sep 17 00:00:00 2001 From: YIMSEBIN Date: Thu, 7 Nov 2024 16:00:16 +0900 Subject: [PATCH 05/10] =?UTF-8?q?feat:=20=EB=B2=88=EC=97=AD=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=EA=B5=AC=EC=A1=B0=20=EC=A0=95=EB=A6=AC=20?= =?UTF-8?q?=EB=B0=8F=20=EA=B7=BC=EB=A1=9C=EA=B3=84=EC=95=BD=EC=84=9C=20?= =?UTF-8?q?=EB=B2=88=EC=97=AD=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EC=9E=91?= =?UTF-8?q?=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../translator/Contract/contractData.ts | 33 ++++++++++++++++ .../EmployeeMyPage/employeeMyPageData.ts | 18 +++++++++ src/assets/translator/EmployeeMyPage/ko.ts | 7 ---- src/assets/translator/EmployeeMyPage/ve.ts | 7 ---- src/assets/translator/PostNotice/ko.ts | 11 ------ .../translator/PostNotice/postNoticeData.ts | 26 +++++++++++++ src/assets/translator/PostNotice/ve.ts | 11 ------ src/assets/translator/RegisterCompany/ko.ts | 9 ----- .../RegisterCompany/registerCompanyData.ts | 22 +++++++++++ src/assets/translator/RegisterCompany/ve.ts | 9 ----- src/pages/postNotice/PostNotice.tsx | 38 +++++++++++++++---- 11 files changed, 130 insertions(+), 61 deletions(-) create mode 100644 src/assets/translator/Contract/contractData.ts create mode 100644 src/assets/translator/EmployeeMyPage/employeeMyPageData.ts delete mode 100644 src/assets/translator/EmployeeMyPage/ko.ts delete mode 100644 src/assets/translator/EmployeeMyPage/ve.ts delete mode 100644 src/assets/translator/PostNotice/ko.ts create mode 100644 src/assets/translator/PostNotice/postNoticeData.ts delete mode 100644 src/assets/translator/PostNotice/ve.ts delete mode 100644 src/assets/translator/RegisterCompany/ko.ts create mode 100644 src/assets/translator/RegisterCompany/registerCompanyData.ts delete mode 100644 src/assets/translator/RegisterCompany/ve.ts diff --git a/src/assets/translator/Contract/contractData.ts b/src/assets/translator/Contract/contractData.ts new file mode 100644 index 0000000..367983c --- /dev/null +++ b/src/assets/translator/Contract/contractData.ts @@ -0,0 +1,33 @@ +import { Languages } from '../Languages'; + +export const contractData = { + [Languages.KO]: { + CONTRACT: '근 로 계 약 서', + WORKING_PLACE: '1. 근무장소', + RESPONSIBILITIES: '2. 업무내용', + WORKING_HOURS: '3. 근로일 및 근로일별 근로시간', + DAY_OFF: '4. 주휴일', + SALARY: '5. 임금', + ANNUAL_PAID_LEAVE: '6. 연차유급휴가', + RULE: '7. 취업규칙', + SENTENCE1: '사용자와 근로자는 각자가 근로계약, 취업규칙, 단체협약을 지키고 성실하게 이행하여야 한다.', + SENTENCE2: "이 계약에서 정하지 않은 사항은 '근로기준법'에서 정하는 바에 따른다.", + SIGN: '서명하기', + SUBMIT: '제출하기', + }, + [Languages.VE]: { + CONTRACT: 'Hợp đồng lao động', + WORKING_PLACE: '1. Nơi làm việc', + RESPONSIBILITIES: '2. Nội dung công việc', + WORKING_HOURS: '3. Ngày làm việc và giờ làm việc theo ngày', + DAY_OFF: '4. Ngày nghỉ hàng tuần', + SALARY: '5. Tiền lương', + ANNUAL_PAID_LEAVE: '6. Nghỉ phép có lương hàng năm', + RULE: '7. Quy tắc lao động', + SENTENCE1: + 'Người sử dụng lao động và người lao động cần tuân thủ hợp đồng lao động, quy tắc lao động và thỏa thuận tập thể một cách nghiêm túc.', + SENTENCE2: 'Các điều khoản không được quy định trong hợp đồng này sẽ được điều chỉnh theo "Luật lao động".', + SIGN: 'Ký tên', + SUBMIT: 'Gửi đi', + }, +}; diff --git a/src/assets/translator/EmployeeMyPage/employeeMyPageData.ts b/src/assets/translator/EmployeeMyPage/employeeMyPageData.ts new file mode 100644 index 0000000..00098e5 --- /dev/null +++ b/src/assets/translator/EmployeeMyPage/employeeMyPageData.ts @@ -0,0 +1,18 @@ +import { Languages } from '../Languages'; + +export const employeeMyPageData = { + [Languages.KO]: { + UPDATE_PROFILE: '프로필 수정하기', + REGISTER_RESUME: '이력서 등록하기', + REGISTER_SIGN: '사인 등록', + REGISTER_VISA: '외국인 번호 및 비자 발급 일자 등록', + MYRECRUITLIST: '내가 지원한 공고', + }, + [Languages.VE]: { + UPDATE_PROFILE: 'Cập nhật hồ sơ', + REGISTER_RESUME: 'Đăng ký hồ sơ', + REGISTER_SIGN: 'Đăng ký chữ ký', + REGISTER_VISA: 'Đăng ký số người nước ngoài và ngày cấp visa', + MYRECRUITLIST: 'Công việc tôi đã ứng tuyển', + }, +}; diff --git a/src/assets/translator/EmployeeMyPage/ko.ts b/src/assets/translator/EmployeeMyPage/ko.ts deleted file mode 100644 index bdcb94e..0000000 --- a/src/assets/translator/EmployeeMyPage/ko.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const EmployeeMyPage = { - UPDATE_PROFILE: '프로필 수정하기', - REGISTER_RESUME: '이력서 등록하기', - REGISTER_SIGN: '사인 등록', - REGISTER_VISA: '외국인 번호 및 비자 발급 일자 등록', - MYRECRUITLIST: '내가 지원한 공고', -}; diff --git a/src/assets/translator/EmployeeMyPage/ve.ts b/src/assets/translator/EmployeeMyPage/ve.ts deleted file mode 100644 index 5ddd79c..0000000 --- a/src/assets/translator/EmployeeMyPage/ve.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const EmployeeMyPage = { - UPDATE_PROFILE: 'Cập nhật hồ sơ', - REGISTER_RESUME: 'Đăng ký hồ sơ', - REGISTER_SIGN: 'Đăng ký chữ ký', - REGISTER_VISA: 'Đăng ký số người nước ngoài và ngày cấp visa', - MYRECRUITLIST: 'Công việc tôi đã ứng tuyển', -}; diff --git a/src/assets/translator/PostNotice/ko.ts b/src/assets/translator/PostNotice/ko.ts deleted file mode 100644 index 6e28f63..0000000 --- a/src/assets/translator/PostNotice/ko.ts +++ /dev/null @@ -1,11 +0,0 @@ -export const PostNotice = { - TITLE: '구인 글 등록하기', - SALARY: '급여', - WORKINGDURATION: '근무기간', - WORKDAYS: '근무요일', - WORKHOURS: '근무시간', - WORKTYPE: '고용형태', - ELIGIBILITY_CRITERIA: '비자조건', - PREFERRED_CONDITIONS: '우대사항', - SUBMIT: '등록하기', -}; diff --git a/src/assets/translator/PostNotice/postNoticeData.ts b/src/assets/translator/PostNotice/postNoticeData.ts new file mode 100644 index 0000000..c65f8f7 --- /dev/null +++ b/src/assets/translator/PostNotice/postNoticeData.ts @@ -0,0 +1,26 @@ +import { Languages } from '../Languages'; + +export const postNoticeData = { + [Languages.KO]: { + TITLE: '구인 글 등록하기', + SALARY: '급여', + WORKINGDURATION: '근무기간', + WORKDAYS: '근무요일', + WORKHOURS: '근무시간', + WORKTYPE: '고용형태', + ELIGIBILITY_CRITERIA: '비자조건', + PREFERRED_CONDITIONS: '우대사항', + SUBMIT: '등록하기', + }, + [Languages.VE]: { + TITLE: 'Đăng bài tuyển dụng', + SALARY: 'Lương', + WORKINGDURATION: 'Thời gian làm việc', + WORKDAYS: 'Ngày làm việc', + WORKHOURS: 'Giờ làm việc', + WORKTYPE: 'Hình thức làm việc', + ELIGIBILITY_CRITERIA: 'Điều kiện visa', + PREFERRED_CONDITIONS: 'Ưu tiên', + SUBMIT: 'Đăng', + }, +}; diff --git a/src/assets/translator/PostNotice/ve.ts b/src/assets/translator/PostNotice/ve.ts deleted file mode 100644 index d96469a..0000000 --- a/src/assets/translator/PostNotice/ve.ts +++ /dev/null @@ -1,11 +0,0 @@ -export const PostNotice = { - TITLE: 'Đăng bài tuyển dụng', - SALARY: 'Lương', - WORKINGDURATION: 'Thời gian làm việc', - WORKDAYS: 'Ngày làm việc', - WORKHOURS: 'Giờ làm việc', - WORKTYPE: 'Hình thức làm việc', - ELIGIBILITY_CRITERIA: 'Điều kiện visa', - PREFERRED_CONDITIONS: 'Ưu tiên', - SUBMIT: 'Đăng', -}; diff --git a/src/assets/translator/RegisterCompany/ko.ts b/src/assets/translator/RegisterCompany/ko.ts deleted file mode 100644 index 0d3663c..0000000 --- a/src/assets/translator/RegisterCompany/ko.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const RegisterCompany = { - TITLE: '회사 등록', - LOGOIMAGE: '회사 이미지 업로드(선택)', - COMPANYNAME: '회사명', - INDUSTRY_OCCUPATION: '업직종', - BRAND: '브랜드', - REVENUE_PERYEAR: '연 평균 매출액', - SUBMIT: '등록하기', -}; diff --git a/src/assets/translator/RegisterCompany/registerCompanyData.ts b/src/assets/translator/RegisterCompany/registerCompanyData.ts new file mode 100644 index 0000000..63d31bf --- /dev/null +++ b/src/assets/translator/RegisterCompany/registerCompanyData.ts @@ -0,0 +1,22 @@ +import { Languages } from '../Languages'; + +export const registerCompanyData = { + [Languages.KO]: { + TITLE: '회사 등록', + LOGOIMAGE: '회사 이미지 업로드(선택)', + COMPANYNAME: '회사명', + INDUSTRY_OCCUPATION: '업직종', + BRAND: '브랜드', + REVENUE_PERYEAR: '연 평균 매출액', + SUBMIT: '등록하기', + }, + [Languages.VE]: { + TITLE: 'Đăng ký công ty', + LOGOIMAGE: 'Tải lên logo công ty (tùy chọn)', + COMPANYNAME: 'Tên công ty', + INDUSTRY_OCCUPATION: 'Ngành nghề', + BRAND: 'Thương hiệu', + REVENUE_PERYEAR: 'Doanh thu hàng năm', + SUBMIT: 'Đăng ký', + }, +}; diff --git a/src/assets/translator/RegisterCompany/ve.ts b/src/assets/translator/RegisterCompany/ve.ts deleted file mode 100644 index d01e351..0000000 --- a/src/assets/translator/RegisterCompany/ve.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const RegisterCompany = { - TITLE: 'Đăng ký công ty', - LOGOIMAGE: 'Tải lên logo công ty (tùy chọn)', - COMPANYNAME: 'Tên công ty', - INDUSTRY_OCCUPATION: 'Ngành nghề', - BRAND: 'Thương hiệu', - REVENUE_PERYEAR: 'Doanh thu hàng năm', - SUBMIT: 'Đăng ký', -}; diff --git a/src/pages/postNotice/PostNotice.tsx b/src/pages/postNotice/PostNotice.tsx index 9c4a31c..8941674 100644 --- a/src/pages/postNotice/PostNotice.tsx +++ b/src/pages/postNotice/PostNotice.tsx @@ -52,25 +52,49 @@ export default function PostNotice() { 구인 글 업로드 - + - + - + - + - + - + - + diff --git a/src/pages/contract/EmployerContract/EmployerContract.tsx b/src/pages/contract/EmployerContract/EmployerContract.tsx index bc3e0ce..621e6c9 100644 --- a/src/pages/contract/EmployerContract/EmployerContract.tsx +++ b/src/pages/contract/EmployerContract/EmployerContract.tsx @@ -4,9 +4,11 @@ import Layout from '@/features/layout'; import ROUTE_PATH from '@/routes/path'; import styled from '@emotion/styled'; import { useState } from 'react'; +import { useTranslation } from 'react-i18next'; import { useNavigate, useParams } from 'react-router-dom'; export default function EmployerContract() { + const { t } = useTranslation(); const { applyId: applicationId } = useParams(); const mutation = useFetchPostContract(); const navigate = useNavigate(); @@ -51,52 +53,67 @@ export default function EmployerContract() { - 근 로 계 약 서 + {t('contract.CONTRACT')} - + - + - + - + - + - + - 사용자와 근로자는 각자가 근로계약, 취업규칙, 단체협약을 지키고 성실하게 이행하여야 한다. + {t('contract.SENTENCE1')} - 이 계약에서 정하지 않은 사항은 '근로기준법'에서 정하는 바에 따른다. + {t('contract.SENTENCE2')}
<> - +
diff --git a/src/pages/myPage/employee/EmployeeMyPage.tsx b/src/pages/myPage/employee/EmployeeMyPage.tsx index fd0c4ab..b5efce2 100644 --- a/src/pages/myPage/employee/EmployeeMyPage.tsx +++ b/src/pages/myPage/employee/EmployeeMyPage.tsx @@ -7,8 +7,10 @@ import EmployeeProfile from '../../../features/employee/myPage/EmployeeProfile'; import { useGetMyApplication } from '@/apis/employee/hooks/useGetMyApplication'; import { useNavigate } from 'react-router-dom'; import ROUTE_PATH from '@/routes/path'; +import { useTranslation } from 'react-i18next'; export default function EmployeeMyPage() { + const { t } = useTranslation(); const { data: myRecruitList } = useGetMyApplication(); const navigate = useNavigate(); @@ -24,7 +26,7 @@ export default function EmployeeMyPage() { navigate(ROUTE_PATH.RESUME); }} > - 이력서 등록 + {t('employeeMyPage.REGISTER_RESUME')} - 사인 등록 + {t('employeeMyPage.REGISTER_SIGN')} - 외국인 번호 및 비자 발급 일자 등록 + {t('employeeMyPage.REGISTER_VISA')}
- 내가 지원한 공고 + {t('employeeMyPage.MYRECRUITLIST')} {myRecruitList && }
diff --git a/src/pages/registerCompany/RegisterCompany.tsx b/src/pages/registerCompany/RegisterCompany.tsx index e5445a4..f116729 100644 --- a/src/pages/registerCompany/RegisterCompany.tsx +++ b/src/pages/registerCompany/RegisterCompany.tsx @@ -4,6 +4,7 @@ import Layout from '@/features/layout'; import ROUTE_PATH from '@/routes/path'; import styled from '@emotion/styled'; import { useState } from 'react'; +import { useTranslation } from 'react-i18next'; import { useNavigate } from 'react-router-dom'; const default_inputs = { @@ -15,6 +16,7 @@ const default_inputs = { }; export default function RegisterCompany() { + const { t } = useTranslation(); const mutation = usePostCompany(); const navigate = useNavigate(); const [inputs, setInputs] = useState({ ...default_inputs }); @@ -47,12 +49,12 @@ export default function RegisterCompany() { - 회사 등록 + {t('registerCompany.TITLE')} - + - + - + - + From 4b230874bcd5f10c2f91464427fd8ed16dbf60e6 Mon Sep 17 00:00:00 2001 From: YIMSEBIN Date: Thu, 7 Nov 2024 16:58:15 +0900 Subject: [PATCH 07/10] =?UTF-8?q?feat:=20Input=20=EC=BB=B4=ED=8F=AC?= =?UTF-8?q?=EB=84=8C=ED=8A=B8=EC=97=90=20labelstyle=20props=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/Input/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/common/Input/index.tsx b/src/components/common/Input/index.tsx index c1742ed..bf51bec 100644 --- a/src/components/common/Input/index.tsx +++ b/src/components/common/Input/index.tsx @@ -3,12 +3,13 @@ import styled from '@emotion/styled'; interface Props extends InputHTMLAttributes { label?: string; + labelStyle?: React.CSSProperties; } -export default function Input({ label, ...rest }: Props) { +export default function Input({ label, labelStyle, ...rest }: Props) { return ( <> - {label && } + {label && } ); From e2ef7f065fbc045e5e57fa1611f131b31d2c94e9 Mon Sep 17 00:00:00 2001 From: YIMSEBIN Date: Thu, 7 Nov 2024 16:59:01 +0900 Subject: [PATCH 08/10] =?UTF-8?q?feat:=20NoticeRequestData=20type=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=EB=A1=9C=20=EC=9D=B4=EB=8F=99=20=EB=B0=8F=20PostNotic?= =?UTF-8?q?e=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=9E=85=EB=A0=A5=EA=B0=92?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/postNotice/hooks/usePostNotice.ts | 18 +--- src/pages/postNotice/PostNotice.tsx | 106 ++++++++++++++++++--- src/types/index.d.ts | 17 ++++ 3 files changed, 111 insertions(+), 30 deletions(-) diff --git a/src/apis/postNotice/hooks/usePostNotice.ts b/src/apis/postNotice/hooks/usePostNotice.ts index 1a7d598..84bf53d 100644 --- a/src/apis/postNotice/hooks/usePostNotice.ts +++ b/src/apis/postNotice/hooks/usePostNotice.ts @@ -1,24 +1,8 @@ import { APIPath } from '@/apis/apiPath'; import { clientInstance } from '@/apis/instance'; +import { NoticeRequestData } from '@/types'; import { useMutation } from '@tanstack/react-query'; -type NoticeRequestData = { - title?: string; - companyScale?: string; - area?: string; - salary?: string; - workDuration?: string; - workDays?: string; - workType?: string; - workHours?: string; - requestedCareer?: string; - majorBusiness?: string; - eligibilityCriteria?: string; - preferredConditions?: string; - employerName?: string; - companyName?: string; -}; - export const getPostNoticePath = () => `${APIPath.postNotice}`; export const postNotice = async (req: NoticeRequestData) => { diff --git a/src/pages/postNotice/PostNotice.tsx b/src/pages/postNotice/PostNotice.tsx index 8941674..f7fb731 100644 --- a/src/pages/postNotice/PostNotice.tsx +++ b/src/pages/postNotice/PostNotice.tsx @@ -2,25 +2,50 @@ import { usePostNotice } from '@/apis/postNotice/hooks/usePostNotice'; import { Button, Flex, Input, Typo } from '@/components/common'; import Layout from '@/features/layout'; import ROUTE_PATH from '@/routes/path'; +import { NoticeRequestData } from '@/types'; import styled from '@emotion/styled'; import { useState } from 'react'; import { useNavigate } from 'react-router-dom'; +const default_inputs: NoticeRequestData = { + title: '', + companyScale: '', + area: '', + salary: '', + workDuration: '', + workDays: '', + workType: '', + workHours: '', + requestedCareer: '', + majorBusiness: '', + eligibilityCriteria: '', + preferredConditions: '', + employerName: '', + companyName: '', +}; + export default function PostNotice() { const mutation = usePostNotice(); const navigate = useNavigate(); - const [inputs, setInputs] = useState({ - salary: '', - workingDuration: '', - workDays: '', - workHours: '', - workType: '', - eligibilityCriteria: '', - preferredConditions: '', - }); + const [inputs, setInputs] = useState({ ...default_inputs }); - const { salary, workingDuration, workDays, workHours, workType, eligibilityCriteria, preferredConditions } = inputs; + const { + title, + companyScale, + area, + salary, + workDuration, + workDays, + workType, + workHours, + requestedCareer, + majorBusiness, + eligibilityCriteria, + preferredConditions, + employerName, + companyName, + } = inputs; const onChange = (e: React.ChangeEvent) => { const { value, name } = e.target; @@ -51,15 +76,58 @@ export default function PostNotice() { 구인 글 업로드 + + + + + + + + + + + + + + + + + + @@ -78,6 +146,15 @@ export default function PostNotice() { + + + Date: Thu, 7 Nov 2024 18:37:46 +0900 Subject: [PATCH 09/10] =?UTF-8?q?fix:=20=EA=B7=BC=EB=A1=9C=EC=9E=90=20?= =?UTF-8?q?=EB=A7=88=EC=9D=B4=ED=8E=98=EC=9D=B4=EC=A7=80=20=ED=94=84?= =?UTF-8?q?=EB=A1=9C=ED=95=84=20=EC=88=98=EC=A0=95=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/employee/myPage/EmployeeProfile.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/features/employee/myPage/EmployeeProfile.tsx b/src/features/employee/myPage/EmployeeProfile.tsx index 3805f0a..798bfad 100644 --- a/src/features/employee/myPage/EmployeeProfile.tsx +++ b/src/features/employee/myPage/EmployeeProfile.tsx @@ -1,4 +1,4 @@ -import { Card, Image, Typo, Button } from '@/components/common'; +import { Card, Image, Typo } from '@/components/common'; import styled from '@emotion/styled'; export default function EmployeeProfile({ @@ -39,11 +39,6 @@ export default function EmployeeProfile({ -
); } From 0b5342106186643030f51307728fb80193e2be18 Mon Sep 17 00:00:00 2001 From: YIMSEBIN Date: Thu, 7 Nov 2024 18:49:41 +0900 Subject: [PATCH 10/10] =?UTF-8?q?feat:=20=EA=B5=AC=EC=9D=B8=EA=B8=80=20?= =?UTF-8?q?=EB=93=B1=EB=A1=9D=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=B2=88?= =?UTF-8?q?=EC=97=AD=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../translator/PostNotice/postNoticeData.ts | 26 ++++++-- src/pages/postNotice/PostNotice.tsx | 64 ++++++++++++++----- 2 files changed, 67 insertions(+), 23 deletions(-) diff --git a/src/assets/translator/PostNotice/postNoticeData.ts b/src/assets/translator/PostNotice/postNoticeData.ts index c65f8f7..f37519d 100644 --- a/src/assets/translator/PostNotice/postNoticeData.ts +++ b/src/assets/translator/PostNotice/postNoticeData.ts @@ -3,24 +3,36 @@ import { Languages } from '../Languages'; export const postNoticeData = { [Languages.KO]: { TITLE: '구인 글 등록하기', + COMPANY_NAME: '회사명', + EMPLOYER_NAME: '담당자명', + COMPANY_SCALE: '회사규모', + AREA: '근무지 주소', SALARY: '급여', - WORKINGDURATION: '근무기간', + MAJOR_BUSINESS: '업무내용', + WORKDURATION: '근무기간', WORKDAYS: '근무요일', WORKHOURS: '근무시간', WORKTYPE: '고용형태', + REQUESTED_CAREER: '지원조건', ELIGIBILITY_CRITERIA: '비자조건', PREFERRED_CONDITIONS: '우대사항', SUBMIT: '등록하기', }, [Languages.VE]: { - TITLE: 'Đăng bài tuyển dụng', + TITLE: 'Đăng thông báo tuyển dụng', + COMPANY_NAME: 'Tên công ty', + EMPLOYER_NAME: 'Tên người phụ trách', + COMPANY_SCALE: 'Quy mô công ty', + AREA: 'Địa chỉ làm việc', SALARY: 'Lương', - WORKINGDURATION: 'Thời gian làm việc', - WORKDAYS: 'Ngày làm việc', + MAJOR_BUSINESS: 'Nội dung công việc', + WORKDURATION: 'Thời gian làm việc', + WORKDAYS: 'Ngày làm việc trong tuần', WORKHOURS: 'Giờ làm việc', - WORKTYPE: 'Hình thức làm việc', - ELIGIBILITY_CRITERIA: 'Điều kiện visa', + WORKTYPE: 'Hình thức lao động', + REQUESTED_CAREER: 'Yêu cầu kinh nghiệm', + ELIGIBILITY_CRITERIA: 'Điều kiện về visa', PREFERRED_CONDITIONS: 'Ưu tiên', - SUBMIT: 'Đăng', + SUBMIT: 'Đăng ký', }, }; diff --git a/src/pages/postNotice/PostNotice.tsx b/src/pages/postNotice/PostNotice.tsx index f7fb731..df27e8f 100644 --- a/src/pages/postNotice/PostNotice.tsx +++ b/src/pages/postNotice/PostNotice.tsx @@ -5,6 +5,7 @@ import ROUTE_PATH from '@/routes/path'; import { NoticeRequestData } from '@/types'; import styled from '@emotion/styled'; import { useState } from 'react'; +import { useTranslation } from 'react-i18next'; import { useNavigate } from 'react-router-dom'; const default_inputs: NoticeRequestData = { @@ -25,6 +26,7 @@ const default_inputs: NoticeRequestData = { }; export default function PostNotice() { + const { t } = useTranslation(); const mutation = usePostNotice(); const navigate = useNavigate(); @@ -74,14 +76,20 @@ export default function PostNotice() { - 구인 글 업로드 + {t('postNotice.TITLE')} - + - + - + - + - +