diff --git a/package.json b/package.json index 388b953..4a45a4f 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "dev": "next dev", - "build": "next build && next export", + "build": "next build", "start": "next start", "lint": "next lint" }, diff --git a/src/apis/recruitments/type.ts b/src/apis/recruitments/type.ts index cb6aa5f..6346279 100644 --- a/src/apis/recruitments/type.ts +++ b/src/apis/recruitments/type.ts @@ -21,13 +21,13 @@ export interface RecruitmentsDetailType extends RecruitmentsDetailTable { export interface RecruitmentsDetailTable { areas: AreasType[]; - preferential_treatment: string; required_grade: number | null; - work_hours: number; + start_time: string; + end_time: string; required_licenses: string[] | []; hiring_progress: HiringProgressType[]; train_pay: number; - pay: number; + pay: string | null; benefits: string | null; military: boolean; submit_document: string; @@ -42,6 +42,7 @@ export interface AreasType { tech: string[]; hiring: number; major_task: string; + preferential_treatment: string | null; } export interface GetNumberOfPagesType { diff --git a/src/apis/user/index.ts b/src/apis/user/index.ts index a76cfd5..405f891 100644 --- a/src/apis/user/index.ts +++ b/src/apis/user/index.ts @@ -22,10 +22,10 @@ export const Login = (body: RequestBody, checkBoxValue: boolean) => { }, { onSuccess: (res) => { - if (res.authority !== "STUDENT") { + if (res.authority !== "STUDENT" && res.authority !== "DEVELOPER") { append({ - title: "해당 서비스를 사용할 수 없는 계정입니다.", - message: "", + title: "", + message: "해당 서비스를 이용할 수 없는 계정입니다.", type: "RED", }); } else { diff --git a/src/apis/user/type.ts b/src/apis/user/type.ts index 673ae37..0e8db49 100644 --- a/src/apis/user/type.ts +++ b/src/apis/user/type.ts @@ -1,4 +1,4 @@ -type AuthorityType = "TEACHER" | "STUDENT" | "COMPANY"; +type AuthorityType = "TEACHER" | "STUDENT" | "COMPANY" | "DEVELOPER"; export interface RequestBody { account_id: string; diff --git a/src/components/account/login/loginInputsComponents.tsx b/src/components/account/login/loginInputsComponents.tsx index c0f1627..85a2ce8 100644 --- a/src/components/account/login/loginInputsComponents.tsx +++ b/src/components/account/login/loginInputsComponents.tsx @@ -7,10 +7,10 @@ import React, { useState } from "react"; interface PropsType { inputStates: RequestBody; handleChange: (e: React.ChangeEvent) => void; + enterEvent: () => void; } -function LoginInputs({ inputStates, handleChange }: PropsType) { - const [isHidden, setIsHidden] = useState(true); +function LoginInputs({ inputStates, handleChange, enterEvent }: PropsType) { return (
{ - setIsHidden((prev) => !prev); - }} - customType={isHidden ? "EyesClose" : "EyesOpen"} - type={isHidden ? "password" : "text"} + enterEvent={enterEvent} + type="password" />
); diff --git a/src/components/account/login/loginStateManagement.tsx b/src/components/account/login/loginStateManagement.tsx index e9cc371..5d37bd3 100644 --- a/src/components/account/login/loginStateManagement.tsx +++ b/src/components/account/login/loginStateManagement.tsx @@ -22,7 +22,11 @@ export default function LoginStateMenagement() { return (
- + { - customType?: "Text" | "Search" | "EyesClose" | "EyesOpen"; + customType?: "Search" | "EyesClose" | "EyesOpen"; enterEvent?: () => void; onChange: (e: React.ChangeEvent) => void; label?: string; @@ -16,16 +16,18 @@ function TextFiled({ value, placeholder, onChange, - customType = "Text", + customType, name, enterEvent, width, height, label, - type, + type = "text", }: PropsType) { const [focus, setFocuse] = useState(false); - const onKeyDown = (e: KeyboardEvent) => { + const [isHidden, setIsHidden] = useState(true); + + const isKeyDownToEnter = (e: KeyboardEvent) => { if (e.key === "Enter") if (enterEvent) enterEvent(); }; @@ -47,12 +49,12 @@ function TextFiled({ > { setFocuse(true); }} @@ -60,12 +62,16 @@ function TextFiled({ setFocuse(false); }} /> - {customType !== "Text" && ( + {type !== "text" && (
setIsHidden((prev) => !prev)} > - +
)}
diff --git a/src/components/recruitments/RecruitmentsTable.tsx b/src/components/recruitments/RecruitmentsTable.tsx index 67a144c..7e0071e 100644 --- a/src/components/recruitments/RecruitmentsTable.tsx +++ b/src/components/recruitments/RecruitmentsTable.tsx @@ -2,15 +2,16 @@ import { RecruitmentsDetailTable } from "@/apis/recruitments/type"; import { hiringProgressEnum } from "@/util/enum"; +import { time_parsing } from "@/util/regex"; import { Icon } from "@team-return/design-system"; import React, { useState } from "react"; function RecruitmentsTable({ ...rest }: RecruitmentsDetailTable) { const { areas, - preferential_treatment, required_grade, - work_hours, + start_time, + end_time, required_licenses, hiring_progress, train_pay, @@ -71,15 +72,17 @@ function RecruitmentsTable({ ...rest }: RecruitmentsDetailTable) { 수행업무 {item.major_task} + + 우대사항 + + {item.preferential_treatment || "-"} + + )} ); })} - - 우대사항 - {preferential_treatment || "-"} - 최소성적 {required_grade || "-"} @@ -92,7 +95,9 @@ function RecruitmentsTable({ ...rest }: RecruitmentsDetailTable) { 근무시간 - {work_hours} 시간 + + {time_parsing(start_time)} ~ {time_parsing(end_time)} + 면접과정 diff --git a/src/util/regex.ts b/src/util/regex.ts index 50f852d..a1c0e30 100644 --- a/src/util/regex.ts +++ b/src/util/regex.ts @@ -13,3 +13,7 @@ export const pon_number_regex = (number: string | null) => { return number; }; + +export const time_parsing = (time: string) => { + return time.slice(0, 5); +};