fix responsive admin forum

This commit is contained in:
2025-04-16 20:39:40 +08:00
parent 650d8a36eb
commit e97fd98077
9 changed files with 396 additions and 204 deletions

View File

@@ -0,0 +1,101 @@
import _ from "lodash";
import { NextResponse } from "next/server";
export async function GET(
request: Request,
{ params }: { params: { id: string } }
) {
const { searchParams } = new URL(request.url);
const search = searchParams.get("search");
const page = searchParams.get("page");
const takeData = 10;
const skipData = Number(page) * takeData - takeData;
try {
let fixData;
const { id } = params;
const postingId = id;
if (!page) {
fixData = await prisma.forum_Komentar.findMany({
orderBy: {
createdAt: "desc",
},
where: {
forum_PostingId: postingId,
isActive: true,
komentar: {
contains: search ?? "",
mode: "insensitive",
},
},
include: {
Forum_ReportKomentar: true,
Author: {
select: {
username: true
}
}
},
});
} else {
const data = await prisma.forum_Komentar.findMany({
take: takeData,
skip: skipData,
orderBy: {
createdAt: "desc",
},
where: {
forum_PostingId: postingId,
isActive: true,
komentar: {
contains: search ?? "",
mode: "insensitive",
},
},
include: {
Forum_ReportKomentar: true,
Author: {
select: {
username: true
}
}
},
});
const nCount = await prisma.forum_Komentar.count({
where: {
forum_PostingId: postingId,
isActive: true,
komentar: {
contains: search ?? "",
mode: "insensitive",
},
},
});
fixData = {
data: data,
nPage: _.ceil(nCount / takeData),
};
}
return NextResponse.json({
success: true,
message: "Berhasil mendapatkan data komentar",
data: fixData,
});
} catch (error) {
console.log("Error get data komentar", error);
return NextResponse.json(
{
status: false,
message: "Gagal mendapatkan data komentar",
error: error || (error as Error).message,
},
{ status: 500 }
);
}
}

View File

