-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨feat: 공고에 대한 지원자 목록 페이지 상단 공고 요약 파트 구현하기 #50
- Loading branch information
Showing
6 changed files
with
157 additions
and
5 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
115 changes: 115 additions & 0 deletions
115
src/components/Employer/ApplicantList/EmployerApplicantListTitle.tsx
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,115 @@ | ||
import Tag from '@/components/Common/Tag'; | ||
import LocationIcon from '@/assets/icons/LocationIcon.svg?react'; | ||
import ClockIcon from '@/assets/icons/ClockIcon.svg?react'; | ||
import MoneyIcon from '@/assets/icons/MoneyIcon.svg?react'; | ||
import TopRightArrowIcons from '@/assets/icons/Home/TopRightArrowIcon.svg?react'; | ||
import { PostSummaryItemType } from '@/types/post/postSummaryItem'; | ||
import { useEffect, useState } from 'react'; | ||
import { useNavigate, useParams } from 'react-router-dom'; | ||
|
||
// 더미데이터 4.7로 불러오기 | ||
const POST_SUMMARY_ITEM: PostSummaryItemType = { | ||
icon_img_url: 'https://example.com/icon.png', | ||
company_name: 'Global Translations Ltd.', | ||
title: 'General Interpretation & Translation', | ||
tags: { | ||
is_recruiting: true, | ||
visa: 'D_2_1', | ||
job_category: 'GENERAL_INTERPRETATION_TRANSLATION', | ||
}, | ||
summaries: { | ||
address: '123 Translation Ave, Seoul', | ||
houlry_rate: 15000, | ||
work_period: 'ONE_MONTH_TO_THREE_MONTHS', | ||
work_days_per_week: 5, | ||
}, | ||
}; | ||
|
||
const EmployerApplicantListTitle = () => { | ||
const navigate = useNavigate(); | ||
const { id } = useParams(); | ||
|
||
const [postData, setPostData] = useState<PostSummaryItemType>(); | ||
|
||
useEffect(() => { | ||
setPostData(POST_SUMMARY_ITEM); | ||
}, []); | ||
|
||
if (!postData) return <></>; | ||
|
||
return ( | ||
<section className="flex flex-col items-center gap-[0.25rem] w-full pt-[0.5rem]"> | ||
<div className='w-[5.125rem] h-[5.125rem] rounded-full bg-cover bg-center bg-[url("/src/assets/images/JobIconExample.jpeg")]'></div> | ||
<div className="flex flex-col gap-[0.5rem] text-center"> | ||
<p className="button-2 text-[#656565]">{postData.company_name}</p> | ||
<h2 className="text-[#33384B] font-bold text-lg">{postData.title}</h2> | ||
</div> | ||
<div className="flex gap-[0.25rem] my-[0.5rem]"> | ||
<Tag | ||
value={postData.tags.is_recruiting ? 'Opening' : 'Closed'} | ||
padding="0.375rem 0.75rem" | ||
isRounded={true} | ||
hasCheckIcon={false} | ||
backgroundColor="#1E1926" | ||
color="#F4F4F9" | ||
fontStyle="caption-1" | ||
/> | ||
<Tag | ||
value={postData.tags.job_category.replace(/_/g, ' ').toLowerCase()} | ||
padding="0.375rem 0.75rem" | ||
isRounded={true} | ||
hasCheckIcon={false} | ||
backgroundColor="#1E1926" | ||
color="#F4F4F9" | ||
fontStyle="caption-1" | ||
/> | ||
<Tag | ||
value={postData.tags.visa.replace(/_/g, '-')} | ||
padding="0.375rem 0.75rem" | ||
isRounded={true} | ||
hasCheckIcon={false} | ||
backgroundColor="#1E1926" | ||
color="#F4F4F9" | ||
fontStyle="caption-1" | ||
/> | ||
</div> | ||
<div className="grid grid-cols-2 gap-[0.5rem] py-[0.375rem] px-[1.5rem]"> | ||
<div className="flex justify-end gap-[0.5rem] px-[0.5rem]"> | ||
<LocationIcon className="min-w-[0.5rem]" /> | ||
<p className="text-[#464646] caption-1"> | ||
{postData.summaries.address} | ||
</p> | ||
</div> | ||
<div className="flex gap-[0.5rem] px-[0.5rem]"> | ||
<ClockIcon className="min-w-[0.5rem]" /> | ||
<p className="text-[#464646] caption-1"> | ||
{postData.summaries.work_days_per_week} days a week | ||
</p> | ||
</div> | ||
<div className="flex justify-end gap-[0.5rem] px-[0.5rem]"> | ||
<MoneyIcon className="min-w-[0.5rem]" /> | ||
<p className="text-[#464646] caption-1"> | ||
${postData.summaries.houlry_rate} | ||
</p> | ||
</div> | ||
<div className="flex gap-[0.5rem] px-[0.5rem]"> | ||
<ClockIcon className="min-w-[0.5rem]" /> | ||
<p className="text-[#464646] caption-1"> | ||
{postData.summaries.work_period.replace(/_/g, ' ').toLowerCase()} | ||
</p> | ||
</div> | ||
</div> | ||
<div className="w-full px-[1.5rem] py-[0.5rem] flex justify-end items-center gap-[0.625rem] bg-[#FFFFFF3D]"> | ||
<p className="caption-1 text-black">See my post</p> | ||
<button | ||
className="px-[0.625rem] py-[0.125rem] bg-[#1B1B1B] rounded-[1.313rem]" | ||
onClick={() => navigate(`/employer/post/${id}`)} | ||
> | ||
<TopRightArrowIcons /> | ||
</button> | ||
</div> | ||
</section> | ||
); | ||
}; | ||
|
||
export default EmployerApplicantListTitle; |
23 changes: 23 additions & 0 deletions
23
src/pages/Employer/ApplicantList/EmployerApplicantListPage.tsx
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 BaseHeader from '@/components/Common/Header/BaseHeader'; | ||
import EmployerApplicantListTitle from '@/components/Employer/ApplicantList/EmployerApplicantListTitle'; | ||
import { useNavigate } from 'react-router-dom'; | ||
|
||
const EmployerApplicantListPage = () => { | ||
const navigate = useNavigate(); | ||
|
||
return ( | ||
<> | ||
<div className="w-full bg-[#FEF387] rounded-b-[1.5rem]"> | ||
<BaseHeader | ||
hasBackButton={true} | ||
onClickBackButton={() => navigate('/employer/post')} | ||
hasMenuButton={true} | ||
title="지원자 조회" | ||
/> | ||
<EmployerApplicantListTitle /> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export default EmployerApplicantListPage; |
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,9 @@ | ||
import { SummariesType, TagType } from '@/types/postDetail/postDetailItem'; | ||
|
||
export type PostSummaryItemType = { | ||
icon_img_url: string; | ||
company_name: string; | ||
title: string; | ||
tags: TagType; | ||
summaries: SummariesType; | ||
}; |
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