# Event Join
## feat - Join event - History semua event dan event saya ### No Issuue
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
import { AdminEvent_Main } from "@/app_modules/admin/event";
|
||||
import AdminEvent_funCountByStatusId from "@/app_modules/admin/event/fun/count/fun_count_event_by_status_id";
|
||||
import { AdminEvent_funCountTipeAcara } from "@/app_modules/admin/event/fun/count/fun_count_tipe_acara";
|
||||
|
||||
export default async function Page() {
|
||||
const countPublish = await AdminEvent_funCountByStatusId("1");
|
||||
const countReview = await AdminEvent_funCountByStatusId("2");
|
||||
const countDraft = await AdminEvent_funCountByStatusId("3");
|
||||
const countReject = await AdminEvent_funCountByStatusId("4");
|
||||
const countTipeAcara = await AdminEvent_funCountTipeAcara()
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -14,6 +17,7 @@ export default async function Page() {
|
||||
countReview={countReview as number}
|
||||
countDraft={countDraft as number}
|
||||
countReject={countReject as number}
|
||||
countTipeAcara={countTipeAcara as number}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
14
src/app/dev/event/detail/riwayat/[id]/layout.tsx
Normal file
14
src/app/dev/event/detail/riwayat/[id]/layout.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { LayoutEvent_DetailRiwayat } from "@/app_modules/event";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<LayoutEvent_DetailRiwayat>{children}</LayoutEvent_DetailRiwayat>
|
||||
</>
|
||||
);
|
||||
}
|
||||
24
src/app/dev/event/detail/riwayat/[id]/page.tsx
Normal file
24
src/app/dev/event/detail/riwayat/[id]/page.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
import { Event_DetailRiwayat } 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 totalPeserta = await Event_countTotalPesertaById(eventId);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Event_DetailRiwayat
|
||||
dataEvent={dataEvent as any}
|
||||
listPeserta={listPeserta as any}
|
||||
totalPeserta={totalPeserta as any}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
import { Event_History } from "@/app_modules/event";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let eventId = params.id;
|
||||
console.log(eventId);
|
||||
return <Event_History />;
|
||||
}
|
||||
19
src/app/dev/event/main/riwayat/page.tsx
Normal file
19
src/app/dev/event/main/riwayat/page.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Event_Riwayat } from "@/app_modules/event";
|
||||
import { Event_getListRiwayatSaya } from "@/app_modules/event/fun/get/get_list_riwayat_saya";
|
||||
import { Event_getListSemuaRiwayat } from "@/app_modules/event/fun/get/get_list_semua_riwayat";
|
||||
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 authorId = await User_getUserId();
|
||||
const dataSemuaRiwayat = await Event_getListSemuaRiwayat();
|
||||
const dataRiwayatSaya = await Event_getListRiwayatSaya(authorId);
|
||||
|
||||
return (
|
||||
<Event_Riwayat
|
||||
dataSemuaRiwayat={dataSemuaRiwayat as any}
|
||||
dataRiwayatSaya={dataRiwayatSaya as any}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -11,6 +11,7 @@ export default async function Page() {
|
||||
|
||||
return (
|
||||
<Event_StatusPage
|
||||
authorId={authorId}
|
||||
listPublish={listPublish}
|
||||
listReview={listReview}
|
||||
listDraft={listDraft}
|
||||
|
||||
Reference in New Issue
Block a user