fix admin forum
deskripsi: - fix tampilan button yang bug di browser safari
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -26,6 +26,9 @@ import { redirectInvestasiPage } from "./path/investasi";
|
||||
import { notifikasi_jobCheckStatus } from "./path/job";
|
||||
import { notifikasi_votingCheckStatus } from "./path/voting";
|
||||
import { redirectDetailCollaborationPage } from "./path/collaboration";
|
||||
import { Comp_V3_SetInnerHTMLWithStiker } from "@/app_modules/_global/component/new/comp_V3_set_html_with_stiker";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { Comp_SetInnerHTML } from "@/app_modules/_global/component/new/comp_set_inner_html";
|
||||
|
||||
export function ComponentNotifiaksi_CardView({
|
||||
data,
|
||||
@@ -41,6 +44,22 @@ export function ComponentNotifiaksi_CardView({
|
||||
const [donasiMenu, setDonasiMenu] = useAtom(gs_donasi_hot_menu);
|
||||
const [investasiMenu, setInvestasiMenu] = useAtom(gs_investas_menu);
|
||||
|
||||
useShallowEffect(() => {
|
||||
// Add custom style for stickers inside Quill editor
|
||||
const style = document.createElement("style");
|
||||
style.textContent = `
|
||||
.chat-content img {
|
||||
max-width: 70px !important;
|
||||
max-height: 70px !important;
|
||||
}
|
||||
`;
|
||||
document.head.appendChild(style);
|
||||
return () => {
|
||||
// Clean up when component unmounts
|
||||
document.head.removeChild(style);
|
||||
};
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Card
|
||||
@@ -202,14 +221,19 @@ export function ComponentNotifiaksi_CardView({
|
||||
<Text lineClamp={2} fw={"bold"}>
|
||||
{data?.title}
|
||||
</Text>
|
||||
{data.kategoriApp === "FORUM" ? (
|
||||
<div
|
||||
style={{ fontSize: 12 }}
|
||||
dangerouslySetInnerHTML={{ __html: data?.pesan }}
|
||||
/>
|
||||
{/* {data.kategoriApp === "FORUM" ? (
|
||||
<Text lineClamp={4}>
|
||||
<Comp_V3_SetInnerHTMLWithStiker
|
||||
props={data?.pesan}
|
||||
className="chat-content"
|
||||
style={{ height: 100 }}
|
||||
/>
|
||||
</Text>
|
||||
) : (
|
||||
<Text lineClamp={2}>{data?.pesan}</Text>
|
||||
)}
|
||||
<Text lineClamp={2}>
|
||||
<Comp_SetInnerHTML props={data?.pesan} />
|
||||
</Text>
|
||||
)} */}
|
||||
</Stack>
|
||||
</Card.Section>
|
||||
<Card.Section p={"sm"}>
|
||||
|
||||
Reference in New Issue
Block a user