From d1f0ab3c2ff3acef723ce4bb344313e01def0a08 Mon Sep 17 00:00:00 2001 From: jihunchoi Date: Sat, 1 Jun 2024 14:55:42 +0900 Subject: [PATCH 01/27] =?UTF-8?q?fix:=20=EC=96=B8=EC=96=B4=20=EC=84=A0?= =?UTF-8?q?=ED=83=9D=20=EC=98=A4=ED=83=80=20=EC=88=98=EC=A0=95,=20team=20c?= =?UTF-8?q?ard=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EB=B0=98=EC=98=81,=20api?= =?UTF-8?q?=20=EB=B3=80=EB=8F=99=EC=82=AC=ED=95=AD=20=EC=A0=81=EC=9A=A9:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/teamAPI.js | 2 +- src/components/Card/teamCard.js | 51 ++++++++++++++++++---- src/pages/Main/main.js | 4 +- src/pages/RegisterMember/registerMember.js | 47 +++++++++++++++++--- 4 files changed, 86 insertions(+), 18 deletions(-) diff --git a/src/api/teamAPI.js b/src/api/teamAPI.js index cff6db5..4289883 100644 --- a/src/api/teamAPI.js +++ b/src/api/teamAPI.js @@ -35,7 +35,7 @@ export const teamAPI = { return axiosWithAuth.get(`/team/${id}`); }, postNewTeamAnnouncement(data, teamId) { - return axiosWithAuth.post(`/team/${teamId}/announcement`, data); + return axiosWithAuth.post("/team-announcement", data); }, inviteTeamMember(data) { return axiosWithAuth.post("/team/invite", data); diff --git a/src/components/Card/teamCard.js b/src/components/Card/teamCard.js index ab007ff..2c80075 100644 --- a/src/components/Card/teamCard.js +++ b/src/components/Card/teamCard.js @@ -13,6 +13,42 @@ import { Title, } from "./styles"; +const occupationOptions = { + design_ui_ux: "UI/UX 디자인", + design_illustration_character: "일러스트/캐릭터 디자인", + design_movie_motion_graphic: "영화/모션그래픽 디자인", + design_product_package: "제품/패키지 디자인", + design_passion: "열정 디자인", + design_crafts: "공예 디자인", + design_graphic: "그래픽 디자인", + development_frontend: "프론트엔드 개발", + development_backend: "백엔드 개발", + development_ai: "AI 개발", + development_devops: "DevOps 개발", + development_security: "보안 개발", + development_game: "게임 개발", + development_embedded: "임베디드 개발", + development_dba: "DBA", + plan: "기획", + media_editing_movie: "영화 편집", + media_filming_movie: "영화 촬영", + media_pd: "PD", + media_photographer: "사진작가", + media_sound_engineer: "음향 엔지니어", + marketing_management: "마케팅 관리", + marketing_promotion: "마케팅 홍보", + marketing_consulting: "마케팅 컨설팅", + translation_english: "영어 번역", + translation_japanese: "일본어 번역", + translation_chinese: "중국어 번역", + translation_spanish: "스페인어 번역", + translation_arabic: "아랍어 번역", + translation_hindi: "힌디어 번역", + translation_french: "프랑스어 번역", + translation_etc: "기타 번역", + etc: "기타", +}; + const TeamCard = ({ data }) => { return ( @@ -44,8 +80,8 @@ const TeamCard = ({ data }) => {
- QWER{data.teamName} - SEOUL{data.location} + QWER{data.teamId} + {data.region}
@@ -56,12 +92,11 @@ const TeamCard = ({ data }) => {
- UI/UX 디자이너{data.category1} - 프론트엔드{data.category2} - 프론트엔드{data.category2} - 프론트엔드{data.category2} - 프론트엔드{data.category2} - 프론트엔드{data.category2} + {data.occupationClassifications.map((item, index) => { + return ( + {occupationOptions[item]} + ); + })} diff --git a/src/pages/Main/main.js b/src/pages/Main/main.js index 51e4390..1976d64 100644 --- a/src/pages/Main/main.js +++ b/src/pages/Main/main.js @@ -22,12 +22,12 @@ const Main = (props) => { > -
+ {/*
-
+
*/}
diff --git a/src/pages/RegisterMember/registerMember.js b/src/pages/RegisterMember/registerMember.js index bd64e45..900051a 100644 --- a/src/pages/RegisterMember/registerMember.js +++ b/src/pages/RegisterMember/registerMember.js @@ -48,17 +48,37 @@ const occupationOptions = [ { value: "translation_japanese", label: "일본어 번역" }, { value: "translation_chinese", label: "중국어 번역" }, { value: "translation_spanish", label: "스페인어 번역" }, - { value: "translation_alabic", label: "아랍어 번역" }, + { value: "translation_arabic", label: "아랍어 번역" }, { value: "translation_hindi", label: "힌디어 번역" }, - { value: "translation_franch", label: "프랑스어 번역" }, + { value: "translation_french", label: "프랑스어 번역" }, { value: "translation_etc", label: "기타 번역" }, { value: "etc", label: "기타" }, ]; +const locationOptions = [ + { value: "seoul", label: "서울" }, + { value: "busan", label: "부산" }, + { value: "incheon", label: "인천" }, + { value: "daegu", label: "대구" }, + { value: "gwangju", label: "광주" }, + { value: "daejeon", label: "대전" }, + { value: "ulsan", label: "울산" }, + { value: "gyeonggi", label: "경기도" }, + { value: "gangwon", label: "강원도" }, + { value: "chungbuk", label: "충청북도" }, + { value: "chungnam", label: "충청남도" }, + { value: "jeonbuk", label: "전라북도" }, + { value: "jeonnam", label: "전라남도" }, + { value: "gyeongbuk", label: "경상북도" }, + { value: "gyeongnam", label: "경상남도" }, + { value: "jeju", label: "제주도" }, +]; + const RegisterMember = ({ setIsCreateTeam }) => { const [title, setTitle] = useState(""); const [description, setDescription] = useState(""); const [vacancies, setVacancies] = useState(0); + const [teamId, setTeamId] = useState(0); const [occupationClassifications, setOccupationClassifications] = useState( [], ); @@ -79,12 +99,14 @@ const RegisterMember = ({ setIsCreateTeam }) => { !vacancies || !occupationClassifications || !publish || - !expiredDate + !expiredDate || + !location ) { alert("모든 항목을 채워주세요"); return; } const data = { + teamId: teamId, title: title, description: description, vacancies: vacancies, @@ -93,12 +115,13 @@ const RegisterMember = ({ setIsCreateTeam }) => { ), publish: publish, expiredDate: expiredDate.toISOString(), + region: location.value, }; console.log(data); teamAPI - .postNewTeamAnnouncement(data, 2) + .postNewTeamAnnouncement(data) .then((res) => { console.log(res); navigate("/team"); @@ -197,12 +220,22 @@ const RegisterMember = ({ setIsCreateTeam }) => { onChange={(e) => handleChange(e.target.value, setVacancies)} style={{ marginTop: "10px", width: "330px" }} /> - 활동지역 + 팀 ID handleChange(e.target.value, setLocation)} + value={teamId} + onChange={(e) => handleChange(e.target.value, setTeamId)} style={{ marginTop: "10px", width: "330px" }} /> + 활동 지역 + setRecruitmentType(selected)} + styles={{ marginTop: "15px", width: "330px" }} + /> + {errors.recruitmentType && ( +
{errors.recruitmentType}
)}
From f06b9c672fb9338ad638c3f46dee3e3ee8a6d6b2 Mon Sep 17 00:00:00 2001 From: jihunchoi Date: Sat, 1 Jun 2024 15:37:02 +0900 Subject: [PATCH 03/27] =?UTF-8?q?fix:=20#52-=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/MyPage/MyFavorites/styles.js | 1 + src/components/MyPage/MyTeam/myTeam.js | 2 +- src/pages/RegisterTeam/registerTeam.js | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/MyPage/MyFavorites/styles.js b/src/components/MyPage/MyFavorites/styles.js index b93a260..f578901 100644 --- a/src/components/MyPage/MyFavorites/styles.js +++ b/src/components/MyPage/MyFavorites/styles.js @@ -90,4 +90,5 @@ export const CardContainter = styled.div` display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; + overflow: scroll; `; diff --git a/src/components/MyPage/MyTeam/myTeam.js b/src/components/MyPage/MyTeam/myTeam.js index fad23b5..66c7eb7 100644 --- a/src/components/MyPage/MyTeam/myTeam.js +++ b/src/components/MyPage/MyTeam/myTeam.js @@ -98,7 +98,7 @@ const MyTeam = ({ setIsCreateTeam, innerRef }) => { > {isMyTeam ? : } - 나의 팀만 보기 + 내가 팀장인 팀만 보기 diff --git a/src/pages/RegisterTeam/registerTeam.js b/src/pages/RegisterTeam/registerTeam.js index ee4cbee..7ee01cd 100644 --- a/src/pages/RegisterTeam/registerTeam.js +++ b/src/pages/RegisterTeam/registerTeam.js @@ -87,11 +87,16 @@ const RegisterTeam = ({ setIsCreateTeam }) => { const [phoneNumber, setPhoneNumber] = useState(""); const [email, setEmail] = useState(""); const [errors, setErrors] = useState({}); + const [selectedResume, setSelectedResume] = useState(null); const handleChange = (value, setter) => { setter(value); }; + const handleResumeClick = (id) => { + setSelectedResume(id); + }; + const registerTeam = async () => { if ( !teamName || From 93901647f14eaa65841b1ddd6af56e6e3a6ceb67 Mon Sep 17 00:00:00 2001 From: jihunchoi Date: Sat, 1 Jun 2024 16:43:40 +0900 Subject: [PATCH 04/27] =?UTF-8?q?fix:=20#52-=EB=A7=88=EC=9D=B4=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=ED=8C=80=20=EB=93=B1=EB=A1=9D=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EC=88=98=EC=A0=95=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MyPage/MyTeamPage/myTeamPage.js | 253 ++++++++++-------- src/components/MyPage/MyTeamPage/styled.js | 8 +- 2 files changed, 144 insertions(+), 117 deletions(-) diff --git a/src/components/MyPage/MyTeamPage/myTeamPage.js b/src/components/MyPage/MyTeamPage/myTeamPage.js index 1378bf4..5ec99af 100644 --- a/src/components/MyPage/MyTeamPage/myTeamPage.js +++ b/src/components/MyPage/MyTeamPage/myTeamPage.js @@ -15,7 +15,8 @@ import { ReactComponent as Line } from "../../../assets/myPage/myInfoVector1.svg const MyTeamPage = ({ setIsCreateTeam }) => { const [teamName, setTeamName] = useState(""); - const [teamDescription, setTeamDescription] = useState(""); + const [teamIntroduction, setTeamIntroduction] = useState(""); + const [teamContent, setTeamContent] = useState(""); const [domain, setDomain] = useState(""); const [location, setLocation] = useState(""); const [phoneNumber, setPhoneNumber] = useState(""); @@ -40,7 +41,8 @@ const MyTeamPage = ({ setIsCreateTeam }) => { const registerTeam = async () => { if ( !teamName || - !teamDescription || + !teamIntroduction || + !teamContent || !domain || !location || !phoneNumber || @@ -48,7 +50,9 @@ const MyTeamPage = ({ setIsCreateTeam }) => { ) { setErrors({ teamName: teamName ? "" : "팀명을 입력해 주세요", - teamDescription: teamDescription ? "" : "팀 상세 소개를 입력해 주세요", + teamIntroduction: teamIntroduction + ? "" + : "팀 상세 소개를 입력해 주세요", domain: domain ? "" : "분야를 선택해 주세요", location: location ? "" : "활동 지역을 선택해 주세요", phoneNumber: phoneNumber ? "" : "연락처를 입력해 주세요", @@ -57,7 +61,8 @@ const MyTeamPage = ({ setIsCreateTeam }) => { } else { const data = { name: teamName, - introduction: teamDescription, + introduction: teamIntroduction, + content: teamContent, domain: domain, location: location, phoneNumber: phoneNumber, @@ -83,18 +88,22 @@ const MyTeamPage = ({ setIsCreateTeam }) => { - -
+
- 프로필 설정
{ )}
-
- 팀 상세 소개 - handleChange(e.target.value, setTeamDescription)} - /> -
-
- {errors.teamDescription && ( -
{errors.teamDescription}
- )} - -
- 팀명 - handleChange(e.target.value, setTeamName)} - /> - {errors.teamName && ( -
{errors.teamName}
- )} - 활동 지역 - handleChange(e.target.value, setLocation)} +
- - - - - - - - - - - - - - - - - - - {errors.location && ( -
{errors.location}
- )} -
+
+ 팀명 + 분야 + 활동 지역 + 연락처 + 이메일 +
+
+ handleChange(e.target.value, setTeamName)} + /> + {errors.teamName && ( +
{errors.teamName}
+ )} -
- 분야 - handleChange(e.target.value, setDomain)} - > - - - - - {errors.domain &&
{errors.domain}
} - - 연락처 - handleChange(e.target.value, setPhoneNumber)} - /> - {errors.phoneNumber && ( -
{errors.phoneNumber}
- )} - - 이메일 - handleChange(e.target.value, setEmail)} - /> - {errors.email &&
{errors.email}
} + handleChange(e.target.value, setDomain)} + > + + + + + {errors.domain && ( +
{errors.domain}
+ )} + + handleChange(e.target.value, setLocation)} + > + + + + + + + + + + + + + + + + + + + {errors.location && ( +
{errors.location}
+ )} + + handleChange(e.target.value, setPhoneNumber)} + /> + {errors.phoneNumber && ( +
{errors.phoneNumber}
+ )} + + handleChange(e.target.value, setEmail)} + /> + {errors.email && ( +
{errors.email}
+ )} +
+
+ +
+ 한줄 소개 + handleChange(e.target.value, setTeamIntroduction)} + /> +
+ +
+ 상세 소개 + handleChange(e.target.value, setTeamContent)} + /> +
+ Date: Sun, 2 Jun 2024 12:21:58 +0900 Subject: [PATCH 05/27] =?UTF-8?q?fix:=20#52-=ED=8C=80=EB=93=B1=EB=A1=9D=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/MyPage/MyTeamPage/myTeamPage.js | 13 +++++++++---- src/components/MyPage/MyTeamPage/styled.js | 8 +++++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/components/MyPage/MyTeamPage/myTeamPage.js b/src/components/MyPage/MyTeamPage/myTeamPage.js index 5ec99af..29a054d 100644 --- a/src/components/MyPage/MyTeamPage/myTeamPage.js +++ b/src/components/MyPage/MyTeamPage/myTeamPage.js @@ -92,9 +92,9 @@ const MyTeamPage = ({ setIsCreateTeam }) => { style={{ display: "flex", flexDirection: "row", - justifyContent: "space-between", width: "100%", height: "100%", + justifyContent: "space-between", }} >
{
{ flexDirection: "row", justifyContent: "space-between", width: "100%", - height: "100%", + height: "242px", }} >
{ display: "flex", flexDirection: "column", justifyContent: "space-between", - height: "100%", + alignItems: "start", }} > 팀명 diff --git a/src/components/MyPage/MyTeamPage/styled.js b/src/components/MyPage/MyTeamPage/styled.js index 1178568..1846252 100644 --- a/src/components/MyPage/MyTeamPage/styled.js +++ b/src/components/MyPage/MyTeamPage/styled.js @@ -33,7 +33,8 @@ export const Tag = styled.label` `; export const Input = styled.input` - width: 332px; + margin-left: 50px; + width: 300px; height: 36px; border: 1.9px solid; border-radius: 6px; @@ -41,7 +42,8 @@ export const Input = styled.input` `; export const Sel = styled.select` - width: 332px; + margin-left: 50px; + width: 300px; height: 36px; border: 1.9px solid; border-radius: 6px; @@ -49,7 +51,7 @@ export const Sel = styled.select` `; export const Explanation = styled.textarea` - width: 750px; + width: 100%; height: 229px; border: 1.9px solid; border-radius: 6px; From b32c21933714b943f49e72b1dc4a6214ca436295 Mon Sep 17 00:00:00 2001 From: jihunchoi Date: Sun, 2 Jun 2024 12:31:58 +0900 Subject: [PATCH 06/27] =?UTF-8?q?fix:=20#52-=ED=8C=80=20=EB=93=B1=EB=A1=9D?= =?UTF-8?q?=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MyPage/MyTeamPage/myTeamPage.js | 34 ++++++++++++------- src/components/MyPage/MyTeamPage/styled.js | 1 - 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/components/MyPage/MyTeamPage/myTeamPage.js b/src/components/MyPage/MyTeamPage/myTeamPage.js index 29a054d..54e0b4b 100644 --- a/src/components/MyPage/MyTeamPage/myTeamPage.js +++ b/src/components/MyPage/MyTeamPage/myTeamPage.js @@ -85,9 +85,7 @@ const MyTeamPage = ({ setIsCreateTeam }) => { return ( 신규 팀 등록 - +
{ style={{ width: "200px", height: "200px" }} /> ) : ( -

- 사진을 여기에 드래그 하거나 클릭하여 업로드하세요 1:1 비율 권장 -

+
+

+ 팀 로고 등록 +

+
)}
@@ -240,10 +247,12 @@ const MyTeamPage = ({ setIsCreateTeam }) => { display: "flex", flexDirection: "column", alignItems: "flex-start", + width: "100%", }} > 한줄 소개 handleChange(e.target.value, setTeamIntroduction)} /> @@ -255,21 +264,22 @@ const MyTeamPage = ({ setIsCreateTeam }) => { display: "flex", flexDirection: "column", alignItems: "flex-start", + width: "100%", }} > 상세 소개 handleChange(e.target.value, setTeamContent)} />
- - 등록하기 - +
+ + 등록하기 + +
); }; diff --git a/src/components/MyPage/MyTeamPage/styled.js b/src/components/MyPage/MyTeamPage/styled.js index 1846252..c4ce483 100644 --- a/src/components/MyPage/MyTeamPage/styled.js +++ b/src/components/MyPage/MyTeamPage/styled.js @@ -52,7 +52,6 @@ export const Sel = styled.select` export const Explanation = styled.textarea` width: 100%; - height: 229px; border: 1.9px solid; border-radius: 6px; border-color: #c9c9c9; From 03137df0edca9340a4c8fc9299a57d191b55784e Mon Sep 17 00:00:00 2001 From: jihunchoi Date: Sun, 2 Jun 2024 13:06:17 +0900 Subject: [PATCH 07/27] =?UTF-8?q?feat:=20#52-=ED=8C=80=EC=9B=90=EA=B5=AC?= =?UTF-8?q?=ED=95=98=EA=B8=B0=20API=20=EC=BD=94=EB=93=9C=20=EC=9E=91?= =?UTF-8?q?=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/teamAPI.js | 16 +++++++- src/pages/MemberSearch/memberSearch.js | 51 +++++++++++++++++++------- 2 files changed, 53 insertions(+), 14 deletions(-) diff --git a/src/api/teamAPI.js b/src/api/teamAPI.js index 4289883..520410e 100644 --- a/src/api/teamAPI.js +++ b/src/api/teamAPI.js @@ -44,7 +44,6 @@ export const teamAPI = { return axiosWithAuth.get("/user/me/teams"); }, getTeamAnnouncements(filter) { - // occupationClassifications가 비어 있는지 확인 const { occupationClassifications, ...rest } = filter; const params = { ...rest, @@ -59,4 +58,19 @@ export const teamAPI = { }, }); }, + getResumeAnnouncements(filter) { + const { occupationClassifications, ...rest } = filter; + const params = { + ...rest, + occupationClassifications: + occupationClassifications.length > 0 ? occupationClassifications : "", + }; + + return axiosWithAuth.get("/resume-announcement", { + params, + paramsSerializer: (params) => { + return qs.stringify(params, { arrayFormat: "repeat" }); + }, + }); + }, }; diff --git a/src/pages/MemberSearch/memberSearch.js b/src/pages/MemberSearch/memberSearch.js index 86d0879..2baa8f0 100644 --- a/src/pages/MemberSearch/memberSearch.js +++ b/src/pages/MemberSearch/memberSearch.js @@ -1,24 +1,52 @@ -import { useState } from "react"; -import TeamCardGrid from "../../components/CardGrid/teamCardGrid"; +import React, { useState, useEffect } from "react"; +import MemberCardGrid from "../../components/CardGrid/memberCardGrid"; import Introduce from "../../components/Introduce/introduce"; import Navigation from "../../components/Navigation/navigation"; import PaginationComponent from "../../components/PagenationComponent/pagenationComponent"; import SideNavigation from "../../components/SideNavigation/sideNavigation"; -import memberTestData2 from "../../api/testDummyData/memberTestDats2"; -import memberTestData3 from "../../api/testDummyData/memberTestData3"; -import MemberCardGrid from "../../components/CardGrid/memberCardGrid"; +import { jobCategories } from "../../api/testDummyData/jobPosition"; import { WriteButton } from "../../components/SideNavigation/styles"; import { useNavigate } from "react-router-dom"; -import { jobCategories } from "../../api/testDummyData/jobPosition"; import Footer from "../../components/Footer/footer"; +import { teamAPI } from "../../api/teamAPI"; +import { useRecoilValue } from "recoil"; +import { occupationClassificationsState } from "../../states/occupationState"; + const MemberSearch = () => { - const [currentPage, setCurrentPage] = useState(1); const navigate = useNavigate(); + const [currentPage, setCurrentPage] = useState(1); + const [announcements, setAnnouncements] = useState([]); + const [totalPages, setTotalPages] = useState(1); + const occupationClassifications = useRecoilValue( + occupationClassificationsState, + ); + + const fetchResumeAnnouncements = async (page) => { + try { + const filter = { + page: page - 1, + size: 10, + occupationClassifications: + occupationClassifications.length > 0 ? occupationClassifications : "", + }; + + const response = await teamAPI.getResumeAnnouncements(filter); + setAnnouncements(response.data.data.content); + setTotalPages(response.data.data.totalPages); + console.log(response.data.data.content); + } catch (error) { + console.error("Error fetching resume announcements:", error); + } + }; + + useEffect(() => { + fetchResumeAnnouncements(currentPage); + }, [currentPage, occupationClassifications]); const handlePageChange = (pageNumber) => { setCurrentPage(pageNumber); - // 추가적인 페이지 변경 처리 로직 }; + return (
@@ -43,10 +71,7 @@ const MemberSearch = () => {
- -
-
- +
{ }} > From 2baf8d357e93e2fd6a56374dba9366941aab1795 Mon Sep 17 00:00:00 2001 From: jihunchoi Date: Sun, 2 Jun 2024 14:11:04 +0900 Subject: [PATCH 08/27] =?UTF-8?q?feat:=20#52-=ED=8C=80=20=EB=94=94?= =?UTF-8?q?=ED=85=8C=EC=9D=BC=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=A0=9C?= =?UTF-8?q?=EC=9E=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.js | 2 + src/components/Card/teamCard.js | 9 ++- src/pages/TeamDetail/styles.js | 121 +++++++++++++++++++++++++++++ src/pages/TeamDetail/teamDetail.js | 99 +++++++++++++++++++++++ 4 files changed, 230 insertions(+), 1 deletion(-) create mode 100644 src/pages/TeamDetail/styles.js create mode 100644 src/pages/TeamDetail/teamDetail.js diff --git a/src/App.js b/src/App.js index 1fc607d..db04d1b 100644 --- a/src/App.js +++ b/src/App.js @@ -15,6 +15,7 @@ import ContestDetail from "./pages/ContestDetailPage/contestDetailPage"; import TeamMemberRecruitmentNotice from "./components/TeamMemberRecruitmentNotice/teamMemberRecruitmentNotice"; import RegisterMember from "./pages/RegisterMember/registerMember"; import MyTeamDetail from "./components/MyPage/MyTeamDetail/myTeamDetail"; +import TeamDetail from "./pages/TeamDetail/teamDetail"; const App = () => { const [userInfo, setUserInfo] = useRecoilState(userInfoState); @@ -58,6 +59,7 @@ const App = () => { } /> } /> } /> + } />
diff --git a/src/components/Card/teamCard.js b/src/components/Card/teamCard.js index 2c80075..f4991ec 100644 --- a/src/components/Card/teamCard.js +++ b/src/components/Card/teamCard.js @@ -1,3 +1,4 @@ +import { useNavigate } from "react-router-dom"; import { ButtonBox, Container, @@ -50,8 +51,14 @@ const occupationOptions = { }; const TeamCard = ({ data }) => { + const navigate = useNavigate(); + + const clickTeamCard = () => { + console.log(data.teamId); + navigate(`${data.teamId}`); + }; return ( - +
{ + const location = useLocation(); + const [teamInfo, setTeamInfo] = useState({}); + const [participants, setParticipants] = useState([]); + + useEffect(() => { + const url = location.pathname; + const result = url.split("/"); + const teamId = result[result.length - 1]; + console.log(teamId); + + teamAPI + .getTeamById(teamId) + .then((res) => { + console.log(res); + console.log(res.data.data); + setTeamInfo(res.data.data); + setParticipants(res.data.data.participants || []); + }) + .catch((err) => { + console.log(err); + }); + }, [location]); + + const handleApply = () => { + alert("지원하기 버튼을 눌렀습니다!"); + }; + + return ( +
+ + + + + + + 팀명: + 연락처: + 이메일: + 생성일: + + + {teamInfo.name} + {teamInfo.phoneNumber} + {teamInfo.email} + {teamInfo.formationDate} + + + {teamInfo.introduction} +
+ 해당 팀에 지원하기 +
+
+ +

소속 팀원 정보

+ {participants.map((participant, index) => ( + + + + {participant.name} + {participant.details} + + + ))} +
+
+
+
+ ); +}; + +export default TeamDetail; From 1153366b52fc5b5f5151db6b808fc516e8cbfa0f Mon Sep 17 00:00:00 2001 From: jihunchoi Date: Sun, 2 Jun 2024 14:42:40 +0900 Subject: [PATCH 09/27] =?UTF-8?q?feat:=20#52-=ED=8C=80=EC=9B=90=EA=B5=AC?= =?UTF-8?q?=ED=95=98=EA=B8=B0=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/teamAPI.js | 5 ++- src/components/Card/memberCard.js | 43 +++++++++++++++++++++- src/pages/RegisterMember/registerMember.js | 2 +- src/pages/TeamDetail/teamDetail.js | 9 +++++ 4 files changed, 55 insertions(+), 4 deletions(-) diff --git a/src/api/teamAPI.js b/src/api/teamAPI.js index 520410e..252d42f 100644 --- a/src/api/teamAPI.js +++ b/src/api/teamAPI.js @@ -12,7 +12,7 @@ export const teamAPI = { name: data.name, introduction: data.introduction, domain: data.domain, - location: data.location, + region: data.location, phoneNumber: data.phoneNumber, email: data.email, }), @@ -73,4 +73,7 @@ export const teamAPI = { }, }); }, + getTeamParticipantsByTeamId(id) { + return axiosWithAuth.get(`/team/${id}/participant`); + }, }; diff --git a/src/components/Card/memberCard.js b/src/components/Card/memberCard.js index 2197a63..4f33731 100644 --- a/src/components/Card/memberCard.js +++ b/src/components/Card/memberCard.js @@ -13,6 +13,42 @@ import { Title, } from "./styles"; +const occupationOptions = { + design_ui_ux: "UI/UX 디자인", + design_illustration_character: "일러스트/캐릭터 디자인", + design_movie_motion_graphic: "영화/모션그래픽 디자인", + design_product_package: "제품/패키지 디자인", + design_passion: "열정 디자인", + design_crafts: "공예 디자인", + design_graphic: "그래픽 디자인", + development_frontend: "프론트엔드 개발", + development_backend: "백엔드 개발", + development_ai: "AI 개발", + development_devops: "DevOps 개발", + development_security: "보안 개발", + development_game: "게임 개발", + development_embedded: "임베디드 개발", + development_dba: "DBA", + plan: "기획", + media_editing_movie: "영화 편집", + media_filming_movie: "영화 촬영", + media_pd: "PD", + media_photographer: "사진작가", + media_sound_engineer: "음향 엔지니어", + marketing_management: "마케팅 관리", + marketing_promotion: "마케팅 홍보", + marketing_consulting: "마케팅 컨설팅", + translation_english: "영어 번역", + translation_japanese: "일본어 번역", + translation_chinese: "중국어 번역", + translation_spanish: "스페인어 번역", + translation_arabic: "아랍어 번역", + translation_hindi: "힌디어 번역", + translation_french: "프랑스어 번역", + translation_etc: "기타 번역", + etc: "기타", +}; + const MemberCard = ({ data }) => { return ( @@ -59,8 +95,11 @@ const MemberCard = ({ data }) => {
- {data.skill1} - {data.skill2} + {data.occupationClassifications.map((item, index) => { + return ( + {occupationOptions[item]} + ); + })}
diff --git a/src/pages/RegisterMember/registerMember.js b/src/pages/RegisterMember/registerMember.js index 900051a..2544a8d 100644 --- a/src/pages/RegisterMember/registerMember.js +++ b/src/pages/RegisterMember/registerMember.js @@ -115,7 +115,7 @@ const RegisterMember = ({ setIsCreateTeam }) => { ), publish: publish, expiredDate: expiredDate.toISOString(), - region: location.value, + region: location.label, }; console.log(data); diff --git a/src/pages/TeamDetail/teamDetail.js b/src/pages/TeamDetail/teamDetail.js index 1e14206..866d6d6 100644 --- a/src/pages/TeamDetail/teamDetail.js +++ b/src/pages/TeamDetail/teamDetail.js @@ -42,6 +42,15 @@ const TeamDetail = () => { .catch((err) => { console.log(err); }); + + teamAPI + .getTeamParticipantsByTeamId(teamId) + .then((res) => { + console.log(res); + }) + .catch((err) => { + console.log(err); + }); }, [location]); const handleApply = () => { From 4562df59172a59c8807934880abcbcc21d4503ed Mon Sep 17 00:00:00 2001 From: jihunchoi Date: Sun, 2 Jun 2024 14:57:15 +0900 Subject: [PATCH 10/27] =?UTF-8?q?fix:=20#52-=EC=86=8C=EC=86=8D=20=ED=8C=80?= =?UTF-8?q?=EC=9B=90=20=EC=A0=95=EB=B3=B4=20=EC=98=A4=EB=A5=98=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/TeamDetail/teamDetail.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/pages/TeamDetail/teamDetail.js b/src/pages/TeamDetail/teamDetail.js index 866d6d6..60267a6 100644 --- a/src/pages/TeamDetail/teamDetail.js +++ b/src/pages/TeamDetail/teamDetail.js @@ -37,7 +37,6 @@ const TeamDetail = () => { console.log(res); console.log(res.data.data); setTeamInfo(res.data.data); - setParticipants(res.data.data.participants || []); }) .catch((err) => { console.log(err); @@ -46,7 +45,8 @@ const TeamDetail = () => { teamAPI .getTeamParticipantsByTeamId(teamId) .then((res) => { - console.log(res); + console.log(res.data.data); + setParticipants(res.data.data); }) .catch((err) => { console.log(err); @@ -89,12 +89,11 @@ const TeamDetail = () => { {participants.map((participant, index) => ( - {participant.name} - {participant.details} + {participant.name.first} ))} From 9bc10149549d02b5d61d6cf74ba9ad0668f38047 Mon Sep 17 00:00:00 2001 From: jihunchoi Date: Sun, 2 Jun 2024 15:54:32 +0900 Subject: [PATCH 11/27] =?UTF-8?q?feat:=20#52-=ED=8C=80=20=EB=94=94?= =?UTF-8?q?=ED=85=8C=EC=9D=BC=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20=EB=B0=8F=20=EC=A7=80=EC=9B=90=20API=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/applicationAPI.js | 12 +++++ src/api/teamAPI.js | 3 ++ src/components/Card/teamCard.js | 4 +- src/pages/TeamDetail/styles.js | 55 +++++++++++++++++++ src/pages/TeamDetail/teamDetail.js | 87 ++++++++++++++++++++++++++---- 5 files changed, 149 insertions(+), 12 deletions(-) create mode 100644 src/api/applicationAPI.js diff --git a/src/api/applicationAPI.js b/src/api/applicationAPI.js new file mode 100644 index 0000000..87138c9 --- /dev/null +++ b/src/api/applicationAPI.js @@ -0,0 +1,12 @@ +import { axiosWithAuth } from "./axios"; + +export const applicationAPI = { + applyTeamAnnouncement(announcementId, resumeId) { + return axiosWithAuth.post( + `/application/${announcementId}?resume_id=${resumeId}`, + ); + }, + postNewTeamAnnouncement(data, teamId) { + return axiosWithAuth.post("/team-announcement", data); + }, +}; diff --git a/src/api/teamAPI.js b/src/api/teamAPI.js index 252d42f..94faeda 100644 --- a/src/api/teamAPI.js +++ b/src/api/teamAPI.js @@ -76,4 +76,7 @@ export const teamAPI = { getTeamParticipantsByTeamId(id) { return axiosWithAuth.get(`/team/${id}/participant`); }, + getTeamAnnouncementById(id) { + return axiosWithAuth.get(`/team-announcement/${id}`); + }, }; diff --git a/src/components/Card/teamCard.js b/src/components/Card/teamCard.js index f4991ec..8535d93 100644 --- a/src/components/Card/teamCard.js +++ b/src/components/Card/teamCard.js @@ -55,7 +55,9 @@ const TeamCard = ({ data }) => { const clickTeamCard = () => { console.log(data.teamId); - navigate(`${data.teamId}`); + console.log(data.teamId); + console.log(data.id); + navigate(`${data.id}`); }; return ( diff --git a/src/pages/TeamDetail/styles.js b/src/pages/TeamDetail/styles.js index fdb7c4c..5958471 100644 --- a/src/pages/TeamDetail/styles.js +++ b/src/pages/TeamDetail/styles.js @@ -119,3 +119,58 @@ export const ParticipantDetails = styled.div` font-size: 14px; color: #555; `; +export const ModalOverlay = styled.div` + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.7); + display: flex; + align-items: center; + justify-content: center; +`; + +export const Modal = styled.div` + background: white; + padding: 20px; + border-radius: 8px; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); +`; + +export const ModalContent = styled.div` + display: flex; + flex-direction: column; + align-items: center; +`; + +export const ModalInput = styled.input` + margin: 10px 0; + padding: 10px; + font-size: 16px; + width: 100px; + text-align: center; +`; + +export const ModalButtonWrapper = styled.div` + display: flex; + gap: 10px; +`; + +export const ConfirmButton = styled.button` + padding: 10px 20px; + background-color: #4caf50; + color: white; + border: none; + border-radius: 5px; + cursor: pointer; +`; + +export const CancelButton = styled.button` + padding: 10px 20px; + background-color: #f44336; + color: white; + border: none; + border-radius: 5px; + cursor: pointer; +`; diff --git a/src/pages/TeamDetail/teamDetail.js b/src/pages/TeamDetail/teamDetail.js index 60267a6..33dbb74 100644 --- a/src/pages/TeamDetail/teamDetail.js +++ b/src/pages/TeamDetail/teamDetail.js @@ -18,32 +18,45 @@ import { ParticipantInfo, ParticipantName, ParticipantDetails, + ModalOverlay, + Modal, + ModalContent, + ModalInput, + ModalButtonWrapper, + ConfirmButton, + CancelButton, } from "./styles"; +import { applicationAPI } from "../../api/applicationAPI"; const TeamDetail = () => { const location = useLocation(); + const [announcementInfo, setAnnouncementInfo] = useState({}); const [teamInfo, setTeamInfo] = useState({}); const [participants, setParticipants] = useState([]); + const [teamAnnouncementId, setTeamAnnouncementId] = useState(); + const [isModalOpen, setIsModalOpen] = useState(false); + const [applyCount, setApplyCount] = useState(1); useEffect(() => { const url = location.pathname; const result = url.split("/"); - const teamId = result[result.length - 1]; - console.log(teamId); + const teamAnnouncementId = result[result.length - 1]; + setTeamAnnouncementId(teamAnnouncementId); + console.log(teamAnnouncementId); teamAPI - .getTeamById(teamId) + .getTeamAnnouncementById(teamAnnouncementId) .then((res) => { console.log(res); console.log(res.data.data); - setTeamInfo(res.data.data); + setAnnouncementInfo(res.data.data); }) .catch((err) => { console.log(err); }); teamAPI - .getTeamParticipantsByTeamId(teamId) + .getTeamParticipantsByTeamId(teamAnnouncementId) .then((res) => { console.log(res.data.data); setParticipants(res.data.data); @@ -53,8 +66,40 @@ const TeamDetail = () => { }); }, [location]); + useEffect(() => { + teamAPI + .getTeamById(announcementInfo.teamId) + .then((res) => { + console.log(res); + console.log("team ind"); + console.log(res.data.data); + setTeamInfo(res.data.data); + }) + .catch((err) => { + console.log(err); + }); + }, [announcementInfo]); + const handleApply = () => { - alert("지원하기 버튼을 눌렀습니다!"); + setIsModalOpen(true); + }; + + const handleConfirmApply = () => { + applicationAPI + .applyTeamAnnouncement(teamAnnouncementId, applyCount) + .then((res) => { + console.log(res); + }) + .catch((err) => { + console.log(err); + }) + .finally(() => { + setIsModalOpen(false); + }); + }; + + const handleCancelApply = () => { + setIsModalOpen(false); }; return ( @@ -63,21 +108,23 @@ const TeamDetail = () => { - + - 팀명: + 프로젝트명: 연락처: 이메일: 생성일: + 지역: - {teamInfo.name} + {announcementInfo.title} {teamInfo.phoneNumber} {teamInfo.email} - {teamInfo.formationDate} + {announcementInfo.createDate} + {announcementInfo.region} - {teamInfo.introduction} + {announcementInfo.description}
@@ -100,6 +147,24 @@ const TeamDetail = () => {
+ {isModalOpen && ( + + + +

팀 지원에 필요한 당신의 이력서 번호를 입력하세요

+ setApplyCount(Number(e.target.value))} + /> + + 확인 + 취소 + +
+
+
+ )}
); }; From 4c5cf6c487af9a44b448149047be30f7473475e7 Mon Sep 17 00:00:00 2001 From: jihunchoi Date: Sun, 2 Jun 2024 15:57:05 +0900 Subject: [PATCH 12/27] =?UTF-8?q?refactor;=20#52-=EC=BB=B4=ED=8F=AC?= =?UTF-8?q?=EB=84=8C=ED=8A=B8,=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=9D=B4?= =?UTF-8?q?=EB=A6=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.js | 10 +++++++--- src/components/Navigation/navigation.js | 2 +- .../{TeamDetail => TeamAnnouncementDetail}/styles.js | 0 .../teamAnnouncementDetail.js} | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) rename src/pages/{TeamDetail => TeamAnnouncementDetail}/styles.js (100%) rename src/pages/{TeamDetail/teamDetail.js => TeamAnnouncementDetail/teamAnnouncementDetail.js} (98%) diff --git a/src/App.js b/src/App.js index db04d1b..c32d6cd 100644 --- a/src/App.js +++ b/src/App.js @@ -15,7 +15,8 @@ import ContestDetail from "./pages/ContestDetailPage/contestDetailPage"; import TeamMemberRecruitmentNotice from "./components/TeamMemberRecruitmentNotice/teamMemberRecruitmentNotice"; import RegisterMember from "./pages/RegisterMember/registerMember"; import MyTeamDetail from "./components/MyPage/MyTeamDetail/myTeamDetail"; -import TeamDetail from "./pages/TeamDetail/teamDetail"; +import TeamDetail from "./pages/TeamAnnouncementDetail/teamAnnouncementDetail"; +import TeamAnnouncementDetail from "./pages/TeamAnnouncementDetail/teamAnnouncementDetail"; const App = () => { const [userInfo, setUserInfo] = useRecoilState(userInfoState); @@ -52,14 +53,17 @@ const App = () => { } /> } /> } /> - } /> + } /> } /> } /> } /> } /> } /> } /> - } /> + } + />
diff --git a/src/components/Navigation/navigation.js b/src/components/Navigation/navigation.js index 98c4755..70f9fb9 100644 --- a/src/components/Navigation/navigation.js +++ b/src/components/Navigation/navigation.js @@ -44,7 +44,7 @@ const Navigation = (props) => { { - navigate("/team"); + navigate("/teamannouncement"); }} > 팀구하기 diff --git a/src/pages/TeamDetail/styles.js b/src/pages/TeamAnnouncementDetail/styles.js similarity index 100% rename from src/pages/TeamDetail/styles.js rename to src/pages/TeamAnnouncementDetail/styles.js diff --git a/src/pages/TeamDetail/teamDetail.js b/src/pages/TeamAnnouncementDetail/teamAnnouncementDetail.js similarity index 98% rename from src/pages/TeamDetail/teamDetail.js rename to src/pages/TeamAnnouncementDetail/teamAnnouncementDetail.js index 33dbb74..7e4b8c0 100644 --- a/src/pages/TeamDetail/teamDetail.js +++ b/src/pages/TeamAnnouncementDetail/teamAnnouncementDetail.js @@ -28,7 +28,7 @@ import { } from "./styles"; import { applicationAPI } from "../../api/applicationAPI"; -const TeamDetail = () => { +const TeamAnnouncementDetail = () => { const location = useLocation(); const [announcementInfo, setAnnouncementInfo] = useState({}); const [teamInfo, setTeamInfo] = useState({}); @@ -169,4 +169,4 @@ const TeamDetail = () => { ); }; -export default TeamDetail; +export default TeamAnnouncementDetail; From 66ca006c862b0db8cd1da249d6e79005c41193e5 Mon Sep 17 00:00:00 2001 From: jihunchoi Date: Sun, 2 Jun 2024 17:16:03 +0900 Subject: [PATCH 13/27] =?UTF-8?q?feat:=20#52-=ED=8C=80=20=EC=A7=80?= =?UTF-8?q?=EC=9B=90=ED=95=98=EA=B8=B0,=20=EC=9D=B4=EB=A0=A5=EC=84=9C=20?= =?UTF-8?q?=EB=B6=88=EB=9F=AC=EC=98=A4=EA=B8=B0=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Card/teamCard.js | 11 ++- src/pages/TeamAnnouncementDetail/styles.js | 47 +++++++-- .../teamAnnouncementDetail.js | 98 ++++++++++++++----- 3 files changed, 115 insertions(+), 41 deletions(-) diff --git a/src/components/Card/teamCard.js b/src/components/Card/teamCard.js index 8535d93..f089fef 100644 --- a/src/components/Card/teamCard.js +++ b/src/components/Card/teamCard.js @@ -54,9 +54,12 @@ const TeamCard = ({ data }) => { const navigate = useNavigate(); const clickTeamCard = () => { - console.log(data.teamId); - console.log(data.teamId); - console.log(data.id); + console.log(data); + console.log(data); + console.log(data); + console.log(data); + console.log(data); + navigate(`${data.id}`); }; return ( @@ -66,7 +69,7 @@ const TeamCard = ({ data }) => { display: "flex", }} > - +
($isSelected ? "#f0f0f0" : "white")}; + + &:hover { + background-color: #f0f0f0; + } +`; + +export const ResumeItemDetail = styled.div` + margin-bottom: 5px; +`; + +export const ResumeItemDetailSmall = styled.div` + font-size: 14px; + margin-bottom: 5px; `; export const ModalButtonWrapper = styled.div` + margin-top: 14px; display: flex; gap: 10px; `; export const ConfirmButton = styled.button` padding: 10px 20px; - background-color: #4caf50; + background-color: #377bff; color: white; border: none; border-radius: 5px; @@ -168,9 +195,9 @@ export const ConfirmButton = styled.button` export const CancelButton = styled.button` padding: 10px 20px; - background-color: #f44336; - color: white; - border: none; + background-color: #ffffff; + color: #f44336; + border: 1px solid #f44336; border-radius: 5px; cursor: pointer; `; diff --git a/src/pages/TeamAnnouncementDetail/teamAnnouncementDetail.js b/src/pages/TeamAnnouncementDetail/teamAnnouncementDetail.js index 7e4b8c0..04867c7 100644 --- a/src/pages/TeamAnnouncementDetail/teamAnnouncementDetail.js +++ b/src/pages/TeamAnnouncementDetail/teamAnnouncementDetail.js @@ -25,23 +25,30 @@ import { ModalButtonWrapper, ConfirmButton, CancelButton, + ResumeList, + ResumeItem, + ResumeItemDetail, + ResumeItemDetailSmall, } from "./styles"; import { applicationAPI } from "../../api/applicationAPI"; +import { resumeAPI } from "../../api/resumeAPI"; const TeamAnnouncementDetail = () => { const location = useLocation(); const [announcementInfo, setAnnouncementInfo] = useState({}); const [teamInfo, setTeamInfo] = useState({}); const [participants, setParticipants] = useState([]); + const [resumes, setResumes] = useState([]); const [teamAnnouncementId, setTeamAnnouncementId] = useState(); const [isModalOpen, setIsModalOpen] = useState(false); - const [applyCount, setApplyCount] = useState(1); + const [selectedResumeId, setSelectedResumeId] = useState(); useEffect(() => { const url = location.pathname; const result = url.split("/"); const teamAnnouncementId = result[result.length - 1]; setTeamAnnouncementId(teamAnnouncementId); + console.log("qwe"); console.log(teamAnnouncementId); teamAPI @@ -54,39 +61,50 @@ const TeamAnnouncementDetail = () => { .catch((err) => { console.log(err); }); - - teamAPI - .getTeamParticipantsByTeamId(teamAnnouncementId) - .then((res) => { - console.log(res.data.data); - setParticipants(res.data.data); - }) - .catch((err) => { - console.log(err); - }); }, [location]); useEffect(() => { - teamAPI - .getTeamById(announcementInfo.teamId) + if (announcementInfo.teamId) { + teamAPI + .getTeamById(announcementInfo.teamId) + .then((res) => { + console.log(res); + console.log("team ind"); + console.log(res.data.data); + setTeamInfo(res.data.data); + }) + .catch((err) => { + console.log(err); + }); + + teamAPI + .getTeamParticipantsByTeamId(announcementInfo.teamId) + .then((res) => { + console.log(res.data.data); + setParticipants(res.data.data); + }) + .catch((err) => { + console.log(err); + }); + } + }, [announcementInfo]); + + const handleApply = () => { + setIsModalOpen(true); + resumeAPI + .getResume() .then((res) => { - console.log(res); - console.log("team ind"); console.log(res.data.data); - setTeamInfo(res.data.data); + setResumes(res.data.data); }) .catch((err) => { console.log(err); }); - }, [announcementInfo]); - - const handleApply = () => { - setIsModalOpen(true); }; const handleConfirmApply = () => { applicationAPI - .applyTeamAnnouncement(teamAnnouncementId, applyCount) + .applyTeamAnnouncement(teamAnnouncementId, selectedResumeId) .then((res) => { console.log(res); }) @@ -96,10 +114,27 @@ const TeamAnnouncementDetail = () => { .finally(() => { setIsModalOpen(false); }); + setSelectedResumeId(); }; const handleCancelApply = () => { setIsModalOpen(false); + setSelectedResumeId(); + }; + + const handleResumeSelect = (resumeId) => { + setSelectedResumeId(resumeId); + }; + + const formatDate = (dateString) => { + const options = { + year: "numeric", + month: "2-digit", + day: "2-digit", + hour: "2-digit", + minute: "2-digit", + }; + return new Date(dateString).toLocaleString(undefined, options); }; return ( @@ -151,12 +186,21 @@ const TeamAnnouncementDetail = () => { -

팀 지원에 필요한 당신의 이력서 번호를 입력하세요

- setApplyCount(Number(e.target.value))} - /> +

