Fix:
modified: android/app/build.gradle
modified: app.config.js
modified: app/(application)/admin/donation/[id]/[status]/index.tsx
modified: app/(application)/admin/donation/[id]/[status]/transaction-detail.tsx
modified: app/(application)/admin/donation/[id]/detail-disbursement-of-funds.tsx
modified: app/(application)/admin/donation/category.tsx
modified: app/(application)/admin/event/[id]/[status]/index.tsx
modified: app/(application)/admin/event/[id]/list-of-participants.tsx
modified: app/(application)/admin/event/[status]/status.tsx
modified: app/(application)/admin/forum/[id]/index.tsx
modified: app/(application)/admin/forum/[id]/list-report-comment.tsx
modified: app/(application)/admin/forum/[id]/list-report-posting.tsx
modified: app/(application)/admin/investment/[id]/[status]/index.tsx
modified: app/(application)/admin/investment/[id]/[status]/transaction-detail.tsx
modified: app/(application)/admin/voting/[id]/[status]/index.tsx
modified: components/DateInput/DateTimeIOS.tsx
modified: components/_ShareComponent/Admin/ButtonReject.tsx
deleted: components/_ShareComponent/GridDetail_4_8.tsx
Add:/
components/_ShareComponent/GridSpan_4_8.tsx
### No Issue
90 lines
2.3 KiB
TypeScript
90 lines
2.3 KiB
TypeScript
/* eslint-disable react-hooks/exhaustive-deps */
|
|
import {
|
|
BaseBox,
|
|
ButtonCustom,
|
|
StackCustom,
|
|
TextCustom,
|
|
ViewWrapper,
|
|
} from "@/components";
|
|
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
|
import { GridSpan_4_8 } from "@/components/_ShareComponent/GridSpan_4_8";
|
|
import { apiAdminDonationDisbursementOfFundsListById } from "@/service/api-admin/api-admin-donation";
|
|
import { dateTimeView } from "@/utils/dateTimeView";
|
|
import { formatCurrencyDisplay } from "@/utils/formatCurrencyDisplay";
|
|
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
|
import React, { useCallback } from "react";
|
|
|
|
export default function AdminDonationDetailDisbursementOfFunds() {
|
|
const { id } = useLocalSearchParams();
|
|
const [data, setData] = React.useState<any | null>(null);
|
|
|
|
useFocusEffect(
|
|
useCallback(() => {
|
|
onLoadData();
|
|
}, [id])
|
|
);
|
|
|
|
const onLoadData = async () => {
|
|
try {
|
|
const response = await apiAdminDonationDisbursementOfFundsListById({
|
|
id: id as string,
|
|
category: "get-one",
|
|
});
|
|
|
|
if (response.success) {
|
|
setData(response.data);
|
|
}
|
|
} catch (error) {
|
|
console.log("[ERROR]", error);
|
|
}
|
|
};
|
|
|
|
const listData = [
|
|
{
|
|
label: "Nominal",
|
|
value: `Rp ${(data && formatCurrencyDisplay(data?.nominalCair)) || 0}`,
|
|
},
|
|
{
|
|
label: "Tanggal",
|
|
value: dateTimeView({ date: data?.createdAt }),
|
|
},
|
|
{
|
|
label: "Judul",
|
|
value: (data && data?.title) || "-",
|
|
},
|
|
{
|
|
label: "Deskripsi",
|
|
value: (data && data?.deskripsi) || "-",
|
|
},
|
|
];
|
|
return (
|
|
<>
|
|
<ViewWrapper
|
|
headerComponent={
|
|
<AdminBackButtonAntTitle title="Detail Pencairan Dana" />
|
|
}
|
|
>
|
|
<BaseBox>
|
|
<StackCustom>
|
|
{listData?.map((item, index) => (
|
|
<GridSpan_4_8
|
|
key={index}
|
|
label={<TextCustom bold>{item.label}</TextCustom>}
|
|
value={<TextCustom>{item.value}</TextCustom>}
|
|
/>
|
|
))}
|
|
</StackCustom>
|
|
</BaseBox>
|
|
|
|
<ButtonCustom
|
|
onPress={() =>
|
|
router.push(`/(application)/(image)/preview-image/${data?.imageId}`)
|
|
}
|
|
>
|
|
Cek Bukti Transaksi
|
|
</ButtonCustom>
|
|
</ViewWrapper>
|
|
</>
|
|
);
|
|
}
|