Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
phyuna0525 committed Nov 5, 2024
2 parents cb62591 + e4ab5f3 commit 2592dca
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 101 deletions.
16 changes: 3 additions & 13 deletions src/apis/companies/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,7 @@ export interface CompaniesDetailsTable {
main_zip_code: string;
main_address: string;
main_address_detail: string;
sub_zip_code: string | null;
sub_address: string | null;
sub_address_detail: string | null;
manager_name: string;
manager_phone_no: string;
sub_manager_name: string | null;
sub_manager_phone_no: string | null;
fax: string | null;
email: string;
representative_name: string;
representative_phone_no: string;
founded_at: string;
worker_number: number;
take: number;
Expand All @@ -42,10 +32,10 @@ export interface CompaniesDetailsTable {
}

export interface CompaniesForReviewType {
id: number,
name: string,
id: number;
name: string;
}

export interface GetCompaniesForReviewingResponse {
companies : CompaniesForReviewType[]
companies: CompaniesForReviewType[];
}
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
61 changes: 7 additions & 54 deletions src/components/company/CompanyTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,11 @@ import FilePreview from "../recruitments/apply/FilePreview";
function CompanyTable({ ...rest }: CompaniesDetailsTable) {
const {
representative_name,
representative_phone_no,
worker_number,
company_introduce,
main_zip_code,
main_address,
main_address_detail,
sub_zip_code,
sub_address,
sub_address_detail,
manager_name,
manager_phone_no,
sub_manager_name,
sub_manager_phone_no,
fax,
email,
founded_at,
take,
service_name,
Expand All @@ -36,12 +26,7 @@ function CompanyTable({ ...rest }: CompaniesDetailsTable) {
<td className="key">대표</td>
<td className="value">{representative_name}</td>
</tr>
<tr>
<td className="key">대표 번호</td>
<td className="value">
{pon_number_regex(representative_phone_no) || "-"}
</td>
</tr>

<tr>
<td className="key">직원 수</td>
<td className="value">{worker_number}</td>
Expand All @@ -55,51 +40,19 @@ function CompanyTable({ ...rest }: CompaniesDetailsTable) {
<td className="value">{company_introduce}</td>
</tr>
<tr>
<td className="key">회사 주소</td>
<td className="key">회사 주소(본사)</td>
<td className="value">
({main_zip_code}) {main_address}({main_address_detail})
</td>
</tr>
<tr>
<td className="key">지점 주소</td>
<td className="value">
{(sub_zip_code &&
sub_address &&
sub_address_detail &&
`(${sub_zip_code}) ${sub_address}(${sub_address_detail})`) ||
"-"}
</td>
</tr>
<tr>
<td className="key">담당자</td>
<td className="value">{manager_name}</td>
</tr>
<tr>
<td className="key">담당자 연락처</td>
<td className="value">{pon_number_regex(manager_phone_no)}</td>
</tr>
<tr>
<td className="key">부담당자</td>
<td className="value">{sub_manager_name || "-"}</td>
</tr>
<tr>
<td className="key">부담당자 연락처</td>
<td className="value">
{pon_number_regex(sub_manager_phone_no) || "-"}
</td>
</tr>
<tr>
<td className="key">팩스번호</td>
<td className="value">{pon_number_regex(fax) || "-"}</td>
</tr>
<tr>
<td className="key">이메일</td>
<td className="value">{email}</td>
</tr>
<tr>
<td className="key">설립일</td>
<td className="value">{founded_at}</td>
</tr>
<tr>
<td className="key">직원수</td>
<td className="value">{worker_number}</td>
</tr>
<tr>
<td className="key">연매출</td>
<td className="value">{take} 억원</td>
Expand All @@ -113,7 +66,7 @@ function CompanyTable({ ...rest }: CompaniesDetailsTable) {
<td className="value file">
{attachments.length === 0
? "-"
: attachments.map(fileUrl => (
: attachments.map((fileUrl) => (
<FilePreview
fileName={fileUrl.split("/")[1].slice(37)}
onClick={() => {
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

0 comments on commit 2592dca

Please sign in to comment.