-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from YIMSEBIN/Weekly
Feat: i18n ๋ฒ์ญ ๋ฐ์ดํฐ ์์ฑ, ํด๋ ๋ฐ ์ฝ๋ ๊ตฌ์กฐ ๋ฆฌํฉํ ๋ง
- Loading branch information
Showing
31 changed files
with
435 additions
and
256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { getDynamicAPIPath } from '@/apis/apiPath'; | ||
import { clientInstance } from '@/apis/instance'; | ||
import { useQuery } from '@tanstack/react-query'; | ||
|
||
export const getMyContractPath = (applyId: number) => `${getDynamicAPIPath.getContract(applyId)}`; | ||
const getMyContract = async (applyId: number) => { | ||
const res = await clientInstance.get(getMyContractPath(applyId)); | ||
return res.data; | ||
}; | ||
|
||
export const useGetMyContract = (applyId: number) => | ||
useQuery({ | ||
queryKey: [getMyContractPath], | ||
queryFn: () => getMyContract(applyId), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { APIPath } from '@/apis/apiPath'; | ||
import { clientInstance } from '@/apis/instance'; | ||
import { useMutation } from '@tanstack/react-query'; | ||
|
||
export type ContractRequestData = { | ||
salary?: string; | ||
workingHours?: string; | ||
dayOff?: string; | ||
annualPaidLeave?: string; | ||
workingPlace?: string; | ||
responsibilities?: string; | ||
rule?: string; | ||
applyId?: number; | ||
}; | ||
|
||
export const getPostContractPath = () => `${APIPath.makeContract}`; | ||
|
||
export const postContract = async (req: ContractRequestData) => { | ||
const response = await clientInstance.post(getPostContractPath(), req); | ||
return response.data; | ||
}; | ||
|
||
export const useFetchPostContract = () => | ||
useMutation({ | ||
mutationFn: postContract, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { APIPath } from '@/apis/apiPath'; | ||
import { clientInstance } from '@/apis/instance'; | ||
import { useMutation } from '@tanstack/react-query'; | ||
|
||
export type SignEmployeeContractRequestData = { | ||
applyId?: number; | ||
}; | ||
|
||
export const getPostSignEmployeeContractPath = () => `${APIPath.signEmployeeContract}`; | ||
|
||
export const postSignEmployeeContract = async (req: SignEmployeeContractRequestData) => { | ||
const response = await clientInstance.post(getPostSignEmployeeContractPath(), req); | ||
return response.data; | ||
}; | ||
|
||
export const useFetchPostContract = () => | ||
useMutation({ | ||
mutationFn: postSignEmployeeContract, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { http, HttpResponse } from 'msw'; | ||
import { getPostContractPath } from '../hooks/usePostContract'; | ||
import { getMyContractPath } from '../hooks/useGetMyContract'; | ||
import { getPostSignEmployeeContractPath } from '../hooks/usePostEmployeeSign'; | ||
|
||
export const contractsMockHandler = [ | ||
http.post(getPostContractPath(), async ({ request }) => { | ||
const req = await request.json(); | ||
return HttpResponse.json(req, { status: 201 }); | ||
}), | ||
|
||
http.get(getMyContractPath(1), () => HttpResponse.json(CONTRACT_DATA)), | ||
|
||
http.post(getPostSignEmployeeContractPath(), async ({ request }) => { | ||
const req = await request.json(); | ||
return HttpResponse.json(req, { status: 201 }); | ||
}), | ||
]; | ||
|
||
const CONTRACT_DATA = { | ||
salary: '์ 2๋ฐฑ๋ง์', | ||
workingHours: '์ํ์ 10:00 ~ 15:00, ๋ชฉ๊ธ 12:00 ~ 16:00', | ||
dayOff: '๋งค์ ๋ง์ง๋ง์ฃผ ํ์์ผ', | ||
annualPaidLeave: 'ํต์๊ทผ๋ก์์ ๊ทผ๋ก์๊ฐ์ ๋น๋กํ์ฌ ์ฐ์ฐจ์ ๊ธํด๊ฐ๋ฅผ ๋ถ์ฌํ๋ค.', | ||
workingPlace: '๋์ ์ ์ฑ๊ตฌ ๊ถ๋ ๋ํ๋ก99', | ||
responsibilities: '๊ฐ๋ฐํ๊ธฐ', | ||
rule: '์ด์ฌํ ์ผํ๊ธฐ!', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { http, HttpResponse } from 'msw'; | ||
import { getPostCompanyPath } from './useRegisterCompany'; | ||
|
||
export const registerCompanyMockHandler = [ | ||
http.post(getPostCompanyPath(), async ({ request }) => { | ||
const req = await request.json(); | ||
return HttpResponse.json(req, { status: 201 }); | ||
}), | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { APIPath } from '@/apis/apiPath'; | ||
import { clientInstance } from '@/apis/instance'; | ||
import { useMutation } from '@tanstack/react-query'; | ||
|
||
export type CompanyRequestData = { | ||
name?: string; | ||
industryOccupation?: string; | ||
brand?: string; | ||
revenuePerYear?: number; | ||
logoImage?: string; | ||
}; | ||
|
||
export const getPostCompanyPath = () => `${APIPath.registerCompany}`; | ||
|
||
export const postCompany = async (req: CompanyRequestData) => { | ||
const response = await clientInstance.post(getPostCompanyPath(), req); | ||
return response.data; | ||
}; | ||
|
||
export const useFetchPostCompany = () => | ||
useMutation({ | ||
mutationFn: postCompany, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export const EmployeeMyPage = { | ||
UPDATE_PROFILE: 'ํ๋กํ ์์ ํ๊ธฐ', | ||
REGISTER_RESUME: '์ด๋ ฅ์ ๋ฑ๋กํ๊ธฐ', | ||
REGISTER_SIGN: '์ฌ์ธ ๋ฑ๋ก', | ||
REGISTER_VISA: '์ธ๊ตญ์ธ ๋ฒํธ ๋ฐ ๋น์ ๋ฐ๊ธ ์ผ์ ๋ฑ๋ก', | ||
MYRECRUITLIST: '๋ด๊ฐ ์ง์ํ ๊ณต๊ณ ', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
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', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export const PostNotice = { | ||
TITLE: '๊ตฌ์ธ ๊ธ ๋ฑ๋กํ๊ธฐ', | ||
SALARY: '๊ธ์ฌ', | ||
WORKINGDURATION: '๊ทผ๋ฌด๊ธฐ๊ฐ', | ||
WORKDAYS: '๊ทผ๋ฌด์์ผ', | ||
WORKHOURS: '๊ทผ๋ฌด์๊ฐ', | ||
WORKTYPE: '๊ณ ์ฉํํ', | ||
ELIGIBILITY_CRITERIA: '๋น์์กฐ๊ฑด', | ||
PREFERRED_CONDITIONS: '์ฐ๋์ฌํญ', | ||
SUBMIT: '๋ฑ๋กํ๊ธฐ', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
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', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export const RegisterCompany = { | ||
TITLE: 'ํ์ฌ ๋ฑ๋ก', | ||
LOGOIMAGE: 'ํ์ฌ ์ด๋ฏธ์ง ์ ๋ก๋(์ ํ)', | ||
COMPANYNAME: 'ํ์ฌ๋ช ', | ||
INDUSTRY_OCCUPATION: '์ ์ง์ข ', | ||
BRAND: '๋ธ๋๋', | ||
REVENUE_PERYEAR: '์ฐ ํ๊ท ๋งค์ถ์ก', | ||
SUBMIT: '๋ฑ๋กํ๊ธฐ', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
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รฝ', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.