Progress Admin

This commit is contained in:
2025-01-16 17:42:36 +08:00
parent 4374def1e9
commit 01f5f32818
15 changed files with 285 additions and 40 deletions

View File

@@ -0,0 +1,5 @@
import { atomWithStorage } from "jotai/utils";
const gs_admin_event_menu_publish = atomWithStorage("gs_admin_event_menu_publish", "1")
export { gs_admin_event_menu_publish }

View File

@@ -0,0 +1,51 @@
import { useAtom } from 'jotai';
import React from 'react';
import { gs_admin_event_menu_publish } from '../_lib/global_state';
import { IconCircleCheck } from '@tabler/icons-react';
import { Button, Group, Stack } from '@mantine/core';
import AdminGlobal_ComponentBackButton from '../../_admin_global/back_button';
function AdminEvent_DetailPublish() {
const [selectPage, setSelectPage] = useAtom(gs_admin_event_menu_publish);
const listPage = [
{
id: "1",
name: "Detail Event",
icon: <IconCircleCheck />,
},
{
id: "2",
name: "Daftar Peserta",
icon: <IconCircleCheck />,
},
{
id: "3",
name: "Daftar Sponsor"
}
]
return (
<>
<Stack>
<AdminGlobal_ComponentBackButton />
<Group>
{listPage.map((e) => (
<Button
key={e.id}
color={selectPage == e.id ? "green" : "gray"}
onClick={() => setSelectPage(e.id)}
style={{
transition: "all 0.5s",
}}
>
{e.name}
</Button>
))}
</Group>
</Stack>
</>
);
}
export default AdminEvent_DetailPublish;

View File

@@ -202,7 +202,6 @@ function TableStatus({ listPublish }: { listPublish: any }) {
e.id === eventId ? (loading === true ? true : false) : false
}
color={"green"}
leftIcon={<IconCircleCheck />}
radius={"xl"}
onClick={async () => {
setEventId(e.id);
@@ -210,7 +209,7 @@ function TableStatus({ listPublish }: { listPublish: any }) {
router.push(RouterAdminEvent.detail_peserta + e.id);
}}
>
Lihat Peserta
Detail
</Button>
</td>
</tr>