import { ActionIcon, AlertDefaultSystem, BadgeCustom, BaseBox, ButtonCustom, DrawerCustom, DummyLandscapeImage, MenuDrawerDynamicGrid, ProgressCustom, 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, TEXT_SIZE_LARGE } from "@/constants/constans-value"; import AdminDonation_BoxOfDonationStory from "@/screens/Admin/Donation/BoxOfDonationStory"; import { Ionicons } from "@expo/vector-icons"; import { router, useLocalSearchParams } from "expo-router"; import _ from "lodash"; import React from "react"; import { View } from "react-native"; export default function AdminDonationDetail() { 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: "Penggalang Dana", value: `Bagas Banuna ${id}`, }, { label: "Judul", value: `Donasi Lorem ipsum dolor sit amet, consectetur adipisicing elit.`, }, { label: "Status", value: ( {_.startCase(status as string)} ), }, { label: "Durasi", value: "30 Hari", }, { label: "Target Dana", value: "Rp 10.000.000", }, { label: "Kategori", value: "Kategori Donasi", }, // { // label: "Total Donatur", // value: "-", // }, // { // label: "Progress", // value: "0 %", // }, // { // label: "Dana Terkumpul", // value: "Rp 0", // }, ]; const listPencarianDana = [ { label: "Total Dana Dicairkan", value: "Rp 0", }, { label: "Sisa Dana", value: "Rp 0", }, { label: "Akumulasi Pencairan", value: "0 kali", }, { label: "Bank Tujuan", value: "BNI", }, { label: "Nomor Rekening", value: "123456789", }, ]; const rightComponent = ( } onPress={() => { setOpenDrawer(true); }} /> ); return ( <> } > {status === "publish" && ( Pencarian Dana {listPencarianDana.map((item, i) => ( {item.label}} value={{item.value}} /> ))} } onPress={() => { router.push(`/admin/donation/${id}/disbursement-of-funds`); }} > Cairkan Dana Jumlah Donatur} value={0 orang} /> Dana Terkumpul} value={Rp 0} /> )} {listData.map((item, i) => ( {item.label}} value={{item.value}} /> ))} {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/donation/${id}/reject-input`); }} /> )} {status === "reject" && ( { router.push(`/admin/donation/${id}/reject-input`); }} /> )} setOpenDrawer(false)} height={"auto"} > , path: `/admin/donation/${id}/list-of-donatur`, }, { label: "Daftar Pencarian Dana", icon: , path: `/admin/donation/${id}/list-disbursement-of-funds`, }, ]} onPressItem={(item) => { setOpenDrawer(false); router.push(item.path as any); }} /> ); }