@@ -6,20 +6,20 @@ import { adminForum_getOnePostingById } from "@/app_modules/admin/forum/fun/get/
export default async function Page({ params }: { params: { id: string } }) { export default async function Page({ params }: { params: { id: string } }) {
let postingId = params.id; let postingId = params.id;
const listKomentar = await adminForum_getListKomentarById({ // const listKomentar = await adminForum_getListKomentarById({
postingId: postingId, // postingId: postingId,
page: 1, // page: 1,
}); // });
const dataPosting = await adminForum_getOnePostingById(postingId); const dataPosting = await adminForum_getOnePostingById(postingId);
const countKomentar = await adminForum_countKomentarByPostingId({postingId: postingId}) // const countKomentar = await adminForum_countKomentarByPostingId({
// postingId: postingId,
// });
return ( return (
<> <>
<AdminForum_LihatSemuaKomentar <AdminForum_LihatSemuaKomentar
listKomentar={listKomentar as any}
dataPosting={dataPosting as any} dataPosting={dataPosting as any}
countKomentar={countKomentar}
/> />
</> </>
); );

View File

@@ -10,7 +10,7 @@ export function ComponentAdminGlobal_TitlePage({
color, color,
component, component,
}: { }: {
name: string; name: React.ReactNode | string
color?: string; color?: string;
component?: React.ReactNode; component?: React.ReactNode;
}) { }) {

View File

@@ -6,21 +6,23 @@ export function Admin_V3_ComponentBreakpoint({
sm, sm,
md, md,
lg, lg,
allCols,
}: { }: {
children: React.ReactNode; children: React.ReactNode;
cols?: number; cols?: number;
sm?: number; sm?: number;
md?: number; md?: number;
lg?: number; lg?: number;
allCols?: number;
}) { }) {
return ( return (
<> <>
<SimpleGrid <SimpleGrid
cols={cols || 2} cols={ allCols || cols || 2}
breakpoints={[ breakpoints={[
{ maxWidth: "sm", cols: sm || 1 }, { maxWidth: "sm", cols: allCols || sm || 1 },
{ maxWidth: "md", cols: md || 1 }, { maxWidth: "md", cols: allCols || md || 1 },
{ maxWidth: "lg", cols: lg || 1 }, { maxWidth: "lg", cols: allCols || lg || 1 },
]} ]}
spacing={"lg"} spacing={"lg"}
verticalSpacing={"lg"} verticalSpacing={"lg"}

View File

@@ -7,6 +7,12 @@ import { useDisclosure } from "@mantine/hooks";
import { IconTrash } from "@tabler/icons-react"; import { IconTrash } from "@tabler/icons-react";
import { useState } from "react"; import { useState } from "react";
import { adminForum_funDeletePostingById } from "../fun/delete/fun_delete_posting_by_id"; import { adminForum_funDeletePostingById } from "../fun/delete/fun_delete_posting_by_id";
import { Admin_ComponentModal } from "../../_admin_global/_component/comp_admin_modal";
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global";
import { ComponentAdminGlobal_NotifikasiBerhasil } from "../../_admin_global/admin_notifikasi/notifikasi_berhasil";
import { ComponentAdminGlobal_NotifikasiPeringatan } from "../../_admin_global/admin_notifikasi/notifikasi_peringatan";
import { ComponentAdminGlobal_NotifikasiGagal } from "../../_admin_global/admin_notifikasi/notifikasi_gagal";
export default function ComponentAdminForum_ButtonDeletePosting({ export default function ComponentAdminForum_ButtonDeletePosting({
postingId, postingId,
@@ -19,28 +25,40 @@ export default function ComponentAdminForum_ButtonDeletePosting({
const [loadingDel2, setLoadingDel2] = useState(false); const [loadingDel2, setLoadingDel2] = useState(false);
async function onDelete() { async function onDelete() {
await adminForum_funDeletePostingById(postingId).then((res) => { try {
if (res.status === 200) { setLoadingDel2(true);
setLoadingDel2(false);
close(); await adminForum_funDeletePostingById(postingId).then((res) => {
ComponentGlobal_NotifikasiBerhasil(res.message); if (res.status === 200) {
onSuccesDelete(true); setLoadingDel2(false);
} else { ComponentAdminGlobal_NotifikasiBerhasil(res.message);
ComponentGlobal_NotifikasiGagal(res.message); onSuccesDelete(true);
} } else {
}); ComponentAdminGlobal_NotifikasiPeringatan(res.message);
}
});
} catch (error) {
console.log("error delete", error);
ComponentAdminGlobal_NotifikasiGagal(
"Terjadi kesalahan, silahkan coba lagi"
);
} finally {
close();
setLoadingDel2(false);
}
} }
return ( return (
<> <>
<Modal <Admin_ComponentModal
opened={opened} opened={opened}
onClose={close} onClose={close}
centered
withCloseButton={false} withCloseButton={false}
closeOnClickOutside={false} closeOnClickOutside={false}
> >
<Stack> <Stack>
<Title order={5}>Anda yakin menghapus posting ini</Title> <Title order={5} c={AdminColor.white}>
Anda yakin menghapus posting ini ?
</Title>
<Group position="center"> <Group position="center">
<Button <Button
radius={"xl"} radius={"xl"}
@@ -52,19 +70,18 @@ export default function ComponentAdminForum_ButtonDeletePosting({
</Button> </Button>
<Button <Button
loaderPosition="center" loaderPosition="center"
loading={loadingDel2 ? true : false} loading={loadingDel2}
radius={"xl"} radius={"xl"}
color="red" color="red"
onClick={() => { onClick={() => {
onDelete(); onDelete();
setLoadingDel2(true);
}} }}
> >
Hapus Hapus
</Button> </Button>
</Group> </Group>
</Stack> </Stack>
</Modal> </Admin_ComponentModal>
<Button <Button
fz={"xs"} fz={"xs"}
loaderPosition="center" loaderPosition="center"

View File

@@ -13,6 +13,7 @@ import {
Text, Text,
Title, Title,
} from "@mantine/core"; } from "@mantine/core";
import { Admin_V3_ComponentBreakpoint } from "../../_components_v3/comp_simple_grid_breakpoint";
export default function ComponentAdminForum_ViewOneDetailPosting({ export default function ComponentAdminForum_ViewOneDetailPosting({
dataPosting, dataPosting,
@@ -21,41 +22,36 @@ export default function ComponentAdminForum_ViewOneDetailPosting({
}) { }) {
return ( return (
<> <>
<Stack spacing={"xs"} h={"100%"} w={"50%"}> <Admin_V3_ComponentBreakpoint>
<Paper bg={AdminColor.softBlue} p={"xs"} style={{ borderRadius: "6px" }}> <Paper p={"md"} radius={"md"} bg={AdminColor.softBlue} shadow="sm">
<Title order={4} c={"white"}>
Detail Posting
</Title>
</Paper>
<Paper p={"md"} radius={"md"} bg={AdminColor.softBlue} shadow="sm">
<Stack> <Stack>
<Stack spacing={5}> <Stack spacing={5}>
<Group position="apart"> <Admin_V3_ComponentBreakpoint allCols={2}>
<Text c={AdminColor.white} fw={"bold"}> <Text c={AdminColor.white} fw={"bold"}>
Username:{" "} Username:{" "}
<Text span inherit> <Text span inherit lineClamp={1}>
{dataPosting?.Author?.username} {dataPosting?.Author?.username}
</Text> </Text>
</Text> </Text>
<Badge <Group position="right">
color={ <Badge
(dataPosting?.ForumMaster_StatusPosting?.id as any) === 1 color={
? "green" (dataPosting?.ForumMaster_StatusPosting?.id as any) === 1
: "red" ? "green"
} : "red"
> }
{dataPosting?.ForumMaster_StatusPosting?.status} >
</Badge> {dataPosting?.ForumMaster_StatusPosting?.status}
</Group> </Badge>
</Group>
</Admin_V3_ComponentBreakpoint>
{/* <Divider /> */} {/* <Divider /> */}
</Stack> </Stack>
<Box> <Box>
<Spoiler <Spoiler
c={AdminColor.white} c={AdminColor.white}
w={500}
hideLabel="sembunyikan" hideLabel="sembunyikan"
maxHeight={100} maxHeight={100}
showLabel="tampilkan" showLabel="tampilkan"
@@ -69,7 +65,7 @@ export default function ComponentAdminForum_ViewOneDetailPosting({
</Box> </Box>
</Stack> </Stack>
</Paper> </Paper>
</Stack> </Admin_V3_ComponentBreakpoint>
</> </>
); );
} }

View File

@@ -33,58 +33,67 @@ import { useState } from "react";
import { adminForum_funDeleteKomentarById } from "../fun/delete/fun_delete_komentar_by_id"; import { adminForum_funDeleteKomentarById } from "../fun/delete/fun_delete_komentar_by_id";
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil";
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal"; import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal";
import { useDisclosure } from "@mantine/hooks"; import { useDisclosure, useShallowEffect } from "@mantine/hooks";
import ComponentAdminGlobal_IsEmptyData from "../../_admin_global/is_empty_data"; import ComponentAdminGlobal_IsEmptyData from "../../_admin_global/is_empty_data";
import { adminForum_getListKomentarById } from "../fun/get/get_list_komentar_by_id"; import { adminForum_getListKomentarById } from "../fun/get/get_list_komentar_by_id";
import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button"; import AdminGlobal_ComponentBackButton from "../../_admin_global/back_button";
import ComponentAdminForum_ViewOneDetailPosting from "../component/detail_one_posting"; import ComponentAdminForum_ViewOneDetailPosting from "../component/detail_one_posting";
import { AdminColor } from "@/app_modules/_global/color/color_pallet"; import { AdminColor } from "@/app_modules/_global/color/color_pallet";
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
import { Admin_V3_ComponentPaginationBreakpoint } from "../../_components_v3/comp_pagination_breakpoint";
import { apiAdminGetKomentarForumById } from "../lib/api_fetch_admin_forum";
import CustomSkeleton from "@/app_modules/components/CustomSkeleton";
import moment from "moment";
import "moment/locale/id";
export default function AdminForum_DetailPosting({ export default function AdminForum_DetailPosting({
listKomentar,
dataPosting, dataPosting,
countKomentar,
}: { }: {
listKomentar: any;
dataPosting: MODEL_FORUM_POSTING; dataPosting: MODEL_FORUM_POSTING;
countKomentar: number;
}) { }) {
return ( return (
<> <>
{/* <pre>{JSON.stringify(listKomentar, null, 2)}</pre> */} {/* <pre>{JSON.stringify(listKomentar, null, 2)}</pre> */}
<Stack> <Stack>
<ComponentAdminGlobal_HeaderTamplate name="Forum: Detail Posting" /> <ComponentAdminGlobal_HeaderTamplate name="Forum: Detail" />
<AdminGlobal_ComponentBackButton /> <AdminGlobal_ComponentBackButton />
<ComponentAdminForum_ViewOneDetailPosting dataPosting={dataPosting} /> <ComponentAdminForum_ViewOneDetailPosting dataPosting={dataPosting} />
<TableKomentar <TableKomentar postingId={dataPosting.id} />
listKomentar={listKomentar}
postingId={dataPosting.id}
countKomentar={countKomentar}
/>
</Stack> </Stack>
</> </>
); );
} }
function TableKomentar({ postingId }: { postingId: string }) {
function TableKomentar({
listKomentar,
postingId,
countKomentar,
}: {
listKomentar: any;
postingId: string;
countKomentar: number;
}) {
const router = useRouter(); const router = useRouter();
const [data, setData] = useState<MODEL_FORUM_KOMENTAR[]>(listKomentar.data); const [data, setData] = useState<MODEL_FORUM_KOMENTAR[] | null>(null);
const [nPage, setNPage] = useState(listKomentar.nPage); const [nPage, setNPage] = useState<number>(1);
const [activePage, setActivePage] = useState(1); const [activePage, setActivePage] = useState(1);
const [isSearch, setSearch] = useState(""); const [isSearch, setSearch] = useState("");
const [isLoadingReport, setLoadingReport] = useState(false); const [isLoadingReport, setLoadingReport] = useState(false);
const [idData, setIdData] = useState(""); const [idData, setIdData] = useState("");
useShallowEffect(() => {
handleLoadData();
}, []);
async function handleLoadData() {
try {
const response = await apiAdminGetKomentarForumById({
id: postingId,
page: `${activePage}`,
search: isSearch,
});
if (response && response.success) {
setData(response.data.data);
}
} catch (error) {
console.error("Invalid data format received:", error);
setData([]);
}
}
async function onSearch(s: string) { async function onSearch(s: string) {
setSearch(s); setSearch(s);
setActivePage(1); setActivePage(1);
@@ -108,96 +117,112 @@ function TableKomentar({
setNPage(loadData.nPage); setNPage(loadData.nPage);
} }
const rowTable = data?.map((e, i) => ( const rowTable = () => {
<tr key={i}> if (!Array.isArray(data) || data.length === 0) {
<td> return (
<Center c={AdminColor.white} w={150}> <tr>
<Text lineClamp={1}>{e?.Author?.username}</Text> <td colSpan={12}>
</Center> <Center>
</td> <Text color="gray">Tidak ada data</Text>
<td> </Center>
<Box w={300}> </td>
<Spoiler c={AdminColor.white} maxHeight={50} hideLabel="sembunyikan" showLabel="tampilkan"> </tr>
<div );
style={{ textAlign: "justify", textJustify: "auto" }} }
dangerouslySetInnerHTML={{ __html: e?.komentar }}
/> return data?.map((e, i) => (
</Spoiler> <tr key={i}>
</Box> <td>
</td> <Box c={AdminColor.white} w={100}>
<td> <Text lineClamp={1}>{e?.Author?.username}</Text>
<Center c={AdminColor.white} w={150}> </Box>
<Text> </td>
{new Intl.DateTimeFormat(["id-ID"], { dateStyle: "medium" }).format( <td>
e.createdAt <Box w={200}>
)} <Spoiler
</Text> c={AdminColor.white}
</Center> maxHeight={50}
</td> hideLabel="sembunyikan"
<td> showLabel="tampilkan"
<Center w={100}> >
<Text <div
c={e?.Forum_ReportKomentar?.length >= 3 ? "red" : AdminColor.white} style={{ textAlign: "justify", textJustify: "auto" }}
fw={"bold"} dangerouslySetInnerHTML={{ __html: e?.komentar }}
fz={"lg"} />
> </Spoiler>
{e?.Forum_ReportKomentar.length} </Box>
</Text> </td>
</Center> <td>
</td> <Box c={AdminColor.white} w={100}>
<td> <Text>{moment(e?.createdAt).format("DD-MM-YYYY")}</Text>
<Stack align="center" spacing={"xs"} w={200}> </Box>
<Button </td>
disabled={e?.Forum_ReportKomentar.length <= 0 ? true : false} <td>
loaderPosition="center" <Center w={100}>
loading={isLoadingReport && e?.id === idData ? true : false} <Text
radius={"xl"} c={
w={170} e?.Forum_ReportKomentar?.length >= 3 ? "red" : AdminColor.white
fz={"xs"} }
leftIcon={<IconFlag3 size={15} />} fw={"bold"}
onClick={() => { fz={"lg"}
setIdData(e?.id); >
setLoadingReport(true); {e?.Forum_ReportKomentar.length}
router.push(RouterAdminForum.report_komentar + e?.id); </Text>
}} </Center>
> </td>
Lihat Report <td>
</Button> <Stack align="center" spacing={"xs"} w={200}>
<ButtonDeleteKomentar komentarId={e?.id} /> <Button
</Stack> disabled={e?.Forum_ReportKomentar.length <= 0 ? true : false}
</td> loaderPosition="center"
</tr> loading={isLoadingReport && e?.id === idData ? true : false}
)); radius={"xl"}
w={170}
fz={"xs"}
leftIcon={<IconFlag3 size={15} />}
onClick={() => {
setIdData(e?.id);
setLoadingReport(true);
router.push(RouterAdminForum.report_komentar + e?.id);
}}
>
Lihat Report
</Button>
<ButtonDeleteKomentar komentarId={e?.id} />
</Stack>
</td>
</tr>
));
};
return ( return (
<> <>
<Stack spacing={"xs"} h={"100%"}> <Stack spacing={"xs"} h={"100%"}>
<Group <ComponentAdminGlobal_TitlePage
position="apart" name={
bg={AdminColor.softBlue} <Group spacing={5}>
p={"xs"} <Title order={4} c={"white"}>
style={{ borderRadius: "6px" }} Komentar:
> </Title>
<Group spacing={5}> <Title order={4} c={"white"}>
<Title order={4} c={"white"}> {data?.length}
Komentar </Title>
</Title> </Group>
<Title order={4} c={"white"}> }
{`(${countKomentar})`} component={
</Title> <TextInput
</Group> icon={<IconSearch size={20} />}
<TextInput radius={"xl"}
icon={<IconSearch size={20} />} placeholder="Cari komentar"
radius={"xl"} onChange={(val) => {
placeholder="Cari komentar" onSearch(val.currentTarget.value);
onChange={(val) => { }}
onSearch(val.currentTarget.value); />
}} }
/> />
</Group>
{_.isEmpty(data) ? ( {!data ? (
<ComponentAdminGlobal_IsEmptyData text="Tidak Ada Komentar" /> <CustomSkeleton height={"80vh"} width={"100%"} />
) : ( ) : (
<Paper p={"md"} bg={AdminColor.softBlue} h={"80vh"}> <Paper p={"md"} bg={AdminColor.softBlue} h={"80vh"}>
<ScrollArea w={"100%"} h={"90%"} offsetScrollbars> <ScrollArea w={"100%"} h={"90%"} offsetScrollbars>
@@ -207,39 +232,36 @@ function TableKomentar({
p={"md"} p={"md"}
w={"100%"} w={"100%"}
h={"100%"} h={"100%"}
> >
<thead> <thead>
<tr> <tr>
<th> <th>
<Center c={AdminColor.white} w={150}>Username</Center> <Text c={AdminColor.white}>Username</Text>
</th> </th>
<th> <th>
<Center c={AdminColor.white} w={300}>Komentar</Center> <Text c={AdminColor.white}>Komentar</Text>
</th> </th>
<th> <th>
<Center c={AdminColor.white} w={150}>Tgl Komentar</Center> <Text c={AdminColor.white}>Tgl Komentar</Text>
</th> </th>
<th> <th>
<Center c={AdminColor.white} w={100}>Total Report</Center> <Center c={AdminColor.white}>Total Report</Center>
</th> </th>
<th> <th>
<Center c={AdminColor.white} w={200}>Aksi</Center> <Center c={AdminColor.white}>Aksi</Center>
</th> </th>
</tr> </tr>
</thead> </thead>
<tbody>{rowTable}</tbody> <tbody>{rowTable()}</tbody>
</Table> </Table>
</ScrollArea> </ScrollArea>
<Center mt={"xl"}> <Admin_V3_ComponentPaginationBreakpoint
<Pagination value={activePage}
value={activePage} total={nPage}
total={nPage} onChange={(val) => {
onChange={(val) => { onPageClick(val);
onPageClick(val); }}
}} />
/>
</Center>
</Paper> </Paper>
)} )}
</Stack> </Stack>

View File

@@ -6,6 +6,7 @@ export {
apiGetAdminForumReportKomentar, apiGetAdminForumReportKomentar,
apiGetAdminForumPublish, apiGetAdminForumPublish,
apiGetAdminHasilReportPosting, apiGetAdminHasilReportPosting,
apiAdminGetKomentarForumById,
}; };
const apiGetAdminForumPublishCountDasboard = async () => { const apiGetAdminForumPublishCountDasboard = async () => {
@@ -159,3 +160,55 @@ const apiGetAdminHasilReportPosting = async ({
return await response.json().catch(() => null); return await response.json().catch(() => null);
}; };
const apiAdminGetKomentarForumById = async ({
id,
page,
search,
}: {
id: string;
page?: string;
search?: string;
}) => {
try {
const { token } = await fetch("/api/get-cookie").then((res) => res.json());
if (!token) {
console.error("No token found");
return null;
}
const isPage = page ? `?page=${page}` : "";
const isSearch = search ? `&search=${search}` : "";
const response = await fetch(
`/api/admin/forum/${id}/komentar${isPage}${isSearch}`,
{
method: "GET",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
Authorization: `Bearer ${token}`,
},
}
);
// Check if the response is OK
if (!response.ok) {
const errorData = await response.json().catch(() => null);
console.error(
"Failed to get admin komentar forum",
response.statusText,
errorData
);
throw new Error(
errorData?.message || "Failed to get admin komentar forum"
);
}
// Return the JSON response
const resulst = await response.json();
return resulst;
} catch (error) {
console.error("Error get admin komentar forum", error);
throw error; // Re-throw the error to handle it in the calling function
}
};

View File

@@ -96,20 +96,17 @@ function TablePublish() {
); );
} }
return data?.map((e, i) => ( return data?.map((e, i) => (
<tr key={i} style={{ <tr
color: AdminColor.white key={i}
}}> style={{
{/* Aksi */} color: AdminColor.white,
}}
>
{/* Author */}
<td> <td>
<Stack align="center" spacing={"xs"}> <Box w={100}>
<ButtonAction postingId={e?.id} /> <Text lineClamp={1}>{e?.Author?.username}</Text>
<ComponentAdminForum_ButtonDeletePosting </Box>
postingId={e?.id}
onSuccesDelete={(val) => {
onDelete(val);
}}
/>
</Stack>
</td> </td>
{/* Status */} {/* Status */}
@@ -127,15 +124,6 @@ function TablePublish() {
</Center> </Center>
</td> </td>
{/* Author */}
<td>
<Box w={100}>
<Text lineClamp={1}>
{e?.Author?.username}
</Text>
</Box>
</td>
{/* Deskripsi */} {/* Deskripsi */}
<td> <td>
<Box w={150}> <Box w={150}>
@@ -176,6 +164,19 @@ function TablePublish() {
</Center> </Center>
</td> </td>
{/* Aksi */}
<td>
<Stack align="center" spacing={"xs"}>
<ButtonAction postingId={e?.id} />
<ComponentAdminForum_ButtonDeletePosting
postingId={e?.id}
onSuccesDelete={(val) => {
onDelete(val);
}}
/>
</Stack>
</td>
{/* <td> {/* <td>
<Box w={100}> <Box w={100}>
<Text> <Text>
@@ -222,15 +223,11 @@ function TablePublish() {
<thead> <thead>
<tr> <tr>
<th> <th>
<Center c={AdminColor.white}>Aksi</Center> <Text c={AdminColor.white}>Username</Text>
</th> </th>
<th> <th>
<Center c={AdminColor.white}>Status</Center> <Center c={AdminColor.white}>Status</Center>
</th> </th>
<th>
<Text c={AdminColor.white}>Username</Text>
</th>
<th> <th>
<Text c={AdminColor.white}>Postingan</Text> <Text c={AdminColor.white}>Postingan</Text>
</th> </th>
@@ -240,6 +237,10 @@ function TablePublish() {
<th> <th>
<Center c={AdminColor.white}>Total Report Posting</Center> <Center c={AdminColor.white}>Total Report Posting</Center>
</th> </th>
<th>
<Center c={AdminColor.white}>Aksi</Center>
</th>
</tr> </tr>
</thead> </thead>
<tbody>{renderTableBody()}</tbody> <tbody>{renderTableBody()}</tbody>