Skip to content

Commit

Permalink
Merge pull request #111 from YIMSEBIN/Weekly
Browse files Browse the repository at this point in the history
Feat/#108 ๋ฒˆ์—ญ๋ฐ์ดํ„ฐ ์ ์šฉ
  • Loading branch information
YIMSEBIN authored Nov 7, 2024
2 parents 5857be2 + ebe403b commit 92ce097
Show file tree
Hide file tree
Showing 12 changed files with 265 additions and 91 deletions.
18 changes: 1 addition & 17 deletions src/apis/postNotice/hooks/usePostNotice.ts
Original file line number Diff line number Diff line change
@@ -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) => {
Expand Down
2 changes: 0 additions & 2 deletions src/assets/translator/EmployeeMyPage/employeeMyPageData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ 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',
Expand Down
26 changes: 19 additions & 7 deletions src/assets/translator/PostNotice/postNoticeData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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รฝ',
},
};
12 changes: 12 additions & 0 deletions src/assets/translator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import { recruitData } from './Recruit/recruitData';
import { registerVisaData } from './RegisterVisa/registerVisaData';
import { resumeData } from './Resume/resumeData';
import { registerSignData } from './registerSign/registerSignData';
import { contractData } from './Contract/contractData';
import { employeeMyPageData } from './EmployeeMyPage/employeeMyPageData';
import { postNoticeData } from './PostNotice/postNoticeData';
import { registerCompanyData } from './RegisterCompany/registerCompanyData';

