# Event Join

## feat
- Join event
- kontribusi event
- histoty in progress
### No Issue
This commit is contained in:
2024-01-29 22:03:27 +08:00
parent bec87028fd
commit ca9214d9e0
109 changed files with 2932 additions and 515 deletions

View File

@@ -1,11 +1,16 @@
import { LayoutEvent_DetailDraft } from "@/app_modules/event";
import React from "react";
export default async function Page({
children,
params,
}: {
children: React.ReactNode;
params: { id: string };
}) {
return <LayoutEvent_DetailDraft>{children}</LayoutEvent_DetailDraft>;
let eventId = params.id
return <>
<LayoutEvent_DetailDraft eventId={eventId}>{children}</LayoutEvent_DetailDraft>;
</>
}

View File

@@ -0,0 +1,8 @@
import { Event_DetailDraft } from "@/app_modules/event";
import { Event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
export default async function Page({params}: {params: {id: string}}) {
let eventId = params.id
const dataEvent = await Event_getOneById(eventId)
return <Event_DetailDraft dataEvent={dataEvent as any} />;
}

View File

@@ -1,5 +0,0 @@
import { Event_DetailDraft } from "@/app_modules/event";
export default async function Page() {
return <Event_DetailDraft />;
}

View File

@@ -0,0 +1,20 @@
import { Event_DetailKontribusi } from "@/app_modules/event";
import { Event_countTotalPesertaById } from "@/app_modules/event/fun/count/count_total_peserta_by_id";
import { Event_getListPesertaById } from "@/app_modules/event/fun/get/get_list_peserta_by_id";
import { Event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
export default async function Page({ params }: { params: { id: string } }) {
let eventId = params.id;
const dataEvent = await Event_getOneById(eventId);
const listKontributor = await Event_getListPesertaById(eventId);
const totalPeserta = await Event_countTotalPesertaById(eventId)
return (
<>
<Event_DetailKontribusi
dataEvent={dataEvent as any}
listKontributor={listKontributor as any}
totalPeserta={totalPeserta}
/>
</>
);
}

View File

@@ -1,9 +0,0 @@
import { Event_DetailKontribusi } from "@/app_modules/event";
export default async function Page() {
return (
<>
<Event_DetailKontribusi />
</>
);
}

View File

@@ -0,0 +1,27 @@
import { Event_DetailMain } from "@/app_modules/event";
import { Event_countTotalPesertaById } from "@/app_modules/event/fun/count/count_total_peserta_by_id";
import { Event_CekUserJoinById } from "@/app_modules/event/fun/get/cek_user_join_by_id";
import { Event_getListPesertaById } from "@/app_modules/event/fun/get/get_list_peserta_by_id";
import { Event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
export default async function Page({ params }: { params: { id: string } }) {
let eventId = params.id;
const dataEvent = await Event_getOneById(eventId);
const listPeserta = await Event_getListPesertaById(eventId);
const userLoginId = await User_getUserId();
const isJoin = await Event_CekUserJoinById(eventId, userLoginId);
const totalPeserta = await Event_countTotalPesertaById(eventId)
return (
<>
<Event_DetailMain
dataEvent={dataEvent as any}
listPeserta={listPeserta as any}
userLoginId={userLoginId}
isJoin={isJoin}
totalPeserta={totalPeserta as any}
/>
</>
);
}

View File

@@ -1,7 +0,0 @@
import { Event_DetailMain } from "@/app_modules/event";
export default async function Page() {
return <>
<Event_DetailMain/>
</>
}

View File

@@ -0,0 +1,9 @@
import { Event_DetailPublish } from "@/app_modules/event";
import { Event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
export default async function Page({ params }: { params: { id: string } }) {
let eventId = params.id;
const dataEvent = await Event_getOneById(eventId);
return <Event_DetailPublish dataEvent={dataEvent as any} />;
}

View File

@@ -1,5 +0,0 @@
import { Event_DetailPublish } from "@/app_modules/event";
export default async function Page() {
return <Event_DetailPublish />;
}

View File

@@ -0,0 +1,9 @@
import { Event_DetailReject } from "@/app_modules/event";
import { Event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
export default async function Page({params}: {params: {id: string}}) {
let eventId = params.id
const dataEvent = await Event_getOneById(eventId)
return <Event_DetailReject dataEvent={dataEvent as any}/>;
}

View File

@@ -1,5 +0,0 @@
import { Event_DetailReject } from "@/app_modules/event";
export default async function Page() {
return <Event_DetailReject />;
}

View File

@@ -0,0 +1,10 @@
import { Event_DetailReview } from "@/app_modules/event";
import { Event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
export default async function Page({params}: {params: {id: string}}) {
let eventId = params.id
const dataEvent = await Event_getOneById(eventId)
return <Event_DetailReview dataEvent={dataEvent as any}/>;
}

View File

@@ -1,6 +0,0 @@
import { Event_DetailReview } from "@/app_modules/event";
export default async function Page() {
return <Event_DetailReview />;
}