diff --git a/src/components/JD/Experience.tsx b/src/components/JD/Experience.tsx index 2263bb5..a66bda7 100644 --- a/src/components/JD/Experience.tsx +++ b/src/components/JD/Experience.tsx @@ -10,6 +10,7 @@ import { QuestionType } from "../../types/experience"; import { bookmarkpatch } from "../../services/JD/bookmarkApi"; import { getCookie } from "../../services/cookie"; import { useParams } from "react-router-dom"; +import { getAllExperienceList } from "../../services/JD/ExperienceApi"; interface ExpProps { type?: "card" | "section"; @@ -26,7 +27,7 @@ interface ExpProps { detail?: QuestionType[]; checkedKeywords?: string[]; onClick?: () => void; - handleApi?: (jdid: string, token: string) => void; + handleApi?: (jdId: string, token: string) => Promise; } const Experience: React.FC = ({ @@ -52,6 +53,19 @@ const Experience: React.FC = ({ // 카드 타입, 섹션 타입 구분 const isSection = type === "section"; + const getExperienceList = async (jdId: string, token: string) => { + try { + const response = await getAllExperienceList(jdId, token); + //console.log(response); + if (handleApi) { + handleApi(jdId, user.token); + } + } catch (error) { + console.error(error); + alert(JSON.stringify(error)); + } + }; + // 경험의 선택된 질문 답변 const answer = detail?.[(question || 1) - 1]?.answer; @@ -69,13 +83,12 @@ const Experience: React.FC = ({ ) => { try { const response = await bookmarkpatch(token, jobId, expId); - console.log(response); if (jdId && user.token) { handleApi!(jdId, user.token); } } catch (error) { - console.error(error); - alert(JSON.stringify(error)); + // console.error(error); + // alert(JSON.stringify(error)); } }; diff --git a/src/components/JD/ExperienceList.tsx b/src/components/JD/ExperienceList.tsx index 65431b0..7168f00 100644 --- a/src/components/JD/ExperienceList.tsx +++ b/src/components/JD/ExperienceList.tsx @@ -23,6 +23,7 @@ import { useParams } from "react-router-dom"; import { formatDateRange } from "../../pages/JDListPage"; import { KeywordType } from "../../types/experience"; import { getKeywords } from "../../services/Experience/keywordApi"; +import { select } from "d3"; type TabType = "basic" | "my"; @@ -259,6 +260,16 @@ const ExperienceList: React.FC = ({ } }, [searchText]); + useEffect(() => { + setSearchText(""); + setMainTag({ id: "", name: "" }); + setSubTag({ id: "", name: "" }); + setCheckedKeywords([]); + if (jdId) { + getExperienceList(jdId, user.token); + } + }, [selectedTab]); + // My 역량 키워드 조회 useEffect(() => { if (user?.token) { @@ -493,6 +504,7 @@ const ExperienceList: React.FC = ({ (item: KeywordType) => item.name )} onClick={() => setshowDetail(true)} + handleApi={getExperienceList} /> ))} diff --git a/src/components/JD/JDEditModal.tsx b/src/components/JD/JDEditModal.tsx index 1a00c7e..734c7df 100644 --- a/src/components/JD/JDEditModal.tsx +++ b/src/components/JD/JDEditModal.tsx @@ -1,6 +1,6 @@ import React, { FC } from "react"; import styled from "styled-components"; -import warning from "../../assets/icons/icon_warning.svg"; +import warning from "../../assets/icons/icon_delete_warning.svg"; import { useNavigate } from "react-router-dom"; interface ModalProps { @@ -21,12 +21,7 @@ const JDEditModal: FC = ({ isOpen, onClose, jdId }) => { warning
이전 페이지로 돌아가시겠어요?
-
- 저장하지 않으면 -
- 입력한 내용은 복원할 수 없어요! -
-
+
작성하던 공고가 저장되지 않아요!
@@ -81,7 +76,7 @@ const MainWrapper = styled.div` .maintext { color: var(--neutral-700, #343A5D); text-align: center; - font-size: 1.375rem; + font-size: 22px; font-style: normal; font-weight: 600; line-height: 1.625rem; @@ -91,17 +86,13 @@ const MainWrapper = styled.div` .subtext { color: var(--neutral-500, #A6AAC0); text-align: center; - font-size: 1rem; + font-size: 16px; font-style: normal; - font-weight: 500; - line-height: 1.25rem; - letter-spacing: -0.02rem; - margin-top: 1.25rem; - span{ - color: var(--main-500, #7D82FF); - font-size: 1.2rem; - font-weight: 600; - } + font-weight: 400; + line-height: 22px; + margin-top: 10px; + letter-spacing: -0.64px; + margin-bottom: 40px; } `; diff --git a/src/pages/JDPlusPage.tsx b/src/pages/JDPlusPage.tsx index 7db3963..5740f9b 100644 --- a/src/pages/JDPlusPage.tsx +++ b/src/pages/JDPlusPage.tsx @@ -128,8 +128,9 @@ const JDPlusPage: React.FC = () => { }, token ); + console.log(response.data.jobDescriptionId); console.log(job.endedAt); - nav("/jd"); + nav(`/jd/${response.data.jobDescriptionId}`); } catch (error) { console.error(error); alert(JSON.stringify(error));