Integrasi API: Donation Admin
Add: - screens/Admin/Donation/funDonationUpdateStatus.ts - utils/countDownAndCondition.ts Fix: - app/(application)/(user)/donation/[id]/index.tsx - app/(application)/admin/donation/[id]/[status]/index.tsx - app/(application)/admin/donation/[id]/list-of-donatur.tsx - app/(application)/admin/donation/[id]/reject-input.tsx - app/(application)/admin/donation/index.tsx - app/(application)/admin/event/[id]/[status]/index.tsx - app/(application)/admin/voting/[id]/[status]/index.tsx - screens/Admin/Donation/BoxOfDonationStory.tsx - screens/Donation/BoxPublish.tsx - screens/Donation/ComponentBoxDetailData.tsx - service/api-admin/api-admin-donation.ts - service/api-client/api-master.ts - utils/colorBadge.ts git add . && git commit -m
This commit is contained in:
@@ -4,7 +4,7 @@ export async function apiAdminDonation({
|
||||
category,
|
||||
search,
|
||||
}: {
|
||||
category: "dashboard" | "publish" | "review" | "reject" ;
|
||||
category: "dashboard" | "publish" | "review" | "reject";
|
||||
search?: string;
|
||||
}) {
|
||||
try {
|
||||
@@ -16,3 +16,51 @@ export async function apiAdminDonation({
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export async function apiAdminDonationDetailById({ id }: { id: string }) {
|
||||
try {
|
||||
const response = await apiConfig.get(`/mobile/admin/donation/${id}`);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export async function apiAdminDonationUpdateStatus({
|
||||
id,
|
||||
changeStatus,
|
||||
data,
|
||||
}: {
|
||||
id: string;
|
||||
changeStatus: "publish" | "review" | "reject";
|
||||
data?: string;
|
||||
}) {
|
||||
try {
|
||||
const response = await apiConfig.put(
|
||||
`/mobile/admin/donation/${id}?status=${changeStatus}`,
|
||||
{
|
||||
data: data,
|
||||
}
|
||||
);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export async function apiAdminDonationListOfDonatur({
|
||||
id,
|
||||
status,
|
||||
}: {
|
||||
id: string;
|
||||
status: "berhasil" | "gagal" | "proses" | "menunggu" | "";
|
||||
}) {
|
||||
try {
|
||||
const response = await apiConfig.get(
|
||||
`/mobile/admin/donation/${id}/donatur?status=${status}`
|
||||
);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,3 +157,14 @@ export async function apiMasterDonation({
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
// ================== END MASTER DONATION ================== //
|
||||
|
||||
export async function apiMasterTransaction() {
|
||||
try {
|
||||
const response = await apiConfig.get(`/mobile/master/transaction-status`);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user