import { ActionIcon, AlertDefaultSystem, BadgeCustom, BaseBox, DrawerCustom, MenuDrawerDynamicGrid, Spacing, StackCustom, TextCustom, ViewWrapper, } from "@/components"; import { IconDot, IconList } from "@/components/_Icon/IconComponent"; import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle"; import AdminButtonReject from "@/components/_ShareComponent/Admin/ButtonReject"; import AdminButtonReview from "@/components/_ShareComponent/Admin/ButtonReview"; import { GridDetail_4_8 } from "@/components/_ShareComponent/GridDetail_4_8"; import { MainColor } from "@/constants/color-palet"; import { ICON_SIZE_BUTTON } from "@/constants/constans-value"; import dayjs from "dayjs"; import { router, useLocalSearchParams } from "expo-router"; import _ from "lodash"; import React from "react"; import QRCode from "react-native-qrcode-svg"; export default function AdminEventDetail() { const { id, status } = useLocalSearchParams(); const [openDrawer, setOpenDrawer] = React.useState(false); const colorBadge = () => { if (status === "publish") { return MainColor.green; } else if (status === "review") { return MainColor.orange; } else if (status === "reject") { return MainColor.red; } else { return MainColor.placeholder; } }; const listData = [ { label: "Pembuat Event", value: `Bagas Banuna ${id}`, }, { label: "Judul Event", value: `Event 123`, }, { label: "Status", value: ( {_.startCase(status as string)} ), }, { label: "Lokasi", value: "Lokasi Event", }, { label: "Tipe Acara", value: "Tipe Acara", }, { label: "Mulai Event", value: dayjs().format("DD/MM/YYYY HH:mm:ss"), }, { label: "Event Berakhir", value: dayjs().add(3, "day").format("DD/MM/YYYY HH:mm:ss"), }, { label: "Deskripsi", value: "Lorem ipsum dolor sit amet consectetur adipisicing elit.", }, // { // label: "Daftar Tipe Acara", // value: ( // <> // Pilihan 1} // left={(props) => ( // // )} // /> // Pilihan 2} // left={(props) => ( // // )} // /> // Pilihan 3} // left={(props) => ( // // )} // /> // Pilihan 4} // left={(props) => ( // // )} // /> // // ), // }, ]; const rightComponent = ( } onPress={() => { setOpenDrawer(true); }} /> ); return ( <> } > {listData.map((item, i) => ( {item.label}} value={{item.value}} /> ))} {(status === "publish" || status === "riwayat") && ( QR Code Event )} {status === "review" && ( { AlertDefaultSystem({ title: "Publish", message: "Apakah anda yakin ingin mempublikasikan data ini?", textLeft: "Batal", textRight: "Ya", onPressLeft: () => { router.back(); }, onPressRight: () => { router.back(); }, }); }} onReject={() => { router.push(`/admin/event/${id}/reject-input`); }} /> )} {status === "reject" && ( { router.push(`/admin/event/${id}/reject-input`); }} /> )} setOpenDrawer(false)} height={"auto"} > , path: `/admin/event/${id}/list-of-participants`, }, ]} onPressItem={(item) => { setOpenDrawer(false); router.push(item.path as any); }} /> ); }