From eecced7482563fb544a898ed3987171dff8a2985 Mon Sep 17 00:00:00 2001 From: nico Date: Fri, 17 Jan 2025 17:46:31 +0800 Subject: [PATCH] Tampilan Admin --- .../event/detail/detail_sponsor/page.tsx | 11 ++ .../admin/event/detail/publish/[id]/page.tsx | 3 +- .../lib/router_admin/router_admin_event.ts | 3 + .../event/_component/detail_data_author.tsx | 50 ++++++ .../event/_component/detail_data_event.tsx | 58 +++++++ .../event/_component/detail_data_sponsor.tsx | 111 +++++++++++++ .../admin/event/_view/view_detail_peserta.tsx | 157 +++++++++--------- .../admin/event/detail/view_detail_data.tsx | 27 +++ .../event/table_status/detail_publish.tsx | 17 +- .../event/table_status/detail_sponsor.tsx | 129 ++++++++++++++ .../event/table_status/table_publish.tsx | 2 +- 11 files changed, 490 insertions(+), 78 deletions(-) create mode 100644 src/app/dev/admin/event/detail/detail_sponsor/page.tsx create mode 100644 src/app_modules/admin/event/_component/detail_data_author.tsx create mode 100644 src/app_modules/admin/event/_component/detail_data_event.tsx create mode 100644 src/app_modules/admin/event/_component/detail_data_sponsor.tsx create mode 100644 src/app_modules/admin/event/detail/view_detail_data.tsx create mode 100644 src/app_modules/admin/event/table_status/detail_sponsor.tsx diff --git a/src/app/dev/admin/event/detail/detail_sponsor/page.tsx b/src/app/dev/admin/event/detail/detail_sponsor/page.tsx new file mode 100644 index 00000000..8da4fe25 --- /dev/null +++ b/src/app/dev/admin/event/detail/detail_sponsor/page.tsx @@ -0,0 +1,11 @@ +import AdminEvent_DetailSponsor from '@/app_modules/admin/event/table_status/detail_sponsor'; + +function Page() { + return ( + <> + + + ); +} + +export default Page; diff --git a/src/app/dev/admin/event/detail/publish/[id]/page.tsx b/src/app/dev/admin/event/detail/publish/[id]/page.tsx index 70c5c9ea..da2f5681 100644 --- a/src/app/dev/admin/event/detail/publish/[id]/page.tsx +++ b/src/app/dev/admin/event/detail/publish/[id]/page.tsx @@ -1,9 +1,10 @@ +import AdminEvent_DetailPublish from '@/app_modules/admin/event/table_status/detail_publish'; import React from 'react'; function Page() { return ( <> - Page + ); } diff --git a/src/app/lib/router_admin/router_admin_event.ts b/src/app/lib/router_admin/router_admin_event.ts index 3ee39f79..8056b233 100644 --- a/src/app/lib/router_admin/router_admin_event.ts +++ b/src/app/lib/router_admin/router_admin_event.ts @@ -4,6 +4,7 @@ export const RouterAdminEvent = { // detail detail_peserta: "/dev/admin/event/detail/peserta/", detail_publish: "/dev/admin/event/detail/publish/", + detail_sponsor: "/dev/admin/event/detail/detail_sponsor/", // child detail_tipe_acara: "/dev/admin/event/child/tipe_acara", @@ -13,5 +14,7 @@ export const RouterAdminEvent = { table_review: "/dev/admin/event/table/review", table_publish: "/dev/admin/event/table/publish", table_reject: "/dev/admin/event/table/reject", + + }; diff --git a/src/app_modules/admin/event/_component/detail_data_author.tsx b/src/app_modules/admin/event/_component/detail_data_author.tsx new file mode 100644 index 00000000..f44bd592 --- /dev/null +++ b/src/app_modules/admin/event/_component/detail_data_author.tsx @@ -0,0 +1,50 @@ +import { Grid, Paper, Stack, Text, Title } from '@mantine/core'; +import React from 'react'; + +function ComponentEvent_DetailDataAuthor() { + return ( + <> + + + Data User + + + + Nama: + + + Nico Arya + + + + + Username: + + + @NicoArya + + + + + Nomor: + + + +628123456789 + + + + + Alamat: + + + Jl Raya Sesetan + + + + + + + ); +} + +export default ComponentEvent_DetailDataAuthor; diff --git a/src/app_modules/admin/event/_component/detail_data_event.tsx b/src/app_modules/admin/event/_component/detail_data_event.tsx new file mode 100644 index 00000000..3622a62e --- /dev/null +++ b/src/app_modules/admin/event/_component/detail_data_event.tsx @@ -0,0 +1,58 @@ +import { Box, Grid, Paper, Stack, Text, Title } from '@mantine/core'; +import React from 'react'; + +function ComponentEvent_DetailDataEvent() { + return ( + <> + + + Coba + + + + Lokasi: + + + Tuban + + + + + Tipe Acara: + + + Seminar + + + + + Tanggal & Waktu Mulai: + + + Minggu, 17 Januari 2025 + 09:00 + + + + + Tanggal & Waktu Selesai: + + + Minggu, 17 Januari 2025 + 15:00 + + + + + Deskripsi: + Lorem ipsum dolor sit amet consectetur adipisicing elit. Nihil, natus. + + + + + + + ); +} + +export default ComponentEvent_DetailDataEvent; diff --git a/src/app_modules/admin/event/_component/detail_data_sponsor.tsx b/src/app_modules/admin/event/_component/detail_data_sponsor.tsx new file mode 100644 index 00000000..dffecc57 --- /dev/null +++ b/src/app_modules/admin/event/_component/detail_data_sponsor.tsx @@ -0,0 +1,111 @@ +import { RouterAdminEvent } from '@/app/lib/router_admin/router_admin_event'; +import { Button, Center, Pagination, Paper, ScrollArea, Stack, Table, Title } from '@mantine/core'; +import { IconImageInPicture } from '@tabler/icons-react'; +import { useRouter } from 'next/navigation'; +import React from 'react'; + +const tableRows = [ + { + id: 1, + sponsor: , + username: "@NicoArya", + name: "Nico Arya", + nomor: "+628123456789", + email: "nicoarya@gmail.com", + + } +] +function AdminEvent_DetailDataSponsor() { + const router = useRouter(); + const rows = tableRows.map((row, i) => ( + + +
{row.sponsor}
+ + +
+ +
+ + +
{row.username}
+ + +
{row.name}
+ + +
{row.nomor}
+ + +
{row.email}
+ + +
+ +
+ + + )) + return ( + <> + + + Daftar Sponsor + + + + + + + + + + + + + + + + + {rows} +
+
Sponsor
+
+
Download
+
+
Username
+
+
Nama
+
+
Nomor
+
+
Email
+
+
Aksi
+
+
+ +
+ +
+
+
+ + ); +} + +export default AdminEvent_DetailDataSponsor; diff --git a/src/app_modules/admin/event/_view/view_detail_peserta.tsx b/src/app_modules/admin/event/_view/view_detail_peserta.tsx index c1b76811..4121452d 100644 --- a/src/app_modules/admin/event/_view/view_detail_peserta.tsx +++ b/src/app_modules/admin/event/_view/view_detail_peserta.tsx @@ -10,6 +10,7 @@ import { ScrollArea, Stack, Table, + Title, } from "@mantine/core"; import { useState } from "react"; import { adminEvent_getListPesertaById } from "../fun"; @@ -41,85 +42,91 @@ export function AdminEvent_ViewDetailPeserta({ const tableRow = _.isEmpty(data) ? [] : data.map((e, i) => ( - - -
{e?.User?.username}
- - -
{e?.User?.Profile?.name}
- - -
+{e?.User?.nomor}
- - -
{e?.User?.Profile?.email}
- - -
- {e.isPresent ? ( - Hadir - ) : ( - Tidak Hadir - )} -
- - - )); + + +
{e?.User?.username}
+ + +
{e?.User?.Profile?.name}
+ + +
+{e?.User?.nomor}
+ + +
{e?.User?.Profile?.email}
+ + +
+ {e.isPresent ? ( + Hadir + ) : ( + Tidak Hadir + )} +
+ + + )); return ( <> - - - - - - - - - - - - - {tableRow} -
-
Username
-
-
Name
-
-
Nomor
-
-
Email
-
-
Konfirmasi Kehadiran
-
- {_.isEmpty(data) ? ( - + + Daftar Peserta + + + + + + + + + + + + + + {tableRow} +
+
Username
+
+
Name
+
+
Nomor
+
+
Email
+
+
Konfirmasi Kehadiran
+
+ {_.isEmpty(data) ? ( + + ) : ( + "" + )} +
+ +
+ { + onPageClick(val); + }} /> - ) : ( - "" - )} - - -
- { - onPageClick(val); - }} - /> -
- - +
+
+ {/*
{JSON.stringify(dataPeserta, null, 2)}
*/} ); diff --git a/src/app_modules/admin/event/detail/view_detail_data.tsx b/src/app_modules/admin/event/detail/view_detail_data.tsx new file mode 100644 index 00000000..0a46bb17 --- /dev/null +++ b/src/app_modules/admin/event/detail/view_detail_data.tsx @@ -0,0 +1,27 @@ +import { SimpleGrid } from '@mantine/core'; +import React from 'react'; +import ComponentEvent_DetailDataAuthor from '../_component/detail_data_author'; +import ComponentEvent_DetailDataEvent from '../_component/detail_data_event'; + +function AdminEvent_ViewDetailData({ }) { + return ( + <> + + {/* //Data Author */} + + + {/* Data Event */} + + + + + ); +} + +export default AdminEvent_ViewDetailData; diff --git a/src/app_modules/admin/event/table_status/detail_publish.tsx b/src/app_modules/admin/event/table_status/detail_publish.tsx index e934a741..7b78bbe3 100644 --- a/src/app_modules/admin/event/table_status/detail_publish.tsx +++ b/src/app_modules/admin/event/table_status/detail_publish.tsx @@ -1,9 +1,13 @@ +'use client' 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'; +import { AdminEvent_ViewDetailPeserta } from '../_view'; +import AdminEvent_ViewDetailData from '../detail/view_detail_data'; +import AdminEvent_DetailDataSponsor from '../_component/detail_data_sponsor'; function AdminEvent_DetailPublish() { const [selectPage, setSelectPage] = useAtom(gs_admin_event_menu_publish); @@ -20,7 +24,8 @@ function AdminEvent_DetailPublish() { }, { id: "3", - name: "Daftar Sponsor" + name: "Daftar Sponsor", + icon: , } ] return ( @@ -31,6 +36,7 @@ function AdminEvent_DetailPublish() { {listPage.map((e) => ( + + + +
+ +
+ + +
+ +
+ + + )) + return ( + <> + + + + + Detail Sponsor + + + + +