fix: event

- deskripsi:
- fix use server untuk pengambilan userid , sekarang menggunakan API
This commit is contained in:
2025-05-30 17:25:04 +08:00
parent 5a9f9e4cf4
commit 6f686b6abf
16 changed files with 377 additions and 313 deletions

View File

@@ -1,15 +1,5 @@
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
import { Event_Create } from "@/app_modules/event";
import { Event_getMasterTipeAcara } from "@/app_modules/event/fun/master/get_tipe_acara";
export default async function Page() {
const userLoginId = await funGetUserIdByToken();
const listTipeAcara = await Event_getMasterTipeAcara();
return (
<Event_Create
listTipeAcara={listTipeAcara as any}
authorId={userLoginId as string}
/>
);
return <Event_Create />;
}

View File

@@ -3,10 +3,10 @@ import LayoutEvent_DetailSponsor from '@/app_modules/event/detail/detail_sponsor
import React from 'react';
async function Layout({children} : {children: React.ReactNode}) {
const userLoginId = await funGetUserIdByToken()
// const userLoginId = await funGetUserIdByToken()
return (
<>
<LayoutEvent_DetailSponsor userLoginId={userLoginId}>
<LayoutEvent_DetailSponsor userLoginId={""}>
{children}
</LayoutEvent_DetailSponsor>
</>

View File

@@ -3,10 +3,10 @@ import DetailSponsor_Event from '@/app_modules/event/detail/detail_sponsor';
import React from 'react';
async function Page() {
const userLoginId = await funGetUserIdByToken();
// const userLoginId = await funGetUserIdByToken();
return (
<>
<DetailSponsor_Event userLoginId={userLoginId} />
<DetailSponsor_Event userLoginId={""} />
</>
);
}

View File

@@ -1,14 +1,9 @@
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
import { Event_DetailMain } from "@/app_modules/event";
export default async function Page() {
const userLoginId = await funGetUserIdByToken();
return (
<>
<Event_DetailMain
userLoginId={userLoginId as string}
/>
<Event_DetailMain />
</>
);
}

View File

@@ -1,8 +1,14 @@
import { LayoutEvent_Edit } from "@/app_modules/event";
import React from "react";
export default async function Layout({children}: {children: React.ReactNode}) {
return <>
<LayoutEvent_Edit>{children}</LayoutEvent_Edit>
export default async function Layout({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<LayoutEvent_Edit>{children}</LayoutEvent_Edit>
</>
}
);
}

View File

@@ -1,25 +1,9 @@
import { Event_Edit } from "@/app_modules/event";
import { event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
import { Event_getMasterTipeAcara } from "@/app_modules/event/fun/master/get_tipe_acara";
import _ from "lodash";
export default async function Page({ params }: { params: { id: string } }) {
let eventId = params.id;
const data = await event_getOneById(eventId);
const dataEvent = _.omit(data, [
"Author",
"EventMaster_Status",
"Event_Peserta",
"createdAt",
"updatedAt",
"active",
]);
const listTipeAcara = await Event_getMasterTipeAcara()
export default async function Page() {
return (
<>
<Event_Edit dataEvent={dataEvent as any} listTipeAcara={listTipeAcara as any}/>
<Event_Edit />
</>
);
}

View File

@@ -3,10 +3,10 @@ import Event_Invoice from '@/app_modules/event/detail/invoice';
import React from 'react';
async function Page() {
const userLoginId = await funGetUserIdByToken();
// const userLoginId = await funGetUserIdByToken();
return (
<>
<Event_Invoice userLoginId={userLoginId} />
<Event_Invoice userLoginId={""} />
</>
);
}

View File

@@ -1,13 +1,10 @@
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
import UiEvent_V2_Konfirmasi from "@/app_modules/event/_ui/V2_konfirmasi";
export default async function Page() {
const userLoginId = await funGetUserIdByToken();
return (
<>
{/* <Ui_Konfirmasi userLoginId={userLoginId as string} /> */}
<UiEvent_V2_Konfirmasi userLoginId={userLoginId as string} />
<UiEvent_V2_Konfirmasi />
</>
);
}

View File

@@ -1,18 +1,6 @@
import { Event_StatusPage } from "@/app_modules/event";
import {
event_getAllByStatusId,
event_getMasterStatus,
} from "@/app_modules/event/fun";
async function Page({ params }: { params: { id: string } }) {
// let statusId = params.id;
// const listStatus = await event_getMasterStatus();
// const dataStatus = await event_getAllByStatusId({
// page: 1,
// statusId: statusId,
// });
return (
<>
<Event_StatusPage />