fix loading hapus forum
This commit is contained in:
@@ -1,9 +0,0 @@
|
|||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<ComponentGlobal_V2_LoadingPage />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<ComponentGlobal_V2_LoadingPage/>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -27,11 +27,10 @@ import {
|
|||||||
Stack,
|
Stack,
|
||||||
Switch,
|
Switch,
|
||||||
Table,
|
Table,
|
||||||
Text,
|
Text
|
||||||
TextInput,
|
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
import { useShallowEffect } from "@mantine/hooks";
|
||||||
import { IconFilter, IconPencil, IconPlus } from "@tabler/icons-react";
|
import { IconPencil, IconPlus } from "@tabler/icons-react";
|
||||||
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
|
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
@@ -39,7 +38,6 @@ import {
|
|||||||
apiAdminGetSticker,
|
apiAdminGetSticker,
|
||||||
apiAdminUpdateStatusStickerById,
|
apiAdminUpdateStatusStickerById,
|
||||||
} from "../../lib/api_fetch_stiker";
|
} from "../../lib/api_fetch_stiker";
|
||||||
import loading from "@/app/dev/(user)/investasi/dialog_page/create/loading";
|
|
||||||
|
|
||||||
export default function AdminAppInformation_ViewSticker() {
|
export default function AdminAppInformation_ViewSticker() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|||||||
@@ -21,11 +21,11 @@ export default function InvalidUser() {
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
});
|
});
|
||||||
router.push("/login", {scroll: false});
|
router.push("/login", {scroll: false});
|
||||||
} catch (error) {
|
|
||||||
console.error("Gagal menghapus cookie:", error);
|
|
||||||
} finally {
|
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
}
|
} catch (error) {
|
||||||
|
setIsLoading(false);
|
||||||
|
console.error("Gagal menghapus cookie:", error);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -33,8 +33,7 @@ export default function InvalidUser() {
|
|||||||
<UIGlobal_LayoutDefault>
|
<UIGlobal_LayoutDefault>
|
||||||
<Stack align="center" justify="center" spacing="md" h={"100vh"}>
|
<Stack align="center" justify="center" spacing="md" h={"100vh"}>
|
||||||
<Title order={2} c={MainColor.white}>
|
<Title order={2} c={MainColor.white}>
|
||||||
{" "}
|
Maaf, Anda tidak memiliki izin untuk mengakses halaman ini. Silakan logout terlebih dahulu.
|
||||||
Invalid User
|
|
||||||
</Title>
|
</Title>
|
||||||
<Button
|
<Button
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
@@ -44,7 +43,7 @@ export default function InvalidUser() {
|
|||||||
deleteCookie();
|
deleteCookie();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Logout
|
Keluar
|
||||||
</Button>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
</UIGlobal_LayoutDefault>
|
</UIGlobal_LayoutDefault>
|
||||||
|
|||||||
@@ -1,57 +1,46 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { RouterProfile } from "@/lib/router_hipmi/router_katalog";
|
|
||||||
import {
|
|
||||||
Stack,
|
|
||||||
Grid,
|
|
||||||
Avatar,
|
|
||||||
Divider,
|
|
||||||
Text,
|
|
||||||
Group,
|
|
||||||
ThemeIcon,
|
|
||||||
ActionIcon,
|
|
||||||
Badge,
|
|
||||||
Button,
|
|
||||||
Drawer,
|
|
||||||
Loader,
|
|
||||||
Modal,
|
|
||||||
Title,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import moment from "moment";
|
|
||||||
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan";
|
|
||||||
import { RouterForum } from "@/lib/router_hipmi/router_forum";
|
|
||||||
import {
|
|
||||||
IconCircleFilled,
|
|
||||||
IconDots,
|
|
||||||
IconEdit,
|
|
||||||
IconFlag3,
|
|
||||||
IconMessageCircle,
|
|
||||||
IconSquareCheck,
|
|
||||||
IconSquareRoundedX,
|
|
||||||
IconTrash,
|
|
||||||
} from "@tabler/icons-react";
|
|
||||||
import { IconCircle } from "@tabler/icons-react";
|
|
||||||
import ComponentForum_PostingButtonMore from "../more_button/posting_button_more";
|
|
||||||
import ComponentForum_DetailMoreButton from "../more_button/detail_more_button";
|
|
||||||
import { MODEL_FORUM_POSTING } from "../../model/interface";
|
|
||||||
import { useDisclosure } from "@mantine/hooks";
|
|
||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2";
|
|
||||||
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil";
|
|
||||||
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal";
|
|
||||||
import { useState } from "react";
|
|
||||||
import { forum_funDeletePostingById } from "../../fun/delete/fun_delete_posting_by_id";
|
|
||||||
import { forum_funEditStatusPostingById } from "../../fun/edit/fun_edit_status_posting_by_id";
|
|
||||||
import { forum_getOnePostingById } from "../../fun/get/get_one_posting_by_id";
|
|
||||||
import mqtt_client from "@/util/mqtt_client";
|
|
||||||
import {
|
import {
|
||||||
AccentColor,
|
AccentColor,
|
||||||
MainColor,
|
MainColor,
|
||||||
} from "@/app_modules/_global/color/color_pallet";
|
} from "@/app_modules/_global/color/color_pallet";
|
||||||
import { ComponentGlobal_LoaderAvatar } from "@/app_modules/_global/component";
|
import { ComponentGlobal_LoaderAvatar } from "@/app_modules/_global/component";
|
||||||
import ComponentGlobal_Loader from "@/app_modules/_global/component/loader";
|
import ComponentGlobal_Loader from "@/app_modules/_global/component/loader";
|
||||||
|
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil";
|
||||||
|
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal";
|
||||||
|
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan";
|
||||||
|
import { RouterForum } from "@/lib/router_hipmi/router_forum";
|
||||||
import { clientLogger } from "@/util/clientLogger";
|
import { clientLogger } from "@/util/clientLogger";
|
||||||
|
import mqtt_client from "@/util/mqtt_client";
|
||||||
|
import {
|
||||||
|
ActionIcon,
|
||||||
|
Avatar,
|
||||||
|
Badge,
|
||||||
|
Button,
|
||||||
|
Drawer,
|
||||||
|
Grid,
|
||||||
|
Group,
|
||||||
|
Loader,
|
||||||
|
Modal,
|
||||||
|
Stack,
|
||||||
|
Text,
|
||||||
|
Title,
|
||||||
|
} from "@mantine/core";
|
||||||
|
import { useDisclosure } from "@mantine/hooks";
|
||||||
|
import {
|
||||||
|
IconDots,
|
||||||
|
IconEdit,
|
||||||
|
IconFlag3,
|
||||||
|
IconSquareCheck,
|
||||||
|
IconSquareRoundedX,
|
||||||
|
IconTrash,
|
||||||
|
} from "@tabler/icons-react";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import { useState } from "react";
|
||||||
|
import { forum_funDeletePostingById } from "../../fun/delete/fun_delete_posting_by_id";
|
||||||
|
import { forum_funEditStatusPostingById } from "../../fun/edit/fun_edit_status_posting_by_id";
|
||||||
|
import { MODEL_FORUM_POSTING } from "../../model/interface";
|
||||||
|
|
||||||
export default function ComponentForum_DetailHeader({
|
export default function ComponentForum_DetailHeader({
|
||||||
data,
|
data,
|
||||||
@@ -342,8 +331,6 @@ function ButtonDelete({
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
|
||||||
if (loading) return <ComponentGlobal_V2_LoadingPage />;
|
|
||||||
|
|
||||||
async function onDelete() {
|
async function onDelete() {
|
||||||
try {
|
try {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { RouterForum } from "@/lib/router_hipmi/router_forum";
|
|
||||||
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil";
|
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil";
|
||||||
|
import { RouterForum } from "@/lib/router_hipmi/router_forum";
|
||||||
import {
|
import {
|
||||||
ActionIcon,
|
ActionIcon,
|
||||||
Button,
|
Button,
|
||||||
@@ -23,13 +23,11 @@ import {
|
|||||||
AccentColor,
|
AccentColor,
|
||||||
MainColor,
|
MainColor,
|
||||||
} from "@/app_modules/_global/color/color_pallet";
|
} from "@/app_modules/_global/color/color_pallet";
|
||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2";
|
|
||||||
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal";
|
|
||||||
import { forum_funDeleteKomentarById } from "../../fun/delete/fun_delete_komentar_by_id";
|
|
||||||
import { forum_funGetAllKomentarById } from "../../fun/get/get_all_komentar_by_id";
|
|
||||||
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global";
|
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global";
|
||||||
import { MODEL_FORUM_KOMENTAR } from "../../model/interface";
|
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import { forum_funDeleteKomentarById } from "../../fun/delete/fun_delete_komentar_by_id";
|
||||||
|
import { MODEL_FORUM_KOMENTAR } from "../../model/interface";
|
||||||
|
|
||||||
export default function ComponentForum_KomentarButtonMore({
|
export default function ComponentForum_KomentarButtonMore({
|
||||||
userId,
|
userId,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { RouterForum } from "@/lib/router_hipmi/router_forum";
|
|
||||||
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil";
|
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil";
|
||||||
|
import { RouterForum } from "@/lib/router_hipmi/router_forum";
|
||||||
import {
|
import {
|
||||||
ActionIcon,
|
ActionIcon,
|
||||||
Button,
|
Button,
|
||||||
@@ -24,8 +24,6 @@ import {
|
|||||||
} from "@tabler/icons-react";
|
} from "@tabler/icons-react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2";
|
|
||||||
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal";
|
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal";
|
||||||
import { IconSquareCheck } from "@tabler/icons-react";
|
import { IconSquareCheck } from "@tabler/icons-react";
|
||||||
import { forum_funDeletePostingById } from "../../fun/delete/fun_delete_posting_by_id";
|
import { forum_funDeletePostingById } from "../../fun/delete/fun_delete_posting_by_id";
|
||||||
@@ -51,8 +49,6 @@ export default function ComponentForum_DetailMoreButton({
|
|||||||
const [loadingEdit, setLoadingEdit] = useState(false);
|
const [loadingEdit, setLoadingEdit] = useState(false);
|
||||||
const [loadingReport, setLoadingReport] = useState(false);
|
const [loadingReport, setLoadingReport] = useState(false);
|
||||||
|
|
||||||
// if (loadingEdit) return <ComponentGlobal_V2_LoadingPage />;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Drawer
|
<Drawer
|
||||||
@@ -194,8 +190,6 @@ function ButtonDelete({
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
|
||||||
if (loading) return <ComponentGlobal_V2_LoadingPage />;
|
|
||||||
|
|
||||||
async function onDelete() {
|
async function onDelete() {
|
||||||
setOpenDel(false);
|
setOpenDel(false);
|
||||||
await forum_funDeletePostingById(postingId as any).then((res) => {
|
await forum_funDeletePostingById(postingId as any).then((res) => {
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Component_Header } from "@/app_modules/_global/component/new/component_header";
|
import { Component_Header } from "@/app_modules/_global/component/new/component_header";
|
||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2";
|
|
||||||
import UI_NewLayoutTamplate, {
|
import UI_NewLayoutTamplate, {
|
||||||
UI_NewChildren,
|
UI_NewChildren,
|
||||||
UI_NewHeader,
|
UI_NewHeader,
|
||||||
} from "@/app_modules/_global/ui/V2_layout_tamplate";
|
} from "@/app_modules/_global/ui/V2_layout_tamplate";
|
||||||
import { useRouter } from "next/navigation";
|
import React from "react";
|
||||||
import React, { useState } from "react";
|
|
||||||
|
|
||||||
export const dynamic = "force-dynamic";
|
export const dynamic = "force-dynamic";
|
||||||
export default function LayoutForum_Detail({
|
export default function LayoutForum_Detail({
|
||||||
@@ -15,21 +13,8 @@ export default function LayoutForum_Detail({
|
|||||||
}: {
|
}: {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
const router = useRouter();
|
|
||||||
const [loading, setLoading] = useState(false);
|
|
||||||
|
|
||||||
if (loading) return <ComponentGlobal_V2_LoadingPage />;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* <UIGlobal_LayoutTamplate
|
|
||||||
header={
|
|
||||||
<UIGlobal_LayoutHeaderTamplate title="Postingan" posotion={"left"} />
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</UIGlobal_LayoutTamplate> */}
|
|
||||||
|
|
||||||
<UI_NewLayoutTamplate>
|
<UI_NewLayoutTamplate>
|
||||||
<UI_NewHeader>
|
<UI_NewHeader>
|
||||||
<Component_Header title="Postingan" posotion={"left"} />
|
<Component_Header title="Postingan" posotion={"left"} />
|
||||||
|
|||||||
@@ -1,24 +1,12 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import {
|
import { Button, Group, Paper, Stack } from "@mantine/core";
|
||||||
ActionIcon,
|
|
||||||
Button,
|
|
||||||
Center,
|
|
||||||
Group,
|
|
||||||
Loader,
|
|
||||||
Paper,
|
|
||||||
Stack,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import "react-quill/dist/quill.snow.css";
|
|
||||||
import "react-quill/dist/quill.bubble.css";
|
|
||||||
import { IconPhotoUp } from "@tabler/icons-react";
|
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2";
|
|
||||||
|
|
||||||
import dynamic from "next/dynamic";
|
|
||||||
import React, { useState } from "react";
|
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
|
import dynamic from "next/dynamic";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import { useState } from "react";
|
||||||
|
import "react-quill/dist/quill.bubble.css";
|
||||||
|
import "react-quill/dist/quill.snow.css";
|
||||||
import { gs_forum_loading_edit_posting } from "../../global_state";
|
import { gs_forum_loading_edit_posting } from "../../global_state";
|
||||||
const ReactQuill = dynamic(
|
const ReactQuill = dynamic(
|
||||||
() => {
|
() => {
|
||||||
@@ -29,17 +17,6 @@ const ReactQuill = dynamic(
|
|||||||
|
|
||||||
export default function Forum_EditKomentar() {
|
export default function Forum_EditKomentar() {
|
||||||
const [value, setValue] = useState("");
|
const [value, setValue] = useState("");
|
||||||
const [reload, setReload] = useState(false);
|
|
||||||
useShallowEffect(() => {
|
|
||||||
if (window && window.document) setReload(true);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
if (!reload)
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<ComponentGlobal_V2_LoadingPage />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -55,9 +32,6 @@ export default function Forum_EditKomentar() {
|
|||||||
/>
|
/>
|
||||||
</Paper>
|
</Paper>
|
||||||
<Group position="right">
|
<Group position="right">
|
||||||
{/* <ActionIcon>
|
|
||||||
<IconPhotoUp />
|
|
||||||
</ActionIcon> */}
|
|
||||||
<ButtonAction />
|
<ButtonAction />
|
||||||
</Group>
|
</Group>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
Reference in New Issue
Block a user