From ca630bc4000230a2a079285cb8111f1a81244099 Mon Sep 17 00:00:00 2001 From: Seunghyo Date: Wed, 22 May 2024 00:56:39 +0900 Subject: [PATCH 1/8] =?UTF-8?q?feat:=20=EC=9E=91=EC=84=B1=EC=99=84?= =?UTF-8?q?=EB=A3=8C=20=EC=8B=A4=EC=8B=9C=EA=B0=84=20jDContainer=20?= =?UTF-8?q?=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/JD/JDContainer.tsx | 18 ++++++++++++++++-- src/pages/ApplyEditPage.tsx | 8 +++++++- src/pages/ApplyPage.tsx | 24 ++++++++++++++---------- 3 files changed, 37 insertions(+), 13 deletions(-) diff --git a/src/components/JD/JDContainer.tsx b/src/components/JD/JDContainer.tsx index 1a3007b..005d09f 100644 --- a/src/components/JD/JDContainer.tsx +++ b/src/components/JD/JDContainer.tsx @@ -11,10 +11,12 @@ import { formatDate } from "../../pages/JDDetailPage"; interface JobContainerProps { jdId: string; token: string; + status: string; } -const JDContainer: React.FC = ({ jdId, token }) => { +const JDContainer: React.FC = ({ jdId, token, status }) => { // const jdData = jobDetails[1]; + const [jdState, setjdState] = useState(""); const [jdData, setJdData] = useState({ enterpriseName: "", title: "", @@ -43,6 +45,7 @@ const JDContainer: React.FC = ({ jdId, token }) => { endedAt: response.data.endedAt, }; setJdData(jdApiData); + setjdState(jdData.writeStatus); } catch (error) { console.error(error); alert(JSON.stringify(error)); @@ -53,10 +56,21 @@ const JDContainer: React.FC = ({ jdId, token }) => { getJobData(jdId, token); }, []); + useEffect(() => { + if (status === "작성완료") { + setjdState("WRITTEN"); + } else if (status === "작성중") { + setjdState("WRITING"); + } + }, [status]); + return ( - +
{jdData.createdAt}
diff --git a/src/pages/ApplyEditPage.tsx b/src/pages/ApplyEditPage.tsx index 0529054..3ed02ca 100644 --- a/src/pages/ApplyEditPage.tsx +++ b/src/pages/ApplyEditPage.tsx @@ -398,7 +398,13 @@ const ApplyEditPage: React.FC = () => { ) : ( - {jdId ? : null} + {jdId ? ( + + ) : null} )} diff --git a/src/pages/ApplyPage.tsx b/src/pages/ApplyPage.tsx index e94a04b..9d32bd2 100644 --- a/src/pages/ApplyPage.tsx +++ b/src/pages/ApplyPage.tsx @@ -27,7 +27,7 @@ const ApplyPage: React.FC = () => { { question: "", answer: "" }, ]); //문항 데이터 const [editing, setEditing] = useState(true); //수정중 여부 - const [completed, setCompleted] = useState(false); //작성 완료 + const [completed, setCompleted] = useState(""); //작성 완료 const [isAllFilled, setIsAllFilled] = useState(false); // 문항이 빈칸이 없는지 검사 const [detailId, setDetailId] = useRecoilState(detailStore); //경험의 고유 id(0이 아니여야함) @@ -223,13 +223,7 @@ const ApplyPage: React.FC = () => { - - 작성완료 - (!editing ? setCompleted(!completed) : null)} - /> - + {editing ? ( { > 저장 + ) : completed === "작성완료" ? ( + + 수정 + ) : ( - + 수정 )} @@ -332,7 +330,13 @@ const ApplyPage: React.FC = () => { ) : ( - {jdId ? : null} + {jdId ? ( + + ) : null} )} From 7ed6e8c1b4c2e70f94c16013512c0313c5d6492f Mon Sep 17 00:00:00 2001 From: Seunghyo Date: Wed, 22 May 2024 01:05:38 +0900 Subject: [PATCH 2/8] =?UTF-8?q?feat:=20=EB=B2=84=ED=8A=BC=20hover?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/JD/Announcement.tsx | 1 + src/pages/ApplyEditPage.tsx | 1 + src/pages/ApplyPage.tsx | 4 ++++ src/pages/JDDetailPage.tsx | 5 +++++ 4 files changed, 11 insertions(+) diff --git a/src/components/JD/Announcement.tsx b/src/components/JD/Announcement.tsx index b0bb683..dc20760 100644 --- a/src/components/JD/Announcement.tsx +++ b/src/components/JD/Announcement.tsx @@ -36,6 +36,7 @@ const JobAnnouncementCard: React.FC = ({ const Container = styled.div` border-radius: 0.75rem; + cursor: pointer; display: flex; padding: 1.25rem; flex-direction: column; diff --git a/src/pages/ApplyEditPage.tsx b/src/pages/ApplyEditPage.tsx index 3ed02ca..454c910 100644 --- a/src/pages/ApplyEditPage.tsx +++ b/src/pages/ApplyEditPage.tsx @@ -652,6 +652,7 @@ const QuestionsWrapper = styled.div` display: flex; align-items: center; justify-content: center; + cursor: pointer; } //overflow-y: scroll; `; diff --git a/src/pages/ApplyPage.tsx b/src/pages/ApplyPage.tsx index 9d32bd2..a1e10c3 100644 --- a/src/pages/ApplyPage.tsx +++ b/src/pages/ApplyPage.tsx @@ -424,6 +424,7 @@ const TextCountWrapper = styled.div` const SaveButton = styled.button<{ isNotNull: boolean }>` display: inline-flex; padding: 0.625rem 4rem; + cursor: pointer; justify-content: center; align-items: center; color: #fff; @@ -556,6 +557,7 @@ const JDButton = styled.button` top: 1rem; width: 2rem; height: 7rem; + cursor: pointer; flex-shrink: 0; border: none; border-radius: 0.66019rem 0rem 0rem 0.66019rem; @@ -568,6 +570,7 @@ const ExperienceButton = styled.button` left: -2rem; top: 8.5rem; width: 2rem; + cursor: pointer; height: 7rem; flex-shrink: 0; border: none; @@ -584,6 +587,7 @@ const QuestionsWrapper = styled.div` display: flex; align-items: center; justify-content: center; + cursor: pointer; } //overflow-y: scroll; `; diff --git a/src/pages/JDDetailPage.tsx b/src/pages/JDDetailPage.tsx index 6e65ea2..436bcdd 100644 --- a/src/pages/JDDetailPage.tsx +++ b/src/pages/JDDetailPage.tsx @@ -18,6 +18,7 @@ import { jobdelete, jobdescriptionget } from "../services/JD/jdApi"; import { getCookie } from "../services/cookie"; import PlaneLoading from "../components/common/Loading"; import JDDeleteModal from "../components/JD/JDDeleteModal"; +import { pointer } from "d3"; const JDDetailPage: React.FC = () => { const [active, setActive] = useState(false); @@ -327,6 +328,7 @@ const Title = styled.h1` const TopButton = styled.button` display: inline-flex; + cursor: pointer; padding: 0.5rem 2.75rem; align-items: flex-start; gap: 0.625rem; @@ -410,6 +412,7 @@ const JobStatusBar = styled.div` .left_container{ display: flex; flex-direction: row; + cursor: pointer; align-items: center; .job_date { color: ${(props) => props.theme.colors.neutral500}; @@ -420,6 +423,7 @@ const JobStatusBar = styled.div` .right_container{ display: flex; flex-direction: row; + cursor: pointer; align-items: center; justify-content: center; color: ${(props) => props.theme.colors.neutral500}; @@ -549,6 +553,7 @@ const ExperienceButton = styled.button` width: 2rem; height: 7rem; flex-shrink: 0; + cursor: pointer; border: none; border-radius: 0.66019rem 0rem 0rem 0.66019rem; background: var(--neutral-300, #eaebf3); From d73508d8d58d24bb3d084a48cc7065608727fbe3 Mon Sep 17 00:00:00 2001 From: Seunghyo Date: Wed, 22 May 2024 01:15:16 +0900 Subject: [PATCH 3/8] =?UTF-8?q?feat:=20dday=20detail=20page=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/JDDetailPage.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/JDDetailPage.tsx b/src/pages/JDDetailPage.tsx index 436bcdd..c5352d0 100644 --- a/src/pages/JDDetailPage.tsx +++ b/src/pages/JDDetailPage.tsx @@ -191,7 +191,9 @@ const JDDetailPage: React.FC = () => { {jdData.writeStatus !== "CLOSED" && (
- {"D-" + jdData.remainingDate} + {parseInt(jdData.remainingDate) <= 0 + ? "D-DAY" + : "D-" + jdData.remainingDate}
)}
{jdData.title}
From 5ce21c5d0ba8ed4bf373542b1e25857056e45cfe Mon Sep 17 00:00:00 2001 From: Seunghyo Date: Wed, 22 May 2024 19:40:11 +0900 Subject: [PATCH 4/8] feat: ExperienceApi - booked --- src/App.tsx | 2 +- src/components/JD/ExperienceList.tsx | 10 ++++-- src/pages/JDDetailPage.tsx | 2 +- src/services/JD/ExperienceApi.tsx | 50 ++++++++++++++++++++++++++-- 4 files changed, 56 insertions(+), 8 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index e44f77f..092af36 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -34,7 +34,7 @@ const App: React.FC = () => { {/* 공고 상세 / JDDetailPage */} } path="/"> - } /> + } /> {/* 공고 수정 / JDEditPage*/} } path="/"> diff --git a/src/components/JD/ExperienceList.tsx b/src/components/JD/ExperienceList.tsx index 08dcd30..678dce6 100644 --- a/src/components/JD/ExperienceList.tsx +++ b/src/components/JD/ExperienceList.tsx @@ -17,6 +17,7 @@ import Checkbox from "../common/Checkbox"; import { getAllExperienceList } from "../../services/JD/ExperienceApi"; import { getCookie } from "../../services/cookie"; import { getAllTags } from "../../services/JD/tagApi"; +import { useParams } from "react-router-dom"; type TabType = "basic" | "my"; @@ -41,6 +42,7 @@ const ExperienceList: React.FC = ({ React.useState("basic"); const user = getCookie("user"); const [experienceData, setExperienceData] = useState({}); + const jdId = useParams().jdId; const [anchorEl, setAnchorEl] = React.useState(null); const open = Boolean(anchorEl); @@ -67,13 +69,15 @@ const ExperienceList: React.FC = ({ ); useEffect(() => { - // getExperienceList(user.token); + if (jdId) { + getExperienceList(jdId, user.token); + } }, []); //모든 경험리스트 불러오기 - const getExperienceList = async (token: string) => { + const getExperienceList = async (jdId: string, token: string) => { try { - const response = await getAllExperienceList(token); + const response = await getAllExperienceList(jdId, token); console.log(response); } catch (error) { console.error(error); diff --git a/src/pages/JDDetailPage.tsx b/src/pages/JDDetailPage.tsx index c5352d0..1ee1b5c 100644 --- a/src/pages/JDDetailPage.tsx +++ b/src/pages/JDDetailPage.tsx @@ -23,7 +23,7 @@ import { pointer } from "d3"; const JDDetailPage: React.FC = () => { const [active, setActive] = useState(false); const [activebutton, setActivebutton] = useState(""); - const jdId = useParams().id; + const jdId = useParams().jdId; const nav = useNavigate(); const [detailId, setDetailId] = useRecoilState(detailStore); const [jdData, setJdData] = useState({ diff --git a/src/services/JD/ExperienceApi.tsx b/src/services/JD/ExperienceApi.tsx index 83a2325..423ddcc 100644 --- a/src/services/JD/ExperienceApi.tsx +++ b/src/services/JD/ExperienceApi.tsx @@ -1,10 +1,54 @@ import client from "../client"; -// 경험 목록 조회 -export const getAllExperienceList = async (token: string) => { - return await client.get(`/api/experiences`, { +// 북마크 된 경험 목록 조회 +export const getAllExperienceList = async (jdId: string, token: string) => { + return await client.get(`/api/experiences/bookmark/${jdId}`, { headers: { Authorization: `Bearer ${token}`, }, }); }; + +// 경험 목록 검색 - 텍스트 검색 +export const searchTextExperienceList = async ( + jdId: string, + searchText: string, + token: string +) => { + return await client.get( + `/api/experiences/bookmark/${jdId}?search=${searchText}`, + { + headers: { + Authorization: `Bearer ${token}`, + }, + } + ); +}; + +// 경험 목록 검색 - 태그필터링 +export const searchTagExperienceList = async ( + jdId: string, + parentTag: string, + childTag: string | null, + token: string +) => { + if (childTag) { + return await client.get( + `/api/experiences/bookmark/${jdId}?parent-tag=${parentTag}&child-tag=${childTag}`, + { + headers: { + Authorization: `Bearer ${token}`, + }, + } + ); + } else { + return await client.get( + `/api/experiences/bookmark/${jdId}?parent-tag=${parentTag}`, + { + headers: { + Authorization: `Bearer ${token}`, + }, + } + ); + } +}; From 32e797fdc12d5317ed9ae8553f8650e7168928d4 Mon Sep 17 00:00:00 2001 From: Seunghyo Date: Wed, 22 May 2024 20:16:02 +0900 Subject: [PATCH 5/8] feat: search api --- src/components/JD/ExperienceList.tsx | 82 ++++++++++++++++++++++++++-- src/pages/JDDetailPage.tsx | 1 - 2 files changed, 78 insertions(+), 5 deletions(-) diff --git a/src/components/JD/ExperienceList.tsx b/src/components/JD/ExperienceList.tsx index 678dce6..5a79dac 100644 --- a/src/components/JD/ExperienceList.tsx +++ b/src/components/JD/ExperienceList.tsx @@ -14,7 +14,11 @@ import PopperPagination from "../Experience/PopperPagination"; import { basicKeywords } from "../../assets/data/keywords"; import { myKeywords } from "../../services/Experience/myKeywords"; import Checkbox from "../common/Checkbox"; -import { getAllExperienceList } from "../../services/JD/ExperienceApi"; +import { + getAllExperienceList, + searchTagExperienceList, + searchTextExperienceList, +} from "../../services/JD/ExperienceApi"; import { getCookie } from "../../services/cookie"; import { getAllTags } from "../../services/JD/tagApi"; import { useParams } from "react-router-dom"; @@ -25,6 +29,29 @@ interface ExperienceListProps { showBookmarksOnly: boolean; } +type StrongPointAPI = { + id: string; + name: string; +}; + +type ExpTagAPI = { + id: string; + name: string; +}; + +type Experience = { + id: string; + title: string; + parentTag: Tag; + childTag: Tag; + strongPoints: StrongPointAPI[]; + startedAt: string; + endedAt: string; + bookmarked: "ON" | "OFF"; +}; + +type Experiences = Experience[]; + const ExperienceList: React.FC = ({ showBookmarksOnly, }) => { @@ -41,7 +68,7 @@ const ExperienceList: React.FC = ({ const [keywordTabOption, setKeywordTabOption] = React.useState("basic"); const user = getCookie("user"); - const [experienceData, setExperienceData] = useState({}); + const [experienceData, setExperienceData] = useState([]); const jdId = useParams().jdId; const [anchorEl, setAnchorEl] = React.useState(null); @@ -70,7 +97,7 @@ const ExperienceList: React.FC = ({ useEffect(() => { if (jdId) { - getExperienceList(jdId, user.token); + // getExperienceList(jdId, user.token); } }, []); @@ -85,6 +112,40 @@ const ExperienceList: React.FC = ({ } }; + const getSearchedExperienceList = async ( + jdId: string, + searchText: string, + token: string + ) => { + try { + const response = await searchTextExperienceList(jdId, searchText, token); + console.log(response); + } catch (error) { + console.error(error); + alert(JSON.stringify(error)); + } + }; + + const getFilteredExperienceList = async ( + jdId: string, + parenttag: string, + childtag: string | null, + token: string + ) => { + try { + const response = await searchTagExperienceList( + jdId, + parenttag, + childtag, + token + ); + console.log(response); + } catch (error) { + console.error(error); + alert(JSON.stringify(error)); + } + }; + // 체크된 역량 키워드 리스트 const [checkedKeywords, setCheckedKeywords] = React.useState([]); @@ -130,12 +191,18 @@ const ExperienceList: React.FC = ({ useEffect(() => { if (mainTag) { console.log("maintag: " + mainTag); + if (jdId) { + getFilteredExperienceList(jdId, mainTag, null, user.token); + } } }, [mainTag]); useEffect(() => { if (subTag) { console.log("subtag: " + subTag); + if (jdId) { + getFilteredExperienceList(jdId, mainTag, subTag, user.token); + } } }, [subTag]); @@ -200,7 +267,14 @@ const ExperienceList: React.FC = ({ setSubTag(""); }} /> - filter {/* 클릭시 검색 api 호출 */} + filter { + getSearchedExperienceList(jdId!, searchText, user.token); + }} + />{" "} + {/* 클릭시 검색 api 호출 */} {showTagPopup && }
diff --git a/src/pages/JDDetailPage.tsx b/src/pages/JDDetailPage.tsx index 1ee1b5c..e794fe6 100644 --- a/src/pages/JDDetailPage.tsx +++ b/src/pages/JDDetailPage.tsx @@ -18,7 +18,6 @@ import { jobdelete, jobdescriptionget } from "../services/JD/jdApi"; import { getCookie } from "../services/cookie"; import PlaneLoading from "../components/common/Loading"; import JDDeleteModal from "../components/JD/JDDeleteModal"; -import { pointer } from "d3"; const JDDetailPage: React.FC = () => { const [active, setActive] = useState(false); From 5916ba7bb6d2badb5710d36c66c2386e207903ec Mon Sep 17 00:00:00 2001 From: Seunghyo Date: Wed, 22 May 2024 20:58:04 +0900 Subject: [PATCH 6/8] =?UTF-8?q?feat:=20experienceList=20data=20type=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=EB=B0=8F=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/JD/ExperienceList.tsx | 164 +++++++++++++++++++++------ 1 file changed, 128 insertions(+), 36 deletions(-) diff --git a/src/components/JD/ExperienceList.tsx b/src/components/JD/ExperienceList.tsx index 5a79dac..f9b0633 100644 --- a/src/components/JD/ExperienceList.tsx +++ b/src/components/JD/ExperienceList.tsx @@ -22,6 +22,7 @@ import { import { getCookie } from "../../services/cookie"; import { getAllTags } from "../../services/JD/tagApi"; import { useParams } from "react-router-dom"; +import { formatDateRange } from "../../pages/JDListPage"; type TabType = "basic" | "my"; @@ -39,18 +40,24 @@ type ExpTagAPI = { name: string; }; -type Experience = { +type ContentAPI = { + question: string; + answer: string; +}; + +type ExperienceAPI = { id: string; title: string; - parentTag: Tag; - childTag: Tag; + parentTag: ExpTagAPI; + childTag: ExpTagAPI; strongPoints: StrongPointAPI[]; + contents: ContentAPI[]; startedAt: string; endedAt: string; bookmarked: "ON" | "OFF"; }; -type Experiences = Experience[]; +type Experiences = ExperienceAPI[]; const ExperienceList: React.FC = ({ showBookmarksOnly, @@ -64,11 +71,81 @@ const ExperienceList: React.FC = ({ const [mainTag, setMainTag] = useState(""); // 선택된 상위태그 const [subTag, setSubTag] = useState(""); //선택된 하위태그 const [filterCount, setfilterCount] = useState(-1); //검색된 경험의 숫자, 검색 안된 상태에서는 -1 - const bookmarkData = ExpData.filter((post) => post.bookmark); // 북마크된 데이터들 const [keywordTabOption, setKeywordTabOption] = React.useState("basic"); const user = getCookie("user"); - const [experienceData, setExperienceData] = useState([]); + const [experienceData, setExperienceData] = useState([ + { + id: "fa0a5813-c879-432d-b276-24364847534c", + title: "경험 제목1 ", + parentTag: { + id: "c191d753-0c59-42eb-8245-79ee5c9c5797", + name: "상위 태그 이름", + }, + childTag: { + id: "860c446b-a021-43d5-9da6-5034a5bdaee7", + name: "하위 태그 이름", + }, + strongPoints: [ + { + id: "fdbf03bf-c1a3-4442-997e-467605868052", + name: "역량 키워드 이름 1", + }, + { + id: "096c3d2e-4073-4724-9a15-c1d6617c63a1", + name: "역량 키워드 이름 2", + }, + ], + contents: [ + { + question: "질문1", + answer: "답변1", + }, + { + question: "질문2", + answer: "답변2", + }, + ], + startedAt: "2024-05-22T07:45:23.720822702", + endedAt: "2024-05-23T07:45:23.720832019", + bookmarked: "ON", + }, + { + id: "7694c6e7-b7a8-4ee8-a698-67c345932663", + title: "경험 제목 2", + parentTag: { + id: "c191d753-0c59-42eb-8245-79ee5c9c5797", + name: "상위 태그 이름", + }, + childTag: { + id: "860c446b-a021-43d5-9da6-5034a5bdaee7", + name: "하위 태그 이름", + }, + strongPoints: [ + { + id: "fdbf03bf-c1a3-4442-997e-467605868052", + name: "역량 키워드 이름 1", + }, + { + id: "096c3d2e-4073-4724-9a15-c1d6617c63a1", + name: "역량 키워드 이름 2", + }, + ], + contents: [ + { + question: "질문1", + answer: "답변1", + }, + { + question: "질문2", + answer: "답변2", + }, + ], + startedAt: "2023-05-22T07:45:23.720822702", + endedAt: "2024-05-23T07:45:23.720832019", + bookmarked: "OFF", + }, + ]); const jdId = useParams().jdId; const [anchorEl, setAnchorEl] = React.useState(null); @@ -97,7 +174,7 @@ const ExperienceList: React.FC = ({ useEffect(() => { if (jdId) { - // getExperienceList(jdId, user.token); + // getExperienceList(jdId, user.token); } }, []); @@ -120,6 +197,8 @@ const ExperienceList: React.FC = ({ try { const response = await searchTextExperienceList(jdId, searchText, token); console.log(response); + setExperienceData(response.data.experiences); + console.log(experienceData); } catch (error) { console.error(error); alert(JSON.stringify(error)); @@ -166,12 +245,24 @@ const ExperienceList: React.FC = ({ }; // 역량 키워드 필터된 경험 데이터, 북마크 - const filteredExpData = ExpData.filter((item) => - item.tags.some((tag) => checkedKeywords.includes(tag)) - ); - const filteredbookedData = bookmarkData.filter((item) => - item.tags.some((tag) => checkedKeywords.includes(tag)) - ); + const filteredExpData = experienceData.filter((experience) => { + const strongPointNames = experience.strongPoints.map((point) => point.name); + const matchedKeywords = strongPointNames.filter((name) => + checkedKeywords.includes(name) + ); + return matchedKeywords.length > 0; + }); + const bookedData = experienceData.filter((experience) => { + // 북마크가 ON인 요소만 필터링 + return experience.bookmarked === "ON"; + }); + const filteredBookedData = experienceData.filter((experience) => { + const strongPointNames = experience.strongPoints.map((point) => point.name); + const matchedKeywords = strongPointNames.filter((name) => + checkedKeywords.includes(name) + ); + return experience.bookmarked === "ON" && matchedKeywords.length > 0; + }); //상위태그 하위태그 필터링 const handleTagSelection = ( @@ -377,39 +468,40 @@ const ExperienceList: React.FC = ({ {selectedTab === "경험검색" ? ( <> - {(checkedKeywords.length === 0 ? ExpData : filteredExpData).map( - (post, index: number) => ( - setshowDetail(true)} - /> - ) - )} + {(checkedKeywords.length === 0 + ? experienceData + : filteredExpData + ).map((post, index: number) => ( + point.name)} + period={formatDateRange(post.startedAt, post.endedAt)} + bookmark={post.bookmarked === "ON" ? true : false} + checkedKeywords={checkedKeywords} + onClick={() => setshowDetail(true)} + /> + ))} ) : ( {(checkedKeywords.length === 0 - ? bookmarkData - : filteredbookedData + ? bookedData + : filteredBookedData ).map((post, index: number) => ( point.name)} + period={formatDateRange(post.startedAt, post.endedAt)} + bookmark={post.bookmarked === "ON" ? true : false} checkedKeywords={checkedKeywords} onClick={() => setshowDetail(true)} /> From c8f297c71809af029696870397d6e72996073fff Mon Sep 17 00:00:00 2001 From: Seunghyo Date: Wed, 22 May 2024 21:13:08 +0900 Subject: [PATCH 7/8] fix: JD modal --- src/components/JD/ExperienceList.tsx | 35 ++++++++++++++++++++++++++++ src/components/JD/JDModal.tsx | 13 ++++------- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/src/components/JD/ExperienceList.tsx b/src/components/JD/ExperienceList.tsx index f9b0633..8343014 100644 --- a/src/components/JD/ExperienceList.tsx +++ b/src/components/JD/ExperienceList.tsx @@ -145,6 +145,41 @@ const ExperienceList: React.FC = ({ endedAt: "2024-05-23T07:45:23.720832019", bookmarked: "OFF", }, + { + id: "7694c6e7-b7a8-4ee8-a698-67c345932663", + title: "경험 제목 3", + parentTag: { + id: "c191d753-0c59-42eb-8245-79ee5c9c5797", + name: "상위 태그 이름", + }, + childTag: { + id: "860c446b-a021-43d5-9da6-5034a5bdaee7", + name: "하위 태그 이름", + }, + strongPoints: [ + { + id: "fdbf03bf-c1a3-4442-997e-467605868052", + name: "역량 키워드 이름 1", + }, + { + id: "096c3d2e-4073-4724-9a15-c1d6617c63a1", + name: "역량 키워드 이름 2", + }, + ], + contents: [ + { + question: "질문1", + answer: "답변1", + }, + { + question: "질문2", + answer: "답변2", + }, + ], + startedAt: "2023-05-22T07:45:23.720822702", + endedAt: "2024-05-23T07:45:23.720832019", + bookmarked: "ON", + }, ]); const jdId = useParams().jdId; diff --git a/src/components/JD/JDModal.tsx b/src/components/JD/JDModal.tsx index 266aa1a..39a2fcd 100644 --- a/src/components/JD/JDModal.tsx +++ b/src/components/JD/JDModal.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 { @@ -20,12 +20,7 @@ const Modal: FC = ({ isOpen, onClose }) => { warning
이전 페이지로 돌아가시겠어요?
-
- 저장하지 않으면 -
- 입력한 내용은 복원할 수 없어요! -
-
+
작성하던 공고가 저장되지 않아요!
@@ -85,7 +80,7 @@ const MainWrapper = styled.div` font-weight: 600; line-height: 1.625rem; letter-spacing: -0.055rem; - margin-top: 1.25rem; + margin-top: 1rem; } .subtext { color: var(--neutral-500, #A6AAC0); @@ -95,7 +90,7 @@ const MainWrapper = styled.div` font-weight: 500; line-height: 1.25rem; letter-spacing: -0.02rem; - margin-top: 1.25rem; + margin-bottom: 1rem; span{ color: var(--main-500, #7D82FF); font-size: 1.2rem; From 5934327afdae90a02f8b2af675e7af6820539f5b Mon Sep 17 00:00:00 2001 From: Seunghyo Date: Wed, 22 May 2024 21:53:45 +0900 Subject: [PATCH 8/8] chore: --- src/components/JD/ExperienceList.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/JD/ExperienceList.tsx b/src/components/JD/ExperienceList.tsx index 8343014..4a3e2f7 100644 --- a/src/components/JD/ExperienceList.tsx +++ b/src/components/JD/ExperienceList.tsx @@ -229,15 +229,15 @@ const ExperienceList: React.FC = ({ searchText: string, token: string ) => { - try { - const response = await searchTextExperienceList(jdId, searchText, token); - console.log(response); - setExperienceData(response.data.experiences); - console.log(experienceData); - } catch (error) { - console.error(error); - alert(JSON.stringify(error)); - } + // try { + // const response = await searchTextExperienceList(jdId, searchText, token); + // console.log(response); + // setExperienceData(response.data.experiences); + // console.log(experienceData); + // } catch (error) { + // console.error(error); + // alert(JSON.stringify(error)); + // } }; const getFilteredExperienceList = async (