- Migrate admin/investment/[id]/[status]/index.tsx to OS_Wrapper (detail with pull-to-refresh) - Migrate admin/investment/[id]/[status]/transaction-detail.tsx to OS_Wrapper (transaction detail with footer) - Migrate admin/investment/[id]/reject-input.tsx to OS_Wrapper with enableKeyboardHandling - Migrate admin/investment/index.tsx to OS_Wrapper (dashboard) - Migrate ScreenInvestmentListOfInvestor.tsx to OS_Wrapper - Migrate ScreenInvestmentStatus.tsx to OS_Wrapper - Migrate admin/dashboard.tsx to OS_Wrapper - Migrate admin/maps.tsx to OS_Wrapper - Fix TASK-005 documentation: reorder Admin Phases 1-10, update tracking table - Mark Admin Phase 3 (Donation) as Complete (12 files verified) - Add Admin Phase 10 (Dashboard & Maps) documentation - Update grand total: 178/~184 files (~97% complete) Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
70 lines
1.8 KiB
TypeScript
70 lines
1.8 KiB
TypeScript
import { Spacing, StackCustom } from "@/components";
|
|
import OS_Wrapper from "@/components/_ShareComponent/OS_Wrapper";
|
|
import {
|
|
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";
|
|
import { apiAdminInvestment } from "@/service/api-admin/api-admin-investment";
|
|
import { useFocusEffect } from "expo-router";
|
|
import React, { useCallback } from "react";
|
|
|
|
export default function AdminInvestment() {
|
|
const [data, setData] = React.useState<any | null>(null);
|
|
|
|
useFocusEffect(
|
|
useCallback(() => {
|
|
onLoadData();
|
|
}, [])
|
|
);
|
|
|
|
const onLoadData = async () => {
|
|
try {
|
|
const response = await apiAdminInvestment({
|
|
category: "dashboard",
|
|
});
|
|
console.log(JSON.stringify(response, null, 2));
|
|
if (response.success) {
|
|
setData(response.data);
|
|
}
|
|
} catch (error) {
|
|
console.log(error);
|
|
}
|
|
};
|
|
|
|
const listData = [
|
|
{
|
|
label: "Publish",
|
|
value: (data && data.publish) || 0,
|
|
icon: <IconPublish size={25} color={MainColor.green} />,
|
|
},
|
|
{
|
|
label: "Review",
|
|
value: (data && data.review) || 0,
|
|
icon: <IconReview size={25} color={MainColor.orange} />,
|
|
},
|
|
{
|
|
label: "Reject",
|
|
value: (data && data.reject) || 0,
|
|
icon: <IconReject size={25} color={MainColor.red} />,
|
|
},
|
|
];
|
|
|
|
return (
|
|
<>
|
|
<OS_Wrapper>
|
|
<AdminTitlePage title="Investasi" />
|
|
<Spacing />
|
|
<StackCustom gap={"xs"}>
|
|
{listData.map((item, i) => (
|
|
<AdminComp_BoxDashboard key={i} item={item} />
|
|
))}
|
|
</StackCustom>
|
|
</OS_Wrapper>
|
|
</>
|
|
);
|
|
}
|