UI Forum untuk user

- UI selesai
- Realtime dan notifikasi selesai
## No Issuee
This commit is contained in:
2024-07-02 17:38:13 +08:00
parent 11b5e8f722
commit bca5a2ac15
43 changed files with 719 additions and 638 deletions

View File

@@ -1,18 +1,14 @@
"use client";
import { RouterAdminForum } from "@/app/lib/router_admin/router_admin_forum";
import ComponentAdminGlobal_HeaderTamplate from "@/app_modules/admin/component_global/header_tamplate";
import ComponentAdminDonasi_TombolKembali from "@/app_modules/admin/donasi/component/tombol_kembali";
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil";
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/notif_global/notifikasi_gagal";
import {
MODEL_FORUM_KOMENTAR,
MODEL_FORUM_MASTER_REPORT,
MODEL_FORUM_REPORT_POSTING,
MODEL_FORUM_REPORT_POSTING
} from "@/app_modules/forum/model/interface";
import mqtt_client from "@/util/mqtt_client";
import {
Badge,
Box,
Button,
Center,
Group,
@@ -24,28 +20,22 @@ import {
Stack,
Table,
Text,
TextInput,
Title,
Title
} from "@mantine/core";
import { useDisclosure } from "@mantine/hooks";
import {
IconMessageCircle,
IconFlag3,
IconTrash,
IconSearch,
IconTrash
} from "@tabler/icons-react";
import _ from "lodash";
import { useRouter } from "next/navigation";
import { useState } from "react";
import { adminForum_funDeletePostingById } from "../fun/delete/fun_delete_posting_by_id";
import { adminForum_funDeleteKomentarById } from "../fun/delete/fun_delete_komentar_by_id";
import { useDisclosure, useShallowEffect } from "@mantine/hooks";
import ComponentAdminGlobal_IsEmptyData from "../../component_global/is_empty_data";
import { adminForum_getListReportKomentarbyId } from "../fun/get/get_list_report_komentar_by_id";
import ComponentAdminGlobal_BackButton from "../../component_global/back_button";
import ComponentAdminForum_ViewOneDetailKomentar from "../component/detail_one_komentar";
import adminForum_funGetOneKomentarById from "../fun/get/get_one_komentar_by_id";
import mqtt_client from "@/util/mqtt_client";
import ComponentAdminGlobal_IsEmptyData from "../../component_global/is_empty_data";
import adminNotifikasi_funCreateToUser from "../../notifikasi/fun/create/fun_create_notif_user";
import ComponentAdminForum_ViewOneDetailKomentar from "../component/detail_one_komentar";
import { adminForum_funDeleteKomentarById } from "../fun/delete/fun_delete_komentar_by_id";
import { adminForum_getListReportKomentarbyId } from "../fun/get/get_list_report_komentar_by_id";
import adminForum_funGetOneKomentarById from "../fun/get/get_one_komentar_by_id";
export default function AdminForum_HasilReportKomentar({
komentarId,
@@ -108,6 +98,7 @@ function ButtonDeleteKomentar({
const dataNotif = {
appId: data.id,
status: "Report Komentar",
// userId harus sama seperti author
userId: data.authorId,
pesan: data.komentar,
kategoriApp: "FORUM",

View File

@@ -13,10 +13,21 @@ export default async function adminNotifikasi_findRouterForum({
onChangeNavbar: (val: any) => void;
onToggleNavbar: (val: any) => void;
}) {
const routeName = RouterAdminForum.table_report_posting;
router.push(routeName);
onChangeNavbar({
id: 7,
childId: 73,
});
if (data.status === "Report Posting") {
const routeName = RouterAdminForum.table_report_posting;
router.push(routeName);
onChangeNavbar({
id: 7,
childId: 73,
});
}
if (data.status === "Report Komentar") {
const routeName = RouterAdminForum.table_report_komentar;
router.push(routeName);
onChangeNavbar({
id: 7,
childId: 74,
});
}
}