From 5aa1157f80e106bc50c57e3d93e614ab1e9fabd2 Mon Sep 17 00:00:00 2001 From: llddang Date: Sun, 1 Dec 2024 20:48:27 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=EC=8A=A4=ED=84=B0=EB=94=94=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=EC=97=90=20=ED=95=99=EC=8A=B5?= =?UTF-8?q?=EC=9E=90=EB=A3=8C=20=EB=93=B1=EB=A1=9D=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #364 --- .../team/[teamId]/study/[studyId]/page.tsx | 55 +++++++++++++------ 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/src/app/team/[teamId]/study/[studyId]/page.tsx b/src/app/team/[teamId]/study/[studyId]/page.tsx index 163b116..fbd990c 100644 --- a/src/app/team/[teamId]/study/[studyId]/page.tsx +++ b/src/app/team/[teamId]/study/[studyId]/page.tsx @@ -5,6 +5,7 @@ import { useAtomValue } from 'jotai'; import NextLink from 'next/link'; import { useRouter } from 'next/navigation'; import { useEffect, useState } from 'react'; +import { BsPlus } from 'react-icons/bs'; import { MdOutlineArrowForwardIos } from 'react-icons/md'; import { getDocumentList } from '@/app/api/document'; @@ -12,6 +13,8 @@ import { getStudy, getStudyMembers } from '@/app/api/study'; import { myTeamAtom } from '@/atom'; import DocumentCard from '@/components/DocumentCard'; import Title from '@/components/Title'; +import CreateDocumentModal from '@/containers/study/CreateDocumentModal'; +import { CreateDocument } from '@/containers/study/CreateDocumentModal/type'; import CurriculumCard from '@/containers/study/CurriculumCard'; import DeleteStudyModal from '@/containers/study/Modal/DeleteStudyModal'; import StudyModal from '@/containers/study/Modal/StudyModal'; @@ -30,6 +33,8 @@ const Page = ({ params }: { params: { teamId: number; studyId: number } }) => { const [isDeleteModalOpen, setIsDeleteModalOpen] = useState(false); const [isTerminateModalOpen, setIsTerminateModalOpen] = useState(false); const [documentArray, setDocumentArray] = useState([]); + const [isCreateDocumentModalOpen, setIsCreateDocumentModalOpen] = useState(false); + const categoryData: CreateDocument = { groupId: params.studyId, groupType: 'studies' }; const router = useRouter(); const user = useGetUser(); @@ -58,7 +63,7 @@ const Page = ({ params }: { params: { teamId: number; studyId: number } }) => { setDocumentArray(res.body.content); } }); - }, [params.studyId, isEditModalOpen]); + }, [params.studyId, isEditModalOpen, isCreateDocumentModalOpen]); useEffect(() => { if (!isTerminateModalOpen) { @@ -108,25 +113,34 @@ const Page = ({ params }: { params: { teamId: number; studyId: number } }) => { /> )} - - + + + + } + isRound + size="icon_sm" + variant="icon_orange" + /> + 전체 보기 + } - isRound - size="icon_sm" - variant="icon_orange" + icon={} + onClick={() => setIsCreateDocumentModalOpen(true)} + size="icon_md" + variant="icon_orange_dark" /> - 전체 보기 - + {documentArray && documentArray.length > 0 ? ( {documentArray.map((data) => ( @@ -186,6 +200,13 @@ const Page = ({ params }: { params: { teamId: number; studyId: number } }) => { isOpen={isDeleteModalOpen} setIsOpen={setIsDeleteModalOpen} /> + + setIsCreateDocumentModalOpen(false)} + categoryData={categoryData} + category="create" + /> ); }; From 5431028190baf22cdbd26b4847daf4b5c02b4829 Mon Sep 17 00:00:00 2001 From: llddang Date: Sun, 1 Dec 2024 20:53:07 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=EC=8A=A4=ED=84=B0=EB=94=94?= =?UTF-8?q?=EC=9B=90=20=EB=AA=A9=EB=A1=9D=EC=9D=B4=20=EC=9E=88=EC=9D=84=20?= =?UTF-8?q?=EB=95=8C=EB=A7=8C=20=EC=8A=A4=ED=84=B0=EB=94=94=EC=9B=90=20?= =?UTF-8?q?=EB=AA=A9=EB=A1=9D=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8?= =?UTF-8?q?=EB=A5=BC=20=EB=A0=8C=EB=8D=94=EB=A7=81=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #365 --- src/app/team/[teamId]/study/[studyId]/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/team/[teamId]/study/[studyId]/page.tsx b/src/app/team/[teamId]/study/[studyId]/page.tsx index fbd990c..f2816ed 100644 --- a/src/app/team/[teamId]/study/[studyId]/page.tsx +++ b/src/app/team/[teamId]/study/[studyId]/page.tsx @@ -176,7 +176,7 @@ const Page = ({ params }: { params: { teamId: number; studyId: number } }) => { refetchMembers={handleRefetchMembers} /> )} - + {participantData && }