From b6f28d2ec3f1e897b7e9ca65538a13aaaf39b4a6 Mon Sep 17 00:00:00 2001 From: Lee Jeong Ron <83465749+JeongRon@users.noreply.github.com> Date: Tue, 3 Sep 2024 12:46:51 +0900 Subject: [PATCH 01/48] =?UTF-8?q?Feat:=20=EC=A3=BC=EC=B5=9C=EC=9E=90=20?= =?UTF-8?q?=EA=B6=8C=ED=95=9C=20=EC=95=84=EB=8B=88=EB=A9=B4=20alert=20?= =?UTF-8?q?=EB=B0=8F=20=EB=92=A4=EB=A1=9C=EA=B0=80=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/agenda/agendaDetail/AgendaInfo.tsx | 6 +-- pages/agenda/[agendaKey]/host/modify.tsx | 37 +++++++++---------- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/components/agenda/agendaDetail/AgendaInfo.tsx b/components/agenda/agendaDetail/AgendaInfo.tsx index 5b64fad66..1dfa21c56 100644 --- a/components/agenda/agendaDetail/AgendaInfo.tsx +++ b/components/agenda/agendaDetail/AgendaInfo.tsx @@ -19,9 +19,7 @@ const copyLink = () => { }; const hostMode = ({ router, agendaKey }: CallbackProps) => { - // router.push(`/agenda/${agendaKey}/host/modify`); // 기존 코드 - 주최자가 대회 수정 - // router.push(`/agenda/${agendaKey}/host/createAnnouncement`); // 공지사항 추가로 변경 - alert('host Mode 예정!'); + router.push(`/agenda/${agendaKey}/host/modify`); }; const subscribeTeam = ({ router, agendaKey }: CallbackProps) => { @@ -114,7 +112,7 @@ export default function AgendaInfo({ case AgendaStatus.OPEN: if (isHost) { // 주최자 - return { text: '주최자 관리', callback: hostMode }; // 주최자 관리 -> 대회 수정 / (변경) 공지사항 추가 버튼 + return { text: '주최자 관리', callback: hostMode }; } else if (isParticipant) { // 참가자 if (isSolo) { diff --git a/pages/agenda/[agendaKey]/host/modify.tsx b/pages/agenda/[agendaKey]/host/modify.tsx index ff19c8df6..ac9406265 100644 --- a/pages/agenda/[agendaKey]/host/modify.tsx +++ b/pages/agenda/[agendaKey]/host/modify.tsx @@ -1,33 +1,32 @@ import { useRouter } from 'next/router'; -import { CancelBtn } from 'components/agenda/button/Buttons'; -import AgendaForm from 'components/agenda/Form/AgendaForm'; -import { saveLocal } from 'pages/agenda/create'; +import { useEffect } from 'react'; import { useAgendaInfo } from 'hooks/agenda/useAgendaInfo'; +import { useUser } from 'hooks/takgu/Layout/useUser'; import styles from 'styles/agenda/pages/CreateAgenda.module.scss'; const ModifyAgenda = () => { const router = useRouter(); const { agendaKey } = router.query; - const data = useAgendaInfo(agendaKey as string); + const agendaData = useAgendaInfo(agendaKey as string); + const user = useUser(); + + useEffect(() => { + // 주최자 확인 + if (agendaData && user) { + if (agendaData.agendaHost !== user.intraId) { + alert('주최자만 접근 가능한 페이지입니다.'); + router.back(); + } + } + }, [agendaData, user, router]); return ( <>
-
- -
-

아젠다 수정하기

-

당부사항

- {data && ( - { - router.push(`/agenda/${agendaKey}`); - }} - /> - )} + {/* 공지사항 추가 */} + {/* 아젠다 확정 */} + {/* 아젠다 취소 */} + {/* 아젠다 결과작성 */}
); From ce6a9088bcb2f1c7f976c4fef141c356a19140a7 Mon Sep 17 00:00:00 2001 From: siwolee Date: Tue, 3 Sep 2024 14:00:24 +0900 Subject: [PATCH 02/48] =?UTF-8?q?fix:=20=EC=95=84=EC=9D=B4=ED=8F=B0=20?= =?UTF-8?q?=ED=8C=8C=EB=9E=80=EA=B8=80=EC=94=A8=20=EC=9D=B4=EC=8A=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- styles/color-theme.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/styles/color-theme.css b/styles/color-theme.css index 81b9a451f..3c4422d1a 100644 --- a/styles/color-theme.css +++ b/styles/color-theme.css @@ -77,3 +77,7 @@ html[data-theme='dark'] { :root { color: var(--color-text); } + +a { + color: var(color-text); +} From 35b2fd4655145503b2c5edf2997b4da8515c1231 Mon Sep 17 00:00:00 2001 From: siwolee Date: Tue, 3 Sep 2024 15:05:57 +0900 Subject: [PATCH 03/48] =?UTF-8?q?chore:=20=EC=98=A4=ED=83=80,=20&&?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EC=B6=9C=EB=A0=A5=ED=95=B4=EC=84=9C=20?= =?UTF-8?q?=EC=97=86=EC=9D=84=20=EA=B2=BD=EC=9A=B0=200=20=EB=B3=B4?= =?UTF-8?q?=EC=9D=B4=EB=8A=94=20=EC=97=90=EB=9F=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Layout/AdminLayout.tsx | 2 +- Layout/TakguLayout.tsx | 4 ++-- components/Pagination.tsx | 4 +++- components/agenda/Layout/MenuBar.tsx | 4 ++-- components/agenda/Layout/MenuBarContent.tsx | 8 ++++++-- components/agenda/Profile/ProfileCard.tsx | 8 ++++++-- .../agenda/agendaDetail/tabs/Participant.tsx | 2 +- components/agenda/teamDetail/TeamInfo.tsx | 2 +- components/takgu/user/BasicProfile.tsx | 4 +++- pages/admin/agenda/teamModify.tsx | 4 +++- pages/agenda/[agendaKey]/[teamUID]/index.tsx | 8 ++++++-- pages/agenda/[agendaKey]/host/modify.tsx | 4 +++- pages/agenda/index.tsx | 2 +- pages/agenda/profile/[intraId]/index.tsx | 18 +++++++++++++----- pages/agenda/ticket/index.tsx | 2 +- 15 files changed, 52 insertions(+), 24 deletions(-) diff --git a/Layout/AdminLayout.tsx b/Layout/AdminLayout.tsx index 9a23d7fc6..d7d029263 100644 --- a/Layout/AdminLayout.tsx +++ b/Layout/AdminLayout.tsx @@ -29,7 +29,7 @@ function AdminAppLayout({ children }: AdminLayoutProps) { return ( {children} - {ModalProviderComponent && } + {ModalProviderComponent ? : ''} ); } diff --git a/Layout/TakguLayout.tsx b/Layout/TakguLayout.tsx index c95d01aa0..b1728d95f 100644 --- a/Layout/TakguLayout.tsx +++ b/Layout/TakguLayout.tsx @@ -65,8 +65,8 @@ function TakguLayout({ children }: TakguLayoutProps) {
- {openCurrentMatch && } - {presentPath === '/' && } + {openCurrentMatch ? : ''} + {presentPath === '/' ? : ''}
{children}