From 8f51090e7666a139ad2fc6c419243dbf30bb2243 Mon Sep 17 00:00:00 2001 From: jaeywon Date: Fri, 19 Apr 2024 05:29:17 +0900 Subject: [PATCH 01/11] =?UTF-8?q?[FIx]=20=EA=B0=81=EA=B0=81=20=EB=B0=A9=20?= =?UTF-8?q?=ED=97=A4=EB=8D=94=20=EB=B3=80=EA=B2=BD,=20=EB=85=B8=EC=87=BC?= =?UTF-8?q?=ED=8C=A8=EB=84=90=ED=8B=B0=20=EC=95=88=EB=B3=B4=EC=9D=B4?= =?UTF-8?q?=EA=B2=8C=ED=95=98=EB=8A=94=EA=B2=83=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/admin/party/AdminCommentReport.tsx | 3 ++- components/admin/party/AdminPartyNoShow.tsx | 6 ++++-- components/admin/party/AdminPartyRoomReport.tsx | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/components/admin/party/AdminCommentReport.tsx b/components/admin/party/AdminCommentReport.tsx index 45719564f..9c522c1fc 100644 --- a/components/admin/party/AdminCommentReport.tsx +++ b/components/admin/party/AdminCommentReport.tsx @@ -41,6 +41,7 @@ export default function AdminCommentReport() { instanceInPartyManage .get(`/reports/comments?page=${currentPage}&size=10`) .then((res) => { + console.log(res); setCommentInfo({ commentReportList: res.data.commentReportList, totalPage: res.data.totalPage, @@ -60,7 +61,7 @@ export default function AdminCommentReport() { return (
- 댓글 신고리스트 + 댓글 신고 목록
diff --git a/components/admin/party/AdminPartyNoShow.tsx b/components/admin/party/AdminPartyNoShow.tsx index 65d48bbb0..b2356dda9 100644 --- a/components/admin/party/AdminPartyNoShow.tsx +++ b/components/admin/party/AdminPartyNoShow.tsx @@ -41,11 +41,13 @@ export default function AdminPartyNoShow() { instanceInPartyManage .get(`/reports/users?page=${currentPage}&size=10`) .then((res) => { + console.log(res); setNoShowInfo({ - noShowReportList: res.data.noShowReportList, + noShowReportList: res.data.userReportList, totalPages: res.data.totalPage, currentPage: currentPage, }); + console.log(noShowInfo); }) .catch((error) => { setSnackBar({ @@ -60,7 +62,7 @@ export default function AdminPartyNoShow() { return (
- 노쇼 신고리스트 + 노쇼 신고 목록
diff --git a/components/admin/party/AdminPartyRoomReport.tsx b/components/admin/party/AdminPartyRoomReport.tsx index 0984c6662..ffdfe40b0 100644 --- a/components/admin/party/AdminPartyRoomReport.tsx +++ b/components/admin/party/AdminPartyRoomReport.tsx @@ -61,7 +61,7 @@ export default function AdminPartyRoomReport() { return (
- 방 신고리스트 + 방 신고 목록
From b1eea8c22ae59ac4a8584de1408fc66667fa6018 Mon Sep 17 00:00:00 2001 From: jaeywon Date: Fri, 19 Apr 2024 05:32:52 +0900 Subject: [PATCH 02/11] =?UTF-8?q?[Fix]=20=EC=96=B4=EB=93=9C=EB=AF=BC=20?= =?UTF-8?q?=ED=85=9C=ED=94=8C=EB=A6=BF=20=EC=B9=B4=ED=85=8C=EA=B3=A0?= =?UTF-8?q?=EB=A6=AC=20=EC=9D=B4=EB=A6=84=20=EC=95=88=EB=B3=B4=EC=9D=B4?= =?UTF-8?q?=EB=8A=94=EA=B2=83=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/admin/party/PartyTemplate.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/admin/party/PartyTemplate.tsx b/components/admin/party/PartyTemplate.tsx index 0ddd656b9..3236bed16 100644 --- a/components/admin/party/PartyTemplate.tsx +++ b/components/admin/party/PartyTemplate.tsx @@ -17,7 +17,7 @@ import styles from 'styles/admin/party/AdminPartyCommon.module.scss'; const tableTitle: { [key: string]: string } = { gameTemplateId: '템플릿번호', - categoryId: '카테고리', + categoryName: '카테고리', gameName: '템플릿이름', maxGamePeople: '최대인원', minGamePeople: '최소인원', @@ -35,6 +35,7 @@ export default function PartyTemplate() { const setModal = useSetRecoilState(modalState); useEffect(() => { + console.log(templates); console.log('Render'); }, [templates]); From 0ddd170aea2c75c22637d1c3c19347e3a6a088d2 Mon Sep 17 00:00:00 2001 From: jaeywon Date: Fri, 19 Apr 2024 06:06:31 +0900 Subject: [PATCH 03/11] =?UTF-8?q?[Fix]=20adminTemplateModal=20=EC=B5=9C?= =?UTF-8?q?=EC=86=8C=EC=9D=B8=EC=9B=90,=20=EC=B5=9C=EB=8C=80=EC=9D=B8?= =?UTF-8?q?=EC=9B=90=20=EB=B3=80=EA=B2=BD,=20=EC=B9=B4=ED=85=8C=EA=B3=A0?= =?UTF-8?q?=EB=A6=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/modal/admin/AdminTemplateModal.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/components/modal/admin/AdminTemplateModal.tsx b/components/modal/admin/AdminTemplateModal.tsx index 3eec7e573..46535b051 100644 --- a/components/modal/admin/AdminTemplateModal.tsx +++ b/components/modal/admin/AdminTemplateModal.tsx @@ -18,8 +18,8 @@ export default function TemplateModal({ template ?? { gameName: '', categoryName: '기타', - maxGamePeople: 1, - minGamePeople: 1, + maxGamePeople: 2, + minGamePeople: 2, maxGameTime: 1, minGameTime: 1, genre: '', @@ -38,6 +38,7 @@ export default function TemplateModal({ const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); + console.log(formData); if (isUpdate(formData)) updateTemplate(formData); else createTemplate(formData); setModal({ modalName: null }); @@ -57,6 +58,14 @@ export default function TemplateModal({ setFormData({ ...formData, gameName: e.target.value }) } /> + + + setFormData({ ...formData, categoryName: e.target.value }) + } + /> From 870c575b9021a0b3fa1391cd84ee3e35cc8a8590 Mon Sep 17 00:00:00 2001 From: jaeywon Date: Fri, 19 Apr 2024 06:08:35 +0900 Subject: [PATCH 04/11] =?UTF-8?q?[FIx]=EC=BD=98=EC=86=94=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/admin/party/AdminCommentReport.tsx | 1 - components/admin/party/AdminPartyNoShow.tsx | 1 - 2 files changed, 2 deletions(-) diff --git a/components/admin/party/AdminCommentReport.tsx b/components/admin/party/AdminCommentReport.tsx index 9c522c1fc..b2cbd9ccd 100644 --- a/components/admin/party/AdminCommentReport.tsx +++ b/components/admin/party/AdminCommentReport.tsx @@ -41,7 +41,6 @@ export default function AdminCommentReport() { instanceInPartyManage .get(`/reports/comments?page=${currentPage}&size=10`) .then((res) => { - console.log(res); setCommentInfo({ commentReportList: res.data.commentReportList, totalPage: res.data.totalPage, diff --git a/components/admin/party/AdminPartyNoShow.tsx b/components/admin/party/AdminPartyNoShow.tsx index b2356dda9..eb20627eb 100644 --- a/components/admin/party/AdminPartyNoShow.tsx +++ b/components/admin/party/AdminPartyNoShow.tsx @@ -41,7 +41,6 @@ export default function AdminPartyNoShow() { instanceInPartyManage .get(`/reports/users?page=${currentPage}&size=10`) .then((res) => { - console.log(res); setNoShowInfo({ noShowReportList: res.data.userReportList, totalPages: res.data.totalPage, From e866c04016bcaa23e475fa3bd2634e32371bb7d6 Mon Sep 17 00:00:00 2001 From: jaeywon Date: Fri, 19 Apr 2024 06:15:35 +0900 Subject: [PATCH 05/11] =?UTF-8?q?[Feat]=20=EC=B9=B4=ED=85=8C=EA=B3=A0?= =?UTF-8?q?=EB=A6=AC=20=EC=9D=B4=EB=A6=84=EC=97=90=20=EB=94=B0=EB=9D=BC=20?= =?UTF-8?q?=EB=B6=84=EB=A5=98=ED=95=A0=EC=88=98=20=EC=9E=88=EB=8A=94=20?= =?UTF-8?q?=ED=95=84=ED=84=B0=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/admin/party/PartyTemplate.tsx | 104 ++++++++++++------ .../admin/party/AdminPartyCommon.module.scss | 23 ++++ 2 files changed, 94 insertions(+), 33 deletions(-) diff --git a/components/admin/party/PartyTemplate.tsx b/components/admin/party/PartyTemplate.tsx index 3236bed16..a194d8e87 100644 --- a/components/admin/party/PartyTemplate.tsx +++ b/components/admin/party/PartyTemplate.tsx @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react'; +import React, { useEffect, useState } from 'react'; import { useSetRecoilState } from 'recoil'; import { Paper, @@ -33,9 +33,9 @@ const tableTitle: { [key: string]: string } = { export default function PartyTemplate() { const { templates, deleteTemplate } = usePartyTemplate(); const setModal = useSetRecoilState(modalState); + const [selectedCategory, setSelectedCategory] = useState('all'); useEffect(() => { - console.log(templates); console.log('Render'); }, [templates]); @@ -51,6 +51,10 @@ export default function PartyTemplate() { deleteTemplate({ gameTemplateId }); }; + const handleCategorySelect = (category: string) => { + setSelectedCategory(category); + }; + return (
@@ -63,41 +67,75 @@ export default function PartyTemplate() { 추가
+
+
    +
  • handleCategorySelect('all')} + > + 전체 +
  • +
  • handleCategorySelect('콘솔게임')} + > + 콘솔게임 +
  • +
  • handleCategorySelect('보드게임')} + > + 보드게임 +
  • +
  • handleCategorySelect('기타')} + > + 기타 +
  • +
+
- {templates.map((t) => ( - - {tableFormat['partyTemplate'].columns.map((columnName) => { - return ( - - {columnName === 'change' && ( - - )} - {columnName === 'delete' ? ( - - ) : ( - t[columnName as keyof PartyGameTemplate]?.toString() - )} - - ); - })} - - ))} + {templates + .filter( + (t) => + selectedCategory === 'all' || + t.categoryName === selectedCategory + ) + .map((t) => ( + + {tableFormat['partyTemplate'].columns.map((columnName) => { + return ( + + {columnName === 'change' && ( + + )} + {columnName === 'delete' ? ( + + ) : ( + t[columnName as keyof PartyGameTemplate]?.toString() + )} + + ); + })} + + ))}
diff --git a/styles/admin/party/AdminPartyCommon.module.scss b/styles/admin/party/AdminPartyCommon.module.scss index 4bf7e46fa..49c207a5b 100644 --- a/styles/admin/party/AdminPartyCommon.module.scss +++ b/styles/admin/party/AdminPartyCommon.module.scss @@ -1,6 +1,10 @@ @import 'styles/common.scss'; @import 'styles/admin/common/Pagination.module.scss'; +.container { + width: 100%; +} + .tableContainer { .table { .tableBody { @@ -66,4 +70,23 @@ } } +.ullist { + display: flex; + justify-content: center; + gap: 10px; + list-style: none; +} + +.lilist { + padding: 8px 16px; + cursor: pointer; + border: 2px solid #5b5a5a; + border-radius: 8px; + transition: background-color 0.3s ease; + + &:hover { + background-color: #eaeaea; + } +} + @include pagination; From a46f6cef18bede27acbfa207ed05105d7a85266a Mon Sep 17 00:00:00 2001 From: jaeywon Date: Fri, 19 Apr 2024 06:20:08 +0900 Subject: [PATCH 06/11] =?UTF-8?q?[Fix]=EC=BD=98=EC=86=94=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/admin/party/AdminPartyNoShow.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/components/admin/party/AdminPartyNoShow.tsx b/components/admin/party/AdminPartyNoShow.tsx index eb20627eb..fe73aef54 100644 --- a/components/admin/party/AdminPartyNoShow.tsx +++ b/components/admin/party/AdminPartyNoShow.tsx @@ -46,7 +46,6 @@ export default function AdminPartyNoShow() { totalPages: res.data.totalPage, currentPage: currentPage, }); - console.log(noShowInfo); }) .catch((error) => { setSnackBar({ From b3a1c250fef29922ba8d64a79f2c8f41fca96565 Mon Sep 17 00:00:00 2001 From: izone00 Date: Sat, 20 Apr 2024 13:15:24 +0900 Subject: [PATCH 07/11] =?UTF-8?q?[Bug]=20=ED=8C=8C=ED=8B=B0=20=EC=83=81?= =?UTF-8?q?=EC=84=B8=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=92=A4=EB=A1=9C?= =?UTF-8?q?=EA=B0=80=EA=B8=B0=20=EB=B2=84=ED=8A=BC=20=EC=95=88=EB=82=98?= =?UTF-8?q?=EC=98=A4=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Layout/Header.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Layout/Header.tsx b/components/Layout/Header.tsx index 87d6e0308..8f44b31d7 100644 --- a/components/Layout/Header.tsx +++ b/components/Layout/Header.tsx @@ -62,7 +62,7 @@ export default function Header() { const path = router.asPath.split('?')[0]; // 쿼리 스트링 제거 const patterns = [ /^\/party\/create$/, // '/party/create' - /^\/party\/[0-9]+$/, // '/party/[roomId]' + /^\/party\/room$/, // '/party/[roomId]' ]; return patterns.some((pattern) => pattern.test(path)); From a3cc8a0eeedf203d05ea01b77697445506c93f10 Mon Sep 17 00:00:00 2001 From: izone00 Date: Sat, 20 Apr 2024 13:16:11 +0900 Subject: [PATCH 08/11] =?UTF-8?q?[Fix]=20=EC=96=B4=EB=93=9C=EB=AF=BC=20?= =?UTF-8?q?=ED=8C=8C=ED=8B=B0=20=EC=83=81=EC=84=B8=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EB=AA=A8=EB=8B=AC=20=EB=8C=93=EA=B8=80=EC=97=90=20?= =?UTF-8?q?intraId=20=EA=B3=B5=EA=B0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/modal/party/PartyRoomEditModal.tsx | 1 + styles/admin/party/PartyRoomEdit.module.scss | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/components/modal/party/PartyRoomEditModal.tsx b/components/modal/party/PartyRoomEditModal.tsx index e963db576..cf5b3d15f 100644 --- a/components/modal/party/PartyRoomEditModal.tsx +++ b/components/modal/party/PartyRoomEditModal.tsx @@ -125,6 +125,7 @@ export default function PartyRoomEditModal({ roomId }: { roomId: number }) {
{comment.nickname} + ({comment.intraId}) {dateToStringShort(new Date(comment.createDate))} diff --git a/styles/admin/party/PartyRoomEdit.module.scss b/styles/admin/party/PartyRoomEdit.module.scss index 2434ce45e..8d00208e5 100644 --- a/styles/admin/party/PartyRoomEdit.module.scss +++ b/styles/admin/party/PartyRoomEdit.module.scss @@ -57,7 +57,7 @@ } ul { display: flex; - margin: 0 5%; + margin: 0; li { display: flex; @@ -99,6 +99,10 @@ .commentUserName { font-weight: 500; + + .intraId { + color: $dark-gray; + } } .commentDate { margin-left: 1em; From 76105bd12f95e915405a4a883c5731018471ddb4 Mon Sep 17 00:00:00 2001 From: izone00 Date: Sat, 20 Apr 2024 13:16:56 +0900 Subject: [PATCH 09/11] =?UTF-8?q?[Bug]=20=ED=8C=8C=ED=8B=B0=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=ED=8E=98=EC=9D=B4=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- styles/party/PartyCreate.module.scss | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/styles/party/PartyCreate.module.scss b/styles/party/PartyCreate.module.scss index ba02a163f..4b481bb6c 100644 --- a/styles/party/PartyCreate.module.scss +++ b/styles/party/PartyCreate.module.scss @@ -148,7 +148,8 @@ select { width: 2.5em; - text-align: center; + color: black; + text-align-last: center; } .textCenter { width: 2.5em; @@ -163,7 +164,8 @@ select { width: 2.5em; - text-align: center; + color: black; + text-align-last: center; } .textCenter { width: 2.5em; From 6916ea94fa577454653f0d2b749a6279a15b94a9 Mon Sep 17 00:00:00 2001 From: izone00 Date: Sat, 20 Apr 2024 13:17:24 +0900 Subject: [PATCH 10/11] =?UTF-8?q?[Fix]=20=ED=8C=8C=ED=8B=B0=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=EC=8B=9C=20=EC=A7=81=EC=A0=91=EC=9E=85=EB=A0=A5=20?= =?UTF-8?q?=EA=B8=B0=EB=B3=B8=EA=B0=92=202-4=20=3D>=202-8=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- constants/party/createOptions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constants/party/createOptions.ts b/constants/party/createOptions.ts index c9d661fc3..e26e03586 100644 --- a/constants/party/createOptions.ts +++ b/constants/party/createOptions.ts @@ -5,7 +5,7 @@ export const customTemplate: PartyTemplateWithoutCategory = { gameTemplateId: custumTemplateId, gameName: '직접 입력', minGamePeople: 2, - maxGamePeople: 4, + maxGamePeople: 8, minGameTime: 15, maxGameTime: 30, genre: '', From 6edf68554105de72c1751a3e070c76c1f466e55b Mon Sep 17 00:00:00 2001 From: izone00 Date: Sat, 20 Apr 2024 13:20:05 +0900 Subject: [PATCH 11/11] =?UTF-8?q?[Bug]=20=ED=8C=8C=ED=8B=B0=20=EB=B0=A9=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=EC=8B=9C=EC=97=90=20=ED=99=94=EC=9D=B4?= =?UTF-8?q?=ED=8A=B8=20=EC=8A=A4=ED=8E=98=EC=9D=B4=EC=8A=A4=EB=A7=8C?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=B0=A9=EC=83=9D=EC=84=B1=EB=90=98?= =?UTF-8?q?=EB=8A=94=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hooks/party/usePartyForm.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hooks/party/usePartyForm.ts b/hooks/party/usePartyForm.ts index 8a29c3a4a..a3dfba1ea 100644 --- a/hooks/party/usePartyForm.ts +++ b/hooks/party/usePartyForm.ts @@ -27,14 +27,14 @@ const reducer: React.Reducer = ( switch (action.type) { case 'UPDATE_TITLE': if (action.title.length > 15) return state; - return { ...state, title: action.title }; + return { ...state, title: action.title.trimStart() }; case 'UPDATE_MIN_PEOPLE': return { ...state, minPeople: action.minPeople }; case 'UPDATE_MAX_PEOPLE': return { ...state, maxPeople: action.maxPeople }; case 'UPDATE_CONTENT': if (action.content.length > 100) return state; - return { ...state, content: action.content }; + return { ...state, content: action.content.trimStart() }; case 'UPDATE_OPEN_PERIOD': return { ...state,