Integrasi API: Admin Investasi
Fix: - app/(application)/(user)/investment/(tabs)/index.tsx - app/(application)/admin/investment/[id]/[status]/transaction-detail.tsx - app/(application)/admin/investment/[id]/list-of-investor.tsx - screens/Invesment/BoxBerandaSection.tsx - screens/Invesment/DetailDataPublishSection.tsx - service/api-admin/api-admin-investment.ts ### No Issue
This commit is contained in:
@@ -52,3 +52,37 @@ export async function apiAdminInvestasiUpdateByStatus({
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export async function apiAdminInvestmentListOfInvestor({
|
||||
id,
|
||||
status,
|
||||
}: {
|
||||
id: string;
|
||||
status: "berhasil" | "gagal" | "proses" | "menunggu" | null;
|
||||
}) {
|
||||
const query = status && status !== null ? `?status=${status}` : "";
|
||||
|
||||
try {
|
||||
const response = await apiConfig.get(
|
||||
`/mobile/admin/investment/${id}/investor${query}`
|
||||
);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export async function apiAdminInvestmentGetOneInvoiceById({
|
||||
id,
|
||||
}: {
|
||||
id: string;
|
||||
}) {
|
||||
try {
|
||||
const response = await apiConfig.get(
|
||||
`/mobile/admin/investment/${id}/invoice`
|
||||
);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user