Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/파티어드민 모달음수처리 css처리 #1320 #1321

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
b973c18
[Feat] PartyAPI response와 연동되는 type 정의
izone00 Mar 11, 2024
b876c0b
[Feat] Admin Party페이지에서 쓰이는 타입 정의
izone00 Mar 11, 2024
e1292e3
[Feat] Modal에 Party 타입 추가
izone00 Mar 11, 2024
c20757a
[Feat] PartyAdmin axiosURL 추가
izone00 Mar 12, 2024
d7cc825
[Feat] PartyCategory 관리 hook구현
izone00 Mar 12, 2024
46f2472
[Feat] PartyTemplate API데이터 관리 hook 구현
izone00 Mar 12, 2024
4bf7a49
Merge pull request #1287 from 42organization/feat/party-category-api사…
izone00 Mar 13, 2024
987f839
Merge pull request #1289 from 42organization/feat/partytemplate-api사용…
izone00 Mar 13, 2024
7f0eb79
[Feat] 어드민 사이드바에 파티 추가
mantoing Mar 13, 2024
bbe9248
[Feat] 파티신고탭 nav바 생성
mantoing Mar 13, 2024
27e8f17
[Feat] scss 변경
mantoing Mar 13, 2024
9dd5461
[Feat] 파티 페이지 생성
mantoing Mar 13, 2024
8c42e05
[Feat] 어드민 파티 관련 타입변경
mantoing Mar 13, 2024
ede1e74
[Feat] 파티 어드민 신고 안의 상세 노쇼신고, 방신고, 댓글신고 nav바 생성
mantoing Mar 13, 2024
489a1e2
[Feat]파티 템플릿 탭, 모달 구현
mantoing Mar 13, 2024
bc4603c
[Feat] 노쇼관리, 댓글관리, 방관리 nav
mantoing Mar 13, 2024
fe55942
[Feat] 파티 어드민 카테고리탭 구현
mantoing Mar 13, 2024
2b1244d
[Feat] 방 신고 탭 구현 , usePartyRoomReport 훅 생성
mantoing Mar 13, 2024
d1de36f
[fix] 방신고 이름 변경
mantoing Mar 13, 2024
63d55e2
[Feat] 댓글신고조회탭 구현, useAdminpartyComment 훅 생성
mantoing Mar 13, 2024
959c216
[Fix] 방신고 출력부분 수정
mantoing Mar 13, 2024
6bf6d96
[Fix] 템플릿 모달제출시 type=submit으로 변경
mantoing Mar 13, 2024
d9fcf3a
[Feat] 파티 어드민 노쇼신고 조회 탭 구현, useAdminPartyNoshow 훅 생성, 신고상세조회 nav바 수정
mantoing Mar 13, 2024
9d6126a
[Feat] 메인페이지에 파티프리뷰구현
mantoing Mar 13, 2024
faa79ee
[Feat]프리뷰를 위한 section 컴포넌트 경로추가
mantoing Mar 13, 2024
5892840
[Feat] pr용 필요없는 파일, 변경한파일만 커밋하게 변경
mantoing Mar 15, 2024
80a7aa8
[Fix] 파티카테고리에 deleteHandler대신 직접적으로 함수접근
mantoing Mar 15, 2024
d5d0771
[Fix] scss이름변경, AdminPartyCommon scss 추가
mantoing Mar 15, 2024
e9b3283
[Fix] AdminPartyReport, PartyNav 하나로 합침
mantoing Mar 15, 2024
3834c9a
[Fix] Types 전꺼로 돌림
mantoing Mar 15, 2024
e1b9dcb
[Feat] pingpong 플레이 버튼 party페이지에서 제거
izone00 Mar 15, 2024
81c4bf7
[Feat] party페이지 background 설정
izone00 Mar 15, 2024
1be034c
[Feat] partyType API변경사항 적용
izone00 Mar 15, 2024
81b451d
[Feat] partyListItem 컴포넌트 구현
izone00 Mar 15, 2024
82ee450
[Feat] 파티 메인 페이지 완성(타이머, 방장 완관 제외)
izone00 Mar 15, 2024
0237e90
[Feat] party 공통 색상 지정
izone00 Mar 15, 2024
60d7529
[Fix] 파티 프리뷰 usePartyRoomList추가한 후 scss 주석삭제
mantoing Mar 15, 2024
894a85b
[Fix] 적용되지않는 className삭제
mantoing Mar 16, 2024
2e7aa89
Merge pull request #1304 from 42organization/feat/메인페이지-파티모집프리뷰구현-어드민…
mantoing Mar 17, 2024
2735968
Merge branch '6th_party' into feat/party모집-서비스의-메인-페이지-구현-#1280
izone00 Mar 18, 2024
73141d2
Merge pull request #1307 from 42organization/feat/party모집-서비스의-메인-페이지…
izone00 Mar 18, 2024
07242fb
[Fix] 템플릿모달 이름, 경로 admin으로 변경
mantoing Mar 18, 2024
7d792b5
[Fix] 파티템플릿 어드민파티템플릿으로 이름변경
mantoing Mar 18, 2024
86ab83e
[Feat] 추가 삭제를 위해 usePartyPenalty훅 구현
mantoing Mar 18, 2024
390efd3
[Feat] 파티어드민 패널티 항목 구현
mantoing Mar 18, 2024
1411bd7
[Feat] 추가 변경을위한 파티패널티 모달 구현
mantoing Mar 18, 2024
7b56014
[Feat] 파티 어드민 nav에 패널티 항목 추가
mantoing Mar 18, 2024
72ac99a
[Feat] 파티 디테일 페이지
contemplation-person Mar 19, 2024
79f0b3a
[Feat] 파티 디테일 모달 관련
contemplation-person Mar 19, 2024
bd57c2c
[Feat] 파티 디테일 타입 정리
contemplation-person Mar 19, 2024
194e2bc
[Feat] getRemainTime 추가
contemplation-person Mar 19, 2024
8171a59
[Feat] 파티 디테일 api추가
contemplation-person Mar 19, 2024
3d61c9c
Merge pull request #1311 from 42organization/Feat/make-party-detail-#…
contemplation-person Mar 19, 2024
e86315d
[Feat] party 배경 이미지 설정 hook
izone00 Mar 19, 2024
283bf80
Merge pull request #1312 from 42organization/feat/party모집-서비스의-메인-페이지…
izone00 Mar 19, 2024
1f719cc
[Feat] 배경, 버튼 색 삽입
contemplation-person Mar 19, 2024
ce8a4e2
[Fix] 토스트 바 설정
contemplation-person Mar 19, 2024
8815d50
[Fix] fetch 해주는 로직 삽입
contemplation-person Mar 19, 2024
f985dc9
[Feat] usePartyCategory hook에 isLoading, isError 추가
izone00 Mar 20, 2024
a379d8a
[Feat] 파티 생성 페이지 완성 (validation 제외)
izone00 Mar 20, 2024
f5a9350
[Fix] 도메인 변경으로 인한 api처리
mantoing Mar 20, 2024
09fa68e
[Fix]페이지네이션에 맞춰서 adminNoShowReport변경
mantoing Mar 20, 2024
9f8b7af
[Fix] 파티어드민 댓글신고조회 페이지네이션으로 구현변경
mantoing Mar 20, 2024
c46fa1b
[Fix]파티어드민 댓글 신고조회 페이지네이션으로 변경, api도메인 확인후 변경
mantoing Mar 20, 2024
fae446a
[Fix] 파티 어드민 패널티부분 response변경 부분 수정
mantoing Mar 20, 2024
3b41173
[Fix] 어드민 파티 패널티 usePartyPenalty삭제후 모달에서 직접적으로 처리
mantoing Mar 20, 2024
92fb416
Merge pull request #1314 from 42organization/Feat/party모집-방-생성-페이지-구현…
izone00 Mar 20, 2024
1927742
[Fix] category, template api 리스트에 키값 추가
izone00 Mar 21, 2024
f03273a
Merge pull request #1316 from 42organization/Feat/party-room-admin-페이…
izone00 Mar 21, 2024
2da23b9
[Fix]useLoginCheck 원래대로 변경
mantoing Mar 22, 2024
349d85e
[Fix] useCallback 사용하는 부분 제외
mantoing Mar 22, 2024
755b22a
[Fix] api경로변경
mantoing Mar 22, 2024
350aa14
[Fix] api 예외처리 설정
mantoing Mar 22, 2024
ec14f7b
[Fix] useEffect제거하고 초기에 직접적으로 값 설정
mantoing Mar 22, 2024
f5d5dc5
Merge branch '6th_party' into feat/파티어드민-패널티항목구현-#1309
mantoing Mar 22, 2024
c6350f6
Merge pull request #1315 from 42organization/feat/파티어드민-패널티항목구현-#1309
mantoing Mar 22, 2024
e67a0a7
[Fix] 모달 post, Patch요청시에 음수처리
mantoing Mar 25, 2024
5f35961
[Fix] css 정렬을 위해 변경
mantoing Mar 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion components/Layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ export default function AppLayout({ children }: AppLayoutProps) {
</HeaderStateContext>
{presentPath !== '/match' &&
presentPath !== '/manual' &&
presentPath !== '/store' && (
presentPath !== '/store' &&
!presentPath.startsWith('/party') && (
<div className={styles.buttonContainer}>
<div className={styles.buttonWrapper}>
<StyledButton onClick={onClickMatch} width={'5.5rem'}>
Expand Down
16 changes: 15 additions & 1 deletion components/admin/SideNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ import {
} from 'react-icons/gr';
import { IoGameControllerOutline, IoReceiptOutline } from 'react-icons/io5';
import { MdOutlineMessage } from 'react-icons/md';
import { TbCalendarTime, TbCoin, TbPaperBag, TbTrophy } from 'react-icons/tb';
import {
TbCalendarTime,
TbCoin,
TbPaperBag,
TbTrophy,
TbNote,
} from 'react-icons/tb';
import SideNavContent from 'components/admin/SideNavContent';
import styles from 'styles/admin/SideNav.module.scss';

Expand Down Expand Up @@ -121,6 +127,14 @@ export default function SideNav() {
>
<TbTrophy className={styles.logo} />
</SideNavContent>

<SideNavContent
url={'/party'}
menuName={'파티관리'}
currentPath={currentPath}
>
<TbNote className={styles.logo} />
</SideNavContent>
</div>
);
}
108 changes: 108 additions & 0 deletions components/admin/party/AdminCommentReport.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
import { useEffect, useState } from 'react';
import { useSetRecoilState } from 'recoil';
import {
Paper,
Table,
TableBody,
TableCell,
TableContainer,
TableRow,
} from '@mui/material';
import { PartyCommentReport, PartyCommentReportTable } from 'types/partyTypes';
import { instanceInPartyManage } from 'utils/axios';
import { toastState } from 'utils/recoil/toast';
import { tableFormat } from 'constants/admin/table';
import {
AdminEmptyItem,
AdminTableHead,
} from 'components/admin/common/AdminTable';
import PageNation from 'components/Pagination';
import styles from 'styles/admin/Party/AdminPartyCommon.module.scss';

const tableTitle: { [key: string]: string } = {
id: '번호',
reporterIntraId: '신고자 이름',
commentsId: '댓글 번호',
roomId: '방',
message: '메세지',
createdAt: '시간',
};

export default function AdminCommentReport() {
const [commentInfo, setCommentInfo] = useState<PartyCommentReportTable>({
commentReportList: [],
totalPage: 0,
currentPage: 0,
});
const [currentPage, setCurrentPage] = useState<number>(1);
const setSnackBar = useSetRecoilState(toastState);

useEffect(() => {
instanceInPartyManage
.get(`/reports/comments?page=${currentPage}&size=10`)
.then((res) => {
setCommentInfo({
commentReportList: res.data.commentReportList,
totalPage: res.data.totalPage,
currentPage: currentPage,
});
})
.catch((error) => {
setSnackBar({
toastName: 'GET request',
message: '댓글신고를 가져오는데 실패했습니다.',
severity: 'error',
clicked: true,
});
});
}, [currentPage]);

return (
<div className={styles.AdminTableWrap}>
<div className={styles.header}>
<span className={styles.title}>댓글 신고리스트</span>
</div>
<TableContainer className={styles.tableContainer} component={Paper}>
<Table className={styles.table} aria-label='UserManagementTable'>
<AdminTableHead tableName={'partyCommentReport'} table={tableTitle} />
<TableBody className={styles.tableBody}>
{commentInfo.commentReportList &&
commentInfo.commentReportList.length > 0 ? (
commentInfo.commentReportList.map(
(report: PartyCommentReport, index: number) => (
<TableRow key={index}>
{tableFormat['partyCommentReport'].columns.map(
(columnName) => {
return (
<TableCell
key={columnName}
className={styles.tableBodyItem}
>
{report[
columnName as keyof PartyCommentReport
]?.toString()}
</TableCell>
);
}
)}
</TableRow>
)
)
) : (
<AdminEmptyItem content={'패널티 기록이 비어있습니다'} />
)}
</TableBody>
</Table>
</TableContainer>
<div className={styles.pageNationContainer}>
<PageNation
curPage={commentInfo.currentPage}
totalPages={commentInfo.totalPage}
pageChangeHandler={(pageNumber: number) => {
setCurrentPage(pageNumber);
}}
/>
</div>
</div>
);
}
108 changes: 108 additions & 0 deletions components/admin/party/AdminPartyNoShow.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
import { useEffect, useState } from 'react';
import { useSetRecoilState } from 'recoil';
import {
Paper,
Table,
TableBody,
TableCell,
TableContainer,
TableRow,
} from '@mui/material';
import { PartyNoshowReport, PartyNoshowReportTable } from 'types/partyTypes';
import { instanceInPartyManage } from 'utils/axios';
import { toastState } from 'utils/recoil/toast';
import { tableFormat } from 'constants/admin/table';
import {
AdminEmptyItem,
AdminTableHead,
} from 'components/admin/common/AdminTable';
import PageNation from 'components/Pagination';
import styles from 'styles/admin/Party/AdminPartyCommon.module.scss';

const tableTitle: { [key: string]: string } = {
id: '번호',
reporterIntraId: '신고자 이름',
reporteeIntraId: '피신고자 이름',
roomId: '방',
message: '메세지',
createdAt: '시간',
};

export default function AdminPartyNoShow() {
const [noShowInfo, setNoShowInfo] = useState<PartyNoshowReportTable>({
noShowReportList: [],
totalPages: 0,
currentPage: 0,
});
const [currentPage, setCurrentPage] = useState<number>(1);
const setSnackBar = useSetRecoilState(toastState);

useEffect(() => {
instanceInPartyManage
.get(`/reports/users?page=${currentPage}&size=10`)
.then((res) => {
setNoShowInfo({
noShowReportList: res.data.noShowReportList,
totalPages: res.data.totalPage,
currentPage: currentPage,
});
})
.catch((error) => {
setSnackBar({
toastName: 'GET request',
message: '댓글신고를 가져오는데 실패했습니다.',
severity: 'error',
clicked: true,
});
});
}, [currentPage]);

return (
<div className={styles.AdminTableWrap}>
<div className={styles.header}>
<span className={styles.title}>노쇼 신고리스트</span>
</div>
<TableContainer className={styles.tableContainer} component={Paper}>
<Table className={styles.table} aria-label='UserManagementTable'>
<AdminTableHead tableName={'partyNoshowReport'} table={tableTitle} />
<TableBody className={styles.tableBody}>
{noShowInfo.noShowReportList &&
noShowInfo.noShowReportList.length > 0 ? (
noShowInfo.noShowReportList.map(
(report: PartyNoshowReport, index: number) => (
<TableRow key={index}>
{tableFormat['partyNoshowReport'].columns.map(
(columnName) => {
return (
<TableCell
key={columnName}
className={styles.tableBodyItem}
>
{report[
columnName as keyof PartyNoshowReport
]?.toString()}
</TableCell>
);
}
)}
</TableRow>
)
)
) : (
<AdminEmptyItem content={'패널티 기록이 비어있습니다'} />
)}
</TableBody>
</Table>
</TableContainer>
<div className={styles.pageNationContainer}>
<PageNation
curPage={noShowInfo.currentPage}
totalPages={noShowInfo.totalPages}
pageChangeHandler={(pageNumber: number) => {
setCurrentPage(pageNumber);
}}
/>
</div>
</div>
);
}
133 changes: 133 additions & 0 deletions components/admin/party/AdminPartyPenalty.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
import { useCallback, useEffect, useState } from 'react';
import { useSetRecoilState } from 'recoil';
import {
Paper,
Table,
TableBody,
TableCell,
TableContainer,
TableRow,
} from '@mui/material';
import { PartyPenaltyAdmin, PartyPenaltyTable } from 'types/partyTypes';
import { instanceInPartyManage } from 'utils/axios';
import { modalState } from 'utils/recoil/modal';
import { toastState } from 'utils/recoil/toast';
import { tableFormat } from 'constants/admin/table';
import {
AdminEmptyItem,
AdminTableHead,
} from 'components/admin/common/AdminTable';
import PageNation from 'components/Pagination';
import styles from 'styles/admin/Party/AdminPartyCommon.module.scss';

const tableTitle: { [key: string]: string } = {
id: '번호',
userIntraId: '유저',
penaltyType: '패널티 타입',
message: '내용',
startTime: '시작 시간',
penaltyTime: '패널티 시간',
edit: '수정',
};

export default function AdminCommentReport() {
const [penaltyInfo, setPenaltyInfo] = useState<PartyPenaltyTable>({
penaltyList: [],
totalPage: 0,
currentPage: 0,
});
const [currentPage, setCurrentPage] = useState<number>(1);
const setModal = useSetRecoilState(modalState);
const setSnackBar = useSetRecoilState(toastState);

useEffect(() => {
instanceInPartyManage
.get(`/penalties?page=${currentPage}&size=10`)
.then((res) => {
setPenaltyInfo({
penaltyList: res.data.penaltyList,
totalPage: res.data.totalPage,
currentPage: currentPage,
});
})
.catch((error) => {
setSnackBar({
toastName: 'GET request',
message: '댓글신고를 가져오는데 실패했습니다.',
severity: 'error',
clicked: true,
});
});
}, [currentPage]);

const handleAddpenalty = () => {
setModal({ modalName: 'ADMIN-PARTY_ADMIN_PENALTY' });
};

const handleEditpenalty = (partyPenalty?: PartyPenaltyAdmin) => {
setModal({ modalName: 'ADMIN-PARTY_ADMIN_PENALTY', partyPenalty });
};

return (
<div className={styles.AdminTableWrap}>
<div className={styles.header}>
<span className={styles.title}>패널티 리스트</span>
</div>
<button
onClick={handleAddpenalty}
className={`${styles.button_1} ${styles.add}`}
>
추가
</button>
<TableContainer component={Paper} className={styles.tableContainer}>
<Table aria-label='UserManagementTable' className={styles.table}>
<AdminTableHead tableName={'partyPenaltyAdmin'} table={tableTitle} />
<TableBody className={styles.tableBody}>
{penaltyInfo.penaltyList && penaltyInfo.penaltyList.length > 0 ? (
penaltyInfo.penaltyList.map(
(penalty: PartyPenaltyAdmin, index: number) => (
<TableRow key={index}>
{tableFormat['partyPenaltyAdmin'].columns.map(
(columnName) => {
return (
<TableCell
key={columnName}
className={styles.tableBodyItem}
>
{columnName === 'edit' ? (
<button
onClick={() => handleEditpenalty(penalty)}
className={`${styles.button_1} ${styles.add}`}
>
수정
</button>
) : (
penalty[
columnName as keyof PartyPenaltyAdmin
]?.toString()
)}
</TableCell>
);
}
)}
</TableRow>
)
)
) : (
<AdminEmptyItem content={'패널티 기록이 비어있습니다'} />
)}
</TableBody>
</Table>
</TableContainer>
<div className={styles.pageNationContainer}>
<PageNation
curPage={penaltyInfo.currentPage}
totalPages={penaltyInfo.totalPage}
pageChangeHandler={(pageNumber: number) => {
setCurrentPage(pageNumber);
}}
/>
</div>
</div>
);
}
Loading
Loading