From ce0e82e6275e5f1df12dfcf93f4d13343820e82f Mon Sep 17 00:00:00 2001 From: Bagasbanuna02 Date: Tue, 22 Jul 2025 12:06:54 +0800 Subject: [PATCH] Deskripsi: Event: Add file: - contibution with id - list of participan - publish - BoxDetailPublishSection - BoxPublishSection - menuDrawerPublish Fix: Event: - layout dan index\ # No Issue --- app/(application)/(user)/_layout.tsx | 8 +++ .../(user)/event/(tabs)/index.tsx | 28 +------- .../(user)/event/(tabs)/kontribusi.tsx | 6 +- .../(user)/event/[id]/contribution.tsx | 51 ++++++++++++++ .../event/[id]/list-of-participants.tsx | 17 +++++ .../(user)/event/[id]/publish.tsx | 69 +++++++++++++++++++ screens/Event/BoxDetailPublishSection.tsx | 61 ++++++++++++++++ screens/Event/BoxPublishSection.tsx | 39 +++++++++++ screens/Event/menuDrawerPublish.tsx | 17 +++++ 9 files changed, 267 insertions(+), 29 deletions(-) create mode 100644 app/(application)/(user)/event/[id]/contribution.tsx create mode 100644 app/(application)/(user)/event/[id]/list-of-participants.tsx create mode 100644 app/(application)/(user)/event/[id]/publish.tsx create mode 100644 screens/Event/BoxDetailPublishSection.tsx create mode 100644 screens/Event/BoxPublishSection.tsx create mode 100644 screens/Event/menuDrawerPublish.tsx diff --git a/app/(application)/(user)/_layout.tsx b/app/(application)/(user)/_layout.tsx index a9b838f..1ef2af6 100644 --- a/app/(application)/(user)/_layout.tsx +++ b/app/(application)/(user)/_layout.tsx @@ -100,6 +100,14 @@ export default function UserLayout() { }} /> + , + }} + /> + {/* ========== Forum Section ========= */} {Array.from({ length: 10 }).map((_, index) => ( - - - - - Lorem ipsum dolor sit - - - Lorem ipsum dolor sit amet consectetur adipisicing elit. Porro sed - doloremque tempora soluta. Dolorem ex quidem ipsum tempora, ipsa, - obcaecati quia suscipit numquam, voluptates commodi porro impedit - natus quos doloremque! - - - + ))} ); diff --git a/app/(application)/(user)/event/(tabs)/kontribusi.tsx b/app/(application)/(user)/event/(tabs)/kontribusi.tsx index 5d52015..562bc00 100644 --- a/app/(application)/(user)/event/(tabs)/kontribusi.tsx +++ b/app/(application)/(user)/event/(tabs)/kontribusi.tsx @@ -5,14 +5,14 @@ import { Grid, StackCustom, TextCustom, - ViewWrapper + ViewWrapper, } from "@/components"; export default function Kontribusi() { return ( - + {Array.from({ length: 10 }).map((_, index) => ( - + { + console.log("PATH ", item.path); + router.navigate(item.path as any); + setOpenDrawer(false); + }; + + return ( + <> + , + headerRight: () => setOpenDrawer(true)} />, + }} + /> + + + + + setOpenDrawer(false)} + height={250} + > + + + + ); +} diff --git a/app/(application)/(user)/event/[id]/list-of-participants.tsx b/app/(application)/(user)/event/[id]/list-of-participants.tsx new file mode 100644 index 0000000..4b9e3fb --- /dev/null +++ b/app/(application)/(user)/event/[id]/list-of-participants.tsx @@ -0,0 +1,17 @@ +import { + AvatarUsernameAndOtherComponent, + BaseBox, + ViewWrapper, +} from "@/components"; + +export default function EventListOfParticipants() { + return ( + + {Array.from({ length: 10 }).map((_, index) => ( + + + + ))} + + ); +} diff --git a/app/(application)/(user)/event/[id]/publish.tsx b/app/(application)/(user)/event/[id]/publish.tsx new file mode 100644 index 0000000..5be4963 --- /dev/null +++ b/app/(application)/(user)/event/[id]/publish.tsx @@ -0,0 +1,69 @@ +import { + ViewWrapper, + StackCustom, + TextCustom, + BaseBox, + Grid, + DotButton, + DrawerCustom, + MenuDrawerDynamicGrid, + ButtonCustom, + AlertCustom, + Spacing, +} from "@/components"; +import { IMenuDrawerItem } from "@/components/_Interface/types"; +import LeftButtonCustom from "@/components/Button/BackButton"; +import Event_BoxDetailPublishSection from "@/screens/Event/BoxDetailPublishSection"; +import { menuDrawerPublishEvent } from "@/screens/Event/menuDrawerPublish"; +import { router, Stack, useLocalSearchParams } from "expo-router"; +import { useState } from "react"; +import { Alert } from "react-native"; + +export default function EventPublish() { + const { id } = useLocalSearchParams(); + const [openDrawer, setOpenDrawer] = useState(false); + + const handlePress = (item: IMenuDrawerItem) => { + console.log("PATH ", item.path); + router.navigate(item.path as any); + setOpenDrawer(false); + }; + + const footerButton = ( + Alert.alert("Anda berhasil join event ini")} + > + Join + + ); + + return ( + <> + , + headerRight: () => setOpenDrawer(true)} />, + }} + /> + + + + + + setOpenDrawer(false)} + height={250} + > + + + + ); +} diff --git a/screens/Event/BoxDetailPublishSection.tsx b/screens/Event/BoxDetailPublishSection.tsx new file mode 100644 index 0000000..7daea51 --- /dev/null +++ b/screens/Event/BoxDetailPublishSection.tsx @@ -0,0 +1,61 @@ +import { + BaseBox, + Grid, + StackCustom, + TextCustom +} from "@/components"; + +export default function Event_BoxDetailPublishSection({ + footerButton, +}: { + footerButton?: React.ReactNode; +}) { + return ( + <> + + + + Judul event publish + + {listData.map((item, index) => ( + + + {item.title} + + + {item.value} + + + ))} + + + + {footerButton} + + ); +} + +const listData = [ + { + title: "Lokasi", + value: + "Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur eveniet ab eum ducimus tempore a quia deserunt quisquam. Tempora, atque. Aperiam minima asperiores dicta perferendis quis adipisci, dolore optio porro!", + }, + { + title: "Tipe Acara", + value: "Workshop", + }, + { + title: "Tanggal Mulai", + value: "Senin, 18 Juli 2025, 10:00 WIB", + }, + { + title: "Tanggal Berakhir", + value: "Selasa, 19 Juli 2025, 12:00 WIB", + }, + { + title: "Deskripsi", + value: + "Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur eveniet ab eum ducimus tempore a quia deserunt quisquam. Tempora, atque. Aperiam minima asperiores dicta perferendis quis adipisci, dolore optio porro!", + }, +]; diff --git a/screens/Event/BoxPublishSection.tsx b/screens/Event/BoxPublishSection.tsx new file mode 100644 index 0000000..1ad4f8f --- /dev/null +++ b/screens/Event/BoxPublishSection.tsx @@ -0,0 +1,39 @@ +import { BaseBox, StackCustom, AvatarUsernameAndOtherComponent, TextCustom } from "@/components"; + +export default function Event_BoxPublishSection({ + id, + name, + avatarHref, + description, + footerButton +}: { + id: string; + name?: string; + avatarHref?: string; + description?: string; + footerButton?: React.ReactNode; +}) { + return ( + <> + + + + + Lorem ipsum dolor sit + + + Lorem ipsum dolor sit amet consectetur adipisicing elit. Porro sed + doloremque tempora soluta. Dolorem ex quidem ipsum tempora, ipsa, + obcaecati quia suscipit numquam, voluptates commodi porro impedit + natus quos doloremque! + + + + {footerButton} + + ); +} + \ No newline at end of file diff --git a/screens/Event/menuDrawerPublish.tsx b/screens/Event/menuDrawerPublish.tsx new file mode 100644 index 0000000..bfe3e61 --- /dev/null +++ b/screens/Event/menuDrawerPublish.tsx @@ -0,0 +1,17 @@ +import { AccentColor } from "@/constants/color-palet"; +import { ICON_SIZE_MEDIUM } from "@/constants/constans-value"; +import { FontAwesome } from "@expo/vector-icons"; + +export const menuDrawerPublishEvent = ({ id }: { id: string }) => [ + { + icon: ( + + ), + label: "Daftar peserta", + path: `/(application)/(user)/event/${id}/list-of-participants`, + }, +];