Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/Weekly' into Weekly
Browse files Browse the repository at this point in the history
  • Loading branch information
tteokbokki-master committed Nov 14, 2024
2 parents 8570546 + 2626f87 commit 9684d42
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 26 deletions.
2 changes: 2 additions & 0 deletions src/apis/applicants/mocks/applicants.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const applicantList = [
applyId: 1,
applicantNation: '베트남',
koreanLanguageLevel: '중급',
contractExistence: false,
},
{
userId: 2,
Expand All @@ -28,5 +29,6 @@ export const applicantList = [
applyId: 2,
applicantNation: '베트남',
koreanLanguageLevel: '고급',
contractExistence: false,
},
];
6 changes: 4 additions & 2 deletions src/assets/translator/Applicants/applicantsData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const applicantsData = {
buttons: {
view_resume: '지원서',
create_contract: '계약하기',
complete_contract: '계약완료',
},
},
[Languages.VE]: {
Expand All @@ -25,8 +26,9 @@ export const applicantsData = {
korean_language_level: 'Trình độ tiếng Hàn',
},
buttons: {
view_resume: 'Hồ sơ ứng tuyển',
create_contract: 'Ký hợp đồng',
view_resume: 'Hồ sơ ứng viên',
create_contract: 'Tạo hợp đồng',
complete_contract: 'Hoàn thành hợp đồng',
},
},
};
14 changes: 7 additions & 7 deletions src/assets/translator/EmployeeMyPage/employeeMyPageData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ export const employeeMyPageData = {
REGISTER_RESUME: '이력서 등록',
REGISTER_SIGN: '사인 등록',
REGISTER_VISA: '외국인 번호 및 비자 등록',
UPDATE_RESUME: '이력서 수정',
UPDATE_SIGN: '사인 수정',
UPDATE_VISA: '외국인 번호 및 비자 수정',
COMPLETE_RESUME: '이력서 등록 완료',
COMPLETE_SIGN: '사인 등록 완료',
COMPLETE_VISA: '외국인 번호 및 비자 등록 완료',
MYRECRUITLIST: '내가 지원한 공고',
},
[Languages.VE]: {
REGISTER_RESUME: 'Đăng ký hồ sơ',
REGISTER_SIGN: 'Đăng ký chữ ký',
REGISTER_VISA: 'Đăng ký số người nước ngoài và visa',
UPDATE_RESUME: 'Cập nhật hồ sơ',
UPDATE_SIGN: 'Cập nhật chữ ký',
UPDATE_VISA: 'Cập nhật số người nước ngoài và visa',
REGISTER_VISA: 'Đăng ký số nước ngoài và visa',
COMPLETE_RESUME: 'Hoàn thành đăng ký hồ sơ',
COMPLETE_SIGN: 'Hoàn thành đăng ký chữ ký',
COMPLETE_VISA: 'Hoàn thành đăng ký số nước ngoài và visa',
MYRECRUITLIST: 'Công việc tôi đã ứng tuyển',
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Button, Icon, Typo } from '@/components/common';
import { useTranslation } from 'react-i18next';
import { useGetRequiredFieldCheck } from '@/apis/recruitmentsDetail/useRequiredFieldCheck';
import { type RequiredFieldCheckProps } from '@/pages/recruit/RecruitType';
import { css } from '@emotion/react';

