# Project Collaboration
## feat - Tampilan beranda & detailnya - Tampilan status & detailnya - Tampilan partisipasi & detailnya - Tampilan grup diskusi & detailnya ### No issue
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
|
||||
export async function adminForum_countLaporanKomentar() {
|
||||
const count = await prisma.forum_ReportKomentar.count({
|
||||
where: {
|
||||
isActive: true,
|
||||
},
|
||||
});
|
||||
|
||||
return count;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
|
||||
export async function adminForum_countLaporanPosting() {
|
||||
const count = await prisma.forum_ReportPosting.count({
|
||||
where: {
|
||||
isActive: true,
|
||||
},
|
||||
});
|
||||
|
||||
return count;
|
||||
}
|
||||
13
src/app_modules/admin/forum/fun/count/fun_count_publish.ts
Normal file
13
src/app_modules/admin/forum/fun/count/fun_count_publish.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
|
||||
export async function adminForum_countPublish() {
|
||||
const count = await prisma.forum_Posting.count({
|
||||
where: {
|
||||
isActive: true,
|
||||
},
|
||||
});
|
||||
|
||||
return count;
|
||||
}
|
||||
@@ -4,36 +4,56 @@ import { Group, Paper, SimpleGrid, Stack, Text, Title } from "@mantine/core";
|
||||
import ComponentAdminGlobal_HeaderTamplate from "../../component/header_tamplate";
|
||||
import ComponentAdminGlobal_LoadingPage from "../../component/loading_admin_page";
|
||||
|
||||
export default function AdminForum_Main() {
|
||||
export default function AdminForum_Main({
|
||||
countPublish,
|
||||
countLaporanPosting,
|
||||
countLaporanKomentar,
|
||||
}: {
|
||||
countPublish: number;
|
||||
countLaporanPosting: number;
|
||||
countLaporanKomentar: number;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<Stack>
|
||||
<ComponentAdminGlobal_HeaderTamplate name="Forum" />
|
||||
<ForumMain />
|
||||
<ForumMain
|
||||
countPublish={countPublish}
|
||||
countLaporanPosting={countLaporanPosting}
|
||||
countLaporanKomentar={countLaporanKomentar}
|
||||
/>
|
||||
</Stack>
|
||||
{/* <ComponentGlobalAdmin_LoadingPage /> */}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function ForumMain() {
|
||||
function ForumMain({
|
||||
countPublish,
|
||||
countLaporanPosting,
|
||||
countLaporanKomentar,
|
||||
}: {
|
||||
countPublish: number;
|
||||
countLaporanPosting: number;
|
||||
countLaporanKomentar: number;
|
||||
}) {
|
||||
const listBox = [
|
||||
{
|
||||
id: 1,
|
||||
name: "Publish",
|
||||
jumlah: 0,
|
||||
jumlah: countPublish,
|
||||
color: "green",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "Laporan Posting",
|
||||
jumlah: 0,
|
||||
jumlah: countLaporanPosting,
|
||||
color: "orange",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "Laporan Komentar",
|
||||
jumlah: 0,
|
||||
jumlah: countLaporanKomentar,
|
||||
color: "red",
|
||||
},
|
||||
];
|
||||
|
||||
@@ -159,16 +159,16 @@ export const listAdminPage = [
|
||||
name: "Table Posting",
|
||||
path: RouterAdminForum.publish,
|
||||
},
|
||||
{
|
||||
id: 73,
|
||||
name: "Laporan Posting",
|
||||
path: RouterAdminForum.report_posting,
|
||||
},
|
||||
{
|
||||
id: 74,
|
||||
name: "Laporan Komentar",
|
||||
path: RouterAdminForum.report_komentar,
|
||||
},
|
||||
// {
|
||||
// id: 73,
|
||||
// name: "Laporan Posting",
|
||||
// path: RouterAdminForum.report_posting,
|
||||
// },
|
||||
// {
|
||||
// id: 74,
|
||||
// name: "Laporan Komentar",
|
||||
// path: RouterAdminForum.report_komentar,
|
||||
// },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user