fix admin forum

deskripsi:
- fix tampilan button yang bug di browser safari
This commit is contained in:
2025-05-06 16:28:00 +08:00
parent 2a095c98fc
commit b7f46f4c2a
5 changed files with 53 additions and 29 deletions

View File

@@ -28,6 +28,7 @@ import { apiGetAdminCollaborationById } from "../lib/api_fetch_admin_collaborati
import { Admin_V3_ComponentSkeletonBreakpoint } from "../../_components_v3/comp_skeleton_breakpoint";
import { Admin_V3_ComponentBreakpoint } from "../../_components_v3/comp_simple_grid_breakpoint";
import { Admin_V3_ComponentDetail } from "../../_components_v3/comp_detail_data";
import { Comp_V3_SetInnerHTMLWithStiker } from "@/app_modules/_global/component/new/comp_V3_set_html_with_stiker";
function DetailPublish() {
const router = useRouter();
@@ -98,11 +99,11 @@ function DetailPublish() {
},
{
label: "Tujuan",
value: data?.purpose,
value: <Comp_V3_SetInnerHTMLWithStiker props={data?.purpose} />,
},
{
label: "Keuntungan",
value: data?.benefit,
value: <Comp_V3_SetInnerHTMLWithStiker props={data?.benefit} />,
},
];
@@ -115,11 +116,11 @@ function DetailPublish() {
{!data ? (
<Admin_V3_ComponentSkeletonBreakpoint />
) : (
<Admin_V3_ComponentBreakpoint >
<Admin_V3_ComponentBreakpoint>
<Admin_ComponentBoxStyle>
<Stack >
<Stack>
{listData.map((e, i) => (
<Admin_V3_ComponentDetail key={i} item={e}/>
<Admin_V3_ComponentDetail key={i} item={e} />
))}
<Group position="center">

View File

@@ -43,8 +43,7 @@ export default function ComponentAdminForum_ViewOneDetailKomentar({
return (
<>
<Stack spacing={"xs"} h={"100%"}>
<Paper p={"md"} radius={"md"} bg={AdminColor.softBlue}>
<Paper p={"md"} radius={"md"} bg={AdminColor.softBlue}>
<Stack>
<Stack spacing={5}>
<Group position="apart">
@@ -64,8 +63,7 @@ export default function ComponentAdminForum_ViewOneDetailKomentar({
maxHeight={100}
/>
</Stack>
</Paper>
</Stack>
</Paper>
</>
);
}

View File

@@ -22,7 +22,7 @@ import {
Stack,
Table,
Text,
Title
Title,
} from "@mantine/core";
import { useDisclosure } from "@mantine/hooks";
import { IconTrash } from "@tabler/icons-react";
@@ -68,9 +68,8 @@ export default function AdminForum_HasilReportKomentar({
/>
</Group>
</Admin_V3_ComponentBreakpoint>
<HasilReportPosting listReport={listReport} komentarId={komentarId} />
{/* <pre>{JSON.stringify(listReport, null, 2)}</pre> */}
</Stack>
</>
);

View File

@@ -1,6 +1,9 @@
"use client";
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
import {
AdminColor,
MainColor,
} from "@/app_modules/_global/color/color_pallet";
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil";
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal";
import ComponentAdminGlobal_HeaderTamplate from "@/app_modules/admin/_admin_global/header_tamplate";
@@ -20,7 +23,7 @@ import {
Stack,
Table,
Text,
Title
Title,
} from "@mantine/core";
import { useDisclosure } from "@mantine/hooks";
import { IconTrash } from "@tabler/icons-react";
@@ -35,6 +38,8 @@ import adminNotifikasi_funCreateToUser from "../../notifikasi/fun/create/fun_cre
import ComponentAdminForum_ViewOneDetailPosting from "../component/detail_one_posting";
import { adminForum_funDeletePostingById } from "../fun/delete/fun_delete_posting_by_id";
import { adminForum_getListReportPostingById } from "../fun/get/get_list_report_posting_by_id";
import { UIGlobal_Modal } from "@/app_modules/_global/ui";
import { Admin_ComponentModal } from "../../_admin_global/_component/comp_admin_modal";
export default function AdminForum_HasilReportPosting({
dataPosting,
@@ -60,7 +65,6 @@ export default function AdminForum_HasilReportPosting({
listReport={listReport}
postingId={dataPosting.id}
/>
{/* <pre>{JSON.stringify(listReport, null, 2)}</pre> */}
</Stack>
</>
);
@@ -73,9 +77,7 @@ function ButtonDeletePosting({
}) {
const router = useRouter();
const [opened, { open, close }] = useDisclosure(false);
const [loadingDel2, setLoadingDel2] = useState(false);
async function onDelete() {
const del = await adminForum_funDeletePostingById(dataPosting.id);
if (del.status === 200) {
@@ -108,15 +110,15 @@ function ButtonDeletePosting({
}
return (
<>
<Modal
<Admin_ComponentModal
opened={opened}
onClose={close}
centered
withCloseButton={false}
closeOnClickOutside={false}
>
<Stack>
<Title order={5}>Anda yakin menghapus posting ini</Title>
<Title order={5} c={MainColor.white}>
Anda yakin menghapus ini ?
</Title>
<Group position="center">
<Button
radius={"xl"}
@@ -140,7 +142,7 @@ function ButtonDeletePosting({
</Button>
</Group>
</Stack>
</Modal>
</Admin_ComponentModal>
<Button
radius={"xl"}
color="red"