-
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.
Browse files
Browse the repository at this point in the history
어드민 원서 상세조회 지원자 페이지 개발
- Loading branch information
Showing
5 changed files
with
90 additions
and
2 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
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
76 changes: 76 additions & 0 deletions
76
apps/admin/src/components/form/FormDetailContent/지원자정보/지원자정보.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,76 @@ | ||
import DataBox from '@/components/common/DataBox/DataBox'; | ||
import { useFormDetailQuery } from '@/services/form/queries'; | ||
import { color } from '@maru/theme'; | ||
import { Column, Row, Text } from '@maru/ui'; | ||
import { flex } from '@maru/utils'; | ||
import Image from 'next/image'; | ||
import styled from 'styled-components'; | ||
|
||
interface Props { | ||
id: number; | ||
} | ||
|
||
const 지원자정보 = ({ id }: Props) => { | ||
const { data: formDetailData } = useFormDetailQuery(id); | ||
|
||
const birthday = formDetailData?.applicant.birthday; | ||
|
||
const formatBirthday = (birthday?: string) => { | ||
if (!birthday) return ''; | ||
const splitBirthday = birthday.split('-'); | ||
splitBirthday.splice(1, 0, '년 '); | ||
splitBirthday.splice(3, 0, '월 '); | ||
splitBirthday.push('일'); | ||
return splitBirthday.join(''); | ||
}; | ||
|
||
return ( | ||
<Column gap={24}> | ||
<Row gap={24}> | ||
<DataBox label="이름" data={formDetailData?.applicant.name ?? ''} /> | ||
<DataBox | ||
label="생년월일" | ||
data={formatBirthday(formDetailData?.applicant.birthday)} | ||
/> | ||
</Row> | ||
<Row gap={24}> | ||
<DataBox label="이름" data={formDetailData?.applicant.name ?? ''} /> | ||
<DataBox | ||
label="생년월일" | ||
data={formatBirthday(formDetailData?.applicant.birthday)} | ||
/> | ||
</Row> | ||
<ProfileImageDataBox> | ||
<Text fontType="H4">증명사진</Text> | ||
<ProfileImageBox> | ||
{formDetailData ? ( | ||
<Image | ||
src={formDetailData.applicant.identificationPictureUri ?? ''} | ||
alt="profile-image" | ||
width={225} | ||
height={300} | ||
/> | ||
) : null} | ||
</ProfileImageBox> | ||
</ProfileImageDataBox> | ||
</Column> | ||
); | ||
}; | ||
|
||
export default 지원자정보; | ||
|
||
const ProfileImageDataBox = styled.div` | ||
${flex({ flexDirection: 'column' })} | ||
gap: 16px; | ||
width: 604px; | ||
height: 392px; | ||
padding: 24px; | ||
border-radius: 12px; | ||
border: 1px solid ${color.gray200}; | ||
background: ${color.white}; | ||
`; | ||
|
||
const ProfileImageBox = styled.div` | ||
width: 225px; | ||
height: 300px; | ||
`; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.