# Event Join
## feat - Join event - History semua event dan event saya ### No Issuue
This commit is contained in:
5
src/app_modules/admin/event/create/tipe_acara.tsx
Normal file
5
src/app_modules/admin/event/create/tipe_acara.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
"use client"
|
||||
|
||||
export default function AdminEvent_CreateTipeAcara(){
|
||||
|
||||
}
|
||||
22
src/app_modules/admin/event/detail/tipe_acara.tsx
Normal file
22
src/app_modules/admin/event/detail/tipe_acara.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import { Stack } from "@mantine/core";
|
||||
import ComponentAdminDonasi_TombolKembali from "../../donasi/component/tombol_kembali";
|
||||
import ComponentAdminGlobal_HeaderTamplate from "../../component/header_tamplate";
|
||||
|
||||
export default function AdminEvent_DetailTipeAcara() {
|
||||
return (
|
||||
<>
|
||||
<Stack>
|
||||
<ComponentAdminGlobal_HeaderTamplate name="Event" />
|
||||
<ComponentAdminDonasi_TombolKembali />
|
||||
<DetailTipeAcara/>
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function DetailTipeAcara(){
|
||||
return <>
|
||||
|
||||
disiin tipe nya
|
||||
</>
|
||||
}
|
||||
@@ -12,6 +12,9 @@ export default async function AdminEvent_funCountByStatusId(statusId: string) {
|
||||
const count = await prisma.event.count({
|
||||
where: {
|
||||
eventMaster_StatusId: "1",
|
||||
tanggal: {
|
||||
gte: new Date
|
||||
}
|
||||
},
|
||||
});
|
||||
return count;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
"use server"
|
||||
|
||||
import prisma from "@/app/lib/prisma"
|
||||
|
||||
export async function AdminEvent_funCountTipeAcara() {
|
||||
const data = await prisma.eventMaster_TipeAcara.count({})
|
||||
return data
|
||||
}
|
||||
@@ -6,10 +6,14 @@ export async function AdminEvent_getListTableByStatusId(statudId: string) {
|
||||
if (statudId === "1") {
|
||||
const getPublish = await prisma.event.findMany({
|
||||
orderBy: {
|
||||
updatedAt: "desc",
|
||||
tanggal: "desc",
|
||||
},
|
||||
where: {
|
||||
eventMaster_StatusId: "1",
|
||||
tanggal: {
|
||||
gte: new Date
|
||||
}
|
||||
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
|
||||
@@ -2,10 +2,12 @@ import AdminEvent_Main from "./main";
|
||||
import AdminEvent_TableReview from "./table_status/table_review";
|
||||
import AdminEvent_TablePublish from "./table_status/table_publish";
|
||||
import AdminEvent_TableReject from "./table_status/table_reject";
|
||||
import AdminEvent_DetailTipeAcara from "./detail/tipe_acara";
|
||||
|
||||
export {
|
||||
AdminEvent_Main,
|
||||
AdminEvent_TableReview,
|
||||
AdminEvent_TablePublish,
|
||||
AdminEvent_TableReject,
|
||||
AdminEvent_DetailTipeAcara,
|
||||
};
|
||||
|
||||
@@ -18,20 +18,22 @@ import { IconChevronsRight } from "@tabler/icons-react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import ComponentAdminGlobal_HeaderTamplate from "../../component/header_tamplate";
|
||||
|
||||
|
||||
export default function AdminEvent_Main({
|
||||
countPublish,
|
||||
countReview,
|
||||
countDraft,
|
||||
countReject,
|
||||
countTipeAcara,
|
||||
}: {
|
||||
countPublish: number;
|
||||
countReview: number;
|
||||
countDraft: number;
|
||||
countReject: number;
|
||||
countTipeAcara: number;
|
||||
}) {
|
||||
const router = useRouter();
|
||||
const listBox = [
|
||||
|
||||
const listStatus = [
|
||||
{
|
||||
id: 1,
|
||||
name: "Publish",
|
||||
@@ -61,10 +63,29 @@ export default function AdminEvent_Main({
|
||||
color: "red",
|
||||
},
|
||||
];
|
||||
|
||||
const listBox2 = [
|
||||
{
|
||||
id: 1,
|
||||
name: "Riwayat Event",
|
||||
// jumlah: countPublish,
|
||||
path: RouterAdminEvent.table_publish,
|
||||
color: "gray",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "Kategori",
|
||||
// jumlah: countPublish,
|
||||
path: RouterAdminEvent.table_publish,
|
||||
color: "green",
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<>
|
||||
<Stack spacing={"xl"}>
|
||||
<ComponentAdminGlobal_HeaderTamplate name="Event"/>
|
||||
<ComponentAdminGlobal_HeaderTamplate name="Event" />
|
||||
|
||||
<SimpleGrid
|
||||
cols={4}
|
||||
spacing="lg"
|
||||
@@ -74,7 +95,7 @@ export default function AdminEvent_Main({
|
||||
{ maxWidth: "36rem", cols: 1, spacing: "sm" },
|
||||
]}
|
||||
>
|
||||
{listBox.map((e, i) => (
|
||||
{listStatus.map((e, i) => (
|
||||
<Paper
|
||||
key={i}
|
||||
bg={`${e.color}.2`}
|
||||
@@ -101,6 +122,25 @@ export default function AdminEvent_Main({
|
||||
</Paper>
|
||||
))}
|
||||
</SimpleGrid>
|
||||
<Paper
|
||||
shadow="md"
|
||||
radius="md"
|
||||
p="md"
|
||||
bg={"gray.3"}
|
||||
// w={{ lg: "62rem", md: "48rem", sm: "36rem" }}
|
||||
w={300}
|
||||
>
|
||||
<Group position="apart">
|
||||
<ActionIcon disabled variant="transparent"></ActionIcon>
|
||||
<Stack align="center" spacing={0}>
|
||||
<Text>Tipe Acara</Text>
|
||||
<Title>{countTipeAcara}</Title>
|
||||
</Stack>
|
||||
<ActionIcon radius={"xl"} onClick={() => router.push("")}>
|
||||
<IconChevronsRight color="gray" />
|
||||
</ActionIcon>
|
||||
</Group>
|
||||
</Paper>
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import AdminMain from "./main/view";
|
||||
import AdminLayout from "./main/layout";
|
||||
import SplashDashboardAdmin from "./splash";
|
||||
import SplashDashboardAdmin from "../splash/splash";
|
||||
|
||||
export { AdminMain, AdminLayout, SplashDashboardAdmin };
|
||||
|
||||
Reference in New Issue
Block a user