Skip to content

Commit

Permalink
Merge pull request #1539 from 42organization/agenda
Browse files Browse the repository at this point in the history
[test-deploy] admin 페이지 수정사항 테스트
  • Loading branch information
irenee-14 authored Sep 3, 2024
2 parents 39659f4 + 797eb12 commit 88a8229
Show file tree
Hide file tree
Showing 39 changed files with 398 additions and 322 deletions.
6 changes: 3 additions & 3 deletions Layout/AdminLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ function AdminAppLayout({ children }: AdminLayoutProps) {
}

return (
<AdminLayout>
{children}
<>
<AdminLayout>{children}</AdminLayout>
{ModalProviderComponent && <ModalProviderComponent />}
</AdminLayout>
</>
);
}

Expand Down
2 changes: 1 addition & 1 deletion Layout/AgendaLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ function AgendaAppLayout({ children }: AgendaLayoutProps) {
<div className={styles.app}>
{children}
<Footer />
<AgendaModalProvider />
</div>
<button onClick={scrollToTop} className={styles.floatingButton}>
</button>
<AgendaModalProvider />
</>
);
}
Expand Down
10 changes: 6 additions & 4 deletions Layout/TakguLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,13 @@ function TakguLayout({ children }: TakguLayoutProps) {
}
const TakguAppLayout = ({ children }: TakguLayoutProps) => {
return (
<UserLayout>
<TakguLayout>{children}</TakguLayout>
<>
<UserLayout>
<TakguLayout>{children}</TakguLayout>
<CustomizedSnackbars />
</UserLayout>
<ModalProvider />
<CustomizedSnackbars />
</UserLayout>
</>
);
};

Expand Down
14 changes: 8 additions & 6 deletions components/admin/agenda/SideNavAgenda.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { useRouter } from 'next/router';
import { TbMessageReport } from 'react-icons/tb';
import { FaRegCalendarCheck, FaRegUserCircle } from 'react-icons/fa';
import { GrAnnounce } from 'react-icons/gr';
import { RiTeamLine } from 'react-icons/ri';
import SideNavContent from 'components/admin/SideNavContent';
import styles from 'styles/admin/SideNav.module.scss';

Expand All @@ -11,34 +13,34 @@ export default function SideNavParty() {
<SideNavContent
type={'agenda'}
url={'agendaList'}
menuName={'대회 관리'}
menuName={'아젠다 관리'}
currentPath={currentPath}
>
<TbMessageReport className={styles.logo} />
<FaRegCalendarCheck className={styles.logo} />
</SideNavContent>
<SideNavContent
type={'agenda'}
url={'teamList'}
menuName={'팀 관리'}
currentPath={currentPath}
>
<TbMessageReport className={styles.logo} />
<RiTeamLine className={styles.logo} />
</SideNavContent>
<SideNavContent
type={'agenda'}
url={'announcements'}
menuName={'공지사항 관리'}
currentPath={currentPath}
>
<TbMessageReport className={styles.logo} />
<GrAnnounce className={styles.logo} />
</SideNavContent>
<SideNavContent
type={'agenda'}
url={'userList'}
menuName={'유저 관리'}
currentPath={currentPath}
>
<TbMessageReport className={styles.logo} />
<FaRegUserCircle className={styles.logo} />
</SideNavContent>
</>
);
Expand Down
12 changes: 6 additions & 6 deletions components/admin/agenda/agendaList/AgendaFillterTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ export default function AgendaFillterTab() {
},
{
contentId: 1,
contentName: '공식',
contentName: '모집 중',
},
{
contentId: 2,
contentName: '비공식',
contentName: '진행 중',
},
{
contentId: 3,
contentName: '완료된 대회',
contentName: '진행 완료',
},
];

Expand All @@ -31,13 +31,13 @@ export default function AgendaFillterTab() {
setChild(<AgendaTable />);
break;
case 1:
setChild(<AgendaTable isOfficial={true} />);
setChild(<AgendaTable status={AgendaStatus.OPEN} />);
break;
case 2:
setChild(<AgendaTable isOfficial={false} />);
setChild(<AgendaTable status={AgendaStatus.CONFIRM} />);
break;
case 3:
setChild(<AgendaTable status={AgendaStatus.CONFIRM} />);
setChild(<AgendaTable status={AgendaStatus.FINISH} />);
break;
}
}, [tabIdx]);
Expand Down
21 changes: 18 additions & 3 deletions components/admin/agenda/agendaList/AgendaTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ export default function AgendaTable({ status, isOfficial }: AgendaTableProps) {
const { openModal, closeModal } = useModal();

const buttonList: string[] = [
styles.detail,
styles.delete,
styles.default,
styles.detail,
styles.coin,
styles.penalty,
];
Expand Down Expand Up @@ -122,6 +123,7 @@ export default function AgendaTable({ status, isOfficial }: AgendaTableProps) {
{ agenda_key: agendaKey },
(data) => {
alert('취소 요청이 성공적으로 전송되었습니다.');
getAgendaList();
},
(error) => {
alert('취소 요청에 실패했습니다: ' + error);
Expand Down Expand Up @@ -156,6 +158,18 @@ export default function AgendaTable({ status, isOfficial }: AgendaTableProps) {
case '공지사항':
router.push(`/admin/agenda/announcements?agendaKey=${agendaKey}`);
break;
case '포스터':
if (!agenda.agendaPosterUrl) {
alert('포스터가 없습니다.');
return;
}
openModal({
type: 'notice',
title: '포스터',
description: "포스터 수정은 '자세히' 버튼을 눌러주세요.",
image: agenda.agendaPosterUrl,
});
break;
}
};

Expand All @@ -164,6 +178,7 @@ export default function AgendaTable({ status, isOfficial }: AgendaTableProps) {
const getData = await instanceInAgenda.get(
`/admin/request/list?page=${currentPage}&size=${itemsPerPage}`
);

const filteredAgendaList = getData.data.content.filter(
(agenda: IAgenda) => {
const matchesStatus = status ? agenda.agendaStatus === status : true;
Expand Down Expand Up @@ -199,9 +214,9 @@ export default function AgendaTable({ status, isOfficial }: AgendaTableProps) {
case AgendaStatus.CANCEL:
return '취소';
case AgendaStatus.OPEN:
return '진행 중';
return '모집 중';
case AgendaStatus.CONFIRM:
return '확정';
return '진행 중';
case AgendaStatus.FINISH:
return '진행완료';
default:
Expand Down
Loading

0 comments on commit 88a8229

Please sign in to comment.