Progress Admin
This commit is contained in:
5
src/app_modules/admin/event/_lib/global_state.ts
Normal file
5
src/app_modules/admin/event/_lib/global_state.ts
Normal 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 }
|
||||
51
src/app_modules/admin/event/table_status/detail_publish.tsx
Normal file
51
src/app_modules/admin/event/table_status/detail_publish.tsx
Normal 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;
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user