Admin Donation
Fix: - dmin/donation/[id]/[status]/index Add: - screens/Admin/Donation/ ### No Issue
This commit is contained in:
@@ -7,6 +7,8 @@ import {
|
|||||||
DrawerCustom,
|
DrawerCustom,
|
||||||
DummyLandscapeImage,
|
DummyLandscapeImage,
|
||||||
MenuDrawerDynamicGrid,
|
MenuDrawerDynamicGrid,
|
||||||
|
ProgressCustom,
|
||||||
|
Spacing,
|
||||||
StackCustom,
|
StackCustom,
|
||||||
TextCustom,
|
TextCustom,
|
||||||
ViewWrapper,
|
ViewWrapper,
|
||||||
@@ -18,10 +20,12 @@ import AdminButtonReview from "@/components/_ShareComponent/Admin/ButtonReview";
|
|||||||
import { GridDetail_4_8 } from "@/components/_ShareComponent/GridDetail_4_8";
|
import { GridDetail_4_8 } from "@/components/_ShareComponent/GridDetail_4_8";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import { ICON_SIZE_BUTTON, TEXT_SIZE_LARGE } from "@/constants/constans-value";
|
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 { Ionicons } from "@expo/vector-icons";
|
||||||
import { router, useLocalSearchParams } from "expo-router";
|
import { router, useLocalSearchParams } from "expo-router";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import { View } from "react-native";
|
||||||
|
|
||||||
export default function AdminDonationDetail() {
|
export default function AdminDonationDetail() {
|
||||||
const { id, status } = useLocalSearchParams();
|
const { id, status } = useLocalSearchParams();
|
||||||
@@ -68,18 +72,18 @@ export default function AdminDonationDetail() {
|
|||||||
label: "Kategori",
|
label: "Kategori",
|
||||||
value: "Kategori Donasi",
|
value: "Kategori Donasi",
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: "Total Donatur",
|
// label: "Total Donatur",
|
||||||
value: "-",
|
// value: "-",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: "Progress",
|
// label: "Progress",
|
||||||
value: "0 %",
|
// value: "0 %",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: "Dana Terkumpul",
|
// label: "Dana Terkumpul",
|
||||||
value: "Rp 0",
|
// value: "Rp 0",
|
||||||
},
|
// },
|
||||||
];
|
];
|
||||||
|
|
||||||
const listPencarianDana = [
|
const listPencarianDana = [
|
||||||
@@ -114,6 +118,8 @@ export default function AdminDonationDetail() {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ViewWrapper
|
<ViewWrapper
|
||||||
@@ -125,33 +131,50 @@ export default function AdminDonationDetail() {
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
{status === "publish" && (
|
{status === "publish" && (
|
||||||
<BaseBox>
|
<View>
|
||||||
<StackCustom>
|
<BaseBox>
|
||||||
<TextCustom bold align="center" size={TEXT_SIZE_LARGE}>
|
<StackCustom>
|
||||||
Pencarian Dana
|
<TextCustom bold align="center" size={TEXT_SIZE_LARGE}>
|
||||||
</TextCustom>
|
Pencarian Dana
|
||||||
|
</TextCustom>
|
||||||
|
|
||||||
<StackCustom gap={5}>
|
<StackCustom gap={5}>
|
||||||
{listPencarianDana.map((item, i) => (
|
{listPencarianDana.map((item, i) => (
|
||||||
<GridDetail_4_8
|
<GridDetail_4_8
|
||||||
key={i}
|
key={i}
|
||||||
label={<TextCustom bold>{item.label}</TextCustom>}
|
label={<TextCustom bold>{item.label}</TextCustom>}
|
||||||
value={<TextCustom>{item.value}</TextCustom>}
|
value={<TextCustom>{item.value}</TextCustom>}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
</StackCustom>
|
||||||
|
<ButtonCustom
|
||||||
|
iconLeft={
|
||||||
|
<Ionicons name="cash-outline" size={ICON_SIZE_BUTTON} />
|
||||||
|
}
|
||||||
|
onPress={() => {
|
||||||
|
router.push(`/admin/donation/${id}/disbursement-of-funds`);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Cairkan Dana
|
||||||
|
</ButtonCustom>
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
<ButtonCustom
|
</BaseBox>
|
||||||
iconLeft={
|
|
||||||
<Ionicons name="cash-outline" size={ICON_SIZE_BUTTON} />
|
<BaseBox>
|
||||||
}
|
<ProgressCustom size="lg" />
|
||||||
onPress={() => {
|
<Spacing />
|
||||||
router.push(`/admin/donation/${id}/disbursement-of-funds`);
|
<StackCustom gap={"xs"}>
|
||||||
}}
|
<GridDetail_4_8
|
||||||
>
|
label={<TextCustom bold>Jumlah Donatur</TextCustom>}
|
||||||
Cairkan Dana
|
value={<TextCustom>0 orang</TextCustom>}
|
||||||
</ButtonCustom>
|
/>
|
||||||
</StackCustom>
|
<GridDetail_4_8
|
||||||
</BaseBox>
|
label={<TextCustom bold>Dana Terkumpul</TextCustom>}
|
||||||
|
value={<TextCustom>Rp 0</TextCustom>}
|
||||||
|
/>
|
||||||
|
</StackCustom>
|
||||||
|
</BaseBox>
|
||||||
|
</View>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<BaseBox>
|
<BaseBox>
|
||||||
@@ -168,34 +191,42 @@ export default function AdminDonationDetail() {
|
|||||||
</BaseBox>
|
</BaseBox>
|
||||||
|
|
||||||
{status === "review" && (
|
{status === "review" && (
|
||||||
<AdminButtonReview
|
<StackCustom>
|
||||||
onPublish={() => {
|
<AdminDonation_BoxOfDonationStory />
|
||||||
AlertDefaultSystem({
|
|
||||||
title: "Publish",
|
<AdminButtonReview
|
||||||
message: "Apakah anda yakin ingin mempublikasikan data ini?",
|
onPublish={() => {
|
||||||
textLeft: "Batal",
|
AlertDefaultSystem({
|
||||||
textRight: "Ya",
|
title: "Publish",
|
||||||
onPressLeft: () => {
|
message: "Apakah anda yakin ingin mempublikasikan data ini?",
|
||||||
router.back();
|
textLeft: "Batal",
|
||||||
},
|
textRight: "Ya",
|
||||||
onPressRight: () => {
|
onPressLeft: () => {
|
||||||
router.back();
|
router.back();
|
||||||
},
|
},
|
||||||
});
|
onPressRight: () => {
|
||||||
}}
|
router.back();
|
||||||
onReject={() => {
|
},
|
||||||
router.push(`/admin/donation/${id}/reject-input`);
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
onReject={() => {
|
||||||
|
router.push(`/admin/donation/${id}/reject-input`);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</StackCustom>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{status === "reject" && (
|
{status === "reject" && (
|
||||||
<AdminButtonReject
|
<StackCustom>
|
||||||
title="Tambah Catatan"
|
<AdminDonation_BoxOfDonationStory />
|
||||||
onReject={() => {
|
|
||||||
router.push(`/admin/donation/${id}/reject-input`);
|
<AdminButtonReject
|
||||||
}}
|
title="Tambah Catatan"
|
||||||
/>
|
onReject={() => {
|
||||||
|
router.push(`/admin/donation/${id}/reject-input`);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</StackCustom>
|
||||||
)}
|
)}
|
||||||
</ViewWrapper>
|
</ViewWrapper>
|
||||||
|
|
||||||
|
|||||||
34
screens/Admin/Donation/BoxOfDonationStory.tsx
Normal file
34
screens/Admin/Donation/BoxOfDonationStory.tsx
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
import {
|
||||||
|
BaseBox,
|
||||||
|
TextCustom,
|
||||||
|
Spacing,
|
||||||
|
StackCustom,
|
||||||
|
DummyLandscapeImage,
|
||||||
|
} from "@/components";
|
||||||
|
|
||||||
|
export default function AdminDonation_BoxOfDonationStory() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<BaseBox>
|
||||||
|
<TextCustom bold>Cerita Penggalang Dana</TextCustom>
|
||||||
|
<Spacing />
|
||||||
|
|
||||||
|
<StackCustom>
|
||||||
|
<TextCustom>
|
||||||
|
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Rem magni
|
||||||
|
perspiciatis eius ipsam provident, impedit, fugiat aliquid nobis
|
||||||
|
pariatur asperiores fuga quidem temporibus labore, molestias
|
||||||
|
perferendis optio ipsum. Praesentium, tempore?
|
||||||
|
</TextCustom>
|
||||||
|
<DummyLandscapeImage />
|
||||||
|
<TextCustom>
|
||||||
|
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Rem magni
|
||||||
|
perspiciatis eius ipsam provident, impedit, fugiat aliquid nobis
|
||||||
|
pariatur asperiores fuga quidem temporibus labore, molestias
|
||||||
|
perferendis optio ipsum. Praesentium, tempore?
|
||||||
|
</TextCustom>
|
||||||
|
</StackCustom>
|
||||||
|
</BaseBox>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user