제출할 이력서를 아래에서 선택하세요.

+ + {resumes.map((resume, index) => ( + handleResumeSelect(resume.id)} + $isSelected={resume.id === selectedResumeId} + > + {resume.title} + + {formatDate(resume.timeStamp.updateAt)} 에 수정됨 + + + ))} + 확인 취소 From 8cb5af95c79f06aa4acb99c05b3bb6d3941c3430 Mon Sep 17 00:00:00 2001 From: jihunchoi Date: Sun, 2 Jun 2024 18:01:32 +0900 Subject: [PATCH 14/27] =?UTF-8?q?feat:=20#52-=EC=9D=B4=EA=B2=83=EC=A0=80?= =?UTF-8?q?=EA=B2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/teamAPI.js | 2 +- src/components/Card/teamCard.js | 6 -- src/components/MyPage/MyTeam/myTeam.js | 2 +- src/components/MyPage/MyTeam/styles.js | 4 +- .../MyPageCard/MyTeamCard/myTeamCard.js | 40 +++++----- .../MyPageCard/MyTeamCard/styles.js | 76 +++---------------- 6 files changed, 34 insertions(+), 96 deletions(-) diff --git a/src/api/teamAPI.js b/src/api/teamAPI.js index 94faeda..2fdb532 100644 --- a/src/api/teamAPI.js +++ b/src/api/teamAPI.js @@ -41,7 +41,7 @@ export const teamAPI = { return axiosWithAuth.post("/team/invite", data); }, getMyTeams() { - return axiosWithAuth.get("/user/me/teams"); + return axiosWithAuth.get("/user/me/team"); }, getTeamAnnouncements(filter) { const { occupationClassifications, ...rest } = filter; diff --git a/src/components/Card/teamCard.js b/src/components/Card/teamCard.js index f089fef..ea50fe6 100644 --- a/src/components/Card/teamCard.js +++ b/src/components/Card/teamCard.js @@ -54,12 +54,6 @@ const TeamCard = ({ data }) => { const navigate = useNavigate(); const clickTeamCard = () => { - console.log(data); - console.log(data); - console.log(data); - console.log(data); - console.log(data); - navigate(`${data.id}`); }; return ( diff --git a/src/components/MyPage/MyTeam/myTeam.js b/src/components/MyPage/MyTeam/myTeam.js index 66c7eb7..5f7f9ff 100644 --- a/src/components/MyPage/MyTeam/myTeam.js +++ b/src/components/MyPage/MyTeam/myTeam.js @@ -110,7 +110,7 @@ const MyTeam = ({ setIsCreateTeam, innerRef }) => { {myTeams.map((item) => ( - + ))} diff --git a/src/components/MyPage/MyTeam/styles.js b/src/components/MyPage/MyTeam/styles.js index 0b1e491..a994007 100644 --- a/src/components/MyPage/MyTeam/styles.js +++ b/src/components/MyPage/MyTeam/styles.js @@ -78,14 +78,14 @@ export const CreateTeamButton = styled.button` `; export const CardContainter = styled.div` + display: grid; + grid-template-columns: repeat(2, 1fr); margin-left: auto; margin-right: auto; margin-top: 30px; margin-bottom: 50px; width: 767px; height: 600px; - display: flex; - flex-wrap: wrap; gap: 20px; overflow-y: auto; `; diff --git a/src/components/MyPageCard/MyTeamCard/myTeamCard.js b/src/components/MyPageCard/MyTeamCard/myTeamCard.js index f0ab3bd..0fc3548 100644 --- a/src/components/MyPageCard/MyTeamCard/myTeamCard.js +++ b/src/components/MyPageCard/MyTeamCard/myTeamCard.js @@ -11,6 +11,7 @@ import { Introduction, TeamMemberButtton, EditButton, + Button, } from "./styles"; import { ReactComponent as MemberCenterLine } from "../../../assets/myPage/MemberCenterLine.svg"; import { useNavigate } from "react-router-dom"; @@ -43,28 +44,27 @@ const MyTeamCard = ({ data }) => { return ( - {data.name} - [{data.name}] - [{data.region}] - - - {data.recruitment ? "모집중" : "모집완료"} - - | {formatFormationDate(data.formationDate)} - - - - {data.introduction} - + {data.name} + {data.introduction} +
+
- 팀원 관리 - 소개 페이지 수정 + > + + +
); }; diff --git a/src/components/MyPageCard/MyTeamCard/styles.js b/src/components/MyPageCard/MyTeamCard/styles.js index 0e66fb4..65a211e 100644 --- a/src/components/MyPageCard/MyTeamCard/styles.js +++ b/src/components/MyPageCard/MyTeamCard/styles.js @@ -1,88 +1,32 @@ import styled from "styled-components"; export const Containter = styled.div` - position: relative; - width: 360px; - height: 246px; - border: 1.9px solid; + display: flex; + flex-direction: column; + border: 2px solid; border-radius: 11px; border-color: #c9c9c9; + padding: 20px; + justify-content: space-between; `; -export const ProejctName = styled.label` - position: absolute; - left: 24px; - top: 19px; +export const TeamName = styled.label` font-size: 17px; font-weight: 700; color: #6d758f; `; -export const TeamName = styled.label` - position: absolute; - left: 24px; - top: 57px; - font-size: 11px; - font-weight: 600; - color: #6d758f; -`; - -export const Region = styled.label` - position: absolute; - left: 24px; - top: 71px; - font-size: 11px; - font-weight: 600; - color: #6d758f; -`; - -export const Recruitment = styled.label` - position: absolute; - right: 76px; - top: 24px; - font-size: 11px; - font-weight: 400; -`; - -export const RecruitmentTime = styled.label` - position: absolute; - width: 45px; - font-size: 11px; - font-weight: 400; - color: #6d758f; -`; - export const Introduction = styled.label` - position: absolute; - left: 26px; - top: 108px; font-size: 15px; font-weight: 400; color: #6d758f; `; -export const TeamMemberButtton = styled.button` - position: absolute; - left: 14px; - top: 201px; - width: 159px; - height: 32px; - border: 2px solid; - border-radius: 4px; - border-color: #376fff; - font-size: 14px; - font-weight: 400; - color: #376fff; - background-color: #ffffff; +export const Button = styled.button` + all: unset; cursor: pointer; -`; - -export const EditButton = styled.button` - position: absolute; - right: 14px; - top: 201px; - width: 159px; - height: 32px; + width: 100%; + height: 30px; border: 2px solid; border-radius: 4px; border-color: #376fff; From aaa8dd0f36eb05825860c3c69d5facf1a1cc2c8c Mon Sep 17 00:00:00 2001 From: jihunchoi Date: Sun, 2 Jun 2024 18:20:37 +0900 Subject: [PATCH 15/27] =?UTF-8?q?feat:=20#52-=EC=86=8C=EC=86=8D=ED=8C=80?= =?UTF-8?q?=EC=9B=90=20=EC=A0=95=EB=B3=B4=20Ui=20=EC=97=85=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/TeamAnnouncementDetail/styles.js | 13 +++++---- .../teamAnnouncementDetail.js | 28 +++++++++++-------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/src/pages/TeamAnnouncementDetail/styles.js b/src/pages/TeamAnnouncementDetail/styles.js index 5ab1f48..04fff97 100644 --- a/src/pages/TeamAnnouncementDetail/styles.js +++ b/src/pages/TeamAnnouncementDetail/styles.js @@ -78,6 +78,7 @@ export const ApplyButton = styled.button` export const ParticipantsWrapper = styled.div` display: flex; flex-direction: column; + align-items: start; width: 100%; border: 2px solid #ddd; border-radius: 10px; @@ -88,9 +89,9 @@ export const ParticipantsWrapper = styled.div` export const ParticipantCard = styled.div` display: flex; + flex-direction: column; align-items: center; padding: 10px; - border-bottom: 1px solid #ddd; &:last-child { border-bottom: none; @@ -98,11 +99,11 @@ export const ParticipantCard = styled.div` `; export const ParticipantImage = styled.img` - width: 50px; - height: 50px; + width: 100px; + height: 100px; border-radius: 50%; object-fit: cover; - margin-right: 10px; + cursor: pointer; `; export const ParticipantInfo = styled.div` @@ -111,8 +112,10 @@ export const ParticipantInfo = styled.div` `; export const ParticipantName = styled.div` - font-size: 16px; + margin-top: 14px; + font-size: 18px; font-weight: bold; + cursor: pointer; `; export const ParticipantDetails = styled.div` diff --git a/src/pages/TeamAnnouncementDetail/teamAnnouncementDetail.js b/src/pages/TeamAnnouncementDetail/teamAnnouncementDetail.js index 04867c7..d056fca 100644 --- a/src/pages/TeamAnnouncementDetail/teamAnnouncementDetail.js +++ b/src/pages/TeamAnnouncementDetail/teamAnnouncementDetail.js @@ -167,18 +167,22 @@ const TeamAnnouncementDetail = () => {
-

소속 팀원 정보

- {participants.map((participant, index) => ( - - - - {participant.name.first} - - - ))} +
+

소속 팀원 정보

+
+
+ {participants.map((participant, index) => ( + + + + {participant.name.fullName} + + + ))} +