export const KO = {
resume: { ...resumeData[Languages.KO] },
Expand All @@ -25,6 +29,10 @@ export const KO = {
applyGuide: { ...applyGuideData[Languages.KO] },
apply: { ...applyData[Languages.KO] },
registerSign: { ...registerSignData[Languages.KO] },
contract: { ...contractData[Languages.KO] },
employeeMyPage: { ...employeeMyPageData[Languages.KO] },
postNotice: { ...postNoticeData[Languages.KO] },
registerCompany: { ...registerCompanyData[Languages.KO] },
};

export const VE = {
Expand All @@ -40,4 +48,8 @@ export const VE = {
applyGuide: { ...applyGuideData[Languages.VE] },
apply: { ...applyData[Languages.VE] },
registerSign: { ...registerSignData[Languages.VE] },
contract: { ...contractData[Languages.VE] },
employeeMyPage: { ...employeeMyPageData[Languages.VE] },
postNotice: { ...postNoticeData[Languages.VE] },
registerCompany: { ...registerCompanyData[Languages.VE] },
};
5 changes: 3 additions & 2 deletions src/components/common/Input/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ import styled from '@emotion/styled';

interface Props extends InputHTMLAttributes<HTMLInputElement> {
label?: string;
labelStyle?: React.CSSProperties;
}

export default function Input({ label, ...rest }: Props) {
export default function Input({ label, labelStyle, ...rest }: Props) {
return (
<>
{label && <label>{label}</label>}
{label && <label style={{ ...labelStyle }}>{label}</label>}
<InputContainer {...rest} />
</>
);
Expand Down
7 changes: 1 addition & 6 deletions src/features/employee/myPage/EmployeeProfile.tsx
Original file line number Diff line number Diff line change
@@ -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({
Expand Down Expand Up @@ -39,11 +39,6 @@ export default function EmployeeProfile({
</Typo>
</TextSection>
</ProfileSection>
<Button
style={{ width: '150px', height: '40px', backgroundColor: 'white', fontSize: '12px', padding: '10px 30px' }}
>
ํ”„๋กœํ•„ ์ˆ˜์ •ํ•˜๊ธฐ
</Button>
</Card>
);
}
Expand Down
26 changes: 14 additions & 12 deletions src/pages/contract/EmployeeContract/EmployeeContract.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Button, Flex, Typo } from '@/components/common';
import Layout from '@/features/layout';
import ROUTE_PATH from '@/routes/path';
import styled from '@emotion/styled';
import { useTranslation } from 'react-i18next';
import { useNavigate, useParams } from 'react-router-dom';

export type ContractResponseData = {
Expand All @@ -17,6 +18,7 @@ export type ContractResponseData = {
};

export default function EmployeeContract() {
const { t } = useTranslation();
const { applyId } = useParams();
const applicationId = Number(applyId);
const { data: contract } = useGetMyContract(applicationId);
Expand Down Expand Up @@ -46,50 +48,50 @@ export default function EmployeeContract() {
<LineWrapper>
<Flex direction="column" justifyContent="space-between" alignItems="center" style={{ width: '100%' }}>
<Typo element="h1" size="24px" style={{ fontWeight: 'bold', marginBottom: '24px' }}>
๊ทผ ๋กœ ๊ณ„ ์•ฝ ์„œ
{t('contract.CONTRACT')}
</Typo>
<InputWrapper>
<InputContainer>
<Typo>1. ๊ทผ๋ฌด์žฅ์†Œ</Typo>
<Typo>{t('contract.WORKING_PLACE')}</Typo>
<Typo>{contractData.workingPlace}</Typo>
</InputContainer>
<InputContainer>
<Typo>2. ์—…๋ฌด๋‚ด์šฉ</Typo>
<Typo>{t('contract.RESPONSIBILITIES')}</Typo>
<Typo>{contractData.responsibilities}</Typo>
</InputContainer>
<InputContainer>
<Typo>3. ๊ทผ๋กœ์ผ ๋ฐ ๊ทผ๋กœ์ผ๋ณ„ ๊ทผ๋กœ์‹œ๊ฐ„</Typo>
<Typo>{t('contract.WORKING_HOURS')}</Typo>
<Typo>{contractData.workingHours}</Typo>
</InputContainer>
<InputContainer>
<Typo>4. ์ฃผํœด์ผ</Typo>
<Typo>{t('contract.DAY_OFF')}</Typo>
<Typo>{contractData.dayOff}</Typo>
</InputContainer>
<InputContainer>
<Typo>5. ์ž„๊ธˆ</Typo>
<Typo>{t('contract.SALARY')}</Typo>
<Typo>{contractData.salary}</Typo>
</InputContainer>
<InputContainer>
<Typo>6. ์—ฐ์ฐจ์œ ๊ธ‰ํœด๊ฐ€</Typo>
<Typo>{t('contract.ANNUAL_PAID_LEAVE')}</Typo>
<Typo>{contractData.annualPaidLeave}</Typo>
</InputContainer>
<InputContainer>
<Typo>7. ์ทจ์—…๊ทœ์น™</Typo>
<Typo>{t('contract.RULE')}</Typo>
<Typo>{contractData.rule}</Typo>
</InputContainer>
</InputWrapper>
<Typo element="p" size="16px" style={{ fontWeight: 'bold', marginTop: '24px' }}>
์‚ฌ์šฉ์ž์™€ ๊ทผ๋กœ์ž๋Š” ๊ฐ์ž๊ฐ€ ๊ทผ๋กœ๊ณ„์•ฝ, ์ทจ์—…๊ทœ์น™, ๋‹จ์ฒดํ˜‘์•ฝ์„ ์ง€ํ‚ค๊ณ  ์„ฑ์‹คํ•˜๊ฒŒ ์ดํ–‰ํ•˜์—ฌ์•ผ ํ•œ๋‹ค.
{t('contract.SENTENCE1')}
</Typo>
<Typo element="p" size="16px" style={{ fontWeight: 'bold', marginTop: '24px' }}>
์ด ๊ณ„์•ฝ์—์„œ ์ •ํ•˜์ง€ ์•Š์€ ์‚ฌํ•ญ์€ '๊ทผ๋กœ๊ธฐ์ค€๋ฒ•'์—์„œ ์ •ํ•˜๋Š” ๋ฐ”์— ๋”ฐ๋ฅธ๋‹ค.
{t('contract.SENTENCE2')}
</Typo>
<ButtonWrapper>
<Button design="outlined" style={{ marginRight: '16px' }}>
์„œ๋ช…ํ•˜๊ธฐ
{t('contract.SIGN')}
</Button>
<Button design="default" onClick={handlePostSignEmployeeContract} style={{}}>
์ œ์ถœํ•˜๊ธฐ
{t('contract.SUBMIT')}
</Button>
</ButtonWrapper>
</Flex>
Expand Down
41 changes: 29 additions & 12 deletions src/pages/contract/EmployerContract/EmployerContract.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -51,52 +53,67 @@ export default function EmployerContract() {
<LineWrapper>
<Flex direction="column" justifyContent="space-between" alignItems="center" style={{ width: '100%' }}>
<Typo element="h1" size="24px" style={{ fontWeight: 'bold', marginBottom: '24px' }}>
๊ทผ ๋กœ ๊ณ„ ์•ฝ ์„œ
{t('contract.CONTRACT')}
</Typo>
<InputWrapper>
<InputContainer>
<Input label="1. ๊ทผ๋ฌด์žฅ์†Œ" value={workingPlace} onChange={onChange} style={InputStyle}></Input>
<Input
label={t('contract.WORKING_PLACE')}
value={workingPlace}
onChange={onChange}
style={InputStyle}
></Input>
</InputContainer>
<InputContainer>
<Input label="2. ์—…๋ฌด๋‚ด์šฉ" value={responsibilities} onChange={onChange} style={InputStyle}></Input>
<Input
label={t('contract.RESPONSIBILITIES')}
value={responsibilities}
onChange={onChange}
style={InputStyle}
></Input>
</InputContainer>
<InputContainer>
<Input
label="3. ๊ทผ๋กœ์ผ ๋ฐ ๊ทผ๋กœ์ผ๋ณ„ ๊ทผ๋กœ์‹œ๊ฐ„"
label={t('contract.WORKING_HOURS')}
value={workingHours}
onChange={onChange}
style={InputStyle}
></Input>
</InputContainer>
<InputContainer>
<Input label="4. ์ฃผํœด์ผ" value={dayOff} onChange={onChange} style={InputStyle}></Input>
<Input label={t('contract.DAY_OFF')} value={dayOff} onChange={onChange} style={InputStyle}></Input>
</InputContainer>
<InputContainer>
<Input label="5. ์ž„๊ธˆ" value={salary} onChange={onChange} style={InputStyle}></Input>
<Input label={t('contract.SALARY')} value={salary} onChange={onChange} style={InputStyle}></Input>
</InputContainer>
<InputContainer>
<Input label="6. ์—ฐ์ฐจ์œ ๊ธ‰ํœด๊ฐ€" value={annualPaidLeave} onChange={onChange} style={InputStyle}></Input>
<Input
label={t('contract.ANNUAL_PAID_LEAVE')}
value={annualPaidLeave}
onChange={onChange}
style={InputStyle}
></Input>
</InputContainer>
<InputContainer>
<Input label="7. ์ทจ์—…๊ทœ์น™" value={rule} onChange={onChange} style={InputStyle}></Input>
<Input label={t('contract.RULE')} value={rule} onChange={onChange} style={InputStyle}></Input>
</InputContainer>
</InputWrapper>
<Typo element="p" size="16px" style={{ fontWeight: 'bold', marginTop: '24px' }}>
์‚ฌ์šฉ์ž์™€ ๊ทผ๋กœ์ž๋Š” ๊ฐ์ž๊ฐ€ ๊ทผ๋กœ๊ณ„์•ฝ, ์ทจ์—…๊ทœ์น™, ๋‹จ์ฒดํ˜‘์•ฝ์„ ์ง€ํ‚ค๊ณ  ์„ฑ์‹คํ•˜๊ฒŒ ์ดํ–‰ํ•˜์—ฌ์•ผ ํ•œ๋‹ค.
{t('contract.SENTENCE1')}
</Typo>
<Typo element="p" size="16px" style={{ fontWeight: 'bold', marginTop: '24px' }}>
์ด ๊ณ„์•ฝ์—์„œ ์ •ํ•˜์ง€ ์•Š์€ ์‚ฌํ•ญ์€ '๊ทผ๋กœ๊ธฐ์ค€๋ฒ•'์—์„œ ์ •ํ•˜๋Š” ๋ฐ”์— ๋”ฐ๋ฅธ๋‹ค.
{t('contract.SENTENCE2')}
</Typo>
<ButtonWrapper>
<div>
<>
<input type="checkbox" />
<label>์„œ๋ช…ํ•˜๊ธฐ</label>
<label>{t('contract.SIGN')}</label>
</>
</div>
<div>
<Button design="default" onClick={handlePostContract}>
์ œ์ถœํ•˜๊ธฐ
{t('contract.SUBMIT')}
</Button>
</div>
</ButtonWrapper>
Expand Down
10 changes: 6 additions & 4 deletions src/pages/myPage/employee/EmployeeMyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -24,7 +26,7 @@ export default function EmployeeMyPage() {
navigate(ROUTE_PATH.RESUME);
}}
>
<Typo bold>์ด๋ ฅ์„œ ๋“ฑ๋ก</Typo>
<Typo bold>{t('employeeMyPage.REGISTER_RESUME')}</Typo>
<Icon.EmployeePage.Bag />
</CardButton>
<CardButton
Expand All @@ -33,7 +35,7 @@ export default function EmployeeMyPage() {
navigate(ROUTE_PATH.REGISTERSIGN);
}}
>
<Typo bold>์‚ฌ์ธ ๋“ฑ๋ก</Typo>
<Typo bold>{t('employeeMyPage.REGISTER_SIGN')}</Typo>
<Icon.EmployeePage.Pen />
</CardButton>
<CardButton
Expand All @@ -42,14 +44,14 @@ export default function EmployeeMyPage() {
navigate(ROUTE_PATH.REGISTER_VISA);
}}
>
<Typo bold>์™ธ๊ตญ์ธ ๋ฒˆํ˜ธ ๋ฐ ๋น„์ž ๋ฐœ๊ธ‰ ์ผ์ž ๋“ฑ๋ก</Typo>
<Typo bold>{t('employeeMyPage.REGISTER_VISA')}</Typo>
<Icon.EmployeePage.Card />
</CardButton>
</ColumnSection>
</Section>
<Section>
<Typo bold element="h3" size="20px" style={{ marginBottom: '24px' }}>
๋‚ด๊ฐ€ ์ง€์›ํ•œ ๊ณต๊ณ 
{t('employeeMyPage.MYRECRUITLIST')}
</Typo>
{myRecruitList && <MyRecruitList myRecruitList={myRecruitList} />}
</Section>
Expand Down
Loading

0 comments on commit 92ce097

Please sign in to comment.