From cbe3498c955477ae6c9d0e8c10475609ea469f39 Mon Sep 17 00:00:00 2001 From: Kimmy Haecho <118002501+siwolee@users.noreply.github.com> Date: Tue, 10 Sep 2024 23:35:31 +0900 Subject: [PATCH 01/20] Update main-deploy.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 아젠다 endpoint update --- .github/workflows/main-deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main-deploy.yml b/.github/workflows/main-deploy.yml index 7b6452000..4e5685cb6 100644 --- a/.github/workflows/main-deploy.yml +++ b/.github/workflows/main-deploy.yml @@ -20,6 +20,7 @@ jobs: - name: Build env: NEXT_PUBLIC_SERVER_ENDPOINT: ${{ secrets.NEXT_PUBLIC_SERVER_ENDPOINT }} + NEXT_PUBLIC_AGENDA_SERVER_ENDPOINT: ${{ secrets.NEXT_PUBLIC_AGENDA_SERVER_ENDPOINT }} NEXT_PUBLIC_CLIENT_ENDPOINT: ${{ secrets.NEXT_PUBLIC_CLIENT_ENDPOINT }} NEXT_PUBLIC_MANAGE_SERVER_ENDPOINT: ${{ secrets.NEXT_PUBLIC_MANAGE_SERVER_ENDPOINT }} NEXT_PUBLIC_PARTY_MANAGE_SERVER_ENDPOINT: ${{ secrets.NEXT_PUBLIC_PARTY_MANAGE_SERVER_ENDPOINT }} From 9d62a60c2114ece3411e09aa9f6ff257955a270d Mon Sep 17 00:00:00 2001 From: Lee Jeong Ron <83465749+JeongRon@users.noreply.github.com> Date: Sat, 21 Sep 2024 17:23:53 +0900 Subject: [PATCH 02/20] =?UTF-8?q?Style:=20agendaDetail=20/=20=EB=8C=80?= =?UTF-8?q?=ED=9A=8C=20=EC=84=A4=EB=AA=85=20=ED=85=8D=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EA=B0=9C=ED=96=89=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/agenda/agendaDetail/tabs/AgendaDescription.tsx | 2 +- styles/agenda/agendaDetail/tabs/AgendaDescription.module.scss | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/components/agenda/agendaDetail/tabs/AgendaDescription.tsx b/components/agenda/agendaDetail/tabs/AgendaDescription.tsx index fc7bf383f..72db01c78 100644 --- a/components/agenda/agendaDetail/tabs/AgendaDescription.tsx +++ b/components/agenda/agendaDetail/tabs/AgendaDescription.tsx @@ -37,7 +37,7 @@ export default function AgendaDescription({ agendaData }: AgendaProps) {

대회 설명

- {agendaContent} + {agendaContent}

모집 완료 기간

diff --git a/styles/agenda/agendaDetail/tabs/AgendaDescription.module.scss b/styles/agenda/agendaDetail/tabs/AgendaDescription.module.scss index 5f3fd4da4..6ac429e80 100644 --- a/styles/agenda/agendaDetail/tabs/AgendaDescription.module.scss +++ b/styles/agenda/agendaDetail/tabs/AgendaDescription.module.scss @@ -76,3 +76,7 @@ flex-direction: column; } } + +.preWrap { + white-space: pre-wrap; +} From 0092bd8701c0ef9832e1b6dc7137a5faadfaee2d Mon Sep 17 00:00:00 2001 From: Lee Jeong Ron <83465749+JeongRon@users.noreply.github.com> Date: Wed, 2 Oct 2024 15:33:48 +0900 Subject: [PATCH 03/20] =?UTF-8?q?Fix:=20=EC=B2=AB=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20AGENDA=20->=20Agenda?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/agenda/Home/AgendaTitle.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/agenda/Home/AgendaTitle.tsx b/components/agenda/Home/AgendaTitle.tsx index 0e8b1a628..ccda6f444 100644 --- a/components/agenda/Home/AgendaTitle.tsx +++ b/components/agenda/Home/AgendaTitle.tsx @@ -7,7 +7,7 @@ const AgendaTitle = () => { return ( <>
-
AGENDA
+
Agenda
-

Ticket

+

handleNavigation('/agenda/ticket')} + > + Ticket +

); } diff --git a/components/agenda/utils/CustomImage.tsx b/components/agenda/utils/CustomImage.tsx index cc43ff197..87ae26f23 100644 --- a/components/agenda/utils/CustomImage.tsx +++ b/components/agenda/utils/CustomImage.tsx @@ -1,6 +1,6 @@ import Image from 'next/image'; import classNames from 'classnames'; -import { useState } from 'react'; +import { MouseEvent, useState } from 'react'; import { CustomImageProps } from 'types/agenda/utils/customImageTypes'; import styles from 'styles/agenda/utils/CustomImage.module.scss'; @@ -10,8 +10,12 @@ const CustomImage = ({ alt, addClass, isProfileImage, + name, + description, }: CustomImageProps) => { const [imgSrc, setImgSrc] = useState(src); + const [isHovered, setIsHovered] = useState(false); + const [mousePosition, setMousePosition] = useState({ x: 0, y: 0 }); const handleError = () => { isProfileImage @@ -19,17 +23,41 @@ const CustomImage = ({ : setImgSrc('/image/agenda/42-icon.svg'); }; + const handleMouseEnter = (e: MouseEvent) => { + setIsHovered(true); + setMousePosition({ + x: e.clientX, + y: e.clientY, + }); + }; + + const handleMouseLeave = () => { + setIsHovered(false); + }; + return src ? ( - {alt} +
+ {alt} + {isHovered && ( +
+
{name}
+
{description}
+
+ )} +
) : null; }; diff --git a/styles/agenda/Profile/ProfileCard.module.scss b/styles/agenda/Profile/ProfileCard.module.scss index de91d199d..9008b9611 100644 --- a/styles/agenda/Profile/ProfileCard.module.scss +++ b/styles/agenda/Profile/ProfileCard.module.scss @@ -222,6 +222,7 @@ } .acheivementContainer { + position: relative; // acheivement hover width: 100%; height: auto; @@ -233,7 +234,7 @@ display: flex; flex-wrap: wrap; width: 100%; - height: 5rem; + height: 9rem; margin-top: 0.5rem; gap: 0.3rem; overflow-y: scroll; diff --git a/styles/agenda/common.scss b/styles/agenda/common.scss index 7485a5931..b2e8df5e8 100644 --- a/styles/agenda/common.scss +++ b/styles/agenda/common.scss @@ -39,6 +39,9 @@ $bg-color-deadline-cancel: rgba(18, 18, 18, 0.8); $agenda-list-bg: linear-gradient(180deg, #fff 65px, rgba(0, 0, 0, 0) 100%), var(--color-bg) lightgray 50% / cover no-repeat; +$hover-bg-color: #e0c7fe; +$hover-bg-title: #cda7fc; + // font-family $font-text-bold: '11StreetGothicBold'; $font-text-regular: '11StreetGothicRegular'; diff --git a/styles/agenda/utils/CustomImage.module.scss b/styles/agenda/utils/CustomImage.module.scss index edeb4e8fd..9e199eac3 100644 --- a/styles/agenda/utils/CustomImage.module.scss +++ b/styles/agenda/utils/CustomImage.module.scss @@ -1,6 +1,36 @@ @import 'styles/agenda/common.scss'; +.imageContainer { + width: 100%; + height: 100%; +} + .customImage { width: 100%; height: 100%; } + +.hoverContainer { + position: absolute; + bottom: 90%; + left: 55%; + z-index: 9999; + display: flex; + flex-direction: column; + background-color: $hover-bg-color; + border-radius: $radius-extra-small; + gap: 0.1rem; +} + +.hoverName { + @include text('description-regular'); + padding: 0.3rem; + font-weight: 900; + background-color: $hover-bg-title; + border-radius: $radius-extra-small $radius-extra-small 0 0; +} + +.hoverDescription { + @include text('description'); + padding: 0.3rem; +} diff --git a/types/agenda/utils/customImageTypes.ts b/types/agenda/utils/customImageTypes.ts index e97236b4a..ffd69b329 100644 --- a/types/agenda/utils/customImageTypes.ts +++ b/types/agenda/utils/customImageTypes.ts @@ -3,4 +3,6 @@ export interface CustomImageProps { alt: string; addClass?: string; isProfileImage?: boolean; + name?: string; + description?: string; } From 0972f8c52817e486c7b4a4d910a871a6cc10c2cd Mon Sep 17 00:00:00 2001 From: Lee Jeong Ron <83465749+JeongRon@users.noreply.github.com> Date: Wed, 2 Oct 2024 23:15:22 +0900 Subject: [PATCH 08/20] =?UTF-8?q?Style:=20index=20=EC=B2=AB=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=ED=85=8D=EC=8A=A4=ED=8A=B8=20=EB=8B=A8?= =?UTF-8?q?=EC=96=B4=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/agenda/Home/AgendaInfo.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/agenda/Home/AgendaInfo.tsx b/components/agenda/Home/AgendaInfo.tsx index f15d20e05..b21000e5d 100644 --- a/components/agenda/Home/AgendaInfo.tsx +++ b/components/agenda/Home/AgendaInfo.tsx @@ -19,7 +19,7 @@ const AgendaInfo = ({
현재 모집 중인 행사가 없습니다.
-
행사 리스트 페이지로 이동 하기
+
Agenda 페이지 이동
From 0fd92fddc3f14c9e965d9ecd6f4a49478b896448 Mon Sep 17 00:00:00 2001 From: Lee Jeong Ron <83465749+JeongRon@users.noreply.github.com> Date: Wed, 2 Oct 2024 23:35:45 +0900 Subject: [PATCH 09/20] =?UTF-8?q?=08Style:=20=ED=94=84=EB=A1=9C=ED=95=84?= =?UTF-8?q?=20=ED=8E=98=EC=9D=B4=EC=A7=80=20/=20=ED=94=84=EB=A1=9C?= =?UTF-8?q?=ED=95=84=20=EC=B9=B4=EB=93=9C,=20=EB=A6=AC=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20height=20=EC=A1=B0=EC=A0=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- styles/agenda/Profile/AgendaProfile.module.scss | 4 ++-- styles/agenda/Profile/ProfileCard.module.scss | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/styles/agenda/Profile/AgendaProfile.module.scss b/styles/agenda/Profile/AgendaProfile.module.scss index 07a7b6b1b..d41552f5f 100644 --- a/styles/agenda/Profile/AgendaProfile.module.scss +++ b/styles/agenda/Profile/AgendaProfile.module.scss @@ -53,8 +53,8 @@ } @media screen and (min-width: 961px) { width: 100%; - min-height: 43rem; - max-height: 43rem; + min-height: 47rem; + max-height: 47rem; margin-top: 1rem; } } diff --git a/styles/agenda/Profile/ProfileCard.module.scss b/styles/agenda/Profile/ProfileCard.module.scss index 9008b9611..98583b986 100644 --- a/styles/agenda/Profile/ProfileCard.module.scss +++ b/styles/agenda/Profile/ProfileCard.module.scss @@ -2,7 +2,7 @@ .profileImageCard { width: 22rem; - height: 31rem; + height: 35rem; perspective: 1000px; margin-bottom: 1rem; } @@ -217,8 +217,11 @@ .description { width: 100%; - height: 2.5rem; + min-height: 3.5rem; + max-height: 3.5rem; + overflow-y: scroll; @include text(description-s); + white-space: pre-wrap; } .acheivementContainer { @@ -234,7 +237,7 @@ display: flex; flex-wrap: wrap; width: 100%; - height: 9rem; + height: 8rem; margin-top: 0.5rem; gap: 0.3rem; overflow-y: scroll; From af3a744ae7324ba719d50028f5f239122b62be5e Mon Sep 17 00:00:00 2001 From: Lee Jeong Ron <83465749+JeongRon@users.noreply.github.com> Date: Thu, 3 Oct 2024 22:04:40 +0900 Subject: [PATCH 10/20] =?UTF-8?q?Fix:=20=ED=94=84=EB=A1=9C=ED=95=84=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20/=20AGENDA=20LIST=20UI=20?= =?UTF-8?q?=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 내 프로필이 페이지 아닐 경우 / 참여중 탭 삭제 - 데이터 (참여중, 개최중, 참여기록, 개최기록) 없을 시, 텍스트 띄워주기 --- components/agenda/Profile/CurrentList.tsx | 4 +- components/agenda/Profile/HistoryList.tsx | 4 +- pages/agenda/profile/user.tsx | 83 +++++++++---------- styles/agenda/Profile/CurrentList.module.scss | 1 + styles/agenda/Profile/HistoryList.module.scss | 1 + 5 files changed, 45 insertions(+), 48 deletions(-) diff --git a/components/agenda/Profile/CurrentList.tsx b/components/agenda/Profile/CurrentList.tsx index 64e0dd6c0..3df648145 100644 --- a/components/agenda/Profile/CurrentList.tsx +++ b/components/agenda/Profile/CurrentList.tsx @@ -16,7 +16,9 @@ const CurrentList = ({
)) ) : ( -
참여중 아젠다가 없습니다.
+
+ 아젠다 목록이 비어있습니다. 새로운 아젠다를 시작해보세요! +
)}
); diff --git a/components/agenda/Profile/HistoryList.tsx b/components/agenda/Profile/HistoryList.tsx index e9110f459..e21053293 100644 --- a/components/agenda/Profile/HistoryList.tsx +++ b/components/agenda/Profile/HistoryList.tsx @@ -110,7 +110,9 @@ const HistoryList = ({ historyListData }: HistoryListProps) => { } ) ) : ( -
아젠다 기록이 없습니다.
+
+ 아젠다 기록이 없습니다. 새로운 아젠다를 시작해보세요! +
)}
diff --git a/pages/agenda/profile/user.tsx b/pages/agenda/profile/user.tsx index c2fe22cdd..f41222774 100644 --- a/pages/agenda/profile/user.tsx +++ b/pages/agenda/profile/user.tsx @@ -25,7 +25,7 @@ const AgendaProfile = () => { const isMyProfile = useRef(false); // 내 프로필 페이지인지 아닌지 확인 const [isIntraId, setIsIntraId] = useState(false); // 인트라 아이디가 42에 있는지 확인 const [isAgendaId, setIsAgendaId] = useState(false); // 인트라 아이디가 agenda에 있는지 확인 - const [activeTab, setActiveTab] = useState('current'); // 현재 활성화된 탭 상태 관리 + const [activeTab, setActiveTab] = useState(''); // 현재 활성화된 탭 상태 관리 /** API GET */ // GET: intraData (42 인트라 데이터 가져오기) @@ -39,7 +39,11 @@ const AgendaProfile = () => { url: `/profile/${queryIntraId}`, isReady: isIntraId, }); - + // GET: current + const currentListData = useFetchGet({ + url: '/profile/current/list', + isReady: isAgendaId, + }).data; // GET: host current const { content: hostCurrentListData, @@ -48,11 +52,6 @@ const AgendaProfile = () => { url: `/host/current/list/${queryIntraId}`, isReady: isAgendaId, }); - // GET: current team - const currentListData = useFetchGet({ - url: '/profile/current/list', - isReady: isAgendaId, - }).data; // GET: host history const { content: hostHistoryListData, @@ -70,17 +69,19 @@ const AgendaProfile = () => { isReady: isAgendaId, }); - /** useEffect */ + /** useEffect - 순차적으로 데이터 호출 */ useEffect(() => { const updateProfileStatus = () => { // 1. queryIntraId와 myIntraId가 있을 때 프로필 URL 설정 isMyProfile.current = queryIntraId === myIntraId; + isMyProfile.current + ? setActiveTab('current') + : setActiveTab('hostCurrent'); // 2. intraData가 있으면 인트라 아이디가 42에 있다는 뜻이므로 isIntraId = true setIsIntraId(!!intraData); // 3. agendaProfileData가 있으면 아젠다에 등록된 사용자이므로 isAgendaId = true setIsAgendaId(!!agendaProfileData); }; - setIsIntraId(false); setIsAgendaId(false); updateProfileStatus(); @@ -123,17 +124,19 @@ const AgendaProfile = () => {
AGENDA LIST
- + {isMyProfile.current ? ( + + ) : null}

- {/* Host Current List */} - {activeTab === 'hostCurrent' && - hostCurrentListData && - hostCurrentListData.length > 0 ? ( - <> - - - - ) : activeTab === 'hostCurrent' ? ( - '' - ) : null} - - {/* Current List */} + {/* Current List - 참여중 */} {activeTab === 'current' && isMyProfile.current && currentListData ? ( <> - ) : activeTab === 'current' ? ( - '' ) : null} - {/* History Host List */} - {activeTab === 'hostHistory' && - hostHistoryListData && - hostHistoryListData.length > 0 ? ( + {/* Host Current List - 개최중 */} + {activeTab === 'hostCurrent' && hostCurrentListData ? ( <> - {' '} - + + - ) : activeTab === 'hostHistory' ? ( - '' ) : null} - {/* History List */} + {/* History List - 참여 기록 */} {activeTab === 'history' && historyListData ? ( <> {' '} - ) : activeTab === 'history' ? ( - '' + ) : null} + + {/* History Host List - 개최 기록 */} + {activeTab === 'hostHistory' && hostHistoryListData ? ( + <> + {' '} + + ) : null}
diff --git a/styles/agenda/Profile/CurrentList.module.scss b/styles/agenda/Profile/CurrentList.module.scss index 6ad137d52..68f812a09 100644 --- a/styles/agenda/Profile/CurrentList.module.scss +++ b/styles/agenda/Profile/CurrentList.module.scss @@ -9,6 +9,7 @@ .currentTeamEmpty { @include text(description-s); + margin-left: 0.5rem; } .currentItemWrapper { diff --git a/styles/agenda/Profile/HistoryList.module.scss b/styles/agenda/Profile/HistoryList.module.scss index d920441e4..39c574de6 100644 --- a/styles/agenda/Profile/HistoryList.module.scss +++ b/styles/agenda/Profile/HistoryList.module.scss @@ -9,6 +9,7 @@ .historyEmpty { @include text(description-s); + margin-left: 0.5rem; } // ITEM From af33e897412e6b2e45be97be512f9dc4643b5bef Mon Sep 17 00:00:00 2001 From: Lee Jeong Ron <83465749+JeongRon@users.noreply.github.com> Date: Sat, 5 Oct 2024 13:22:23 +0900 Subject: [PATCH 11/20] =?UTF-8?q?Style:=20Agenda=20list=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20/=20=EB=B2=84=ED=8A=BC=20=ED=81=B4?= =?UTF-8?q?=EB=A6=AD=20=EC=BB=A4=EC=84=9C=20style=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/agenda/Layout/AgendaHeader.tsx | 1 - styles/agenda/Home/AgendaList.module.scss | 1 + styles/agenda/Layout/Header.module.scss | 11 ++++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/components/agenda/Layout/AgendaHeader.tsx b/components/agenda/Layout/AgendaHeader.tsx index 68a318608..78dd01617 100644 --- a/components/agenda/Layout/AgendaHeader.tsx +++ b/components/agenda/Layout/AgendaHeader.tsx @@ -1,5 +1,4 @@ import Link from 'next/link'; -import { useRouter } from 'next/router'; import { createContext, Dispatch, SetStateAction, useState } from 'react'; import { FiMenu } from 'react-icons/fi'; import Logo from 'public/image/main-logo.svg'; diff --git a/styles/agenda/Home/AgendaList.module.scss b/styles/agenda/Home/AgendaList.module.scss index bba4ae6c2..3668f7809 100644 --- a/styles/agenda/Home/AgendaList.module.scss +++ b/styles/agenda/Home/AgendaList.module.scss @@ -45,6 +45,7 @@ .agendaListStatus { @include text('statusButton'); + cursor: pointer; background: none; border: none; box-shadow: none; diff --git a/styles/agenda/Layout/Header.module.scss b/styles/agenda/Layout/Header.module.scss index f7a29a649..8676290cb 100644 --- a/styles/agenda/Layout/Header.module.scss +++ b/styles/agenda/Layout/Header.module.scss @@ -38,11 +38,12 @@ gap: 2rem; justify-content: flex-start; align-items: center; - .menuIcon { - width: 1.5rem; - height: 1.5rem; - cursor: pointer; - } +} + +.menuIcon { + width: 1.5rem; + height: 1.5rem; + cursor: pointer; } .logoWrap { From 47872b4964f1c6a972f024b4f8c9ed379f75be91 Mon Sep 17 00:00:00 2001 From: irenee-14 Date: Tue, 8 Oct 2024 13:56:37 +0900 Subject: [PATCH 12/20] =?UTF-8?q?Feat:=20=EB=8C=80=ED=9A=8C=20=EC=A2=85?= =?UTF-8?q?=EB=A3=8C=ED=95=98=EA=B8=B0=20=EB=B2=84=ED=8A=BC=20=EC=A1=B0?= =?UTF-8?q?=EA=B1=B4=20=EB=B3=80=EA=B2=BD,=20=EC=83=81=20=EC=9E=85?= =?UTF-8?q?=EB=A0=A5=ED=95=98=EA=B8=B0=20url=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/agenda/Form/AgendaResultForm.tsx | 33 ++++++++++++++++--- components/agenda/agendaDetail/AgendaInfo.tsx | 6 +--- pages/agenda/detail/host/index.tsx | 28 +++++++++++----- pages/agenda/detail/host/result.tsx | 20 +++++++---- .../agenda/Form/AgendaResultForm.module.scss | 26 +++++++++++++++ .../pages/agendakey/host/result.module.scss | 6 ++++ utils/agenda/getAgendaSnackBarInfo.ts | 4 +++ 7 files changed, 97 insertions(+), 26 deletions(-) diff --git a/components/agenda/Form/AgendaResultForm.tsx b/components/agenda/Form/AgendaResultForm.tsx index fd6cf2932..a4dabbc2b 100644 --- a/components/agenda/Form/AgendaResultForm.tsx +++ b/components/agenda/Form/AgendaResultForm.tsx @@ -1,4 +1,5 @@ -import React, { useState, useEffect, useRef } from 'react'; +import router from 'next/router'; +import React, { useEffect, useRef } from 'react'; import { AddElementBtn, DragBtn, @@ -178,7 +179,11 @@ const AgendaResultForm = ({ }); return ( -
+

- {award_idx} + {award_idx + 1} {': '}

@@ -245,7 +250,7 @@ const AgendaResultForm = ({ id='newAwardInput' ref={newAwardInputRef} type='text' - placeholder='추가할 상을 입력해주세요...' + placeholder='상을 입력해주세요.' onKeyUp={addAwardEnter} /> @@ -254,7 +259,25 @@ const AgendaResultForm = ({

- +
+ + +
); }; diff --git a/components/agenda/agendaDetail/AgendaInfo.tsx b/components/agenda/agendaDetail/AgendaInfo.tsx index a69f4c848..10cf58930 100644 --- a/components/agenda/agendaDetail/AgendaInfo.tsx +++ b/components/agenda/agendaDetail/AgendaInfo.tsx @@ -28,10 +28,6 @@ const subscribeTeam = ({ router, agendaKey }: CallbackProps) => { router.push(`/agenda/detail/team/create?agenda_key=${agendaKey}`); }; -const submitResults = ({ router, agendaKey }: CallbackProps) => { - router.push(`/agenda/detail/host/result?agenda_key=${agendaKey}`); -}; - export default function AgendaInfo({ agendaData, isHost, @@ -99,7 +95,7 @@ export default function AgendaInfo({ switch (agendaData.agendaStatus) { case AgendaStatus.CONFIRM: - return isHost ? { text: '결과입력', callback: submitResults } : null; + return isHost ? { text: '주최자 관리', callback: hostMode } : null; case AgendaStatus.OPEN: if (isHost) { // 주최자 diff --git a/pages/agenda/detail/host/index.tsx b/pages/agenda/detail/host/index.tsx index db42ba343..dfab0ba6b 100644 --- a/pages/agenda/detail/host/index.tsx +++ b/pages/agenda/detail/host/index.tsx @@ -20,6 +20,7 @@ const ModifyAgenda = () => { const { sendRequest } = useFetchRequest(); const { openModal } = useModal(); const agendaStatus = agendaData?.agendaStatus; + const agendaIsRanking = agendaData?.isRanking; const setSnackbar = useSetRecoilState(toastState); const handleClick = (description: string, onProceed: () => void) => { @@ -70,9 +71,14 @@ const ModifyAgenda = () => { const resultAgenda = () => { if (agendaStatus && agendaStatus === AgendaStatus.CONFIRM) { - handleClick('행사를 상 입력 없이 종료하시겠습니까?', () => { - sendRequest('PATCH', 'finish', {}, { agenda_key: agendaKey }); - router.push(`/agenda/detail?agenda_key=${agendaKey}`); + handleClick('행사를 종료하시겠습니까?', () => { + sendRequest( + 'PATCH', + 'finish', + { awards: [] }, + { agenda_key: agendaKey } + ); + window.location.href = `/agenda/detail?agenda_key=${agendaKey}`; }); } else { setSnackbar({ @@ -86,7 +92,7 @@ const ModifyAgenda = () => { const resultFormAgenda = () => { if (agendaStatus && agendaStatus === AgendaStatus.CONFIRM) { - handleClick('행사 종료 후 상 입력을 하시겠습니까?', () => { + handleClick('행사 종료 및 상 입력을 하시겠습니까?', () => { router.push(`/agenda/detail/host/result?agenda_key=${agendaKey}`); }); } else { @@ -111,6 +117,7 @@ const ModifyAgenda = () => { if (!agendaKey) { return ; } + console.log('data', agendaData); return ( <>
@@ -150,11 +157,14 @@ const ModifyAgenda = () => { 행사가 진행 중인 상태에서만 행사를 종료할 수 있습니다.
- - + {agendaIsRanking ? ( + + ) : ( + + )}
diff --git a/pages/agenda/detail/host/result.tsx b/pages/agenda/detail/host/result.tsx index 29a03ea51..f3471c5ad 100644 --- a/pages/agenda/detail/host/result.tsx +++ b/pages/agenda/detail/host/result.tsx @@ -24,7 +24,7 @@ function checkAwardSubmitable(awardList: AwardListProps[]) { const awardedTeams: { [key: string]: string } = {}; awardList.forEach((awardInfo) => { if (awardInfo.teams.length === 0) { - throw new Error(awardInfo.award + '상에 팀이 없습니다.'); + throw new Error(awardInfo.award + '에 팀이 없습니다.'); } awardInfo.teams.forEach((team) => { if (awardedTeams[team]) { @@ -59,7 +59,7 @@ function parseData(awardList: AwardListProps[]) { Data.push({ awardName: awardInfo.award, teamName: team, - awardPriority: key, + awardPriority: key + 1, }); }); }); @@ -118,15 +118,21 @@ const SubmitAgendaResult = () => { } const msg = awardlistToString(awardList); + openModal({ type: 'proceedCheck', title: '결과 제출 전 확인', description: msg + '\n결과를 제출하시겠습니까?', - onProceed: () => { - instanceInAgenda.patch(`/confirm?agenda_key=${agenda_key}`, { - awards: Data, - }); - closeModal(); + onProceed: async () => { + try { + await instanceInAgenda.patch(`/finish?agenda_key=${agenda_key}`, { + awards: Data, + }); + closeModal(); + window.location.href = `/agenda/detail?agenda_key=${agenda_key}`; + } catch (error) { + return error; + } }, }); }; diff --git a/styles/agenda/Form/AgendaResultForm.module.scss b/styles/agenda/Form/AgendaResultForm.module.scss index 2257141b0..1205493c1 100644 --- a/styles/agenda/Form/AgendaResultForm.module.scss +++ b/styles/agenda/Form/AgendaResultForm.module.scss @@ -106,3 +106,29 @@ outline: none; box-shadow: 0 0 5px 5px var(--highlight-yellow); } + +.formBtn { + display: flex; + height: 1rem; + flex: 1; + padding: 0.5rem; + margin: 0 0.5rem; + cursor: pointer; + user-select: none; + border-radius: $radius-small; + justify-content: center; + align-items: center; + &.submit { + @include textButton('submit', 'highlight'); + } + &.cancel { + @include textButton('cancel', 'default'); + } +} + +.buttonContainer { + display: flex; + margin: 1em 2rem; + gap: 1rem; + justify-content: space-between; +} diff --git a/styles/agenda/pages/agendakey/host/result.module.scss b/styles/agenda/pages/agendakey/host/result.module.scss index cbe1397c1..f0a52ddc2 100644 --- a/styles/agenda/pages/agendakey/host/result.module.scss +++ b/styles/agenda/pages/agendakey/host/result.module.scss @@ -1 +1,7 @@ @import 'styles/agenda/common.scss'; + +.container { + display: flex; + width: 100%; + padding: 0rem 4rem; +} diff --git a/utils/agenda/getAgendaSnackBarInfo.ts b/utils/agenda/getAgendaSnackBarInfo.ts index 4bb6d0f8b..e237ce89e 100644 --- a/utils/agenda/getAgendaSnackBarInfo.ts +++ b/utils/agenda/getAgendaSnackBarInfo.ts @@ -46,6 +46,10 @@ export default function getAgendaSnackBarInfo( severity: 'success', message: '대회가 성공적으로 확정되었습니다.', }, + '/finish': { + severity: 'success', + message: '결과가 성공적으로 등록되었습니다.', + }, '/cancel': { severity: 'info', message: '대회가 취소되었습니다.', From 152149c1649307723194deab25a57b1e6e1cbf96 Mon Sep 17 00:00:00 2001 From: irenee-14 Date: Tue, 8 Oct 2024 15:16:46 +0900 Subject: [PATCH 13/20] =?UTF-8?q?Feat:=20index=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=ED=99=94=EC=82=B4=ED=91=9C=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EB=B0=8F=20css=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/agenda/Home/AgendaInfo.tsx | 10 ++++++++-- pages/index.tsx | 21 ++++++++++++++------- styles/agenda/Home/AgendaInfo.module.scss | 6 ++++-- styles/index.module.scss | 13 +++++++++++++ 4 files changed, 39 insertions(+), 11 deletions(-) diff --git a/components/agenda/Home/AgendaInfo.tsx b/components/agenda/Home/AgendaInfo.tsx index b21000e5d..854ffb109 100644 --- a/components/agenda/Home/AgendaInfo.tsx +++ b/components/agenda/Home/AgendaInfo.tsx @@ -1,4 +1,5 @@ import Image from 'next/image'; +import router from 'next/router'; import { AgendaDataProps } from 'types/agenda/agendaDetail/agendaTypes'; import { showPeriod } from 'utils/handleTime'; import AgendaTags from 'components/agenda/utils/AgendaTags'; @@ -19,8 +20,13 @@ const AgendaInfo = ({
현재 모집 중인 행사가 없습니다.
-
Agenda 페이지 이동
- +
Agenda 가기
+ { + router.push('/agenda'); + }} + />
); diff --git a/pages/index.tsx b/pages/index.tsx index f2638220b..50cf2693c 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -2,6 +2,7 @@ import Image from 'next/image'; import { useRouter } from 'next/router'; import type { NextPage } from 'next'; import PageController from 'components/agenda/utils/PageController'; +import RightArrow from 'public/image/agenda/ChevronRight.svg'; import PingpongIcon from 'public/image/takgu/ping-pong.svg'; import styles from 'styles/index.module.scss'; @@ -14,12 +15,18 @@ const Index: NextPage = () => { return (
-

handleNavigation('/agenda')} - > - Agenda -

+
+

handleNavigation('/agenda')} + > + Agenda +

+ handleNavigation('/agenda')} + /> +
@@ -62,7 +69,7 @@ const Index: NextPage = () => {

handleNavigation('/takgu')} + // onClick={() => handleNavigation('/outer')} > Outer match

diff --git a/styles/agenda/Home/AgendaInfo.module.scss b/styles/agenda/Home/AgendaInfo.module.scss index 5b50dea4a..ddd61fddd 100644 --- a/styles/agenda/Home/AgendaInfo.module.scss +++ b/styles/agenda/Home/AgendaInfo.module.scss @@ -9,6 +9,7 @@ justify-content: center; align-items: center; gap: 2rem; + @include text('default'); } .emptyContent { @@ -17,13 +18,14 @@ justify-content: center; align-items: center; gap: 0.5rem; + @include text('tab'); } .arrowIcon { position: absolute; right: -2rem; - width: 1.5rem; - height: 1.5rem; + width: 1.2rem; + height: 1.2rem; } .agendaInfoContainer { diff --git a/styles/index.module.scss b/styles/index.module.scss index 4dc5ee2ba..e0f7d953f 100644 --- a/styles/index.module.scss +++ b/styles/index.module.scss @@ -20,6 +20,12 @@ cursor: pointer; } +.titleWarp { + display: flex; + align-items: center; + gap: 0.5rem; +} + .container { @include container(1); width: calc(100% - 2rem); @@ -66,3 +72,10 @@ .pingpong { grid-area: pingpong; } + +.arrowIcon { + width: 1.2rem; + height: 1.2rem; + pointer-events: auto; + cursor: pointer; +} From b9d839086ce60f6c600fe65dcdafeb5ca9bced2c Mon Sep 17 00:00:00 2001 From: irenee-14 Date: Tue, 8 Oct 2024 16:47:01 +0900 Subject: [PATCH 14/20] =?UTF-8?q?Fix:=20=EC=A7=80=EC=9B=90=ED=95=98?= =?UTF-8?q?=EA=B8=B0=20layout=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Layout/TakguLayout.tsx | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/Layout/TakguLayout.tsx b/Layout/TakguLayout.tsx index bd9d5c344..db0cd20e2 100644 --- a/Layout/TakguLayout.tsx +++ b/Layout/TakguLayout.tsx @@ -1,7 +1,6 @@ +import { useRouter } from 'next/router'; import { useRecoilValue } from 'recoil'; import { openCurrentMatchState } from 'utils/recoil/takgu/match'; -import AdminReject from 'components/admin/AdminReject'; -import AdminLayout from 'components/admin/Layout'; import CurrentMatch from 'components/takgu/Layout/CurrentMatch'; import Footer from 'components/takgu/Layout/Footer'; import Header from 'components/takgu/Layout/Header'; @@ -16,7 +15,6 @@ import useGetUserSeason from 'hooks/takgu/Layout/useGetUserSeason'; import useLiveCheck from 'hooks/takgu/Layout/useLiveCheck'; import useSetAfterGameModal from 'hooks/takgu/Layout/useSetAfterGameModal'; import { useUser } from 'hooks/takgu/Layout/useUser'; -import useAxiosResponse from 'hooks/useAxiosResponse'; import styles from 'styles/takgu/Layout/Layout.module.scss'; import PlayButton from '../components/takgu/Layout/PlayButton'; import UserLayout from '../components/takgu/Layout/UserLayout'; @@ -30,9 +28,9 @@ type TakguLayoutProps = { function TakguLayout({ children }: TakguLayoutProps) { const user = useUser(); const presentPath = usePathname(); + const path = useRouter().pathname; const openCurrentMatch = useRecoilValue(openCurrentMatchState); - // useAxiosResponse(); useGetUserSeason(presentPath); useSetAfterGameModal(); useLiveCheck(presentPath); @@ -41,14 +39,10 @@ function TakguLayout({ children }: TakguLayoutProps) { if (!user || !user.intraId) return null; switch (true) { - case presentPath.includes('takgu/admin'): - if (!user.isAdmin) return ; - return {children}; - - case presentPath.includes('takgu/recruit'): + case path.includes('takgu/recruit'): return {children}; - case presentPath === 'takgu/statistics' && user.isAdmin: + case path.includes('takgu/statistics') && user.isAdmin: return ( @@ -86,10 +80,8 @@ function TakguLayout({ children }: TakguLayoutProps) { const TakguAppLayout = ({ children }: TakguLayoutProps) => { return ( <> - - {children} - - + {children} + ); From 19f47afb8701e59e50aaad3f2f3c0d5fd8efd915 Mon Sep 17 00:00:00 2001 From: irenee-14 Date: Thu, 10 Oct 2024 10:16:59 +0900 Subject: [PATCH 15/20] =?UTF-8?q?Fix:=20=EC=9D=B8=EB=8D=B1=EC=8A=A4?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=9D=B4=EB=AF=B8=EC=A7=80=201:1?= =?UTF-8?q?=EA=B3=A0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index.tsx | 20 ++++++++++++-------- styles/index.module.scss | 10 ++++++++++ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/pages/index.tsx b/pages/index.tsx index 50cf2693c..f15e94bb2 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -41,13 +41,15 @@ const Index: NextPage = () => { className={styles.container} onClick={() => handleNavigation('/agenda/ticket')} > - ticket +
+ ticket +
@@ -61,7 +63,9 @@ const Index: NextPage = () => { className={styles.container} onClick={() => handleNavigation('/takgu')} > - +
+ +
diff --git a/styles/index.module.scss b/styles/index.module.scss index e0f7d953f..c3485c97e 100644 --- a/styles/index.module.scss +++ b/styles/index.module.scss @@ -79,3 +79,13 @@ pointer-events: auto; cursor: pointer; } + +.imageWarpper { + position: relative; + padding: 0.5rem; + overflow: hidden; + cursor: pointer; + @media screen and (max-width: 961px) { + padding: 1rem; + } +} From 4629048eb058fc289dd73c6c1ba5a49eca98e236 Mon Sep 17 00:00:00 2001 From: irenee-14 Date: Thu, 10 Oct 2024 10:18:13 +0900 Subject: [PATCH 16/20] =?UTF-8?q?Feat:=20=ED=97=A4=EB=8D=94=20=EB=B0=8F=20?= =?UTF-8?q?=EB=A9=94=EB=89=B4=EB=B0=94=20=EC=9C=84=EC=B9=98=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/agenda/Layout/AgendaHeader.tsx | 9 ++-- components/agenda/Layout/MenuBar.tsx | 18 ++++--- .../takgu/Layout/MenuBar/MenuBarElement.tsx | 11 ++-- styles/agenda/Layout/Header.module.scss | 9 +++- styles/agenda/Layout/MenuBar.module.scss | 52 +++++++++++++++++-- 5 files changed, 79 insertions(+), 20 deletions(-) diff --git a/components/agenda/Layout/AgendaHeader.tsx b/components/agenda/Layout/AgendaHeader.tsx index 78dd01617..ffbc04d8f 100644 --- a/components/agenda/Layout/AgendaHeader.tsx +++ b/components/agenda/Layout/AgendaHeader.tsx @@ -29,15 +29,16 @@ export default function AgendaHeader() {
+ HeaderState?.setOpenMenuBarState(!menu)} + /> +
- HeaderState?.setOpenMenuBarState(!menu)} - />
diff --git a/components/agenda/Layout/MenuBar.tsx b/components/agenda/Layout/MenuBar.tsx index 28075efd8..4fc01ee09 100644 --- a/components/agenda/Layout/MenuBar.tsx +++ b/components/agenda/Layout/MenuBar.tsx @@ -40,16 +40,20 @@ const MenuBar = ({ headerstate }: { headerstate: HeaderContextState }) => { headerstate.openMenuState ? styles.active : styles.inactive }`} > - +
+ +
+ {/* */} +
@@ -58,6 +62,8 @@ const MenuBar = ({ headerstate }: { headerstate: HeaderContextState }) => { +
+
{user?.isAdmin ? ( <> diff --git a/components/takgu/Layout/MenuBar/MenuBarElement.tsx b/components/takgu/Layout/MenuBar/MenuBarElement.tsx index 7fe74b20f..da800cd07 100644 --- a/components/takgu/Layout/MenuBar/MenuBarElement.tsx +++ b/components/takgu/Layout/MenuBar/MenuBarElement.tsx @@ -179,11 +179,12 @@ export const AdminMenu = () => { {isAdmin && (
- + + +
)}
diff --git a/styles/agenda/Layout/Header.module.scss b/styles/agenda/Layout/Header.module.scss index 8676290cb..b20b2e382 100644 --- a/styles/agenda/Layout/Header.module.scss +++ b/styles/agenda/Layout/Header.module.scss @@ -18,8 +18,11 @@ padding: 1rem; font-size: $font-size-l; - justify-content: space-between; + gap: 1rem; align-items: center; + @media screen and (min-width: 481px) { + gap: 1.5rem; + } } .logo { @@ -36,11 +39,15 @@ height: 100%; flex: 2; gap: 2rem; + // justify-content: center; justify-content: flex-start; align-items: center; } .menuIcon { + // position: absolute; + // left: 2; + z-index: 2; width: 1.5rem; height: 1.5rem; cursor: pointer; diff --git a/styles/agenda/Layout/MenuBar.module.scss b/styles/agenda/Layout/MenuBar.module.scss index 8a5c24370..5da906425 100644 --- a/styles/agenda/Layout/MenuBar.module.scss +++ b/styles/agenda/Layout/MenuBar.module.scss @@ -1,4 +1,5 @@ @import 'styles/agenda/common.scss'; + .container { position: fixed; top: 4rem; @@ -11,13 +12,13 @@ background: var(--menubar-bg); } .inactive { - right: calc(max(25vw, 200px) * -1); + left: calc(max(25vw, 200px) * -1); box-shadow: none; transition: all 0.5s; } .active { - right: 0; - box-shadow: -1px 0 6px 0 var(--color-text); + left: 0; // 변경 + box-shadow: 1px 0 6px 0 var(--color-text); transition: all 0.5s; } @@ -28,6 +29,7 @@ width: 100vw; height: 100vh; } + .button { display: flex; width: 100%; @@ -58,9 +60,17 @@ font-size: $font-size-s; color: var(--color-text); } + + h3 { + margin: 0; + margin-bottom: 1rem; + font-size: $font-size-s; + color: var(--color-text); + } p, h1, - h2 { + h2, + h3 { @include hoverAction; } } @@ -78,3 +88,37 @@ .activebg { z-index: 300; } + +.row { + display: flex; + justify-content: flex-start; + align-items: center; + margin: 0.5rem 0; +} + +.icon { + display: inline-flex; + width: 1.2rem; + height: 1.2rem; + margin-left: 0.5rem; + pointer-events: auto; + cursor: pointer; + align-items: center; + @include hoverAction; +} +.profile { + display: flex; + width: 100%; + width: 4.5rem; + height: 1.2rem; + flex-direction: column; + padding: 0.5rem; + margin: 0; + margin: 1rem 0.2rem; + border: var(--default-border); + border-radius: $radius-medium; + // box-shadow: var(--default-box-shadow); + border-radius: $radius-extra-small; + justify-content: center; + align-items: center; +} From cb6b085cec20fa81393e436297698ec5e781bf79 Mon Sep 17 00:00:00 2001 From: irenee-14 Date: Thu, 10 Oct 2024 10:46:11 +0900 Subject: [PATCH 17/20] =?UTF-8?q?Fix:=20=EB=AA=A8=EB=8B=AC=20=ED=98=B8?= =?UTF-8?q?=EC=B6=9C=EC=9C=84=EC=B9=98=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Layout/TakguLayout.tsx | 24 ++++++++++++++---------- utils/recoil/agenda/modalState.ts | 2 +- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/Layout/TakguLayout.tsx b/Layout/TakguLayout.tsx index db0cd20e2..ea2c1a20c 100644 --- a/Layout/TakguLayout.tsx +++ b/Layout/TakguLayout.tsx @@ -25,7 +25,7 @@ type TakguLayoutProps = { children: React.ReactNode; }; -function TakguLayout({ children }: TakguLayoutProps) { +const TakguLayout = ({ children }: TakguLayoutProps) => { const user = useUser(); const presentPath = usePathname(); const path = useRouter().pathname; @@ -38,18 +38,20 @@ function TakguLayout({ children }: TakguLayoutProps) { if (!user || !user.intraId) return null; - switch (true) { - case path.includes('takgu/recruit'): + const renderContent = () => { + if (path.includes('takgu/recruit')) { return {children}; + } - case path.includes('takgu/statistics') && user.isAdmin: + if (path.includes('takgu/statistics') && user.isAdmin) { return ( ); + } - case presentPath.includes('takgu'): + if (presentPath.includes('takgu')) { return ( <> @@ -65,12 +67,15 @@ function TakguLayout({ children }: TakguLayoutProps) { {children}