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_ComponentSkeletonBreakpoint } from "../../_components_v3/comp_skeleton_breakpoint";
|
||||||
import { Admin_V3_ComponentBreakpoint } from "../../_components_v3/comp_simple_grid_breakpoint";
|
import { Admin_V3_ComponentBreakpoint } from "../../_components_v3/comp_simple_grid_breakpoint";
|
||||||
import { Admin_V3_ComponentDetail } from "../../_components_v3/comp_detail_data";
|
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() {
|
function DetailPublish() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -98,11 +99,11 @@ function DetailPublish() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Tujuan",
|
label: "Tujuan",
|
||||||
value: data?.purpose,
|
value: <Comp_V3_SetInnerHTMLWithStiker props={data?.purpose} />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Keuntungan",
|
label: "Keuntungan",
|
||||||
value: data?.benefit,
|
value: <Comp_V3_SetInnerHTMLWithStiker props={data?.benefit} />,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -115,11 +116,11 @@ function DetailPublish() {
|
|||||||
{!data ? (
|
{!data ? (
|
||||||
<Admin_V3_ComponentSkeletonBreakpoint />
|
<Admin_V3_ComponentSkeletonBreakpoint />
|
||||||
) : (
|
) : (
|
||||||
<Admin_V3_ComponentBreakpoint >
|
<Admin_V3_ComponentBreakpoint>
|
||||||
<Admin_ComponentBoxStyle>
|
<Admin_ComponentBoxStyle>
|
||||||
<Stack >
|
<Stack>
|
||||||
{listData.map((e, i) => (
|
{listData.map((e, i) => (
|
||||||
<Admin_V3_ComponentDetail key={i} item={e}/>
|
<Admin_V3_ComponentDetail key={i} item={e} />
|
||||||
))}
|
))}
|
||||||
|
|
||||||
<Group position="center">
|
<Group position="center">
|
||||||
|
|||||||
@@ -43,8 +43,7 @@ export default function ComponentAdminForum_ViewOneDetailKomentar({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack spacing={"xs"} h={"100%"}>
|
<Paper p={"md"} radius={"md"} bg={AdminColor.softBlue}>
|
||||||
<Paper p={"md"} radius={"md"} bg={AdminColor.softBlue}>
|
|
||||||
<Stack>
|
<Stack>
|
||||||
<Stack spacing={5}>
|
<Stack spacing={5}>
|
||||||
<Group position="apart">
|
<Group position="apart">
|
||||||
@@ -64,8 +63,7 @@ export default function ComponentAdminForum_ViewOneDetailKomentar({
|
|||||||
maxHeight={100}
|
maxHeight={100}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Paper>
|
</Paper>
|
||||||
</Stack>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import {
|
|||||||
Stack,
|
Stack,
|
||||||
Table,
|
Table,
|
||||||
Text,
|
Text,
|
||||||
Title
|
Title,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { useDisclosure } from "@mantine/hooks";
|
import { useDisclosure } from "@mantine/hooks";
|
||||||
import { IconTrash } from "@tabler/icons-react";
|
import { IconTrash } from "@tabler/icons-react";
|
||||||
@@ -68,9 +68,8 @@ export default function AdminForum_HasilReportKomentar({
|
|||||||
/>
|
/>
|
||||||
</Group>
|
</Group>
|
||||||
</Admin_V3_ComponentBreakpoint>
|
</Admin_V3_ComponentBreakpoint>
|
||||||
|
|
||||||
<HasilReportPosting listReport={listReport} komentarId={komentarId} />
|
<HasilReportPosting listReport={listReport} komentarId={komentarId} />
|
||||||
{/* <pre>{JSON.stringify(listReport, null, 2)}</pre> */}
|
|
||||||
</Stack>
|
</Stack>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
"use client";
|
"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_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 ComponentAdminGlobal_HeaderTamplate from "@/app_modules/admin/_admin_global/header_tamplate";
|
import ComponentAdminGlobal_HeaderTamplate from "@/app_modules/admin/_admin_global/header_tamplate";
|
||||||
@@ -20,7 +23,7 @@ import {
|
|||||||
Stack,
|
Stack,
|
||||||
Table,
|
Table,
|
||||||
Text,
|
Text,
|
||||||
Title
|
Title,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { useDisclosure } from "@mantine/hooks";
|
import { useDisclosure } from "@mantine/hooks";
|
||||||
import { IconTrash } from "@tabler/icons-react";
|
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 ComponentAdminForum_ViewOneDetailPosting from "../component/detail_one_posting";
|
||||||
import { adminForum_funDeletePostingById } from "../fun/delete/fun_delete_posting_by_id";
|
import { adminForum_funDeletePostingById } from "../fun/delete/fun_delete_posting_by_id";
|
||||||
import { adminForum_getListReportPostingById } from "../fun/get/get_list_report_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({
|
export default function AdminForum_HasilReportPosting({
|
||||||
dataPosting,
|
dataPosting,
|
||||||
@@ -60,7 +65,6 @@ export default function AdminForum_HasilReportPosting({
|
|||||||
listReport={listReport}
|
listReport={listReport}
|
||||||
postingId={dataPosting.id}
|
postingId={dataPosting.id}
|
||||||
/>
|
/>
|
||||||
{/* <pre>{JSON.stringify(listReport, null, 2)}</pre> */}
|
|
||||||
</Stack>
|
</Stack>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
@@ -73,9 +77,7 @@ function ButtonDeletePosting({
|
|||||||
}) {
|
}) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [opened, { open, close }] = useDisclosure(false);
|
const [opened, { open, close }] = useDisclosure(false);
|
||||||
|
|
||||||
const [loadingDel2, setLoadingDel2] = useState(false);
|
const [loadingDel2, setLoadingDel2] = useState(false);
|
||||||
|
|
||||||
async function onDelete() {
|
async function onDelete() {
|
||||||
const del = await adminForum_funDeletePostingById(dataPosting.id);
|
const del = await adminForum_funDeletePostingById(dataPosting.id);
|
||||||
if (del.status === 200) {
|
if (del.status === 200) {
|
||||||
@@ -108,15 +110,15 @@ function ButtonDeletePosting({
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Modal
|
<Admin_ComponentModal
|
||||||
opened={opened}
|
opened={opened}
|
||||||
onClose={close}
|
onClose={close}
|
||||||
centered
|
|
||||||
withCloseButton={false}
|
withCloseButton={false}
|
||||||
closeOnClickOutside={false}
|
|
||||||
>
|
>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Title order={5}>Anda yakin menghapus posting ini</Title>
|
<Title order={5} c={MainColor.white}>
|
||||||
|
Anda yakin menghapus ini ?
|
||||||
|
</Title>
|
||||||
<Group position="center">
|
<Group position="center">
|
||||||
<Button
|
<Button
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
@@ -140,7 +142,7 @@ function ButtonDeletePosting({
|
|||||||
</Button>
|
</Button>
|
||||||
</Group>
|
</Group>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Modal>
|
</Admin_ComponentModal>
|
||||||
<Button
|
<Button
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
color="red"
|
color="red"
|
||||||
|
|||||||
@@ -26,6 +26,9 @@ import { redirectInvestasiPage } from "./path/investasi";
|
|||||||
import { notifikasi_jobCheckStatus } from "./path/job";
|
import { notifikasi_jobCheckStatus } from "./path/job";
|
||||||
import { notifikasi_votingCheckStatus } from "./path/voting";
|
import { notifikasi_votingCheckStatus } from "./path/voting";
|
||||||
import { redirectDetailCollaborationPage } from "./path/collaboration";
|
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({
|
export function ComponentNotifiaksi_CardView({
|
||||||
data,
|
data,
|
||||||
@@ -41,6 +44,22 @@ export function ComponentNotifiaksi_CardView({
|
|||||||
const [donasiMenu, setDonasiMenu] = useAtom(gs_donasi_hot_menu);
|
const [donasiMenu, setDonasiMenu] = useAtom(gs_donasi_hot_menu);
|
||||||
const [investasiMenu, setInvestasiMenu] = useAtom(gs_investas_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 (
|
return (
|
||||||
<>
|
<>
|
||||||
<Card
|
<Card
|
||||||
@@ -202,14 +221,19 @@ export function ComponentNotifiaksi_CardView({
|
|||||||
<Text lineClamp={2} fw={"bold"}>
|
<Text lineClamp={2} fw={"bold"}>
|
||||||
{data?.title}
|
{data?.title}
|
||||||
</Text>
|
</Text>
|
||||||
{data.kategoriApp === "FORUM" ? (
|
{/* {data.kategoriApp === "FORUM" ? (
|
||||||
<div
|
<Text lineClamp={4}>
|
||||||
style={{ fontSize: 12 }}
|
<Comp_V3_SetInnerHTMLWithStiker
|
||||||
dangerouslySetInnerHTML={{ __html: data?.pesan }}
|
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>
|
</Stack>
|
||||||
</Card.Section>
|
</Card.Section>
|
||||||
<Card.Section p={"sm"}>
|
<Card.Section p={"sm"}>
|
||||||
|
|||||||
Reference in New Issue
Block a user