export default function ButtonGroup() {
const { t } = useTranslation();
Expand All @@ -21,34 +22,40 @@ export default function ButtonGroup() {
return (
<ColumnSection>
<ActiveButton
design="outlined"
design={resumeExistence ? 'deactivate' : 'outlined'}
css={resumeExistence ? deactiveButtonStyle : activateButtonStyle}
style={{ borderRight: '3px solid #0a65cc' }}
onClick={() => {
navigate(ROUTE_PATH.RESUME);
}}
disabled={resumeExistence}
>
<Typo bold>{resumeExistence ? t('employeeMyPage.UPDATE_RESUME') : t('employeeMyPage.REGISTER_RESUME')}</Typo>
<Typo bold>{resumeExistence ? t('employeeMyPage.COMPLETE_RESUME') : t('employeeMyPage.REGISTER_RESUME')}</Typo>
{resumeExistence ? <Icon.EmployeePage.Check /> : <Icon.EmployeePage.Bag />}
</ActiveButton>
<ActiveButton
design="outlined"
design={signExistence ? 'deactivate' : 'outlined'}
css={signExistence ? deactiveButtonStyle : activateButtonStyle}
style={{ borderRight: '3px solid #0a65cc' }}
onClick={() => {
navigate(ROUTE_PATH.REGISTERSIGN);
}}
disabled={signExistence}
>
<Typo bold>{signExistence ? t('employeeMyPage.UPDATE_SIGN') : t('employeeMyPage.REGISTER_SIGN')}</Typo>
<Typo bold>{signExistence ? t('employeeMyPage.COMPLETE_SIGN') : t('employeeMyPage.REGISTER_SIGN')}</Typo>
{signExistence ? <Icon.EmployeePage.Check /> : <Icon.EmployeePage.Pen />}
</ActiveButton>
<ActiveButton
design="outlined"
design={visaExistence ? 'deactivate' : 'outlined'}
css={visaExistence ? deactiveButtonStyle : activateButtonStyle}
onClick={() => {
navigate(ROUTE_PATH.REGISTER_VISA);
}}
disabled={visaExistence}
>
<Typo bold>
{visaExistence && foreignerIdNumberExistence
? t('employeeMyPage.UPDATE_VISA')
? t('employeeMyPage.COMPLETE_VISA')
: t('employeeMyPage.REGISTER_VISA')}
</Typo>
{visaExistence && foreignerIdNumberExistence ? <Icon.EmployeePage.Check /> : <Icon.EmployeePage.Card />}
Expand All @@ -71,10 +78,15 @@ const ActiveButton = styled(Button)`
border-radius: 0;
border: 0;
color: #000;
`;

export const deactiveButtonStyle = css``;

export const activateButtonStyle = css`
${deactiveButtonStyle};
transition:
background-color 0.3s,
background-image 0.3s; // 배경 색상과 이미지 애니메이션
background-image 0.3s;
&:hover {
* {
color: #fff;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,30 @@ type Props = {
};

type DownloadContractProps = {
imageUrl: string;
imageUrlV: string;
url: string;
urlV: string;
};

export default function MyRecruitCard({ myRecruit }: Props) {
const { image, title, area, status, applyId } = myRecruit;
const buttonStyle = getStateStyle(status);
const navigate = useNavigate();
const { data: imgURLs } = useGetContractImg(applyId);

// 근로계약서 이미지 다운로드
const downloadContract = () => {
const { data: imgURLs } = useGetContractImg(applyId);
const imgData: DownloadContractProps = imgURLs;
const link = document.createElement('a');
link.href = imgData.imageUrlV;
link.href = imgData.urlV;
link.download = 'downloaded_image';
console.log(imgData);
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
};

return (
<Card
borderColor="blue"
borderRadius="4px"
css={{
width: '100%',
Expand All @@ -69,6 +69,7 @@ export default function MyRecruitCard({ myRecruit }: Props) {
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
border: '1px solid #0A65CC',
}}
>
<Image
Expand Down
11 changes: 9 additions & 2 deletions src/pages/applicantsPage/ApplicantList/ApplicantsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,15 @@ export default function ApplicantsTable({ applicantList }: Props) {
>
{t('applicants.buttons.view_resume')}
</Button>
<Button css={buttonStyle} onClick={() => openModal(applicant.userId, applicant.applyId)}>
{t('applicants.buttons.create_contract')}
<Button
design={applicant.contractExistence ? 'deactivate' : 'default'}
css={buttonStyle}
onClick={() => openModal(applicant.userId, applicant.applyId)}
disabled={applicant.contractExistence}
>
{applicant.contractExistence
? t('applicants.buttons.complete_contract')
: t('applicants.buttons.create_contract')}
</Button>
</Flex>
</Td>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/myPage/employee/EmployeeMyPage.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Flex, InnerContainer, Spinner, Typo } from '@/components/common';
import Layout from '@/features/layout';
import styled from '@emotion/styled';
import MyRecruitList from '../../../features/employee/myPage/MyRecruitList';
import MyRecruitList from '../../../features/myPage/employee/components/MyRecruitList';
import { useGetMyApplication } from '@/apis/employee/hooks/useGetMyApplication';
import { useTranslation } from 'react-i18next';
import ProfileSection from '@/features/employee/myPage/ProfileSection';
import ProfileSection from '@/features/myPage/employee/components/ProfileSection';
import { css } from '@emotion/react';
export default function EmployeeMyPage() {
const { t } = useTranslation();
Expand Down
1 change: 1 addition & 0 deletions src/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export type ApplicantData = {
applyId: number;
applicantNation: string;
koreanLanguageLevel: string;
contractExistence: boolean;
};

export type ForeignerData = {
Expand Down

0 comments on commit 9684d42

Please sign in to comment.