From 6f3cc03fa5d310acc04533566427d96c7c199376 Mon Sep 17 00:00:00 2001 From: Bagasbanuna02 Date: Tue, 12 Aug 2025 17:32:07 +0800 Subject: [PATCH] Admin Donation Add: - (application)/admin/donation/ Component Admin Add: - _ShareComponent/GridView_3_3_6.tsx ### No Issue --- app/(application)/admin/_layout.tsx | 7 ++ .../admin/donation/[status]/status.tsx | 76 ++++++++++++ .../admin/donation/category-create.tsx | 27 +++++ .../admin/donation/category-update.tsx | 35 ++++++ app/(application)/admin/donation/category.tsx | 113 ++++++++++++++++++ app/(application)/admin/donation/index.tsx | 49 ++++++++ components/_ShareComponent/GridView_3_3_6.tsx | 25 ++++ screens/Admin/listPageAdmin.tsx | 10 +- screens/Authentication/LoginView.tsx | 4 +- 9 files changed, 339 insertions(+), 7 deletions(-) create mode 100644 app/(application)/admin/donation/[status]/status.tsx create mode 100644 app/(application)/admin/donation/category-create.tsx create mode 100644 app/(application)/admin/donation/category-update.tsx create mode 100644 app/(application)/admin/donation/category.tsx create mode 100644 app/(application)/admin/donation/index.tsx create mode 100644 components/_ShareComponent/GridView_3_3_6.tsx diff --git a/app/(application)/admin/_layout.tsx b/app/(application)/admin/_layout.tsx index b1c8c50..94674c0 100644 --- a/app/(application)/admin/_layout.tsx +++ b/app/(application)/admin/_layout.tsx @@ -106,6 +106,13 @@ export default function AdminLayout() { {/* */} {/* ================== Event End ================== */} + + {/* ================== Donasi Start ================== */} + {/* */} + {/* */} + {/* + */} + {/* ================== Donasi End ================== */} + ); + return ( + <> + }> + + + + + + + + {Array.from({ length: 10 }).map((_, index) => ( + + } + onPress={() => { + // router.push(`/admin/donation/${index}/${status}`); + }} + /> + } + value2={Username username} + value3={ + + Lorem ipsum dolor sit amet consectetur adipisicing elit. + Blanditiis asperiores quidem deleniti architecto eaque et + nostrum, ad consequuntur eveniet quisquam quae voluptatum + ducimus! Dolorem nobis modi officia debitis, beatae mollitia. + + } + /> + ))} + + + + ); +} diff --git a/app/(application)/admin/donation/category-create.tsx b/app/(application)/admin/donation/category-create.tsx new file mode 100644 index 0000000..587ea69 --- /dev/null +++ b/app/(application)/admin/donation/category-create.tsx @@ -0,0 +1,27 @@ +import { + BoxButtonOnFooter, + ButtonCustom, + TextInputCustom, + ViewWrapper, +} from "@/components"; +import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle"; +import { useRouter } from "expo-router"; + +export default function AdminDonationCategoryCreate() { + const router = useRouter(); + const buttonSubmit = ( + + router.back()}>Simpan + + ); + return ( + <> + } + footerComponent={buttonSubmit} + > + + + + ); +} diff --git a/app/(application)/admin/donation/category-update.tsx b/app/(application)/admin/donation/category-update.tsx new file mode 100644 index 0000000..91c1241 --- /dev/null +++ b/app/(application)/admin/donation/category-update.tsx @@ -0,0 +1,35 @@ +import { + BoxButtonOnFooter, + ButtonCustom, + TextInputCustom, + ViewWrapper, +} from "@/components"; +import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle"; +import { useLocalSearchParams, useRouter } from "expo-router"; +import { useState } from "react"; + +export default function AdminDonationCategoryUpdate() { + const { id } = useLocalSearchParams(); + const [value, setValue] = useState(id); + + const router = useRouter(); + const buttonSubmit = ( + + router.back()}>Update + + ); + return ( + <> + } + footerComponent={buttonSubmit} + > + + + + ); +} diff --git a/app/(application)/admin/donation/category.tsx b/app/(application)/admin/donation/category.tsx new file mode 100644 index 0000000..20f7cf4 --- /dev/null +++ b/app/(application)/admin/donation/category.tsx @@ -0,0 +1,113 @@ +import { + ActionIcon, + BaseBox, + CenterCustom, + Spacing, + StackCustom, + TextCustom, + ViewWrapper, +} from "@/components"; +import { IconEdit } from "@/components/_Icon"; +import AdminActionIconPlus from "@/components/_ShareComponent/Admin/ActionIconPlus"; +import AdminComp_BoxTitle from "@/components/_ShareComponent/Admin/BoxTitlePage"; +import AdminTitlePage from "@/components/_ShareComponent/Admin/TitlePage"; +import { GridView_3_3_6 } from "@/components/_ShareComponent/GridView_3_3_6"; +import { MainColor } from "@/constants/color-palet"; +import { ICON_SIZE_BUTTON } from "@/constants/constans-value"; +import { View } from "react-native"; +import { Divider, Switch } from "react-native-paper"; +import { router } from "expo-router"; + +export default function AdminDonationCategory() { + return ( + <> + }> + { + router.push(`/admin/donation/category-create`); + }} + /> + } + /> + + + + Aksi + + } + component2={Status} + component3={Kategori} + /> + + + + + {listData.map((item, index) => ( + + + + } + onPress={() => { + router.push(`/admin/donation/category-update?id=${index}`); + }} + /> + + } + component2={ + { + console.log(item); + }} + color={MainColor.yellow} + + /> + } + component3={{item.label}} + /> + + + + ))} + + + + + ); +} + +const listData = [ + { + label: "Kegiatan Sosial", + value: "kegiatan_sosial", + }, + { + label: "Pendidikan", + value: "pendidikan", + }, + { + label: "Kesehatan", + value: "kesehatan", + }, + { + label: "Kebudayaan", + value: "kebudayaan", + }, + { + label: "Bencana Alami", + value: "bencana_alami", + }, + { + label: "Lainnya", + value: "lainnya", + }, +]; diff --git a/app/(application)/admin/donation/index.tsx b/app/(application)/admin/donation/index.tsx new file mode 100644 index 0000000..d63ec2c --- /dev/null +++ b/app/(application)/admin/donation/index.tsx @@ -0,0 +1,49 @@ +import { Spacing, StackCustom, ViewWrapper } from "@/components"; +import { + IconList, + IconPublish, + IconReject, + IconReview, +} from "@/components/_Icon/IconComponent"; +import AdminComp_BoxDashboard from "@/components/_ShareComponent/Admin/BoxDashboard"; +import AdminTitlePage from "@/components/_ShareComponent/Admin/TitlePage"; +import { MainColor } from "@/constants/color-palet"; + +export default function AdminDonation() { + return ( + <> + + + + + {listData.map((item, i) => ( + + ))} + + + + ); +} + +const listData = [ + { + label: "Publish", + value: 4, + icon: , + }, + { + label: "Review", + value: 7, + icon: , + }, + { + label: "Reject", + value: 5, + icon: , + }, + { + label: "Kategori", + value: 4, + icon: , + }, +]; diff --git a/components/_ShareComponent/GridView_3_3_6.tsx b/components/_ShareComponent/GridView_3_3_6.tsx new file mode 100644 index 0000000..3e7be13 --- /dev/null +++ b/components/_ShareComponent/GridView_3_3_6.tsx @@ -0,0 +1,25 @@ +import { Grid } from "@/components"; + +export const GridView_3_3_6 = ({ + component1, + component2, + component3, +}: { + component1: React.ReactNode; + component2: React.ReactNode; + component3: React.ReactNode; +}) => { + return ( + + + {component1} + + + {component2} + + + {component3} + + + ); +}; diff --git a/screens/Admin/listPageAdmin.tsx b/screens/Admin/listPageAdmin.tsx index 7fcbeef..e38da87 100644 --- a/screens/Admin/listPageAdmin.tsx +++ b/screens/Admin/listPageAdmin.tsx @@ -22,11 +22,11 @@ const adminListMenu: NavbarItem[] = [ label: "Donasi", icon: "hand-right", links: [ - { label: "Dashboard", link: "/admin/donasi" }, - { label: "Publish", link: "/admin/donasi/publish" }, - { label: "Review", link: "/admin/donasi/review" }, - { label: "Reject", link: "/admin/donasi/reject" }, - { label: "Kategori", link: "/admin/donasi/kategori" }, + { label: "Dashboard", link: "/admin/donation" }, + { label: "Publish", link: "/admin/donation/publish/status" }, + { label: "Review", link: "/admin/donation/review/status" }, + { label: "Reject", link: "/admin/donation/reject/status" }, + { label: "Kategori", link: "/admin/donation/category" }, ], }, { diff --git a/screens/Authentication/LoginView.tsx b/screens/Authentication/LoginView.tsx index 1963e28..af685d5 100644 --- a/screens/Authentication/LoginView.tsx +++ b/screens/Authentication/LoginView.tsx @@ -84,9 +84,9 @@ export default function LoginView() { - router.navigate("/admin/event")}> + {/* router.navigate("/admin/donation")}> Admin ( Delete Soon ) - + */} );