Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

모집의뢰서 상세보기 수정 #76

Merged
merged 3 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/apis/recruitments/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export interface RecruitmentsDetailType extends RecruitmentsDetailTable {

export interface RecruitmentsDetailTable {
areas: AreasType[];
required_grade: number | null;
working_hours: string;
required_licenses: string[] | [];
hiring_progress: HiringProgressType[];
Expand All @@ -37,6 +36,9 @@ export interface RecruitmentsDetailTable {
start_date: string;
end_date: string;
etc: string | null;
winter_intern: boolean;
additional_qualifications: string | null;
integration_plan: boolean;
}

interface CodeType {
Expand Down
70 changes: 37 additions & 33 deletions src/components/recruitments/RecruitmentsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import React, { useCallback, useRef, useState } from "react";
function RecruitmentsTable({ ...rest }: RecruitmentsDetailTable) {
const {
areas,
required_grade,
working_hours,
required_licenses,
hiring_progress,
Expand All @@ -19,12 +18,19 @@ function RecruitmentsTable({ ...rest }: RecruitmentsDetailTable) {
start_date,
end_date,
etc,
winter_intern,
additional_qualifications,
integration_plan,
} = rest;

return (
<div className="drag mt-14 rounded-[12px] overflow-hidden border border-solid border-[#e5e5e5]">
<table>
<tbody>
<tr>
<td className="key">형태</td>
<td className="value">{winter_intern ? "체험형" : "채용형"}</td>
</tr>
{areas.map((item, index) => {
const [isOpen, setIsOpen] = useState<boolean>(false);
const parentRef = useRef<HTMLDivElement>(null);
Expand All @@ -40,7 +46,7 @@ function RecruitmentsTable({ ...rest }: RecruitmentsDetailTable) {
} else {
parentRef.current.style.height = `${childRef.current.clientHeight}px`;
}
setIsOpen(prev => !prev);
setIsOpen((prev) => !prev);
},
[isOpen]
);
Expand Down Expand Up @@ -70,13 +76,13 @@ function RecruitmentsTable({ ...rest }: RecruitmentsDetailTable) {
<tr>
<td className="key detail">직무</td>
<td className="value detail">
{item.job.map(item => item.name).join(", ")}
{item.job.map((item) => item.name).join(", ")}
</td>
</tr>
<tr>
<td className="key detail">기술스택</td>
<td className="leading-6 whitespace-pre value detail">
{item.tech.map(item => item.name).join("\n")}
{item.tech.map((item) => item.name).join("\n")}
</td>
</tr>
<tr>
Expand All @@ -100,57 +106,55 @@ function RecruitmentsTable({ ...rest }: RecruitmentsDetailTable) {
);
})}
<tr>
<td className="key">모집일</td>
<td className="key">필수 자격증</td>
<td className="value">
{start_date && end_date
? start_date + " ~ " + end_date
: "상시채용"}
</td>
</tr>
<tr>
<td className="key">최소성적</td>
<td className="value">
{required_grade ? required_grade + "%" : "-"}
{!!required_licenses.length ? required_licenses.join(", ") : "-"}
</td>
</tr>
<tr>
<td className="key">필수자격증</td>
<td className="value">
{!!required_licenses.length ? required_licenses.join(", ") : "-"}
</td>
<td className="key">기타 자격 요건</td>
<td className="value">{additional_qualifications || "-"}</td>
</tr>
<tr>
<td className="key">근무시간</td>
<td className="value">{working_hours}</td>
<td className="value">{working_hours}시간</td>
</tr>
<tr>
<td className="key">면접과정</td>
<td className="key">선발절차</td>
<td className="value">
{hiring_progress
.map(itme => hiringProgressEnum[itme])
.map((itme) => hiringProgressEnum[itme])
.join(" > ")}
</td>
</tr>
<tr>
<td className="key">실습 수당</td>
<td className="value">이스터에그 입니다 ^^<div className="easteregg" /></td>
</tr>
<tr>
<td className="key">정규직 전환 시</td>
<td className="value">안 보여 줄 거지롱~<div className="easteregg" /></td>
</tr>
<tr>
<td className="key">복지</td>
<td className="value">{benefits || "-"}</td>
</tr>
<tr>
<td className="key">병역특례 여부</td>
<td className="value">{military ? "있음" : "없음"}</td>
</tr>
{!winter_intern && (
<tr>
<td className="key">병역특례 여부</td>
<td className="value">{military ? "있음" : "없음"}</td>
</tr>
)}
<tr>
<td className="key">제출 서류</td>
<td className="value">{submit_document}</td>
</tr>
<tr>
<td className="key">모집 기간</td>
<td className="value">
{start_date && end_date
? start_date + " ~ " + end_date
: "상시채용"}
</td>
</tr>
{winter_intern && (
<tr>
<td className="key">현장실습 연계 계획</td>
<td className="value">{integration_plan ? "있음" : "없음"}</td>
</tr>
)}
<tr>
<td className="key">기타</td>
<td className="value">{etc || "-"}</td>
Expand Down
Loading