Merge pull request #263 from bipproduction/bagas/31-jan-25

fix event admin
This commit is contained in:
Bagasbanuna02
2025-02-03 14:08:14 +08:00
committed by GitHub
13 changed files with 331 additions and 160 deletions

View File

@@ -4,6 +4,7 @@ export {
apiGetAdminEventRiwayatCount as apiGetEventRiwayatCount,
apiGetAdminEventByStatus as apiGetDataEventByStatus,
apiGetAdminEventRiwayat,
apiGetAdminEventTipeAcara,
};
const apiGetAdminEventStatusCountDashboard = async ({
@@ -114,3 +115,20 @@ const apiGetAdminEventRiwayat = async ({
return await response.json().catch(() => null);
};
const apiGetAdminEventTipeAcara = async () => {
const { token } = await fetch("/api/get-cookie").then((res) => res.json());
if (!token) return await token.json().catch(() => null);
const response = await fetch(`/api/event/tipe-acara`, {
method: "GET",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
"Access-Control-Allow-Origin": "*",
Authorization: `Bearer ${token}`,
},
});
return await response.json().catch(() => null);
};

View File

@@ -1,8 +1,6 @@
import { AdminEvent_Riwayat } from "@/app_modules/admin/event";
import { adminEvent_funGetListAllRiwayat } from "@/app_modules/admin/event/fun/get/get_list_all_riwayat";
export default async function Page() {
// const listRiwayat = await adminEvent_funGetListAllRiwayat({ page: 1 });
return (
<>

View File

@@ -2,11 +2,11 @@ import { AdminEvent_DetailTipeAcara } from "@/app_modules/admin/event";
import { AdminEvent_getListTipeAcara } from "@/app_modules/admin/event/fun/get/get_list_tipe_acara";
export default async function Page() {
const listTipe = await AdminEvent_getListTipeAcara()
// const listTipe = await AdminEvent_getListTipeAcara()
return (
<>
<AdminEvent_DetailTipeAcara listTipe={listTipe}/>
<AdminEvent_DetailTipeAcara />
</>
);
}