Integrasi API: Donation & Admin Donation
Fix: - app/(application)/(user)/donation/[id]/fund-disbursement.tsx - app/(application)/(user)/donation/[id]/list-of-donatur.tsx - app/(application)/admin/donation/[id]/[status]/index.tsx - app/(application)/admin/donation/[id]/detail-disbursement-of-funds.tsx - app/(application)/admin/donation/[id]/disbursement-of-funds.tsx - app/(application)/admin/donation/[id]/list-disbursement-of-funds.tsx - service/api-admin/api-admin-donation.ts - service/api-client/api-donation.ts - utils/pickFile.ts: Sudah bisa memilih ukuran crop tapi hanya di android ### No issue
This commit is contained in:
@@ -103,3 +103,52 @@ export async function apiAdminDonationInvoiceUpdateById({
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export async function apiAdminDonationListOfDonaturById({
|
||||
id,
|
||||
}: {
|
||||
id: string;
|
||||
}) {
|
||||
try {
|
||||
const response = await apiConfig.get(`/mobile/donation/${id}/donatur`);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export async function apiAdminDonationDisbursementOfFundsCreated({
|
||||
id,
|
||||
data,
|
||||
}: {
|
||||
id: string;
|
||||
data: any;
|
||||
}) {
|
||||
try {
|
||||
const response = await apiConfig.post(
|
||||
`/mobile/admin/donation/${id}/disbursement`,
|
||||
{
|
||||
data: data,
|
||||
}
|
||||
);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export async function apiAdminDonationDisbursementOfFundsListById({
|
||||
id,
|
||||
category,
|
||||
}: {
|
||||
id: string;
|
||||
category: "get-all" | "get-one"
|
||||
}) {
|
||||
try {
|
||||
const response = await apiConfig.get(`/mobile/admin/donation/${id}/disbursement?category=${category}`);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -255,3 +255,16 @@ export async function apiDonationDeleteNews({ id }: { id: string }) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export async function apiDonationDisbursementOfFundsListById({
|
||||
id,
|
||||
}: {
|
||||
id: string;
|
||||
}) {
|
||||
try {
|
||||
const response = await apiConfig.get(`/mobile/donation/${id}/disbursement`);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user