diff --git a/package.json b/package.json index 40418346..c1cd1e9b 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,6 @@ "@types/node": "20.4.5", "@types/react": "18.2.17", "@types/react-dom": "18.2.7", - "@types/react-virtualized": "^9.21.30", "@types/uuid": "^9.0.4", "autoprefixer": "10.4.14", "bufferutil": "^4.0.8", @@ -53,7 +52,7 @@ "mqtt": "^5.5.0", "next": "^13.5.4-canary.8", "next-dev": "^1.1.9", - "next-scroll-loader": "^1.0.5", + "next-scroll-loader": "^1.0.9", "postcss": "8.4.27", "react": "18.2.0", "react-countdown": "^2.3.5", @@ -67,7 +66,6 @@ "react-responsive-carousel": "^3.2.23", "react-simple-toasts": "^5.10.0", "react-toastify": "^9.1.3", - "react-virtualized": "^9.22.5", "socket.io-client": "^4.7.2", "tailwindcss": "3.3.3", "ts-node": "^10.9.2", diff --git a/prisma/schema.prisma b/prisma/schema.prisma index fdd7eddc..baa94cd0 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -865,8 +865,9 @@ model Notifikasi { Role MasterUserRole? @relation(fields: [userRoleId], references: [id]) userRoleId String - User User @relation("UserNotifikasi", fields: [userId], references: [id], map: "NotifikasiUser") - userId String - Admin User @relation("AdminNotifikasi", fields: [adminId], references: [id], map: "NotifikasiAdmin") - adminId String + User User? @relation("UserNotifikasi", fields: [userId], references: [id], map: "NotifikasiUser") + userId String? + Admin User? @relation("AdminNotifikasi", fields: [adminId], references: [id], map: "NotifikasiAdmin") + adminId String? + } diff --git a/public/aset/global/main_background.png b/public/aset/global/main_background.png new file mode 100644 index 00000000..bc2282b7 Binary files /dev/null and b/public/aset/global/main_background.png differ diff --git a/public/file/dd090612-fe9e-4fe2-b776-7124325a0e9b.jpeg b/public/file/dd090612-fe9e-4fe2-b776-7124325a0e9b.jpeg new file mode 100644 index 00000000..25a18f99 Binary files /dev/null and b/public/file/dd090612-fe9e-4fe2-b776-7124325a0e9b.jpeg differ diff --git a/public/investasi/74bf9679-adb4-4811-945c-0d3ce0922a49.jpeg b/public/investasi/74bf9679-adb4-4811-945c-0d3ce0922a49.jpeg new file mode 100644 index 00000000..25a18f99 Binary files /dev/null and b/public/investasi/74bf9679-adb4-4811-945c-0d3ce0922a49.jpeg differ diff --git a/public/job/0fbd6251-c6a4-4552-82be-f630f04b838c.jpg b/public/job/0fbd6251-c6a4-4552-82be-f630f04b838c.jpg new file mode 100644 index 00000000..4204a23e Binary files /dev/null and b/public/job/0fbd6251-c6a4-4552-82be-f630f04b838c.jpg differ diff --git a/public/job/6ca7d19c-6d7b-49fb-acd6-44e5f1b09d7b.jpg b/public/job/6ca7d19c-6d7b-49fb-acd6-44e5f1b09d7b.jpg new file mode 100644 index 00000000..f1447727 Binary files /dev/null and b/public/job/6ca7d19c-6d7b-49fb-acd6-44e5f1b09d7b.jpg differ diff --git a/public/job/80b01061-3161-414e-980e-2fc3ac8ee1d3.jpg b/public/job/80b01061-3161-414e-980e-2fc3ac8ee1d3.jpg new file mode 100644 index 00000000..bad7a539 Binary files /dev/null and b/public/job/80b01061-3161-414e-980e-2fc3ac8ee1d3.jpg differ diff --git a/public/job/a2486cad-442a-4f4b-b09c-9c0aa7a54cab.jpg b/public/job/a2486cad-442a-4f4b-b09c-9c0aa7a54cab.jpg new file mode 100644 index 00000000..eeda6691 Binary files /dev/null and b/public/job/a2486cad-442a-4f4b-b09c-9c0aa7a54cab.jpg differ diff --git a/public/job/e5700057-a462-4085-84a4-c2a5acb36b4c.png b/public/job/e5700057-a462-4085-84a4-c2a5acb36b4c.png new file mode 100644 index 00000000..f1aa5b43 Binary files /dev/null and b/public/job/e5700057-a462-4085-84a4-c2a5acb36b4c.png differ diff --git a/public/portofolio/logo/55409a1f-8d3d-455a-b5bf-10cd64eda28b.png b/public/portofolio/logo/55409a1f-8d3d-455a-b5bf-10cd64eda28b.png new file mode 100644 index 00000000..176da5a2 Binary files /dev/null and b/public/portofolio/logo/55409a1f-8d3d-455a-b5bf-10cd64eda28b.png differ diff --git a/public/portofolio/logo/a7ebdb61-1200-45b3-b868-ed9cc811c8b8.png b/public/portofolio/logo/a7ebdb61-1200-45b3-b868-ed9cc811c8b8.png new file mode 100644 index 00000000..256b64ba Binary files /dev/null and b/public/portofolio/logo/a7ebdb61-1200-45b3-b868-ed9cc811c8b8.png differ diff --git a/public/portofolio/logo/c457514a-9b0b-48b8-8ae6-2d903f8964bc.jpg b/public/portofolio/logo/c457514a-9b0b-48b8-8ae6-2d903f8964bc.jpg new file mode 100644 index 00000000..7184c41f Binary files /dev/null and b/public/portofolio/logo/c457514a-9b0b-48b8-8ae6-2d903f8964bc.jpg differ diff --git a/src/app/dev/admin/forum/child/report-komentar/page.tsx b/src/app/dev/admin/forum/child/report-komentar/page.tsx deleted file mode 100644 index cf8566da..00000000 --- a/src/app/dev/admin/forum/child/report-komentar/page.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { AdminForum_TableReportKomentar } from "@/app_modules/admin/forum"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/admin/forum/child/report-posting/page.tsx b/src/app/dev/admin/forum/child/report-posting/page.tsx deleted file mode 100644 index 2235353a..00000000 --- a/src/app/dev/admin/forum/child/report-posting/page.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { AdminForum_TableReportPosting } from "@/app_modules/admin/forum"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/admin/forum/children/semua-komentar/[id]/page.tsx b/src/app/dev/admin/forum/detail/[id]/page.tsx similarity index 64% rename from src/app/dev/admin/forum/children/semua-komentar/[id]/page.tsx rename to src/app/dev/admin/forum/detail/[id]/page.tsx index 663ee0e9..69063651 100644 --- a/src/app/dev/admin/forum/children/semua-komentar/[id]/page.tsx +++ b/src/app/dev/admin/forum/detail/[id]/page.tsx @@ -1,17 +1,25 @@ import { AdminForum_LihatSemuaKomentar } from "@/app_modules/admin/forum"; +import adminForum_countKomentarByPostingId from "@/app_modules/admin/forum/fun/count/fun_count_komentar_by_id"; import { adminForum_getListKomentarById } from "@/app_modules/admin/forum/fun/get/get_list_komentar_by_id"; import { adminForum_getOnePostingById } from "@/app_modules/admin/forum/fun/get/get_one_posting_by_id"; export default async function Page({ params }: { params: { id: string } }) { let postingId = params.id; - const listKomentar = await adminForum_getListKomentarById(postingId); + + const listKomentar = await adminForum_getListKomentarById({ + postingId: postingId, + page: 1, + }); const dataPosting = await adminForum_getOnePostingById(postingId); + const countKomentar = await adminForum_countKomentarByPostingId({postingId: postingId}) + return ( <> ); diff --git a/src/app/dev/admin/forum/hasil-report/komentar/[id]/page.tsx b/src/app/dev/admin/forum/hasil-report/komentar/[id]/page.tsx deleted file mode 100644 index 9b9dbfe8..00000000 --- a/src/app/dev/admin/forum/hasil-report/komentar/[id]/page.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { AdminForum_HasilReportKomentar } from "@/app_modules/admin/forum" -import { adminForum_getListReportKomentarbyId } from "@/app_modules/admin/forum/fun/get/get_list_report_komentar_by_id"; - -export default async function Page({params}: {params: {id: string}}) { - let komentarId = params.id - const listReport = await adminForum_getListReportKomentarbyId(komentarId) - - return ( - <> - - - ); -} \ No newline at end of file diff --git a/src/app/dev/admin/forum/sub-detail/report-komentar/[id]/page.tsx b/src/app/dev/admin/forum/sub-detail/report-komentar/[id]/page.tsx new file mode 100644 index 00000000..94f2bd0f --- /dev/null +++ b/src/app/dev/admin/forum/sub-detail/report-komentar/[id]/page.tsx @@ -0,0 +1,24 @@ +import { AdminForum_HasilReportKomentar } from "@/app_modules/admin/forum"; +import { adminForum_getListReportKomentarbyId } from "@/app_modules/admin/forum/fun/get/get_list_report_komentar_by_id"; +import adminForum_funGetOneKomentarById from "@/app_modules/admin/forum/fun/get/get_one_komentar_by_id"; + +export default async function Page({ params }: { params: { id: string } }) { + let komentarId = params.id; + const listReport = await adminForum_getListReportKomentarbyId({ + komentarId: komentarId, + page: 1, + }); + const dataKomentar = await adminForum_funGetOneKomentarById({ + komentarId: komentarId, + }); + + return ( + <> + + + ); +} diff --git a/src/app/dev/admin/forum/hasil-report/posting/[id]/page.tsx b/src/app/dev/admin/forum/sub-detail/report-posting/[id]/page.tsx similarity index 55% rename from src/app/dev/admin/forum/hasil-report/posting/[id]/page.tsx rename to src/app/dev/admin/forum/sub-detail/report-posting/[id]/page.tsx index a8f5eee0..a40c7fed 100644 --- a/src/app/dev/admin/forum/hasil-report/posting/[id]/page.tsx +++ b/src/app/dev/admin/forum/sub-detail/report-posting/[id]/page.tsx @@ -1,14 +1,20 @@ import { AdminForum_HasilReportPosting } from "@/app_modules/admin/forum"; import { adminForum_getListReportPostingById } from "@/app_modules/admin/forum/fun/get/get_list_report_posting_by_id"; +import { adminForum_getOnePostingById } from "@/app_modules/admin/forum/fun/get/get_one_posting_by_id"; export default async function Page({ params }: { params: { id: string } }) { let postingId = params.id; - const listReport = await adminForum_getListReportPostingById(postingId); + const listReport = await adminForum_getListReportPostingById({ + postingId: postingId, + page: 1, + }); + + const dataPosting = await adminForum_getOnePostingById(postingId); return ( <> diff --git a/src/app/dev/admin/forum/child/publish/page.tsx b/src/app/dev/admin/forum/sub-menu/posting/page.tsx similarity index 65% rename from src/app/dev/admin/forum/child/publish/page.tsx rename to src/app/dev/admin/forum/sub-menu/posting/page.tsx index f98121f7..c6457777 100644 --- a/src/app/dev/admin/forum/child/publish/page.tsx +++ b/src/app/dev/admin/forum/sub-menu/posting/page.tsx @@ -1,8 +1,8 @@ import { AdminForum_TablePublish } from "@/app_modules/admin/forum"; -import { adminForum_getListPublish } from "@/app_modules/admin/forum/fun/get/get_list_publish"; +import { adminForum_getListPosting } from "@/app_modules/admin/forum/fun/get/get_list_publish"; export default async function Page() { - const listPublish = await adminForum_getListPublish(); + const listPublish = await adminForum_getListPosting({page: 1}); return ( <> diff --git a/src/app/dev/admin/forum/sub-menu/report-komentar/page.tsx b/src/app/dev/admin/forum/sub-menu/report-komentar/page.tsx new file mode 100644 index 00000000..dfff6d5b --- /dev/null +++ b/src/app/dev/admin/forum/sub-menu/report-komentar/page.tsx @@ -0,0 +1,12 @@ +import adminForum_funGetAllReportKomentar from "@/app_modules/admin/forum/fun/get/get_all_report_komentar"; +import AdminForum_TableReportKomentar from "@/app_modules/admin/forum/sub_menu/table_report_komentar"; + +export default async function Page() { + const listData = await adminForum_funGetAllReportKomentar({ page: 1 }); + + return ( + <> + + + ); +} diff --git a/src/app/dev/admin/forum/sub-menu/report-posting/page.tsx b/src/app/dev/admin/forum/sub-menu/report-posting/page.tsx new file mode 100644 index 00000000..9d2e6dfb --- /dev/null +++ b/src/app/dev/admin/forum/sub-menu/report-posting/page.tsx @@ -0,0 +1,12 @@ +import { AdminForum_TableReportPosting } from "@/app_modules/admin/forum"; +import adminForum_funGetAllReportPosting from "@/app_modules/admin/forum/fun/get/get_all_report_posting"; + +export default async function Page() { + const listData = await adminForum_funGetAllReportPosting({ page: 1 }); + + return ( + <> + + + ); +} diff --git a/src/app/dev/admin/main/dashboard/page.tsx b/src/app/dev/admin/main/dashboard/page.tsx index ee00cc55..e046e03a 100644 --- a/src/app/dev/admin/main/dashboard/page.tsx +++ b/src/app/dev/admin/main/dashboard/page.tsx @@ -6,5 +6,9 @@ export default async function Page() { const countUser = await AdminMainDashboard_CountUser(); const countPorto = await AdminMainDashboard_CountPOrtofolio(); + // await new Promise((a, b) => { + // setTimeout(a, 4000); + // }); + return ; } diff --git a/src/app/dev/auth/validasi/[id]/layout.tsx b/src/app/dev/auth/validasi/[id]/layout.tsx deleted file mode 100644 index af451bb8..00000000 --- a/src/app/dev/auth/validasi/[id]/layout.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { LayoutValidasi } from "@/app_modules/auth"; -import { ActionIcon, Button } from "@mantine/core"; -import Link from "next/link"; -import React from "react"; - -export default async function Layout({ - children, -}: { - children: React.ReactNode; -}) { - return ( - <> - {children} - - ); -} diff --git a/src/app/dev/colab/detail/group/[id]/page.tsx b/src/app/dev/colab/detail/group/[id]/page.tsx index f20a232e..2fecdb0c 100644 --- a/src/app/dev/colab/detail/group/[id]/page.tsx +++ b/src/app/dev/colab/detail/group/[id]/page.tsx @@ -1,7 +1,5 @@ import adminColab_getOneRoomChatById from "@/app_modules/admin/colab/fun/get/get_one_room_chat_by_id"; import { Colab_GroupChatView } from "@/app_modules/colab"; -import ColabViewChat from "@/app_modules/colab/detail/chat"; -import colab_V2getListMessageByRoomId from "@/app_modules/colab/fun/chat/get_message_by_room_id"; import colab_getMessageByRoomId from "@/app_modules/colab/fun/get/room_chat/get_message_by_room_id"; import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id"; diff --git a/src/app/dev/colab/detail/grup/[id]/layout.tsx b/src/app/dev/colab/detail/grup/[id]/layout.tsx deleted file mode 100644 index 50e8de8a..00000000 --- a/src/app/dev/colab/detail/grup/[id]/layout.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import prisma from "@/app/lib/prisma"; -import { LayoutColab_DetailGrupDiskusi } from "@/app_modules/colab"; -import colab_getListAnggotaByRoomId from "@/app_modules/colab/fun/get/room_chat/get_list_anggota_by_room_id"; -import React from "react"; - -export default async function Layout({ - children, - params, -}: { - children: React.ReactNode; - params: { id: string }; -}) { - let roomId = params.id; - const dataRoom = await colab_getListAnggotaByRoomId(roomId); - - - return ( - <> - - {children} - - - ); -} diff --git a/src/app/dev/colab/detail/grup/[id]/page.tsx b/src/app/dev/colab/detail/grup/[id]/page.tsx deleted file mode 100644 index d03cec6e..00000000 --- a/src/app/dev/colab/detail/grup/[id]/page.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { Colab_DetailGrupDiskusi } from "@/app_modules/colab"; -import colab_getMessageByRoomId from "@/app_modules/colab/fun/get/room_chat/get_message_by_room_id"; -import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; -import _ from "lodash"; - -export default async function Page({ params }: { params: { id: string } }) { - let roomId = params.id; - const userLoginId = await user_getOneUserId(); - let listMsg = await colab_getMessageByRoomId({ page: 1, roomId: roomId }); - - return ( - <> - - - ); -} diff --git a/src/app/dev/colab/detail/main_detail/[id]/loading.tsx b/src/app/dev/colab/detail/main_detail/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/colab/detail/main_detail/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/colab/detail/proyek/saya/[id]/layout.tsx b/src/app/dev/colab/detail/proyek/saya/[id]/layout.tsx index 0b6c1c5a..d7c38cc1 100644 --- a/src/app/dev/colab/detail/proyek/saya/[id]/layout.tsx +++ b/src/app/dev/colab/detail/proyek/saya/[id]/layout.tsx @@ -1,6 +1,4 @@ import { LayoutColab_DetailProyekSaya } from "@/app_modules/colab"; -import colab_getOneCollaborationById from "@/app_modules/colab/fun/get/get_one_by_id"; -import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; import React from "react"; export default async function Layout({ @@ -11,11 +9,11 @@ export default async function Layout({ params: { id: string }; }) { let colabId = params.id; - const dataColab = await colab_getOneCollaborationById(colabId) + return ( <> - + {children} diff --git a/src/app/dev/colab/detail/status/publish/[id]/loading.tsx b/src/app/dev/colab/detail/status/publish/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/colab/detail/status/publish/[id]/loading.tsx +++ b/src/app/dev/colab/detail/status/publish/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/colab/detail/status/reject/[id]/loading.tsx b/src/app/dev/colab/detail/status/reject/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/colab/detail/status/reject/[id]/loading.tsx +++ b/src/app/dev/colab/detail/status/reject/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/colab/detail/status/review/[id]/loading.tsx b/src/app/dev/colab/detail/status/review/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/colab/detail/status/review/[id]/loading.tsx +++ b/src/app/dev/colab/detail/status/review/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/colab/main/beranda/loading.tsx b/src/app/dev/colab/main/beranda/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/colab/main/beranda/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/colab/main/beranda/page.tsx b/src/app/dev/colab/main/beranda/page.tsx index 1a94a1a1..29973ad3 100644 --- a/src/app/dev/colab/main/beranda/page.tsx +++ b/src/app/dev/colab/main/beranda/page.tsx @@ -3,7 +3,7 @@ import colab_getListAllProyek from "@/app_modules/colab/fun/get/get_list_all_pro import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; export default async function Page() { - const listData = await colab_getListAllProyek(); + const listData = await colab_getListAllProyek({page: 1}); const userLoginId = await user_getOneUserId(); return ( diff --git a/src/app/dev/colab/main/grup/loading.tsx b/src/app/dev/colab/main/grup/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/colab/main/grup/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/colab/main/grup/page.tsx b/src/app/dev/colab/main/grup/page.tsx index 8dd133e0..2d9237a9 100644 --- a/src/app/dev/colab/main/grup/page.tsx +++ b/src/app/dev/colab/main/grup/page.tsx @@ -2,7 +2,7 @@ import colab_getListRoomChatByAuthorId from "@/app_modules/colab/fun/get/room_ch import Colab_GrupDiskus from "@/app_modules/colab/main/grup"; export default async function Page() { - const listRoom = await colab_getListRoomChatByAuthorId(); + const listRoom = await colab_getListRoomChatByAuthorId({page: 1}); return ( <> diff --git a/src/app/dev/colab/main/proyek/loading.tsx b/src/app/dev/colab/main/proyek/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/colab/main/proyek/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/colab/main/proyek/page.tsx b/src/app/dev/colab/main/proyek/page.tsx index 81e644f7..abb00e7e 100644 --- a/src/app/dev/colab/main/proyek/page.tsx +++ b/src/app/dev/colab/main/proyek/page.tsx @@ -1,10 +1,10 @@ import { Colab_Proyek } from "@/app_modules/colab"; -import colab_getListPartisipasiProyekByAuthorId from "@/app_modules/colab/fun/get/get_list_partisipasi_proyek_by_author_id"; -import colab_getListAllProyekSayaByAuthorId from "@/app_modules/colab/fun/get/get_list_proyek_saya_by_author_id"; +import colab_getListPartisipasiProyekByAuthorId from "@/app_modules/colab/fun/get/pasrtisipan/get_list_partisipasi_proyek_by_author_id"; +import colab_getListAllProyekSayaByAuthorId from "@/app_modules/colab/fun/get/pasrtisipan/get_list_proyek_saya_by_author_id"; export default async function Page() { - const listPartisipasiProyek = (await colab_getListPartisipasiProyekByAuthorId()).data; - const listProyekSaya = (await colab_getListAllProyekSayaByAuthorId()).data; + const listPartisipasiProyek = await colab_getListPartisipasiProyekByAuthorId({page: 1}) + const listProyekSaya = await colab_getListAllProyekSayaByAuthorId({page: 1}) return ( <> diff --git a/src/app/dev/colab/main/status/loading.tsx b/src/app/dev/colab/main/status/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/colab/main/status/loading.tsx +++ b/src/app/dev/colab/main/status/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/crowd/main/loading.tsx b/src/app/dev/crowd/main/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/crowd/main/loading.tsx +++ b/src/app/dev/crowd/main/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/cerita_penggalang/[id]/loading.tsx b/src/app/dev/donasi/cerita_penggalang/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/cerita_penggalang/[id]/loading.tsx +++ b/src/app/dev/donasi/cerita_penggalang/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/create/cerita_penggalang/[id]/loading.tsx b/src/app/dev/donasi/create/cerita_penggalang/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/create/cerita_penggalang/[id]/loading.tsx +++ b/src/app/dev/donasi/create/cerita_penggalang/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/create/create_donasi/loading.tsx b/src/app/dev/donasi/create/create_donasi/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/create/create_donasi/loading.tsx +++ b/src/app/dev/donasi/create/create_donasi/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/create/create_kabar/[id]/loading.tsx b/src/app/dev/donasi/create/create_kabar/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/create/create_kabar/[id]/loading.tsx +++ b/src/app/dev/donasi/create/create_kabar/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/detail/detail_donasi_saya/[id]/loading.tsx b/src/app/dev/donasi/detail/detail_donasi_saya/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/detail/detail_donasi_saya/[id]/loading.tsx +++ b/src/app/dev/donasi/detail/detail_donasi_saya/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/detail/detail_draft/[id]/loading.tsx b/src/app/dev/donasi/detail/detail_draft/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/detail/detail_draft/[id]/loading.tsx +++ b/src/app/dev/donasi/detail/detail_draft/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/detail/detail_kabar/[id]/loading.tsx b/src/app/dev/donasi/detail/detail_kabar/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/detail/detail_kabar/[id]/loading.tsx +++ b/src/app/dev/donasi/detail/detail_kabar/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/detail/detail_main/[id]/loading.tsx b/src/app/dev/donasi/detail/detail_main/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/detail/detail_main/[id]/loading.tsx +++ b/src/app/dev/donasi/detail/detail_main/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/detail/detail_notif/[id]/loading.tsx b/src/app/dev/donasi/detail/detail_notif/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/detail/detail_notif/[id]/loading.tsx +++ b/src/app/dev/donasi/detail/detail_notif/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/detail/detail_publish/[id]/loading.tsx b/src/app/dev/donasi/detail/detail_publish/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/detail/detail_publish/[id]/loading.tsx +++ b/src/app/dev/donasi/detail/detail_publish/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/detail/detail_reject/[id]/loading.tsx b/src/app/dev/donasi/detail/detail_reject/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/detail/detail_reject/[id]/loading.tsx +++ b/src/app/dev/donasi/detail/detail_reject/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/detail/detail_review/[id]/loading.tsx b/src/app/dev/donasi/detail/detail_review/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/detail/detail_review/[id]/loading.tsx +++ b/src/app/dev/donasi/detail/detail_review/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/donatur/[id]/loading.tsx b/src/app/dev/donasi/donatur/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/donatur/[id]/loading.tsx +++ b/src/app/dev/donasi/donatur/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/edit/edit_cerita/[id]/loading.tsx b/src/app/dev/donasi/edit/edit_cerita/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/edit/edit_cerita/[id]/loading.tsx +++ b/src/app/dev/donasi/edit/edit_cerita/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/edit/edit_donasi/[id]/loading.tsx b/src/app/dev/donasi/edit/edit_donasi/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/edit/edit_donasi/[id]/loading.tsx +++ b/src/app/dev/donasi/edit/edit_donasi/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/edit/edit_rekening/[id]/loading.tsx b/src/app/dev/donasi/edit/edit_rekening/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/edit/edit_rekening/[id]/loading.tsx +++ b/src/app/dev/donasi/edit/edit_rekening/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/edit/update_kabar/[id]/loading.tsx b/src/app/dev/donasi/edit/update_kabar/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/edit/update_kabar/[id]/loading.tsx +++ b/src/app/dev/donasi/edit/update_kabar/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/kabar/[id]/loading.tsx b/src/app/dev/donasi/kabar/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/kabar/[id]/loading.tsx +++ b/src/app/dev/donasi/kabar/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/list_kabar/[id]/loading.tsx b/src/app/dev/donasi/list_kabar/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/list_kabar/[id]/loading.tsx +++ b/src/app/dev/donasi/list_kabar/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/main/loading.tsx b/src/app/dev/donasi/main/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/main/loading.tsx +++ b/src/app/dev/donasi/main/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/notif_page/[id]/loading.tsx b/src/app/dev/donasi/notif_page/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/notif_page/[id]/loading.tsx +++ b/src/app/dev/donasi/notif_page/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/page_pop_up/create/loading.tsx b/src/app/dev/donasi/page_pop_up/create/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/page_pop_up/create/loading.tsx +++ b/src/app/dev/donasi/page_pop_up/create/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/pencairan_dana/[id]/loading.tsx b/src/app/dev/donasi/pencairan_dana/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/pencairan_dana/[id]/loading.tsx +++ b/src/app/dev/donasi/pencairan_dana/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/penggalang_dana/[id]/loading.tsx b/src/app/dev/donasi/penggalang_dana/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/penggalang_dana/[id]/loading.tsx +++ b/src/app/dev/donasi/penggalang_dana/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/proses_donasi/invoice/[id]/loading.tsx b/src/app/dev/donasi/proses_donasi/invoice/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/proses_donasi/invoice/[id]/loading.tsx +++ b/src/app/dev/donasi/proses_donasi/invoice/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/proses_donasi/masukan_donasi/[id]/loading.tsx b/src/app/dev/donasi/proses_donasi/masukan_donasi/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/proses_donasi/masukan_donasi/[id]/loading.tsx +++ b/src/app/dev/donasi/proses_donasi/masukan_donasi/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/proses_donasi/metode_pembayaran/[id]/loading.tsx b/src/app/dev/donasi/proses_donasi/metode_pembayaran/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/proses_donasi/metode_pembayaran/[id]/loading.tsx +++ b/src/app/dev/donasi/proses_donasi/metode_pembayaran/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/donasi/proses_donasi/proses_transaksi/[id]/loading.tsx b/src/app/dev/donasi/proses_donasi/proses_transaksi/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/donasi/proses_donasi/proses_transaksi/[id]/loading.tsx +++ b/src/app/dev/donasi/proses_donasi/proses_transaksi/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/event/create/loading.tsx b/src/app/dev/event/create/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/event/create/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/event/detail/draft/[id]/loading.tsx b/src/app/dev/event/detail/draft/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/event/detail/draft/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/event/detail/kontribusi/[id]/loading.tsx b/src/app/dev/event/detail/kontribusi/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/event/detail/kontribusi/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/event/detail/main/[id]/loading.tsx b/src/app/dev/event/detail/main/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/event/detail/main/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/event/detail/publish/[id]/loading.tsx b/src/app/dev/event/detail/publish/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/event/detail/publish/[id]/loading.tsx +++ b/src/app/dev/event/detail/publish/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/event/detail/reject/[id]/loading.tsx b/src/app/dev/event/detail/reject/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/event/detail/reject/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/event/detail/review/[id]/loading.tsx b/src/app/dev/event/detail/review/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/event/detail/review/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/event/detail/riwayat/[id]/loading.tsx b/src/app/dev/event/detail/riwayat/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/event/detail/riwayat/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/event/edit/[id]/loading.tsx b/src/app/dev/event/edit/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/event/edit/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/event/main/beranda/page.tsx b/src/app/dev/event/main/beranda/page.tsx index b2f95196..04638f77 100644 --- a/src/app/dev/event/main/beranda/page.tsx +++ b/src/app/dev/event/main/beranda/page.tsx @@ -1,8 +1,8 @@ import { Event_Beranda } from "@/app_modules/event"; -import { Event_getListAllPublish } from "@/app_modules/event/fun/get/get_list_all_publish"; +import { event_getListAllPublish } from "@/app_modules/event/fun/get/get_list_all_publish"; export default async function Page() { - const dataEvent = await Event_getListAllPublish(); + const dataEvent = await event_getListAllPublish({page: 1}); return ( <> diff --git a/src/app/dev/event/main/kontribusi/page.tsx b/src/app/dev/event/main/kontribusi/page.tsx index 85b4b01c..62955eb6 100644 --- a/src/app/dev/event/main/kontribusi/page.tsx +++ b/src/app/dev/event/main/kontribusi/page.tsx @@ -1,10 +1,9 @@ import { Event_Kontribusi } from "@/app_modules/event"; -import { Event_getListKontibusiByUserId } from "@/app_modules/event/fun/get/get_list_kontribusi_by_user_id"; +import { event_getListKontibusiByUserId } from "@/app_modules/event/fun/get/get_list_kontribusi_by_user_id"; import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; export default async function Page() { - const userLoginId = await user_getOneUserId(); - const listKontribusi = await Event_getListKontibusiByUserId(userLoginId) + const listKontribusi = await event_getListKontibusiByUserId({page: 1}) return ( <> diff --git a/src/app/dev/event/main/loading.tsx b/src/app/dev/event/main/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/event/main/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/event/main/riwayat/page.tsx b/src/app/dev/event/main/riwayat/page.tsx index f08094ab..3c20774d 100644 --- a/src/app/dev/event/main/riwayat/page.tsx +++ b/src/app/dev/event/main/riwayat/page.tsx @@ -1,14 +1,12 @@ import { Event_Riwayat } from "@/app_modules/event"; -import { Event_getListRiwayatSaya } from "@/app_modules/event/fun/get/get_list_riwayat_saya"; -import { Event_getListSemuaRiwayat } from "@/app_modules/event/fun/get/get_list_semua_riwayat"; -import { Event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id"; +import { event_getListRiwayatSaya } from "@/app_modules/event/fun/get/get_list_riwayat_saya"; +import { event_getListSemuaRiwayat } from "@/app_modules/event/fun/get/riwayat/get_list_semua_riwayat"; import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; export default async function Page({ params }: { params: { id: string } }) { let eventId = params.id; - const authorId = await user_getOneUserId(); - const dataSemuaRiwayat = await Event_getListSemuaRiwayat(); - const dataRiwayatSaya = await Event_getListRiwayatSaya(authorId); + const dataSemuaRiwayat = await event_getListSemuaRiwayat({ page: 1 }); + const dataRiwayatSaya = await event_getListRiwayatSaya({ page: 1 }); return ( - - - ); -} diff --git a/src/app/dev/event/splash/page.tsx b/src/app/dev/event/splash/page.tsx index 8a50c2da..1c7128cd 100644 --- a/src/app/dev/event/splash/page.tsx +++ b/src/app/dev/event/splash/page.tsx @@ -2,7 +2,7 @@ import { Event_SplashScreen } from "@/app_modules/event"; export default async function Page() { // await new Promise((a, b) => { - // setTimeout(a, 1000); + // setTimeout(a, 3000); // }); return ; } diff --git a/src/app/dev/forum/create/loading.tsx b/src/app/dev/forum/create/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/forum/create/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/forum/detail/[id]/loading.tsx b/src/app/dev/forum/detail/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/forum/detail/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/forum/detail/[id]/page.tsx b/src/app/dev/forum/detail/[id]/page.tsx deleted file mode 100644 index 318b9707..00000000 --- a/src/app/dev/forum/detail/[id]/page.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import Forum_Detail from "@/app_modules/forum/detail"; -import { forum_getKomentarById } from "@/app_modules/forum/fun/get/get_komentar_by_id"; -import { forum_getOnePostingById } from "@/app_modules/forum/fun/get/get_one_posting_by_id"; -import { forum_countOneTotalKomentarById } from "@/app_modules/forum/fun/count/count_one_total_komentar_by_id"; -import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; - -export default async function Page({ params }: { params: { id: string } }) { - let postingId = params.id; - - const userLoginId = await user_getOneUserId() - const dataPosting = await forum_getOnePostingById(postingId); - const listKomentar = await forum_getKomentarById(postingId); - const totalKomentar = await forum_countOneTotalKomentarById(postingId) - - - return ( - <> - - - ); -} diff --git a/src/app/dev/forum/detail/[id]/layout.tsx b/src/app/dev/forum/detail/main-detail/[id]/layout.tsx similarity index 100% rename from src/app/dev/forum/detail/[id]/layout.tsx rename to src/app/dev/forum/detail/main-detail/[id]/layout.tsx diff --git a/src/app/dev/forum/detail/main-detail/[id]/page.tsx b/src/app/dev/forum/detail/main-detail/[id]/page.tsx new file mode 100644 index 00000000..0c764797 --- /dev/null +++ b/src/app/dev/forum/detail/main-detail/[id]/page.tsx @@ -0,0 +1,34 @@ +import Forum_MainDetail from "@/app_modules/forum/detail/main_detail"; +import { forum_funGetAllKomentarById } from "@/app_modules/forum/fun/get/get_all_komentar_by_id"; +import { forum_getOnePostingById } from "@/app_modules/forum/fun/get/get_one_posting_by_id"; +import { forum_countOneTotalKomentarById } from "@/app_modules/forum/fun/count/count_one_total_komentar_by_id"; +import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; +import { RouterForum } from "@/app/lib/router_hipmi/router_forum"; +import { redirect } from "next/navigation"; +import { forum_countTotalKomenById } from "@/app_modules/forum/fun/count/count_total_komentar_by_id"; + +export default async function Page({ params }: { params: { id: string } }) { + let postingId = params.id; + + const userLoginId = await user_getOneUserId(); + const dataPosting = await forum_getOnePostingById(postingId); + const listKomentar = await forum_funGetAllKomentarById({ + postingId: postingId, + page: 1, + }); + + dataPosting?.isActive === false && redirect(RouterForum.beranda); + + const countKomentar = await forum_countTotalKomenById(postingId); + + return ( + <> + + + ); +} diff --git a/src/app/dev/forum/detail/report-komentar/[id]/page.tsx b/src/app/dev/forum/detail/report-komentar/[id]/page.tsx new file mode 100644 index 00000000..afb7f262 --- /dev/null +++ b/src/app/dev/forum/detail/report-komentar/[id]/page.tsx @@ -0,0 +1,13 @@ +import { Forum_DetailReportKomentar } from "@/app_modules/forum"; +import forum_funGetOneReportKomentarById from "@/app_modules/forum/fun/get/get_one_report_komentar_by_id"; + +export default async function Page({ params }: { params: { id: string } }) { + const komentarId = params.id; + const dataKomentar = await forum_funGetOneReportKomentarById({ komentarId: komentarId }); + + return ( + <> + + + ); +} diff --git a/src/app/dev/forum/detail/report-posting/[id]/page.tsx b/src/app/dev/forum/detail/report-posting/[id]/page.tsx new file mode 100644 index 00000000..faa3d24a --- /dev/null +++ b/src/app/dev/forum/detail/report-posting/[id]/page.tsx @@ -0,0 +1,12 @@ +import { Forum_DetailReportPosting } from "@/app_modules/forum"; +import forum_funGetOneReportedPostingById from "@/app_modules/forum/fun/get/get_one_posting_reported_by_id"; + +export default async function Page({params}: {params: {id: string}}) { + const postingId = params.id + const dataPosting = await forum_funGetOneReportedPostingById({postingId: postingId}) + return ( + <> + + + ); +} diff --git a/src/app/dev/forum/edit/komentar/[id]/loading.tsx b/src/app/dev/forum/edit/komentar/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/forum/edit/komentar/[id]/loading.tsx +++ b/src/app/dev/forum/edit/komentar/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/forum/edit/posting/[id]/loading.tsx b/src/app/dev/forum/edit/posting/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/forum/edit/posting/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/forum/forumku/[id]/loading.tsx b/src/app/dev/forum/forumku/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/forum/forumku/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/forum/forumku/[id]/page.tsx b/src/app/dev/forum/forumku/[id]/page.tsx index ca9e99b3..2432252d 100644 --- a/src/app/dev/forum/forumku/[id]/page.tsx +++ b/src/app/dev/forum/forumku/[id]/page.tsx @@ -1,5 +1,5 @@ import { Forum_Forumku } from "@/app_modules/forum"; -import { forum_getListPostingByAuhtorId } from "@/app_modules/forum/fun/get/get_list_posting_by_author_id"; +import { forum_getAllPostingByAuhtorId } from "@/app_modules/forum/fun/get/get_list_posting_by_author_id"; import { forum_countOneTotalKomentarById } from "@/app_modules/forum/fun/count/count_one_total_komentar_by_id"; import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id"; @@ -25,7 +25,7 @@ export default async function Page({ params }: { params: { id: string } }) { // setTimeout(a, 1000); // }); - const dataPosting = await forum_getListPostingByAuhtorId(authorId); + const dataPosting = await forum_getAllPostingByAuhtorId({authorId: authorId, page: 1}); const totalPosting = await forum_countPostingByAuthorId(authorId); return ( diff --git a/src/app/dev/forum/komentar/[id]/loading.tsx b/src/app/dev/forum/komentar/[id]/loading.tsx index b1f8b62f..380b3fcd 100644 --- a/src/app/dev/forum/komentar/[id]/loading.tsx +++ b/src/app/dev/forum/komentar/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/forum/main/loading.tsx b/src/app/dev/forum/main/loading.tsx deleted file mode 100644 index 874bc4a9..00000000 --- a/src/app/dev/forum/main/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/forum/main/page.tsx b/src/app/dev/forum/main/page.tsx index c0b887a9..f1caab55 100644 --- a/src/app/dev/forum/main/page.tsx +++ b/src/app/dev/forum/main/page.tsx @@ -1,17 +1,16 @@ - import { Forum_Beranda } from "@/app_modules/forum"; -import { forum_getListAllPosting } from "@/app_modules/forum/fun/get/get_list_all_posting"; +import { forum_new_getAllPosting } from "@/app_modules/forum/fun/get/new_get_all_posting"; import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; export default async function Page() { - const listForum = await forum_getListAllPosting(); + const listForum = await forum_new_getAllPosting({ page: 1 }); const userLoginId = await user_getOneUserId(); + + // console.log(JSON.stringify(listForum, null, 2)); + return ( <> - + ); } diff --git a/src/app/dev/forum/report/komentar-lainnya/[id]/loading.tsx b/src/app/dev/forum/report/komentar-lainnya/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/forum/report/komentar-lainnya/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/forum/report/komentar-lainnya/[id]/page.tsx b/src/app/dev/forum/report/komentar-lainnya/[id]/page.tsx index 1f34498e..4c4b9439 100644 --- a/src/app/dev/forum/report/komentar-lainnya/[id]/page.tsx +++ b/src/app/dev/forum/report/komentar-lainnya/[id]/page.tsx @@ -1,11 +1,16 @@ import { Forum_ReportKomentarLainnya } from "@/app_modules/forum"; +import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; export default async function Page({ params }: { params: { id: string } }) { let komentarId = params.id; + const userLoginId = await user_getOneUserId(); return ( <> - + ); } diff --git a/src/app/dev/forum/report/komentar/[id]/loading.tsx b/src/app/dev/forum/report/komentar/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/forum/report/komentar/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/forum/report/komentar/[id]/page.tsx b/src/app/dev/forum/report/komentar/[id]/page.tsx index 64e4a7b4..88717b66 100644 --- a/src/app/dev/forum/report/komentar/[id]/page.tsx +++ b/src/app/dev/forum/report/komentar/[id]/page.tsx @@ -1,15 +1,19 @@ import { Forum_ReportKomentar } from "@/app_modules/forum"; import { forum_getMasterKategoriReport } from "@/app_modules/forum/fun/master/get_master_kategori_report"; +import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; export default async function Page({ params }: { params: { id: string } }) { let komentarId = params.id; const listReport = await forum_getMasterKategoriReport(); + const userLoginId = await user_getOneUserId(); + return ( <> ); diff --git a/src/app/dev/forum/report/posting-lainnya/[id]/loading.tsx b/src/app/dev/forum/report/posting-lainnya/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/forum/report/posting-lainnya/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/forum/report/posting-lainnya/[id]/page.tsx b/src/app/dev/forum/report/posting-lainnya/[id]/page.tsx index 0d5b8cbd..3039aef6 100644 --- a/src/app/dev/forum/report/posting-lainnya/[id]/page.tsx +++ b/src/app/dev/forum/report/posting-lainnya/[id]/page.tsx @@ -1,11 +1,16 @@ import { Forum_ReportPostingLainnya } from "@/app_modules/forum"; +import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; export default async function Page({ params }: { params: { id: string } }) { - let postingIg = params.id; + let postingId = params.id; + const userLoginId = await user_getOneUserId() return ( <> - + ); } diff --git a/src/app/dev/forum/report/posting/[id]/loading.tsx b/src/app/dev/forum/report/posting/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/forum/report/posting/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/forum/report/posting/[id]/page.tsx b/src/app/dev/forum/report/posting/[id]/page.tsx index 2275c4ea..d52c5827 100644 --- a/src/app/dev/forum/report/posting/[id]/page.tsx +++ b/src/app/dev/forum/report/posting/[id]/page.tsx @@ -1,15 +1,18 @@ import { Forum_ReportPosting } from "@/app_modules/forum"; import { forum_getMasterKategoriReport } from "@/app_modules/forum/fun/master/get_master_kategori_report"; +import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; export default async function Page({ params }: { params: { id: string } }) { let postingId = params.id; const listReport = await forum_getMasterKategoriReport(); + const userLoginId = await user_getOneUserId(); return ( <> ); diff --git a/src/app/dev/forum/splash/loading.tsx b/src/app/dev/forum/splash/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/forum/splash/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/home/layout.tsx b/src/app/dev/home/layout.tsx deleted file mode 100644 index 4e254330..00000000 --- a/src/app/dev/home/layout.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; -import { HomeLayout } from "@/app_modules/home"; -import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id"; -import notifikasi_countUserNotifikasi from "@/app_modules/notifikasi/fun/count/fun_count_by_id"; -import { redirect } from "next/navigation"; - -export default async function Layout({ children }: { children: any }) { - const userId = await user_getOneUserId(); - const dataUser = await user_getOneByUserId(userId); - - const countNotifikasi = await notifikasi_countUserNotifikasi(); - - return ( - <> - - {children} - - - ); -} diff --git a/src/app/dev/home/loading.tsx b/src/app/dev/home/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/home/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/home/page.tsx b/src/app/dev/home/page.tsx index c27b1df5..aa3e2356 100644 --- a/src/app/dev/home/page.tsx +++ b/src/app/dev/home/page.tsx @@ -1,17 +1,16 @@ -import { HomeView } from "@/app_modules/home"; -import { cookies } from "next/headers"; -import { unsealData } from "iron-session"; -import _ from "lodash"; -import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; -import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id"; -import { redirect } from "next/navigation"; import { RouterAdminDashboard } from "@/app/lib/router_hipmi/router_admin"; import { RouterHome } from "@/app/lib/router_hipmi/router_home"; -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; +import { HomeView } from "@/app_modules/home"; +import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id"; +import { job_getTwoForHomeView } from "@/app_modules/job/fun/get/get_two_for_home_view"; +import notifikasi_countUserNotifikasi from "@/app_modules/notifikasi/fun/count/fun_count_by_id"; +import { redirect } from "next/navigation"; export default async function Page() { const userId = await user_getOneUserId(); const dataUser = await user_getOneByUserId(userId); + const dataJob = await job_getTwoForHomeView(); if (dataUser?.active === false) { return redirect(RouterHome.home_user_non_active); @@ -23,12 +22,18 @@ export default async function Page() { // if (dataUser?.Profile === null) return ; // await new Promise((a, b) => { - // setTimeout(a, 4000); + // setTimeout(a, 3000); // }); + const countNotifikasi = await notifikasi_countUserNotifikasi(); + return ( <> - + ); } diff --git a/src/app/dev/investasi/berita/[id]/loading.tsx b/src/app/dev/investasi/berita/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/berita/[id]/loading.tsx +++ b/src/app/dev/investasi/berita/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/create/loading.tsx b/src/app/dev/investasi/create/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/create/loading.tsx +++ b/src/app/dev/investasi/create/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/create_berita/[id]/loading.tsx b/src/app/dev/investasi/create_berita/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/create_berita/[id]/loading.tsx +++ b/src/app/dev/investasi/create_berita/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/detail/[id]/loading.tsx b/src/app/dev/investasi/detail/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/detail/[id]/loading.tsx +++ b/src/app/dev/investasi/detail/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/detail_berita/[id]/loading.tsx b/src/app/dev/investasi/detail_berita/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/detail_berita/[id]/loading.tsx +++ b/src/app/dev/investasi/detail_berita/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/detail_dokumen/[id]/loading.tsx b/src/app/dev/investasi/detail_dokumen/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/detail_dokumen/[id]/loading.tsx +++ b/src/app/dev/investasi/detail_dokumen/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/detail_portofolio/draft/[id]/loading.tsx b/src/app/dev/investasi/detail_portofolio/draft/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/detail_portofolio/draft/[id]/loading.tsx +++ b/src/app/dev/investasi/detail_portofolio/draft/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/detail_portofolio/publish/[id]/loading.tsx b/src/app/dev/investasi/detail_portofolio/publish/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/detail_portofolio/publish/[id]/loading.tsx +++ b/src/app/dev/investasi/detail_portofolio/publish/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/detail_portofolio/reject/[id]/loading.tsx b/src/app/dev/investasi/detail_portofolio/reject/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/detail_portofolio/reject/[id]/loading.tsx +++ b/src/app/dev/investasi/detail_portofolio/reject/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/detail_portofolio/review/[id]/loading.tsx b/src/app/dev/investasi/detail_portofolio/review/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/detail_portofolio/review/[id]/loading.tsx +++ b/src/app/dev/investasi/detail_portofolio/review/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/detail_prospektus/[id]/loading.tsx b/src/app/dev/investasi/detail_prospektus/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/detail_prospektus/[id]/loading.tsx +++ b/src/app/dev/investasi/detail_prospektus/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/detail_saham_terbeli/[id]/loading.tsx b/src/app/dev/investasi/detail_saham_terbeli/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/detail_saham_terbeli/[id]/loading.tsx +++ b/src/app/dev/investasi/detail_saham_terbeli/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/dialog_page/create/loading.tsx b/src/app/dev/investasi/dialog_page/create/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/dialog_page/create/loading.tsx +++ b/src/app/dev/investasi/dialog_page/create/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/dialog_page/transaksi_saham/loading.tsx b/src/app/dev/investasi/dialog_page/transaksi_saham/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/dialog_page/transaksi_saham/loading.tsx +++ b/src/app/dev/investasi/dialog_page/transaksi_saham/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/edit/[id]/loading.tsx b/src/app/dev/investasi/edit/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/edit/[id]/loading.tsx +++ b/src/app/dev/investasi/edit/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/edit_berita/[id]/loading.tsx b/src/app/dev/investasi/edit_berita/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/edit_berita/[id]/loading.tsx +++ b/src/app/dev/investasi/edit_berita/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/edit_dokumen/[id]/loading.tsx b/src/app/dev/investasi/edit_dokumen/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/edit_dokumen/[id]/loading.tsx +++ b/src/app/dev/investasi/edit_dokumen/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/edit_intro/[id]/loading.tsx b/src/app/dev/investasi/edit_intro/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/edit_intro/[id]/loading.tsx +++ b/src/app/dev/investasi/edit_intro/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/edit_prospektus/[id]/loading.tsx b/src/app/dev/investasi/edit_prospektus/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/edit_prospektus/[id]/loading.tsx +++ b/src/app/dev/investasi/edit_prospektus/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/list_edit_berita/[id]/loading.tsx b/src/app/dev/investasi/list_edit_berita/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/list_edit_berita/[id]/loading.tsx +++ b/src/app/dev/investasi/list_edit_berita/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/main/loading.tsx b/src/app/dev/investasi/main/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/main/loading.tsx +++ b/src/app/dev/investasi/main/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/metode_transfer/[id]/loading.tsx b/src/app/dev/investasi/metode_transfer/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/metode_transfer/[id]/loading.tsx +++ b/src/app/dev/investasi/metode_transfer/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/proses_investasi/[id]/loading.tsx b/src/app/dev/investasi/proses_investasi/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/proses_investasi/[id]/loading.tsx +++ b/src/app/dev/investasi/proses_investasi/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/proses_transaksi/[id]/loading.tsx b/src/app/dev/investasi/proses_transaksi/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/proses_transaksi/[id]/loading.tsx +++ b/src/app/dev/investasi/proses_transaksi/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/status_pesanan/[id]/loading.tsx b/src/app/dev/investasi/status_pesanan/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/status_pesanan/[id]/loading.tsx +++ b/src/app/dev/investasi/status_pesanan/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/status_transaksi/berhasil/loading.tsx b/src/app/dev/investasi/status_transaksi/berhasil/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/status_transaksi/berhasil/loading.tsx +++ b/src/app/dev/investasi/status_transaksi/berhasil/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/status_transaksi/gagal/[id]/loading.tsx b/src/app/dev/investasi/status_transaksi/gagal/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/status_transaksi/gagal/[id]/loading.tsx +++ b/src/app/dev/investasi/status_transaksi/gagal/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/transfer/[id]/loading.tsx b/src/app/dev/investasi/transfer/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/transfer/[id]/loading.tsx +++ b/src/app/dev/investasi/transfer/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/upload/loading.tsx b/src/app/dev/investasi/upload/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/upload/loading.tsx +++ b/src/app/dev/investasi/upload/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/upload_bukti/loading.tsx b/src/app/dev/investasi/upload_bukti/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/upload_bukti/loading.tsx +++ b/src/app/dev/investasi/upload_bukti/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/upload_dokumen/[id]/loading.tsx b/src/app/dev/investasi/upload_dokumen/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/upload_dokumen/[id]/loading.tsx +++ b/src/app/dev/investasi/upload_dokumen/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/investasi/upload_prospektus/[id]/loading.tsx b/src/app/dev/investasi/upload_prospektus/[id]/loading.tsx index 874bc4a9..d8a1c040 100644 --- a/src/app/dev/investasi/upload_prospektus/[id]/loading.tsx +++ b/src/app/dev/investasi/upload_prospektus/[id]/loading.tsx @@ -1,4 +1,4 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; +import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2"; export default async function Page() { return ( diff --git a/src/app/dev/job/create/loading.tsx b/src/app/dev/job/create/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/job/create/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/job/detail/arsip/[id]/loading.tsx b/src/app/dev/job/detail/arsip/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/job/detail/arsip/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/job/detail/arsip/[id]/page.tsx b/src/app/dev/job/detail/arsip/[id]/page.tsx index e8fd9290..b37f2fd6 100644 --- a/src/app/dev/job/detail/arsip/[id]/page.tsx +++ b/src/app/dev/job/detail/arsip/[id]/page.tsx @@ -1,9 +1,9 @@ import { Job_DetailArsip } from "@/app_modules/job"; -import { Job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; +import { job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; export default async function Page({params}:{params: {id: string}}) { let jobId = params.id - const dataJob = await Job_getOneById(jobId) + const dataJob = await job_getOneById(jobId) return ( <> diff --git a/src/app/dev/job/detail/draft/[id]/loading.tsx b/src/app/dev/job/detail/draft/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/job/detail/draft/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/job/detail/draft/[id]/page.tsx b/src/app/dev/job/detail/draft/[id]/page.tsx index eaff874d..15d14b24 100644 --- a/src/app/dev/job/detail/draft/[id]/page.tsx +++ b/src/app/dev/job/detail/draft/[id]/page.tsx @@ -1,10 +1,10 @@ import Job_DetailDraft from "@/app_modules/job/detail/draft/view"; -import { Job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; +import { job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; export default async function Page({params}: {params: {id: string}}) { let jobId = params.id - const dataJob = await Job_getOneById(jobId) + const dataJob = await job_getOneById(jobId) return ( <> diff --git a/src/app/dev/job/detail/main/[id]/loading.tsx b/src/app/dev/job/detail/main/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/job/detail/main/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/job/detail/main/[id]/page.tsx b/src/app/dev/job/detail/main/[id]/page.tsx index 00e3a6a4..bfe9b192 100644 --- a/src/app/dev/job/detail/main/[id]/page.tsx +++ b/src/app/dev/job/detail/main/[id]/page.tsx @@ -1,11 +1,11 @@ "use server"; import { Job_MainDetail } from "@/app_modules/job"; -import { Job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; +import { job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; import app_config from "@/util/app_config"; export default async function Page({ params }: { params: { id: string } }) { const idJob = params.id; - const dataJob = await Job_getOneById(idJob); + const dataJob = await job_getOneById(idJob); return ( <> diff --git a/src/app/dev/job/detail/publish/[id]/loading.tsx b/src/app/dev/job/detail/publish/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/job/detail/publish/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/job/detail/publish/[id]/page.tsx b/src/app/dev/job/detail/publish/[id]/page.tsx index 1558f947..6dd30830 100644 --- a/src/app/dev/job/detail/publish/[id]/page.tsx +++ b/src/app/dev/job/detail/publish/[id]/page.tsx @@ -1,9 +1,9 @@ import { Job_DetailPublish } from "@/app_modules/job"; -import { Job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; +import { job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; export default async function Page({params}: {params: {id: string}}) { let jobId = params.id - const dataJob = await Job_getOneById(jobId) + const dataJob = await job_getOneById(jobId) return ( <> diff --git a/src/app/dev/job/detail/reject/[id]/loading.tsx b/src/app/dev/job/detail/reject/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/job/detail/reject/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/job/detail/reject/[id]/page.tsx b/src/app/dev/job/detail/reject/[id]/page.tsx index 0645612e..cd6f0206 100644 --- a/src/app/dev/job/detail/reject/[id]/page.tsx +++ b/src/app/dev/job/detail/reject/[id]/page.tsx @@ -1,10 +1,10 @@ import Job_DetailReject from "@/app_modules/job/detail/reject/view"; -import { Job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; +import { job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; export default async function Page({params}: {params: {id: string}}) { let jobId = params.id - const dataJob = await Job_getOneById(jobId) + const dataJob = await job_getOneById(jobId) return ( <> diff --git a/src/app/dev/job/detail/review/[id]/loading.tsx b/src/app/dev/job/detail/review/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/job/detail/review/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/job/detail/review/[id]/page.tsx b/src/app/dev/job/detail/review/[id]/page.tsx index 67463ad7..6dda171e 100644 --- a/src/app/dev/job/detail/review/[id]/page.tsx +++ b/src/app/dev/job/detail/review/[id]/page.tsx @@ -1,5 +1,5 @@ import Job_DetailReview from "@/app_modules/job/detail/review/view"; -import { Job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; +import { job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; import React from "react"; export default async function Page({ @@ -8,7 +8,7 @@ export default async function Page({ params: { id: React.ReactNode }; }) { let jobId = params.id; - const dataJob = await Job_getOneById(jobId) + const dataJob = await job_getOneById(jobId) return ( <> diff --git a/src/app/dev/job/edit/[id]/loading.tsx b/src/app/dev/job/edit/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/job/edit/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/job/edit/[id]/page.tsx b/src/app/dev/job/edit/[id]/page.tsx index 76da710e..baba6e04 100644 --- a/src/app/dev/job/edit/[id]/page.tsx +++ b/src/app/dev/job/edit/[id]/page.tsx @@ -1,9 +1,9 @@ import { Job_Edit } from "@/app_modules/job"; -import { Job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; +import { job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; export default async function Page({ params }: { params: { id: string } }) { let jobId = params.id; - const dataJob = await Job_getOneById(jobId); + const dataJob = await job_getOneById(jobId); return ( <> diff --git a/src/app/dev/job/main/arsip/page.tsx b/src/app/dev/job/main/arsip/page.tsx index fcd2d063..f46dce88 100644 --- a/src/app/dev/job/main/arsip/page.tsx +++ b/src/app/dev/job/main/arsip/page.tsx @@ -1,12 +1,12 @@ import { Job_Arsip } from "@/app_modules/job"; -import { Job_getListAllArsipById } from "@/app_modules/job/fun/get/get_list_all_arsip"; +import { job_getAllArsipById } from "@/app_modules/job/fun/get/get_all_arsip"; export default async function Page() { - const dataJob = await Job_getListAllArsipById() + const dataJob = await job_getAllArsipById({ page: 1 }); return ( <> - + ); } diff --git a/src/app/dev/job/main/beranda/page.tsx b/src/app/dev/job/main/beranda/page.tsx index c16c9453..1a4bce82 100644 --- a/src/app/dev/job/main/beranda/page.tsx +++ b/src/app/dev/job/main/beranda/page.tsx @@ -1,12 +1,12 @@ -import { Job_Beranda } from "@/app_modules/job"; -import { Job_getAllListPublish } from "@/app_modules/job/fun/get/get_list_all_publish"; +import { Job_ViewBeranda } from "@/app_modules/job"; +import { job_getAllListPublish } from "@/app_modules/job/fun/get/get_all_publish"; export default async function Page() { - const listJob = await Job_getAllListPublish(); + const listJob = await job_getAllListPublish({ page: 1 }); return ( <> - + ); } diff --git a/src/app/dev/job/main/loading.tsx b/src/app/dev/job/main/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/job/main/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/job/main/status/page.tsx b/src/app/dev/job/main/status/page.tsx index 3ce708be..767d88b1 100644 --- a/src/app/dev/job/main/status/page.tsx +++ b/src/app/dev/job/main/status/page.tsx @@ -1,13 +1,14 @@ import { Job_Status } from "@/app_modules/job"; -import { Job_getListStatusByStatusId } from "@/app_modules/job/fun/get/get_list_status_by_status_id"; +import job_getAllStatusDraft from "@/app_modules/job/fun/get/status/get_list_draft"; +import job_getAllStatusPublish from "@/app_modules/job/fun/get/status/get_list_publish"; +import job_getAllStatusReject from "@/app_modules/job/fun/get/status/get_list_reject"; +import job_getAllStatusReview from "@/app_modules/job/fun/get/status/get_list_review"; export default async function Page() { - const listPublish = await Job_getListStatusByStatusId("1"); - const listReview = await Job_getListStatusByStatusId("2"); - const listDraft = await Job_getListStatusByStatusId("3"); - const listReject = await Job_getListStatusByStatusId("4"); - - + const listPublish = await job_getAllStatusPublish({page: 1}); + const listReview = await job_getAllStatusReview({ page: 1 }); + const listDraft = await job_getAllStatusDraft({ page: 1 }); + const listReject = await job_getAllStatusReject({page: 1}); return ( <> diff --git a/src/app/dev/job/non_user_view/[id]/loading.tsx b/src/app/dev/job/non_user_view/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/job/non_user_view/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/job/non_user_view/[id]/page.tsx b/src/app/dev/job/non_user_view/[id]/page.tsx index 0a2a00cf..f69c2288 100644 --- a/src/app/dev/job/non_user_view/[id]/page.tsx +++ b/src/app/dev/job/non_user_view/[id]/page.tsx @@ -1,11 +1,9 @@ -"use server"; import { Job_NonUserView } from "@/app_modules/job"; -import { Job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; -import os from "os"; +import { job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; export default async function Page({ params }: { params: { id: string } }) { let jobId = params.id; - const dataJob = await Job_getOneById(jobId); + const dataJob = await job_getOneById(jobId); // const platform = os.platform(); // const hostName = // platform === "darwin" diff --git a/src/app/dev/job/splash/loading.tsx b/src/app/dev/job/splash/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/job/splash/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/job/splash/page.tsx b/src/app/dev/job/splash/page.tsx index 5286f7dc..9e3d7f07 100644 --- a/src/app/dev/job/splash/page.tsx +++ b/src/app/dev/job/splash/page.tsx @@ -1,9 +1,9 @@ -import { Job_Splash } from "@/app_modules/job"; +import { Job_ViewSplash } from "@/app_modules/job"; export default async function Page() { return ( <> - + ); } diff --git a/src/app/dev/katalog/[id]/layout.tsx b/src/app/dev/katalog/[id]/layout.tsx index 62c2dc48..82012dc7 100644 --- a/src/app/dev/katalog/[id]/layout.tsx +++ b/src/app/dev/katalog/[id]/layout.tsx @@ -1,10 +1,29 @@ +import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; import { KatalogLayout } from "@/app_modules/katalog/main"; +import { Profile_getOneProfileAndUserById } from "@/app_modules/katalog/profile/fun/get/get_one_user_profile"; + +export default async function Layout({ + children, + params, +}: { + children: any; + params: { id: string }; +}) { + const profileId = params.id; + const dataProfile = await Profile_getOneProfileAndUserById(profileId) + const authorId = dataProfile?.userId; + const userLoginId = await user_getOneUserId(); + -export default async function Layout({ children, params }: { children: any, params: {id: string} }) { - // const a = atob(params.id.toString()) return ( <> - {children} + + {children} + ); } diff --git a/src/app/dev/katalog/[id]/loading.tsx b/src/app/dev/katalog/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/katalog/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/katalog/[id]/page.tsx b/src/app/dev/katalog/[id]/page.tsx index f2ff9949..9116b1e1 100644 --- a/src/app/dev/katalog/[id]/page.tsx +++ b/src/app/dev/katalog/[id]/page.tsx @@ -1,37 +1,21 @@ -import prisma from "@/app/lib/prisma"; -import { KatalogView } from "@/app_modules/katalog/main"; -import { url } from "inspector"; -import { unsealData } from "iron-session"; -import _ from "lodash"; -import { cookies } from "next/headers"; -import { redirect } from "next/navigation"; -import { funGetUserProfile } from "@/app_modules/fun_global/get_user_profile"; -import yaml from "yaml"; -import fs from "fs"; -import { funGetListPortofolio } from "@/app_modules/katalog/portofolio/fun/get/get_list_portofolio"; import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; -import { Profile_getOneById } from "@/app_modules/katalog/profile/fun/get/get_one_profile"; +import { Katalog_MainView } from "@/app_modules/katalog"; +import { funGetListPortofolio } from "@/app_modules/katalog/portofolio/fun/get/get_list_portofolio"; import { Profile_getOneProfileAndUserById } from "@/app_modules/katalog/profile/fun/get/get_one_user_profile"; -import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id"; -const config = yaml.parse(fs.readFileSync("config.yaml").toString()); + export default async function Page({ params }: { params: { id: string } }) { let profileId = params.id; - const authorId = await user_getOneUserId(); - const dataUser = await user_getOneByUserId(authorId) + const userLoginId = await user_getOneUserId(); const listPorto = await funGetListPortofolio(profileId); const dataProfile = await Profile_getOneProfileAndUserById(profileId); - // await new Promise((a, b) => { - // setTimeout(a, 1000); - // }); - return ( <> - ); diff --git a/src/app/dev/notifikasi/page.tsx b/src/app/dev/notifikasi/page.tsx index 2ee83bdc..de986f62 100644 --- a/src/app/dev/notifikasi/page.tsx +++ b/src/app/dev/notifikasi/page.tsx @@ -1,9 +1,8 @@ import { Notifikasi_MainView } from "@/app_modules/notifikasi"; import notifikasi_getByUserId from "@/app_modules/notifikasi/fun/get/get_notifiaksi_by_id"; - export default async function Page() { - const listNotifikasi = await notifikasi_getByUserId() + const listNotifikasi = await notifikasi_getByUserId({ page: 1 }); return ( <> diff --git a/src/app/dev/portofolio/create/[id]/loading.tsx b/src/app/dev/portofolio/create/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/portofolio/create/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/portofolio/daftar-portofolio/[id]/page.tsx b/src/app/dev/portofolio/daftar-portofolio/[id]/page.tsx new file mode 100644 index 00000000..45a30f23 --- /dev/null +++ b/src/app/dev/portofolio/daftar-portofolio/[id]/page.tsx @@ -0,0 +1,17 @@ +import { Portofolio_ViewListDetail } from "@/app_modules/katalog/portofolio"; +import { portofolio_funGetAllDaftarByid } from "@/app_modules/katalog/portofolio/fun/get/get_all_portofolio"; + +export default async function Page({ params }: { params: { id: string } }) { + const profileId = params.id; + const dataPortofolio = await portofolio_funGetAllDaftarByid({ + profileId, + page: 1, + }); + + + return ( + <> + + + ); +} diff --git a/src/app/dev/portofolio/edit/data/[id]/loading.tsx b/src/app/dev/portofolio/edit/data/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/portofolio/edit/data/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/portofolio/edit/logo/[id]/loading.tsx b/src/app/dev/portofolio/edit/logo/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/portofolio/edit/logo/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/portofolio/edit/medsos/[id]/loading.tsx b/src/app/dev/portofolio/edit/medsos/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/portofolio/edit/medsos/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/portofolio/main/[id]/loading.tsx b/src/app/dev/portofolio/main/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/portofolio/main/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/portofolio/main/[id]/page.tsx b/src/app/dev/portofolio/main/[id]/page.tsx index 6e18a541..fe44019e 100644 --- a/src/app/dev/portofolio/main/[id]/page.tsx +++ b/src/app/dev/portofolio/main/[id]/page.tsx @@ -4,14 +4,15 @@ import { portofolio_getOneById } from "@/app_modules/katalog/portofolio/fun/get/ export default async function Page({ params }: { params: { id: string } }) { const getPorto = await portofolio_getOneById(params.id); - const userLoginId = await user_getOneUserId() - - + const userLoginId = await user_getOneUserId(); return ( <> {/* {JSON.stringify(getPorto)} */} - + ); } diff --git a/src/app/dev/profile/create/loading.tsx b/src/app/dev/profile/create/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/profile/create/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/profile/edit/[id]/loading.tsx b/src/app/dev/profile/edit/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/profile/edit/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/profile/upload/background/[id]/layout.tsx b/src/app/dev/profile/upload/background/[id]/layout.tsx index ff543f33..11f4cf1b 100644 --- a/src/app/dev/profile/upload/background/[id]/layout.tsx +++ b/src/app/dev/profile/upload/background/[id]/layout.tsx @@ -1,8 +1,16 @@ import LayoutProfile_UpdateFotoBackground from "@/app_modules/katalog/profile/upload/foto_background/layout"; import React from "react"; -export default async function Layout({children}: {children: React.ReactNode}) { - return<> - {children} +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + + {children} + -} \ No newline at end of file + ); +} diff --git a/src/app/dev/profile/upload/background/[id]/loading.tsx b/src/app/dev/profile/upload/background/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/profile/upload/background/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/profile/upload/foto/[id]/layout.tsx b/src/app/dev/profile/upload/foto/[id]/layout.tsx index b381b860..5613eabd 100644 --- a/src/app/dev/profile/upload/foto/[id]/layout.tsx +++ b/src/app/dev/profile/upload/foto/[id]/layout.tsx @@ -1,9 +1,14 @@ import { UploadFotoProfileLayout } from "@/app_modules/katalog/profile"; import React from "react"; -export default async function Layout({children, params}: {children: React.ReactNode, params: {id: string}}) { - let profileId = params.id - return <> - {children} +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} -} \ No newline at end of file + ); +} diff --git a/src/app/dev/profile/upload/foto/[id]/loading.tsx b/src/app/dev/profile/upload/foto/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/profile/upload/foto/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/user_search/main/page.tsx b/src/app/dev/user-search/page.tsx similarity index 52% rename from src/app/dev/user_search/main/page.tsx rename to src/app/dev/user-search/page.tsx index 58f343db..7305259d 100644 --- a/src/app/dev/user_search/main/page.tsx +++ b/src/app/dev/user-search/page.tsx @@ -1,8 +1,8 @@ import { UserSearch_MainView } from "@/app_modules/user_search"; -import { UserSearch_getListUser } from "@/app_modules/user_search/fun/get/get_list_user"; +import { userSearch_getAllUser } from "@/app_modules/user_search/fun/get/get_all_user"; export default async function Page() { - const listUser = await UserSearch_getListUser({ name: "" }); + const listUser = await userSearch_getAllUser({ page: 1 }); return ; } diff --git a/src/app/dev/user_search/main/layout.tsx b/src/app/dev/user_search/main/layout.tsx deleted file mode 100644 index 31218acb..00000000 --- a/src/app/dev/user_search/main/layout.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import { LayoutUserSearch_MainView } from "@/app_modules/user_search"; -import React from "react"; - -export default async function Layout({ - children, -}: { - children: React.ReactNode; -}) { - return {children}; -} diff --git a/src/app/dev/vote/create/loading.tsx b/src/app/dev/vote/create/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/vote/create/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/vote/detail/draft/[id]/loading.tsx b/src/app/dev/vote/detail/draft/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/vote/detail/draft/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/vote/detail/kontribusi/[id]/loading.tsx b/src/app/dev/vote/detail/kontribusi/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/vote/detail/kontribusi/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/vote/detail/main/[id]/loading.tsx b/src/app/dev/vote/detail/main/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/vote/detail/main/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/vote/detail/main/[id]/page.tsx b/src/app/dev/vote/detail/main/[id]/page.tsx index 197f4b7e..cbdfffe3 100644 --- a/src/app/dev/vote/detail/main/[id]/page.tsx +++ b/src/app/dev/vote/detail/main/[id]/page.tsx @@ -1,10 +1,9 @@ -import prisma from "@/app/lib/prisma"; import { Vote_MainDetail } from "@/app_modules/vote"; -import { Vote_getHasilVoteById } from "@/app_modules/vote/fun/get/get_list_hasil_by_id"; import { Vote_cekKontributorById } from "@/app_modules/vote/fun/get/cek_kontributor_by_id"; +import { Vote_getHasilVoteById } from "@/app_modules/vote/fun/get/get_list_hasil_by_id"; +import { Vote_getListKontributorById } from "@/app_modules/vote/fun/get/get_list_kontributor_by_id"; import { Vote_getOnebyId } from "@/app_modules/vote/fun/get/get_one_by_id"; import { Vote_getOnePilihanVotingByUserId } from "@/app_modules/vote/fun/get/get_one_pilihan_voting_by_user_id"; -import { Vote_getListKontributorById } from "@/app_modules/vote/fun/get/get_list_kontributor_by_id"; export default async function Page({ params }: { params: { id: string } }) { const voteId = params.id; diff --git a/src/app/dev/vote/detail/publish/[id]/loading.tsx b/src/app/dev/vote/detail/publish/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/vote/detail/publish/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/vote/detail/reject/[id]/loading.tsx b/src/app/dev/vote/detail/reject/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/vote/detail/reject/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/vote/detail/review/[id]/loading.tsx b/src/app/dev/vote/detail/review/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/vote/detail/review/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/vote/detail/riwayat_saya/[id]/loading.tsx b/src/app/dev/vote/detail/riwayat_saya/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/vote/detail/riwayat_saya/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/vote/detail/semua_riwayat/[id]/loading.tsx b/src/app/dev/vote/detail/semua_riwayat/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/vote/detail/semua_riwayat/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/vote/edit/[id]/loading.tsx b/src/app/dev/vote/edit/[id]/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/vote/edit/[id]/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/vote/main/beranda/page.tsx b/src/app/dev/vote/main/beranda/page.tsx index 25623b91..25ca9990 100644 --- a/src/app/dev/vote/main/beranda/page.tsx +++ b/src/app/dev/vote/main/beranda/page.tsx @@ -1,8 +1,8 @@ import { Vote_Beranda } from "@/app_modules/vote"; -import { Vote_getAllListPublish } from "@/app_modules/vote/fun/get/get_all_list_publish"; +import { vote_getAllListPublish } from "@/app_modules/vote/fun/get/get_all_list_publish"; export default async function Page() { - const dataVote = await Vote_getAllListPublish() + const dataVote = await vote_getAllListPublish({page: 1}) return ( <> diff --git a/src/app/dev/vote/main/kontribusi/page.tsx b/src/app/dev/vote/main/kontribusi/page.tsx index fa11c1b2..31e1f35f 100644 --- a/src/app/dev/vote/main/kontribusi/page.tsx +++ b/src/app/dev/vote/main/kontribusi/page.tsx @@ -1,9 +1,8 @@ import { Vote_Kontribusi } from "@/app_modules/vote"; -import { Vote_getAllListKontribusiByAuthorId } from "@/app_modules/vote/fun/get/get_list_kontribusi_by_author_id"; - +import { vote_getAllListKontribusiByAuthorId } from "@/app_modules/vote/fun/get/get_list_kontribusi_by_author_id"; export default async function Page() { - const dataKontribusi = await Vote_getAllListKontribusiByAuthorId() + const dataKontribusi = await vote_getAllListKontribusiByAuthorId({ page: 1 }); return ( <> diff --git a/src/app/dev/vote/main/loading.tsx b/src/app/dev/vote/main/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/vote/main/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/dev/vote/main/riwayat/page.tsx b/src/app/dev/vote/main/riwayat/page.tsx index 76593fd8..067bdb85 100644 --- a/src/app/dev/vote/main/riwayat/page.tsx +++ b/src/app/dev/vote/main/riwayat/page.tsx @@ -1,10 +1,10 @@ import { Vote_Riwayat } from "@/app_modules/vote"; -import { Vote_getAllListRiwayat } from "@/app_modules/vote/fun/get/get_all_list_riwayat"; -import { Vote_getAllListRiwayatSaya } from "@/app_modules/vote/fun/get/get_all_list_riwayat_saya"; +import { vote_getAllListRiwayat } from "@/app_modules/vote/fun/get/get_all_list_riwayat"; +import { Vote_getAllListRiwayatSaya as vote_getAllListRiwayatSaya } from "@/app_modules/vote/fun/get/get_all_list_riwayat_saya"; export default async function Page() { - const listRiwayat = await Vote_getAllListRiwayat(); - const listRiwayatSaya = await Vote_getAllListRiwayatSaya() + const listRiwayat = await vote_getAllListRiwayat({ page: 1 }); + const listRiwayatSaya = await vote_getAllListRiwayatSaya({ page: 1 }); return ( <> diff --git a/src/app/dev/vote/main/status/page.tsx b/src/app/dev/vote/main/status/page.tsx index 8c612930..9946bbbe 100644 --- a/src/app/dev/vote/main/status/page.tsx +++ b/src/app/dev/vote/main/status/page.tsx @@ -1,12 +1,14 @@ import { Vote_Status } from "@/app_modules/vote"; -import { Vote_getListByStatusId } from "@/app_modules/vote/fun/get/get_list_status_by_status_id"; +import { vote_getAllDraft } from "@/app_modules/vote/fun/get/status/get_all_draft"; +import { vote_getAllPublish } from "@/app_modules/vote/fun/get/status/get_all_publish"; +import { vote_getAllReject } from "@/app_modules/vote/fun/get/status/get_all_reject"; +import { vote_getAllReview } from "@/app_modules/vote/fun/get/status/get_all_review"; export default async function Page() { - const listPublish = await Vote_getListByStatusId("1"); - const listReview = await Vote_getListByStatusId("2"); - const listDraft = await Vote_getListByStatusId("3"); - const listReject = await Vote_getListByStatusId("4"); - + const listPublish = await vote_getAllPublish({page: 1}); + const listReview = await vote_getAllReview({page: 1}); + const listDraft = await vote_getAllDraft({page: 1}); + const listReject = await vote_getAllReject({page: 1}); return ( <> diff --git a/src/app/dev/vote/splash/loading.tsx b/src/app/dev/vote/splash/loading.tsx deleted file mode 100644 index b1f8b62f..00000000 --- a/src/app/dev/vote/splash/loading.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; - -export default async function Page() { - return ( - <> - - - ); -} diff --git a/src/app/emotion.tsx b/src/app/emotion.tsx index 478edabf..9df6fde4 100644 --- a/src/app/emotion.tsx +++ b/src/app/emotion.tsx @@ -1,11 +1,16 @@ "use client"; -import AppNotif from "@/app_modules/notif"; +import { MainColor } from "@/app_modules/_global/color/color_pallet"; // import './globals.css' import { CacheProvider } from "@emotion/react"; -import { Image, MantineProvider, useEmotionCache } from "@mantine/core"; +import { + Box, + Container, + MantineProvider, + rem, + useEmotionCache, +} from "@mantine/core"; import { Notifications } from "@mantine/notifications"; import { useServerInsertedHTML } from "next/navigation"; -import { ToastContainer, toast } from "react-toastify"; import "react-toastify/dist/ReactToastify.css"; export default function RootStyleRegistry({ @@ -35,8 +40,24 @@ export default function RootStyleRegistry({ {children} - {/* - */} + {/* + + + + */} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 1e7f4898..60515f79 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,5 +1,6 @@ import MqttLoader from "@/util/mqtt_loader"; import RootStyleRegistry from "./emotion"; +import { Container } from "@mantine/core"; export default function RootLayout({ children, diff --git a/src/app/lib/router_admin/router_admin_forum.ts b/src/app/lib/router_admin/router_admin_forum.ts index ddefb1fd..0957a7b2 100644 --- a/src/app/lib/router_admin/router_admin_forum.ts +++ b/src/app/lib/router_admin/router_admin_forum.ts @@ -1,13 +1,16 @@ export const RouterAdminForum = { + // main main: "/dev/admin/forum/main", - publish: "/dev/admin/forum/child/publish", - report_komentar: "/dev/admin/forum/child/report-komentar", - report_posting: "/dev/admin/forum/child/report-posting", - //children - semua_komentar: "/dev/admin/forum/children/semua-komentar/", - - // report - hasil_report_posting: "/dev/admin/forum/hasil-report/posting/", - hasil_report_komentar: "/dev/admin/forum/hasil-report/komentar/" + // sub menu + table_posting: "/dev/admin/forum/sub-menu/posting", + table_report_posting: "/dev/admin/forum/sub-menu/report-posting", + table_report_komentar: "/dev/admin/forum/sub-menu/report-komentar", + + // detail + detail_posting: "/dev/admin/forum/detail/", + + // sub detail + report_komentar: "/dev/admin/forum/sub-detail/report-komentar/", + report_posting: "/dev/admin/forum/sub-detail/report-posting/", }; diff --git a/src/app/lib/router_hipmi/router_forum.ts b/src/app/lib/router_hipmi/router_forum.ts index ee955887..2666cc4b 100644 --- a/src/app/lib/router_hipmi/router_forum.ts +++ b/src/app/lib/router_hipmi/router_forum.ts @@ -13,9 +13,11 @@ export const RouterForum = { edit_komentar: "/dev/forum/edit/komentar/", //detail - main_detail: "/dev/forum/detail/", + main_detail: "/dev/forum/detail/main-detail/", + detail_report_komentar: "/dev/forum/detail/report-komentar/", + detail_report_posting: "/dev/forum/detail/report-posting/", - // komentra + // komentar komentar: "/dev/forum/komentar/", //report diff --git a/src/app/lib/router_hipmi/router_katalog.ts b/src/app/lib/router_hipmi/router_katalog.ts index 5d5bb8f7..25261c34 100644 --- a/src/app/lib/router_hipmi/router_katalog.ts +++ b/src/app/lib/router_hipmi/router_katalog.ts @@ -19,9 +19,13 @@ export const RouterProfile = { }; export const RouterPortofolio = { + main_detail: "/dev/portofolio/main/", + api_logo_porto: "/api/portofolio/logo/", create: "/dev/portofolio/create/", + daftar_portofolio: "/dev/portofolio/daftar-portofolio/", + //edit edit_data_bisnis: "/dev/portofolio/edit/data/", edit_logo_bisnis: "/dev/portofolio/edit/logo/", diff --git a/src/app/lib/router_hipmi/router_user_search.ts b/src/app/lib/router_hipmi/router_user_search.ts index 7aa2c19e..8b64a9f1 100644 --- a/src/app/lib/router_hipmi/router_user_search.ts +++ b/src/app/lib/router_hipmi/router_user_search.ts @@ -1,3 +1,3 @@ export const RouterUserSearch = { - main: "/dev/user_search/main" + main: "/dev/user-search" } \ No newline at end of file diff --git a/src/app/makuro/page.tsx b/src/app/makuro/page.tsx index adb83ece..62e9732c 100644 --- a/src/app/makuro/page.tsx +++ b/src/app/makuro/page.tsx @@ -47,5 +47,5 @@ export default function App() { padding: 8, }; - return ; + return <>; } diff --git a/src/app/zCoba/page.tsx b/src/app/zCoba/page.tsx index 4a504557..daab8eca 100644 --- a/src/app/zCoba/page.tsx +++ b/src/app/zCoba/page.tsx @@ -1,9 +1,17 @@ +import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate"; +import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate"; import Coba_TestLoading from "@/app_modules/zCoba"; +import { Text } from "@mantine/core"; export default async function Page() { + await new Promise((a, b) => { + setTimeout(a, 3000); + }); + return ( <> + {/* */} ); } diff --git a/src/app_modules/component_global/author_name_on_header.tsx b/src/app_modules/_global/author_name_on_header.tsx similarity index 84% rename from src/app_modules/component_global/author_name_on_header.tsx rename to src/app_modules/_global/author_name_on_header.tsx index e40f5151..940941c4 100644 --- a/src/app_modules/component_global/author_name_on_header.tsx +++ b/src/app_modules/_global/author_name_on_header.tsx @@ -52,7 +52,11 @@ export default function ComponentGlobal_AuthorNameOnHeader({ {visible ? ( @@ -65,7 +69,11 @@ export default function ComponentGlobal_AuthorNameOnHeader({ ) : ( - + - + {authorName ? authorName : "Nama author"} {tglPublish ? ( - + {skrng.toLocaleDateString(["id-ID"], { dateStyle: "medium", })} diff --git a/src/app_modules/_global/color/color_pallet.ts b/src/app_modules/_global/color/color_pallet.ts new file mode 100644 index 00000000..3f2efc9d --- /dev/null +++ b/src/app_modules/_global/color/color_pallet.ts @@ -0,0 +1,14 @@ +export const MainColor = { + black: "#202020", + darkblue: "#001D3D", + yellow: "#FFC300", +}; + +export const AccentColor = { + blackgray: "#333533", + darkblue: "#002E59", + blue: "#00447D", + softblue: "#007CBA", + skyblue: "#00BFFF", + yellow: "#FFD60A", +}; diff --git a/src/app_modules/_global/component/box_information.tsx b/src/app_modules/_global/component/box_information.tsx new file mode 100644 index 00000000..f51fb951 --- /dev/null +++ b/src/app_modules/_global/component/box_information.tsx @@ -0,0 +1,52 @@ +import { Center, Grid, Group, Paper, Stack, Text, Title } from "@mantine/core"; +import { AccentColor, MainColor } from "../color/color_pallet"; + +export default function ComponentGlobal_BoxInformation({ + informasi, + isReport, +}: { + informasi: string; + isReport?: boolean; +}) { + return ( + <> + {isReport ? ( + + + + * Report + + + {informasi} + + + + ) : ( + + + + *{" "} + + {informasi} + + + + + )} + + ); +} diff --git a/src/app_modules/_global/component/button_create.tsx b/src/app_modules/_global/component/button_create.tsx new file mode 100644 index 00000000..892cc258 --- /dev/null +++ b/src/app_modules/_global/component/button_create.tsx @@ -0,0 +1,51 @@ +"use client"; + +import { RouterJob } from "@/app/lib/router_hipmi/router_job"; +import { + AccentColor, + MainColor, +} from "@/app_modules/_global/color/color_pallet"; +import { ActionIcon, Loader } from "@mantine/core"; +import { IconPencilPlus } from "@tabler/icons-react"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; + +export default function ComponentGlobal_CreateButton({ + path, +}: { + path: string; +}) { + const router = useRouter(); + const [isLoading, setLoading] = useState(false); + + return ( + <> + { + setLoading(true); + router.push(path); + }} + > + {isLoading ? ( + + ) : ( + + )} + + + ); +} diff --git a/src/app_modules/component_global/error_input.tsx b/src/app_modules/_global/component/error_input.tsx similarity index 100% rename from src/app_modules/component_global/error_input.tsx rename to src/app_modules/_global/component/error_input.tsx diff --git a/src/app_modules/component_global/input_countdown.tsx b/src/app_modules/_global/component/input_countdown.tsx similarity index 100% rename from src/app_modules/component_global/input_countdown.tsx rename to src/app_modules/_global/component/input_countdown.tsx diff --git a/src/app_modules/_global/component/is_empty_data.tsx b/src/app_modules/_global/component/is_empty_data.tsx new file mode 100644 index 00000000..0cc2fe35 --- /dev/null +++ b/src/app_modules/_global/component/is_empty_data.tsx @@ -0,0 +1,23 @@ +"use client"; + +import { Center, Text } from "@mantine/core"; + +export default function ComponentGlobal_IsEmptyData({ + text, + height, +}: { + text?: string; + height?: number; +}) { + return ( + <> +
+ {text ? text : "Tidak Ada Data"} +
+ + ); +} diff --git a/src/app_modules/_global/component/loader.tsx b/src/app_modules/_global/component/loader.tsx new file mode 100644 index 00000000..8df65a5d --- /dev/null +++ b/src/app_modules/_global/component/loader.tsx @@ -0,0 +1,10 @@ +import { Loader } from "@mantine/core"; +import { MainColor } from "../color/color_pallet"; + +export default function ComponentGlobal_Loader({ size }: { size?: number }) { + return ( + <> + + + ); +} diff --git a/src/app_modules/component_global/variabel_global.ts b/src/app_modules/_global/component/waring_popup.ts similarity index 79% rename from src/app_modules/component_global/variabel_global.ts rename to src/app_modules/_global/component/waring_popup.ts index b70605aa..528b4a82 100644 --- a/src/app_modules/component_global/variabel_global.ts +++ b/src/app_modules/_global/component/waring_popup.ts @@ -1,4 +1,4 @@ -import { ComponentGlobal_NotifikasiPeringatan } from "./notif_global/notifikasi_peringatan"; +import { ComponentGlobal_NotifikasiPeringatan } from "../notif_global/notifikasi_peringatan"; /** * @returns nilai maksimal untuk upload file di semua module diff --git a/src/app_modules/component_global/component_layout_tamplate.tsx b/src/app_modules/_global/component_layout_tamplate.tsx similarity index 70% rename from src/app_modules/component_global/component_layout_tamplate.tsx rename to src/app_modules/_global/component_layout_tamplate.tsx index 627b36c3..135d2079 100644 --- a/src/app_modules/component_global/component_layout_tamplate.tsx +++ b/src/app_modules/_global/component_layout_tamplate.tsx @@ -1,21 +1,9 @@ "use client"; -import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; -import { RouterUserSearch } from "@/app/lib/router_hipmi/router_user_search"; import { Box, - Center, - Title, - SimpleGrid, - Loader, - Stack, - ActionIcon, - Avatar, - Text, + Stack } from "@mantine/core"; -import { IconUserSearch, IconUserCircle } from "@tabler/icons-react"; -import router from "next/router"; -import { ComponentGlobal_NotifikasiPeringatan } from "./notif_global/notifikasi_peringatan"; export default function AppComponentGlobal_LayoutTamplate({ children, @@ -44,7 +32,7 @@ export default function AppComponentGlobal_LayoutTamplate({ {/* Children */} - + {children} {footer ? ( diff --git a/src/app_modules/component_global/header_tamplate.tsx b/src/app_modules/_global/header_tamplate.tsx similarity index 100% rename from src/app_modules/component_global/header_tamplate.tsx rename to src/app_modules/_global/header_tamplate.tsx diff --git a/src/app_modules/component_global/loading_card.tsx b/src/app_modules/_global/loading_card.tsx similarity index 91% rename from src/app_modules/component_global/loading_card.tsx rename to src/app_modules/_global/loading_card.tsx index ff43d946..2cd225c3 100644 --- a/src/app_modules/component_global/loading_card.tsx +++ b/src/app_modules/_global/loading_card.tsx @@ -1,5 +1,3 @@ -"use client"; - import { Overlay, Center, Loader } from "@mantine/core"; export default function ComponentGlobal_CardLoadingOverlay({ @@ -16,7 +14,7 @@ export default function ComponentGlobal_CardLoadingOverlay({ diff --git a/src/app_modules/_global/loading_page_v2.tsx b/src/app_modules/_global/loading_page_v2.tsx new file mode 100644 index 00000000..a2d24ec2 --- /dev/null +++ b/src/app_modules/_global/loading_page_v2.tsx @@ -0,0 +1,56 @@ +"use client"; + +import { + Box, + Center, + Group, + LoadingOverlay, + Skeleton, + Text, +} from "@mantine/core"; +import { MainColor } from "./color/color_pallet"; + +export default function ComponentGlobal_V2_LoadingPage() { + const listhHuruf = [ + { + huruf: "H", + }, + { + huruf: "I", + }, + { + huruf: "P", + }, + { + huruf: "M", + }, + { + huruf: "I", + }, + ]; + const customLOader = ( +
+ + {listhHuruf.map((e, i) => ( +
+ + + {e.huruf} + +
+ ))} +
+
+ ); + + return ( + <> + + + ); +} diff --git a/src/app_modules/component_global/maintenance_information.tsx b/src/app_modules/_global/maintenance_information.tsx similarity index 100% rename from src/app_modules/component_global/maintenance_information.tsx rename to src/app_modules/_global/maintenance_information.tsx diff --git a/src/app_modules/component_global/notif_global/notifikasi_berhasil.tsx b/src/app_modules/_global/notif_global/notifikasi_berhasil.tsx similarity index 100% rename from src/app_modules/component_global/notif_global/notifikasi_berhasil.tsx rename to src/app_modules/_global/notif_global/notifikasi_berhasil.tsx diff --git a/src/app_modules/component_global/notif_global/notifikasi_gagal.tsx b/src/app_modules/_global/notif_global/notifikasi_gagal.tsx similarity index 100% rename from src/app_modules/component_global/notif_global/notifikasi_gagal.tsx rename to src/app_modules/_global/notif_global/notifikasi_gagal.tsx diff --git a/src/app_modules/component_global/notif_global/notifikasi_peringatan.tsx b/src/app_modules/_global/notif_global/notifikasi_peringatan.tsx similarity index 100% rename from src/app_modules/component_global/notif_global/notifikasi_peringatan.tsx rename to src/app_modules/_global/notif_global/notifikasi_peringatan.tsx diff --git a/src/app_modules/_global/ui/ui_drawer.tsx b/src/app_modules/_global/ui/ui_drawer.tsx new file mode 100644 index 00000000..3ef7b5b3 --- /dev/null +++ b/src/app_modules/_global/ui/ui_drawer.tsx @@ -0,0 +1,104 @@ +import { + ActionIcon, + Drawer, + Group, + SimpleGrid, + Stack, + Text, +} from "@mantine/core"; +import { IconX } from "@tabler/icons-react"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; +import { AccentColor } from "../color/color_pallet"; +import ComponentGlobal_Loader from "../component/loader"; + +interface MODEL_DRAWER { + id: string; + name: string; + icon: string; + path: string; +} +export default function UIGlobal_Drawer({ + opened, + close, + component, +}: { + opened: boolean; + close: () => void; + component: + | { + id: string; + name: string; + icon: string; + path: string; + }[] + | any[]; +}) { + const router = useRouter(); + const [isLoading, setIsLoading] = useState(false); + const [pageId, setPageId] = useState(""); + + return ( + <> + close()} + position={"bottom"} + size={"auto"} + withCloseButton={false} + styles={{ + content: { + padding: 0, + position: "absolute", + margin: "auto", + backgroundColor: "transparent", + left: 0, + right: 0, + width: 500, + }, + body: { + backgroundColor: AccentColor.darkblue, + borderTop: `2px solid ${AccentColor.blue}`, + borderRight: `1px solid ${AccentColor.blue}`, + borderLeft: `1px solid ${AccentColor.blue}`, + borderRadius: "20px 20px 0px 0px", + color: "white", + paddingBottom: "5%", + }, + }} + > + + + + + + + + {component.map((e, i) => ( + + { + setPageId(e?.id); + setIsLoading(true); + router.push(e?.path); + }} + > + {isLoading && e?.id === pageId ? ( + + ) : ( + e?.icon + )} + + + {e?.name} + + + ))} + + + + + ); +} diff --git a/src/app_modules/_global/ui/ui_header_tamplate.tsx b/src/app_modules/_global/ui/ui_header_tamplate.tsx new file mode 100644 index 00000000..85093b23 --- /dev/null +++ b/src/app_modules/_global/ui/ui_header_tamplate.tsx @@ -0,0 +1,114 @@ +"use client"; + +import { + Header, + Group, + ActionIcon, + Text, + Title, + Box, + Loader, +} from "@mantine/core"; +import { IconArrowLeft, IconChevronLeft } from "@tabler/icons-react"; +import { useRouter } from "next/navigation"; +import React, { useState } from "react"; +import { AccentColor, MainColor } from "../color/color_pallet"; + +export default function UIGlobal_LayoutHeaderTamplate({ + title, + posotion, + // left button + hideButtonLeft, + iconLeft, + routerLeft, + customButtonLeft, + // right button + iconRight, + routerRight, + customButtonRight, +}: { + title: string; + posotion?: any; + // left button + hideButtonLeft?: boolean; + iconLeft?: any; + routerLeft?: any; + customButtonLeft?: React.ReactNode; + // right button + iconRight?: any; + routerRight?: any; + customButtonRight?: React.ReactNode; +}) { + const router = useRouter(); + const [isLoading, setIsLoading] = useState(false); + const [isRightLoading, setRightLoading] = useState(false); + + return ( + <> +
+ + {hideButtonLeft ? ( + + ) : customButtonLeft ? ( + customButtonLeft + ) : ( + { + setIsLoading(true); + routerLeft === undefined + ? router.back() + : router.push(routerLeft, { scroll: false }); + }} + > + {isLoading ? ( + + ) : iconLeft ? ( + iconLeft + ) : ( + + )} + + )} + + + {title} + + + {customButtonRight ? ( + customButtonRight + ) : iconRight === undefined ? ( + + ) : routerRight === undefined ? ( + {iconRight} + ) : ( + { + setRightLoading(true); + router.push(routerRight); + }} + > + {isRightLoading ? ( + + ) : ( + iconRight + )} + + )} + +
+ + ); +} diff --git a/src/app_modules/_global/ui/ui_layout_tamplate.tsx b/src/app_modules/_global/ui/ui_layout_tamplate.tsx new file mode 100644 index 00000000..57c900c2 --- /dev/null +++ b/src/app_modules/_global/ui/ui_layout_tamplate.tsx @@ -0,0 +1,126 @@ +"use client"; + +import { + BackgroundImage, + Box, + Container, + Footer, + rem, + ScrollArea, +} from "@mantine/core"; +import { AccentColor, MainColor } from "../color/color_pallet"; +import React from "react"; + +export default function UIGlobal_LayoutTamplate({ + children, + header, + footer, +}: { + children: React.ReactNode; + header?: React.ReactNode; + footer?: React.ReactNode; +}) { + return ( + <> + + + + + + {children} + + + + + + + ); +} + +function UIHeader({ header }: { header: React.ReactNode }) { + return ( + <> + {header ? ( + + {header} + + ) : ( + "" + )} + + ); +} + +function UIChildren({ + children, + footer, +}: { + children: React.ReactNode; + footer: React.ReactNode; +}) { + return ( + <> + + + {children} + + + + ); +} + +function UIFooter({ footer }: { footer: React.ReactNode }) { + return ( + <> + {footer ? ( + + + {footer} + + + ) : ( + "" + )} + + ); +} diff --git a/src/app_modules/_global/ui/ui_modal.tsx b/src/app_modules/_global/ui/ui_modal.tsx new file mode 100644 index 00000000..55c7f14d --- /dev/null +++ b/src/app_modules/_global/ui/ui_modal.tsx @@ -0,0 +1,45 @@ +import { Modal, Stack, Title, Group, Button, Box } from "@mantine/core"; +import { MainColor, AccentColor } from "../color/color_pallet"; + +export default function UIGlobal_Modal({ + opened, + close, + title, + buttonKiri, + buttonKanan, +}: { + opened: any; + close: any; + title: any; + buttonKiri: any; + buttonKanan: any; +}) { + return ( + <> + { + close(); + }} + centered + withCloseButton={false} + styles={{ + content: { + backgroundColor: MainColor.darkblue, + border: `2px solid ${AccentColor.blue}`, + }, + }} + > + + + {title} + + + {buttonKiri} + {buttonKanan} + + + + + ); +} diff --git a/src/app_modules/_global/ui/ui_splash.tsx b/src/app_modules/_global/ui/ui_splash.tsx new file mode 100644 index 00000000..80fbc09e --- /dev/null +++ b/src/app_modules/_global/ui/ui_splash.tsx @@ -0,0 +1,19 @@ +"use client"; + +import { Loader, Stack, ThemeIcon } from "@mantine/core"; +import UIGlobal_LayoutTamplate from "./ui_layout_tamplate"; + +export default function UIGlobal_SplashScreen({ icon }: { icon: any }) { + return ( + <> + + + + {icon} + + + + + + ); +} diff --git a/src/app_modules/admin/app_info/main/index.tsx b/src/app_modules/admin/app_info/main/index.tsx index cce2f39c..7494c5c5 100644 --- a/src/app_modules/admin/app_info/main/index.tsx +++ b/src/app_modules/admin/app_info/main/index.tsx @@ -1,44 +1,12 @@ "use client"; import { - ActionIcon, - Button, - Center, - Grid, - Group, - Modal, - Paper, - ScrollArea, Space, - Stack, - Table, - Text, - TextInput, - Title, - Tooltip, + Stack } from "@mantine/core"; -import { list } from "postcss"; import ComponentAdminGlobal_HeaderTamplate from "../../component_global/header_tamplate"; -import { useState } from "react"; -import { - IconEdit, - IconEye, - IconEyeClosed, - IconEyeOff, - IconPhone, - IconPlus, - IconTrack, - IconTrash, -} from "@tabler/icons-react"; -import { ComponentGlobalAdmin_NotifikasiPeringatan } from "../../component_global/admin_notifikasi/notifikasi_peringatan"; -import adminAppInformation_funUpdateNomorAdmin from "../fun/update/fun_update_nomor"; -import { ComponentGlobalAdmin_NotifikasiBerhasil } from "../../component_global/admin_notifikasi/notifikasi_berhasil"; -import { ComponentGlobalAdmin_NotifikasiGagal } from "../../component_global/admin_notifikasi/notifikasi_gagal"; -import adminAppInformation_getNomorAdmin from "../fun/master/get_nomor_admin"; -import { MODEL_DATA_BANK } from "@/app_modules/investasi/model/model_investasi"; -import _ from "lodash"; -import InformasiWhatApps from "./info_whatsapp"; import InformasiBank from "./info_bank"; +import InformasiWhatApps from "./info_whatsapp"; export default function AdminAppInformation_MainView({ nomorAdmin, diff --git a/src/app_modules/admin/app_info/main/info_bank.tsx b/src/app_modules/admin/app_info/main/info_bank.tsx index 90e058d6..70d11f08 100644 --- a/src/app_modules/admin/app_info/main/info_bank.tsx +++ b/src/app_modules/admin/app_info/main/info_bank.tsx @@ -2,41 +2,34 @@ import { MODEL_DATA_BANK } from "@/app_modules/investasi/model/model_investasi"; import { - Center, - Stack, ActionIcon, - Tooltip, - Group, - Title, Button, + Center, + Grid, + Group, + Modal, Paper, ScrollArea, - Modal, - TextInput, - Text, - Table, - SimpleGrid, - Grid, + Stack, Switch, + Table, + Text, + TextInput, + Title, + Tooltip } from "@mantine/core"; import { - IconEye, - IconEyeOff, - IconEdit, - IconTrash, - IconPlus, IconCirclePlus, + IconEdit } from "@tabler/icons-react"; -import _, { fill } from "lodash"; +import _ from "lodash"; import { useState } from "react"; +import { ComponentAdminGlobal_NotifikasiBerhasil } from "../../component_global/admin_notifikasi/notifikasi_berhasil"; +import { ComponentAdminGlobal_NotifikasiGagal } from "../../component_global/admin_notifikasi/notifikasi_gagal"; import adminAppInformation_createBank from "../fun/create/fun_create_new_bank"; import adminAppInformation_getMasterBank from "../fun/master/get_list_bank"; -import { ComponentGlobalAdmin_NotifikasiBerhasil } from "../../component_global/admin_notifikasi/notifikasi_berhasil"; -import { ComponentGlobalAdmin_NotifikasiGagal } from "../../component_global/admin_notifikasi/notifikasi_gagal"; -import adminAppInformation_getOneBankById from "../fun/get/get_one_bank_by_id"; -import { useShallowEffect } from "@mantine/hooks"; -import adminAppInformation_updateDataBankById from "../fun/update/fun_update_data_bank"; import adminAppInformation_updateStatusBankById from "../fun/update/fun_udpate_status_bank"; +import adminAppInformation_updateDataBankById from "../fun/update/fun_update_data_bank"; export default function InformasiBank({ listBank, @@ -70,9 +63,9 @@ export default function InformasiBank({ if (create.status === 200) { const loadData = await adminAppInformation_getMasterBank(); setData(loadData); - ComponentGlobalAdmin_NotifikasiBerhasil(create.message); + ComponentAdminGlobal_NotifikasiBerhasil(create.message); } else { - ComponentGlobalAdmin_NotifikasiGagal(create.message); + ComponentAdminGlobal_NotifikasiGagal(create.message); } setIsCreate(false); } @@ -84,10 +77,10 @@ export default function InformasiBank({ if (updt.status === 200) { const loadData = await adminAppInformation_getMasterBank(); setData(loadData); - ComponentGlobalAdmin_NotifikasiBerhasil(updt.message); + ComponentAdminGlobal_NotifikasiBerhasil(updt.message); setIsUpdate(false); } else { - ComponentGlobalAdmin_NotifikasiGagal(updt.message); + ComponentAdminGlobal_NotifikasiGagal(updt.message); } } @@ -108,10 +101,10 @@ export default function InformasiBank({ if (updt.status === 200) { const loadData = await adminAppInformation_getMasterBank(); setData(loadData); - ComponentGlobalAdmin_NotifikasiBerhasil(updt.message); + ComponentAdminGlobal_NotifikasiBerhasil(updt.message); setIsActivation(false); } else { - ComponentGlobalAdmin_NotifikasiGagal(updt.message); + ComponentAdminGlobal_NotifikasiGagal(updt.message); } } diff --git a/src/app_modules/admin/app_info/main/info_whatsapp.tsx b/src/app_modules/admin/app_info/main/info_whatsapp.tsx index 31e35bfc..f181f1be 100644 --- a/src/app_modules/admin/app_info/main/info_whatsapp.tsx +++ b/src/app_modules/admin/app_info/main/info_whatsapp.tsx @@ -1,20 +1,19 @@ " use client"; import { - Stack, - Group, - Title, - Paper, ActionIcon, - TextInput, Button, - Box, - Tooltip, + Group, + Paper, + Stack, + TextInput, + Title, + Tooltip } from "@mantine/core"; import { IconEdit, IconPhone } from "@tabler/icons-react"; import { useState } from "react"; -import { ComponentGlobalAdmin_NotifikasiBerhasil } from "../../component_global/admin_notifikasi/notifikasi_berhasil"; -import { ComponentGlobalAdmin_NotifikasiGagal } from "../../component_global/admin_notifikasi/notifikasi_gagal"; +import { ComponentAdminGlobal_NotifikasiBerhasil } from "../../component_global/admin_notifikasi/notifikasi_berhasil"; +import { ComponentAdminGlobal_NotifikasiGagal } from "../../component_global/admin_notifikasi/notifikasi_gagal"; import adminAppInformation_getNomorAdmin from "../fun/master/get_nomor_admin"; import adminAppInformation_funUpdateNomorAdmin from "../fun/update/fun_update_nomor"; @@ -39,11 +38,11 @@ export default function InformasiWhatApps({ nomorAdmin }: { nomorAdmin: any }) { const loadDdata = await adminAppInformation_getNomorAdmin(); setDataNomor(loadDdata); if (loadDdata) { - ComponentGlobalAdmin_NotifikasiBerhasil(updt.message); + ComponentAdminGlobal_NotifikasiBerhasil(updt.message); return; } } else { - ComponentGlobalAdmin_NotifikasiGagal(updt.message); + ComponentAdminGlobal_NotifikasiGagal(updt.message); } } diff --git a/src/app_modules/admin/colab/sub_menu/group.tsx b/src/app_modules/admin/colab/sub_menu/group.tsx index 45d7d470..30bc2c58 100644 --- a/src/app_modules/admin/colab/sub_menu/group.tsx +++ b/src/app_modules/admin/colab/sub_menu/group.tsx @@ -25,7 +25,7 @@ import { import { IconBan, IconCircleDot, IconEye } from "@tabler/icons-react"; import { useState } from "react"; import adminColab_getOneByColabId from "../fun/get/get_one_by_colab_id"; -import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/notif_global/notifikasi_gagal"; +import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal"; import ComponentAdminColab_DetailData from "../component/detail_data"; import adminColab_getOneRoomChatById from "../fun/get/get_one_room_chat_by_id"; import adminColab_getListAllGroupChat from "../fun/get/get_list_all_group_chat"; diff --git a/src/app_modules/admin/colab/sub_menu/publish.tsx b/src/app_modules/admin/colab/sub_menu/publish.tsx index 29590803..3f8cabbd 100644 --- a/src/app_modules/admin/colab/sub_menu/publish.tsx +++ b/src/app_modules/admin/colab/sub_menu/publish.tsx @@ -25,11 +25,11 @@ import { useDisclosure, useShallowEffect } from "@mantine/hooks"; import adminColab_getListAllPublish from "../fun/get/get_list_all_publish"; import ComponentAdminColab_DetailData from "../component/detail_data"; import adminColab_getOneByColabId from "../fun/get/get_one_by_colab_id"; -import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; +import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan"; import _ from "lodash"; import { IconBan, IconCheck, IconEye } from "@tabler/icons-react"; import adminColab_funReportProjectById from "../fun/edit/fun_report_project_by_id"; -import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil"; +import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; export default function AdminColab_TablePublish({ listData, diff --git a/src/app_modules/admin/component_global/admin_notifikasi/notifikasi_berhasil.tsx b/src/app_modules/admin/component_global/admin_notifikasi/notifikasi_berhasil.tsx index 51ae73d3..bfbc9870 100644 --- a/src/app_modules/admin/component_global/admin_notifikasi/notifikasi_berhasil.tsx +++ b/src/app_modules/admin/component_global/admin_notifikasi/notifikasi_berhasil.tsx @@ -14,7 +14,7 @@ import { * @type number * @returns notifikasi berhasil warna hijau */ -export async function ComponentGlobalAdmin_NotifikasiBerhasil( +export async function ComponentAdminGlobal_NotifikasiBerhasil( text: string, durasi?: number ) { diff --git a/src/app_modules/admin/component_global/admin_notifikasi/notifikasi_gagal.tsx b/src/app_modules/admin/component_global/admin_notifikasi/notifikasi_gagal.tsx index c9f103f8..d48ce3fa 100644 --- a/src/app_modules/admin/component_global/admin_notifikasi/notifikasi_gagal.tsx +++ b/src/app_modules/admin/component_global/admin_notifikasi/notifikasi_gagal.tsx @@ -8,7 +8,7 @@ import { IconAlertTriangle } from "@tabler/icons-react"; * @type string * @returns notifikasi peringatan */ -export async function ComponentGlobalAdmin_NotifikasiGagal(text: string) { +export async function ComponentAdminGlobal_NotifikasiGagal(text: string) { return notifications.show({ message: (
diff --git a/src/app_modules/admin/component_global/admin_notifikasi/notifikasi_peringatan.tsx b/src/app_modules/admin/component_global/admin_notifikasi/notifikasi_peringatan.tsx index 399a671c..ec2ec9fc 100644 --- a/src/app_modules/admin/component_global/admin_notifikasi/notifikasi_peringatan.tsx +++ b/src/app_modules/admin/component_global/admin_notifikasi/notifikasi_peringatan.tsx @@ -8,7 +8,7 @@ import { IconAlertTriangle } from "@tabler/icons-react"; * @type string * @returns notifikasi peringatan */ -export async function ComponentGlobalAdmin_NotifikasiPeringatan( +export async function ComponentAdminGlobal_NotifikasiPeringatan( text: string, durasi?: number ) { diff --git a/src/app_modules/admin/component_global/back_button.tsx b/src/app_modules/admin/component_global/back_button.tsx index 15abe3ba..b2b550fe 100644 --- a/src/app_modules/admin/component_global/back_button.tsx +++ b/src/app_modules/admin/component_global/back_button.tsx @@ -5,7 +5,7 @@ import { IconChevronLeft } from "@tabler/icons-react"; import { useRouter } from "next/navigation"; import { useState } from "react"; -export default function ComponentGlobalAdmin_BackButton({path}:{path?:string}) { +export default function ComponentAdminGlobal_BackButton({path}:{path?:string}) { const router = useRouter(); const [isLoading, setLoading] = useState(false); diff --git a/src/app_modules/admin/component_global/is_empty_data.tsx b/src/app_modules/admin/component_global/is_empty_data.tsx new file mode 100644 index 00000000..01c4d382 --- /dev/null +++ b/src/app_modules/admin/component_global/is_empty_data.tsx @@ -0,0 +1,19 @@ +"use client"; + +import { Center, Text } from "@mantine/core"; + +export default function ComponentAdminGlobal_IsEmptyData({ + text, + marginTop, +}: { + text?: string; + marginTop?: number; +}) { + return ( + <> +
+ {text ? text : "Tidak Ada Data"} +
+ + ); +} diff --git a/src/app_modules/admin/component_global/loading_admin_page.tsx b/src/app_modules/admin/component_global/loading_admin_page.tsx index 6febf957..317f4ad0 100644 --- a/src/app_modules/admin/component_global/loading_admin_page.tsx +++ b/src/app_modules/admin/component_global/loading_admin_page.tsx @@ -28,7 +28,7 @@ export default function ComponentAdminGlobal_LoadingPage() { }, ]; const customLOader = ( -
+
{listhHuruf.map((e, i) => (
@@ -44,7 +44,10 @@ export default function ComponentAdminGlobal_LoadingPage() { return ( <> - + {/* */} + + {customLOader} + ); } diff --git a/src/app_modules/admin/component_global/logout.tsx b/src/app_modules/admin/component_global/logout.tsx index 40caa8c6..0b2508fc 100644 --- a/src/app_modules/admin/component_global/logout.tsx +++ b/src/app_modules/admin/component_global/logout.tsx @@ -17,8 +17,8 @@ import { Warna } from "@/app/lib/warna"; import { useDisclosure } from "@mantine/hooks"; import { gs_kodeId, gs_nomor, gs_otp } from "@/app_modules/auth/state/state"; import { auth_Logout } from "@/app_modules/auth/fun/fun_logout"; -import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil"; -import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; +import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; +import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan"; import { useState } from "react"; export default function Admin_Logout() { diff --git a/src/app_modules/admin/developer/index.tsx b/src/app_modules/admin/developer/index.tsx index f793cb1b..d09864a4 100644 --- a/src/app_modules/admin/developer/index.tsx +++ b/src/app_modules/admin/developer/index.tsx @@ -21,8 +21,8 @@ import { IconSearch } from "@tabler/icons-react"; import { useEffect, useState } from "react"; import adminDeveloper_funEditUserAksesById from "./fun/edit/fun_edit_user_akses_by_id"; import adminDeveloper_funGetListAllAdmin from "./fun/get/fun_get_list_all_admin"; -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 { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; +import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal"; import adminDeveloper_funGetListAllUser from "./fun/get/fun_get_list_all_user"; export default function AdminDeveloper({ diff --git a/src/app_modules/admin/donasi/detail/detail_reject.tsx b/src/app_modules/admin/donasi/detail/detail_reject.tsx index 7fcca317..64d434a6 100644 --- a/src/app_modules/admin/donasi/detail/detail_reject.tsx +++ b/src/app_modules/admin/donasi/detail/detail_reject.tsx @@ -24,8 +24,8 @@ import { AdminDonasi_funUpdateCatatanReject } from "../fun/update/fun_update_cat import { NotifBerhasil } from "@/app_modules/donasi/component/notifikasi/notif_berhasil"; import { NotifGagal } from "@/app_modules/donasi/component/notifikasi/notif_gagal"; import { AdminDonasi_getOneById } from "../fun/get/get_one_by_id"; -import ComponentGlobal_InputCountDown from "@/app_modules/component_global/input_countdown"; -import ComponentGlobalAdmin_BackButton from "../../component_global/back_button"; +import ComponentGlobal_InputCountDown from "@/app_modules/_global/component/input_countdown"; +import ComponentAdminGlobal_BackButton from "../../component_global/back_button"; import ComponentAdminDonasi_TampilanDetailDonasi from "../component/tampilan_detail_donasi"; import ComponentAdminDonasi_CeritaPenggalangDana from "../component/tampilan_detail_cerita"; @@ -94,7 +94,7 @@ function ButtonOnHeader({ <> - + diff --git a/src/app_modules/admin/donasi/detail/detail_review.tsx b/src/app_modules/admin/donasi/detail/detail_review.tsx index c74a052d..12429dc7 100644 --- a/src/app_modules/admin/donasi/detail/detail_review.tsx +++ b/src/app_modules/admin/donasi/detail/detail_review.tsx @@ -1,7 +1,7 @@ "use client"; import { RouterDonasi } from "@/app/lib/router_hipmi/router_donasi"; -import ComponentGlobal_InputCountDown from "@/app_modules/component_global/input_countdown"; +import ComponentGlobal_InputCountDown from "@/app_modules/_global/component/input_countdown"; import TampilanRupiahDonasi from "@/app_modules/donasi/component/tampilan_rupiah"; import { MODEL_CERITA_DONASI, @@ -25,14 +25,14 @@ import { import { useDisclosure } from "@mantine/hooks"; import { useRouter } from "next/navigation"; import { useState } from "react"; -import { ComponentGlobalAdmin_NotifikasiBerhasil } from "../../component_global/admin_notifikasi/notifikasi_berhasil"; -import { ComponentGlobalAdmin_NotifikasiGagal } from "../../component_global/admin_notifikasi/notifikasi_gagal"; -import { ComponentGlobalAdmin_NotifikasiPeringatan } from "../../component_global/admin_notifikasi/notifikasi_peringatan"; +import { ComponentAdminGlobal_NotifikasiBerhasil } from "../../component_global/admin_notifikasi/notifikasi_berhasil"; +import { ComponentAdminGlobal_NotifikasiGagal } from "../../component_global/admin_notifikasi/notifikasi_gagal"; +import { ComponentAdminGlobal_NotifikasiPeringatan } from "../../component_global/admin_notifikasi/notifikasi_peringatan"; import ComponentAdminDonasi_TombolKembali from "../component/tombol_kembali"; import { AdminDonasi_getOneById } from "../fun/get/get_one_by_id"; import { AdminDonasi_funUpdateStatusPublish } from "../fun/update/fun_status_publish"; import { AdminDonasi_funUpdateStatusReject } from "../fun/update/fun_status_reject"; -import ComponentGlobalAdmin_BackButton from "../../component_global/back_button"; +import ComponentAdminGlobal_BackButton from "../../component_global/back_button"; import ComponentAdminDonasi_TampilanDetailDonasi from "../component/tampilan_detail_donasi"; import ComponentAdminDonasi_CeritaPenggalangDana from "../component/tampilan_detail_cerita"; @@ -85,12 +85,12 @@ function ButtonOnHeader({ if (res.status === 200) { const newData = await AdminDonasi_getOneById(donasi?.id); setData(newData); - ComponentGlobalAdmin_NotifikasiBerhasil( + ComponentAdminGlobal_NotifikasiBerhasil( "Berhasil Mengubah Status Donasi" ); setLoadingPublish(true); } else { - ComponentGlobalAdmin_NotifikasiPeringatan( + ComponentAdminGlobal_NotifikasiPeringatan( "Gagal Mengubah Status Donasi" ); } @@ -100,7 +100,7 @@ function ButtonOnHeader({ async function onReject() { if (catatan === "") - return ComponentGlobalAdmin_NotifikasiPeringatan( + return ComponentAdminGlobal_NotifikasiPeringatan( "Lengkapi Alasan Penolakan" ); @@ -110,10 +110,10 @@ function ButtonOnHeader({ const newData = await AdminDonasi_getOneById(donasi?.id); setData(newData); close(); - ComponentGlobalAdmin_NotifikasiBerhasil(res.message); + ComponentAdminGlobal_NotifikasiBerhasil(res.message); setLoadingReject(true); } else { - ComponentGlobalAdmin_NotifikasiGagal(res.message); + ComponentAdminGlobal_NotifikasiGagal(res.message); } } ); @@ -122,7 +122,7 @@ function ButtonOnHeader({ return ( <> - + {donasi.donasiMaster_StatusDonasiId === "2" ? ( - - - ); -} - -function ButtonDeletePosting({ postingId }: { postingId: string }) { - const [opened, { open, close }] = useDisclosure(false); - const [loadingDel, setLoadingDel] = useState(false); - const [loadingDel2, setLoadingDel2] = useState(false); - - async function onDelete() { - await adminForum_funDeletePostingById(postingId).then((res) => { - if (res.status === 200) { - setLoadingDel2(false); - setLoadingDel(false); - close(); - ComponentGlobal_NotifikasiBerhasil(res.message); - } else { - ComponentGlobal_NotifikasiGagal(res.message); - } - }); - } - return ( - <> - - - Anda yakin menghapus posting ini - - - - - - - - - ); -} diff --git a/src/app_modules/admin/forum/child/report_komentar/index.tsx b/src/app_modules/admin/forum/child/report_komentar/index.tsx deleted file mode 100644 index 714ec270..00000000 --- a/src/app_modules/admin/forum/child/report_komentar/index.tsx +++ /dev/null @@ -1,11 +0,0 @@ -"use client"; - -import { Stack } from "@mantine/core"; - -export default function AdminForum_TableReportKomentar() { - return ( - <> - ini rep komen - - ); -} diff --git a/src/app_modules/admin/forum/child/report_posting/index.tsx b/src/app_modules/admin/forum/child/report_posting/index.tsx deleted file mode 100644 index d9a9c9f1..00000000 --- a/src/app_modules/admin/forum/child/report_posting/index.tsx +++ /dev/null @@ -1,11 +0,0 @@ -"use client"; - -import { Stack } from "@mantine/core"; - -export default function AdminForum_TableReportPosting() { - return ( - <> - ini rep pos - - ); -} diff --git a/src/app_modules/admin/forum/children/semua_komentar/index.tsx b/src/app_modules/admin/forum/children/semua_komentar/index.tsx deleted file mode 100644 index c01e13f7..00000000 --- a/src/app_modules/admin/forum/children/semua_komentar/index.tsx +++ /dev/null @@ -1,291 +0,0 @@ -"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 { - MODEL_FORUM_KOMENTAR, - MODEL_FORUM_POSTING, -} from "@/app_modules/forum/model/interface"; -import { - Badge, - Box, - Button, - Center, - Grid, - Group, - Modal, - Paper, - ScrollArea, - Spoiler, - Stack, - Table, - Text, - Title, -} from "@mantine/core"; -import { IconTrash } from "@tabler/icons-react"; -import { IconFlag3 } from "@tabler/icons-react"; -import _ from "lodash"; -import { useRouter } from "next/navigation"; -import { useState } from "react"; -import { adminForum_funDeleteKomentarById } from "../../fun/delete/fun_delete_komentar_by_id"; -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 { useDisclosure } from "@mantine/hooks"; - -export default function AdminForum_LihatSemuaKomentar({ - listKomentar, - dataPosting, -}: { - listKomentar: MODEL_FORUM_KOMENTAR[]; - dataPosting: MODEL_FORUM_POSTING; -}) { - return ( - <> - {/*
{JSON.stringify(listKomentar, null, 2)}
*/} - - - - - - - - ); -} - -function DataPosting({ dataPosting }: { dataPosting: MODEL_FORUM_POSTING }) { - return ( - <> - - - - - POSTING - - - - - - - Author : - - - - {dataPosting?.Author?.Profile?.name} - - - - - - -
- - - - - - - - - ); -} - -function TableKomentar({ - listKomentar, -}: { - listKomentar: MODEL_FORUM_KOMENTAR[]; -}) { - const router = useRouter(); - // const [data, setData] = useState(listKomentar); - - const TableRows = listKomentar?.map((e, i) => ( - - -
- {e?.Author?.Profile?.name} -
- - -
- -
- -
- - -
- - {new Intl.DateTimeFormat(["id-ID"], { dateStyle: "medium" }).format( - e.createdAt - )} - -
- - -
- = 3 ? "red" : "black"} - fw={"bold"} - fz={"lg"} - > - {e?.Forum_ReportKomentar.length} - -
- - - - - - - - - - )); - - return ( - <> - - - - KOMENTAR - - - - - - - - - - - - - - {TableRows} -
-
Author
-
-
Komentar
-
-
Tanggal Komentar
-
-
Total Report Komentar
-
-
Aksi
-
-
- -
- {_.isEmpty(TableRows) ? ( -
- Tidak Ada Data -
- ) : ( - "" - )} -
-
- - ); -} - -function ButtonDeleteKomentar({ komentarId }: { komentarId: string }) { - const router = useRouter(); - const [opened, { open, close }] = useDisclosure(false); - const [loadindDel, setLoadingDel] = useState(false); - const [loadingDel2, setLoadingDel2] = useState(false); - - async function onDelete() { - await adminForum_funDeleteKomentarById(komentarId).then((res) => { - if (res.status === 200) { - setLoadingDel(false); - setLoadingDel2(false); - ComponentGlobal_NotifikasiBerhasil(res.message); - close(); - } else { - ComponentGlobal_NotifikasiGagal(res.message); - } - }); - } - return ( - <> - - - Anda yakin menghapus komentar ini ? - - - - - - - - - - ); -} diff --git a/src/app_modules/admin/forum/component/button_delete.tsx b/src/app_modules/admin/forum/component/button_delete.tsx new file mode 100644 index 00000000..e741108c --- /dev/null +++ b/src/app_modules/admin/forum/component/button_delete.tsx @@ -0,0 +1,84 @@ +"use client"; + +import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; +import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal"; +import { Modal, Stack, Title, Group, Button } from "@mantine/core"; +import { useDisclosure } from "@mantine/hooks"; +import { IconTrash } from "@tabler/icons-react"; +import { useState } from "react"; +import { adminForum_funDeletePostingById } from "../fun/delete/fun_delete_posting_by_id"; + +export default function ComponentAdminForum_ButtonDeletePosting({ + postingId, + onSuccesDelete, +}: { + postingId: string; + onSuccesDelete: (val: any) => void; +}) { + const [opened, { open, close }] = useDisclosure(false); + const [loadingDel2, setLoadingDel2] = useState(false); + + async function onDelete() { + await adminForum_funDeletePostingById(postingId).then((res) => { + if (res.status === 200) { + setLoadingDel2(false); + close(); + ComponentGlobal_NotifikasiBerhasil(res.message); + onSuccesDelete(true); + } else { + ComponentGlobal_NotifikasiGagal(res.message); + } + }); + } + return ( + <> + + + Anda yakin menghapus posting ini + + + + + + + + + ); +} diff --git a/src/app_modules/admin/forum/component/detail_one_komentar.tsx b/src/app_modules/admin/forum/component/detail_one_komentar.tsx new file mode 100644 index 00000000..a2ff9e49 --- /dev/null +++ b/src/app_modules/admin/forum/component/detail_one_komentar.tsx @@ -0,0 +1,64 @@ +"use client"; + +import { MODEL_FORUM_KOMENTAR, MODEL_FORUM_POSTING } from "@/app_modules/forum/model/interface"; +import { + Badge, + Box, + Divider, + Group, + Paper, + Spoiler, + Stack, + Text, + Title, +} from "@mantine/core"; + +export default function ComponentAdminForum_ViewOneDetailKomentar({ + dataKomentar, +}: { + dataKomentar: MODEL_FORUM_KOMENTAR; +}) { + return ( + <> + + + + Detail Komentar + + + + + + + + + Username:{" "} + + {dataKomentar?.Author?.username} + + + + + {/* */} + + + + +
+ + + + + + + ); +} diff --git a/src/app_modules/admin/forum/component/detail_one_posting.tsx b/src/app_modules/admin/forum/component/detail_one_posting.tsx new file mode 100644 index 00000000..13312433 --- /dev/null +++ b/src/app_modules/admin/forum/component/detail_one_posting.tsx @@ -0,0 +1,73 @@ +"use client"; + +import { MODEL_FORUM_POSTING } from "@/app_modules/forum/model/interface"; +import { + Badge, + Box, + Divider, + Group, + Paper, + Spoiler, + Stack, + Text, + Title, +} from "@mantine/core"; + +export default function ComponentAdminForum_ViewOneDetailPosting({ + dataPosting, +}: { + dataPosting: MODEL_FORUM_POSTING; +}) { + return ( + <> + + + + Detail Posting + + + + + + + + + Username:{" "} + + {dataPosting?.Author?.username} + + + + + {dataPosting?.ForumMaster_StatusPosting?.status} + + + {/* */} + + + + +
+ + + + + + + ); +} diff --git a/src/app_modules/admin/forum/detail/detail_posting.tsx b/src/app_modules/admin/forum/detail/detail_posting.tsx new file mode 100644 index 00000000..904b0fb2 --- /dev/null +++ b/src/app_modules/admin/forum/detail/detail_posting.tsx @@ -0,0 +1,316 @@ +"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 { + MODEL_FORUM_KOMENTAR, + MODEL_FORUM_POSTING, +} from "@/app_modules/forum/model/interface"; +import { + Badge, + Box, + Button, + Center, + Grid, + Group, + Modal, + Pagination, + Paper, + ScrollArea, + Spoiler, + Stack, + Table, + Text, + TextInput, + Title, +} from "@mantine/core"; +import { IconSearch, IconTrash } from "@tabler/icons-react"; +import { IconFlag3 } from "@tabler/icons-react"; +import _ from "lodash"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; +import { adminForum_funDeleteKomentarById } from "../fun/delete/fun_delete_komentar_by_id"; +import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; +import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal"; +import { useDisclosure } from "@mantine/hooks"; +import ComponentAdminGlobal_IsEmptyData from "../../component_global/is_empty_data"; +import { adminForum_getListKomentarById } from "../fun/get/get_list_komentar_by_id"; +import ComponentAdminGlobal_BackButton from "../../component_global/back_button"; +import ComponentAdminForum_ViewOneDetailPosting from "../component/detail_one_posting"; + +export default function AdminForum_DetailPosting({ + listKomentar, + dataPosting, + countKomentar, +}: { + listKomentar: any; + dataPosting: MODEL_FORUM_POSTING; + countKomentar: number; +}) { + return ( + <> + {/*
{JSON.stringify(listKomentar, null, 2)}
*/} + + + + + + + + ); +} + + + +function TableKomentar({ + listKomentar, + postingId, + countKomentar, +}: { + listKomentar: any; + postingId: string; + countKomentar: number; +}) { + const router = useRouter(); + const [data, setData] = useState(listKomentar.data); + const [nPage, setNPage] = useState(listKomentar.nPage); + const [activePage, setActivePage] = useState(1); + const [isSearch, setSearch] = useState(""); + const [isLoadingReport, setLoadingReport] = useState(false); + const [idData, setIdData] = useState(""); + + async function onSearch(s: string) { + setSearch(s); + setActivePage(1); + const loadData = await adminForum_getListKomentarById({ + postingId: postingId, + page: 1, + search: s, + }); + setData(loadData.data as any); + setNPage(loadData.nPage); + } + + async function onPageClick(p: any) { + setActivePage(p); + const loadData = await adminForum_getListKomentarById({ + postingId: postingId, + search: isSearch, + page: p, + }); + setData(loadData.data as any); + setNPage(loadData.nPage); + } + + const rowTable = data?.map((e, i) => ( + + +
+ {e?.Author?.username} +
+ + + + +
+ + + + +
+ + {new Intl.DateTimeFormat(["id-ID"], { dateStyle: "medium" }).format( + e.createdAt + )} + +
+ + +
+ = 3 ? "red" : "black"} + fw={"bold"} + fz={"lg"} + > + {e?.Forum_ReportKomentar.length} + +
+ + + + + + + + + )); + + return ( + <> + + + + + Komentar + + + {`(${countKomentar})`} + + + } + radius={"xl"} + placeholder="Cari komentar" + onChange={(val) => { + onSearch(val.currentTarget.value); + }} + /> + + + {_.isEmpty(data) ? ( + + ) : ( + + + + + + + + + + + + + {rowTable} +
+
Username
+
+
Komentar
+
+
Tgl Komentar
+
+
Total Report
+
+
Aksi
+
+
+
+ { + onPageClick(val); + }} + /> +
+
+ )} +
+ + ); +} + +function ButtonDeleteKomentar({ komentarId }: { komentarId: string }) { + const router = useRouter(); + const [opened, { open, close }] = useDisclosure(false); + const [loadindDel, setLoadingDel] = useState(false); + const [loadingDel2, setLoadingDel2] = useState(false); + + async function onDelete() { + await adminForum_funDeleteKomentarById(komentarId).then((res) => { + if (res.status === 200) { + setLoadingDel(false); + setLoadingDel2(false); + ComponentGlobal_NotifikasiBerhasil(res.message); + close(); + } else { + ComponentGlobal_NotifikasiGagal(res.message); + } + }); + } + return ( + <> + + + Anda yakin menghapus komentar ini ? + + + + + + + + + + ); +} diff --git a/src/app_modules/admin/forum/fun/count/fun_count_komentar_by_id.ts b/src/app_modules/admin/forum/fun/count/fun_count_komentar_by_id.ts new file mode 100644 index 00000000..2ee508d9 --- /dev/null +++ b/src/app_modules/admin/forum/fun/count/fun_count_komentar_by_id.ts @@ -0,0 +1,19 @@ +"use server"; + +import prisma from "@/app/lib/prisma"; + +export default async function adminForum_countKomentarByPostingId({ + postingId, +}: { + postingId: string; +}) { + const count = await prisma.forum_Komentar.count({ + where: { + isActive: true, + forum_PostingId: postingId, + }, + }); + + + return count; +} diff --git a/src/app_modules/admin/forum/fun/count/fun_count_laporan_komentar.ts b/src/app_modules/admin/forum/fun/count/fun_count_laporan_komentar.ts index 9402b709..c78daf1b 100644 --- a/src/app_modules/admin/forum/fun/count/fun_count_laporan_komentar.ts +++ b/src/app_modules/admin/forum/fun/count/fun_count_laporan_komentar.ts @@ -6,6 +6,9 @@ export async function adminForum_countLaporanKomentar() { const count = await prisma.forum_ReportKomentar.count({ where: { isActive: true, + Forum_Komentar: { + isActive: true, + }, }, }); diff --git a/src/app_modules/admin/forum/fun/count/fun_count_laporan_posting.ts b/src/app_modules/admin/forum/fun/count/fun_count_laporan_posting.ts index fa673c48..9e88da10 100644 --- a/src/app_modules/admin/forum/fun/count/fun_count_laporan_posting.ts +++ b/src/app_modules/admin/forum/fun/count/fun_count_laporan_posting.ts @@ -6,6 +6,9 @@ export async function adminForum_countLaporanPosting() { const count = await prisma.forum_ReportPosting.count({ where: { isActive: true, + Forum_Posting: { + isActive: true, + }, }, }); diff --git a/src/app_modules/admin/forum/fun/count/fun_count_publish.ts b/src/app_modules/admin/forum/fun/count/fun_count_publish.ts index c5fde5de..2042cc7e 100644 --- a/src/app_modules/admin/forum/fun/count/fun_count_publish.ts +++ b/src/app_modules/admin/forum/fun/count/fun_count_publish.ts @@ -6,7 +6,9 @@ export async function adminForum_countPublish() { const count = await prisma.forum_Posting.count({ where: { isActive: true, + }, + }); return count; diff --git a/src/app_modules/admin/forum/fun/delete/fun_delete_komentar_by_id.ts b/src/app_modules/admin/forum/fun/delete/fun_delete_komentar_by_id.ts index 796be1cf..6a99d4a3 100644 --- a/src/app_modules/admin/forum/fun/delete/fun_delete_komentar_by_id.ts +++ b/src/app_modules/admin/forum/fun/delete/fun_delete_komentar_by_id.ts @@ -14,6 +14,5 @@ export async function adminForum_funDeleteKomentarById(komentarId: string) { }); if (!delTemporary) return { status: 400, message: "Gagal Dihapus" }; - revalidatePath("/dev/admin/forum/children/semua-komentar"); return { status: 200, message: "Berhasil Dihapus" }; } diff --git a/src/app_modules/admin/forum/fun/get/get_all_report_komentar.ts b/src/app_modules/admin/forum/fun/get/get_all_report_komentar.ts new file mode 100644 index 00000000..e365a254 --- /dev/null +++ b/src/app_modules/admin/forum/fun/get/get_all_report_komentar.ts @@ -0,0 +1,98 @@ +"use server"; + +import prisma from "@/app/lib/prisma"; +import { ceil } from "lodash"; + +export default async function adminForum_funGetAllReportKomentar({ + page, + search, +}: { + page: number; + search?: string; +}) { + const takeData = 10; + const skipData = page * takeData - takeData; + + const data = await prisma.forum_ReportKomentar.findMany({ + take: takeData, + skip: skipData, + orderBy: { + createdAt: "desc", + }, + where: { + Forum_Komentar: { + isActive: true, + komentar: { + contains: search, + mode: "insensitive", + }, + }, + }, + select: { + id: true, + isActive: true, + createdAt: true, + deskripsi: true, + forumMaster_KategoriReportId: true, + ForumMaster_KategoriReport: { + select: { + id: true, + title: true, + deskripsi: true, + }, + }, + forum_KomentarId: true, + Forum_Komentar: { + select: { + id: true, + komentar: true, + forum_PostingId: true, + // Forum_Posting: { + // select: { + // id: true, + // diskusi: true, + // ForumMaster_StatusPosting: { + // select: { + // id: true, + // status: true, + // }, + // }, + // Author: { + // select: { + // id: true, + // username: true, + // }, + // }, + // }, + // }, + }, + }, + userId: true, + User: { + select: { + id: true, + username: true, + }, + }, + }, + }); + + const nCount = await prisma.forum_ReportKomentar.count({ + where: { + Forum_Komentar: { + isActive: true, + komentar: { + contains: search, + mode: "insensitive", + }, + }, + }, + }); + + const allData = { + data: data, + nPage: ceil(nCount / takeData), + }; + + return allData; +} diff --git a/src/app_modules/admin/forum/fun/get/get_all_report_posting.ts b/src/app_modules/admin/forum/fun/get/get_all_report_posting.ts new file mode 100644 index 00000000..2cd5332c --- /dev/null +++ b/src/app_modules/admin/forum/fun/get/get_all_report_posting.ts @@ -0,0 +1,95 @@ +"use server"; + +import prisma from "@/app/lib/prisma"; +import { ceil } from "lodash"; + +export default async function adminForum_funGetAllReportPosting({ + page, + search, +}: { + page: number; + search?: string; +}) { + + const takeData = 10 + const skipData = page * takeData - takeData + + const data = await prisma.forum_ReportPosting.findMany({ + take: takeData, + skip: skipData, + orderBy: { + createdAt: "desc", + }, + where: { + Forum_Posting: { + isActive: true, + diskusi: { + contains: search, + mode: "insensitive" + } + }, + + }, + select: { + id: true, + isActive: true, + createdAt: true, + deskripsi: true, + forumMaster_KategoriReportId: true, + ForumMaster_KategoriReport: { + select: { + id: true, + title: true, + deskripsi: true, + }, + }, + + forum_PostingId: true, + Forum_Posting: { + select: { + id: true, + diskusi: true, + ForumMaster_StatusPosting: { + select: { + id: true, + status: true, + } + }, + Author: { + select: { + id: true, + username: true + } + } + }, + }, + userId: true, + User: { + select: { + id: true, + username: true, + }, + }, + }, + }); + + + const nCount = await prisma.forum_ReportPosting.count({ + where: { + Forum_Posting: { + isActive: true, + diskusi: { + contains: search, + mode: "insensitive", + }, + }, + }, + }); + + const allData = { + data: data, + nPage: ceil(nCount / takeData), + }; + + return allData; +} diff --git a/src/app_modules/admin/forum/fun/get/get_list_komentar_by_id.ts b/src/app_modules/admin/forum/fun/get/get_list_komentar_by_id.ts index d2a76ad7..b1e126c8 100644 --- a/src/app_modules/admin/forum/fun/get/get_list_komentar_by_id.ts +++ b/src/app_modules/admin/forum/fun/get/get_list_komentar_by_id.ts @@ -1,15 +1,33 @@ "use server"; import prisma from "@/app/lib/prisma"; +import { ceil } from "lodash"; + +export async function adminForum_getListKomentarById({ + postingId, + page, + search, +}: { + postingId: string; + page: number; + search?: string; +}) { + const takeData = 10; + const skipData = page * takeData - takeData; -export async function adminForum_getListKomentarById(postingId: string) { const data = await prisma.forum_Komentar.findMany({ + take: takeData, + skip: skipData, orderBy: { createdAt: "desc", }, where: { forum_PostingId: postingId, isActive: true, + komentar: { + contains: search, + mode: "insensitive", + }, }, select: { id: true, @@ -20,6 +38,7 @@ export async function adminForum_getListKomentarById(postingId: string) { Author: { select: { id: true, + username: true, Profile: { select: { name: true, @@ -28,9 +47,25 @@ export async function adminForum_getListKomentarById(postingId: string) { }, }, }, - Forum_ReportKomentar: true + Forum_ReportKomentar: true, }, }); - return data; + const nCount = await prisma.forum_Komentar.count({ + where: { + forum_PostingId: postingId, + isActive: true, + komentar: { + contains: search, + mode: "insensitive", + }, + }, + }); + + const allData = { + data: data, + nPage: ceil(nCount / takeData), + }; + + return allData; } diff --git a/src/app_modules/admin/forum/fun/get/get_list_publish.tsx b/src/app_modules/admin/forum/fun/get/get_list_publish.tsx index 028019d2..8a6838e8 100644 --- a/src/app_modules/admin/forum/fun/get/get_list_publish.tsx +++ b/src/app_modules/admin/forum/fun/get/get_list_publish.tsx @@ -1,14 +1,30 @@ "use server"; import prisma from "@/app/lib/prisma"; +import { ceil } from "lodash"; + +export async function adminForum_getListPosting({ + page, + search, +}: { + page: number; + search?: string; +}) { + const takeData = 10; + const skipData = page * takeData - takeData; -export async function adminForum_getListPublish() { const data = await prisma.forum_Posting.findMany({ + take: takeData, + skip: skipData, orderBy: { createdAt: "desc", }, where: { isActive: true, + diskusi: { + contains: search, + mode: "insensitive", + }, }, select: { id: true, @@ -25,12 +41,27 @@ export async function adminForum_getListPublish() { Forum_ReportPosting: true, Forum_Komentar: { where: { - isActive: true - } + isActive: true, + }, }, - ForumMaster_StatusPosting: true + ForumMaster_StatusPosting: true, }, }); - return data; + const nCount = await prisma.forum_Posting.count({ + where: { + isActive: true, + diskusi: { + contains: search, + mode: "insensitive", + }, + }, + }); + + const allData = { + data: data, + nPage: ceil(nCount / takeData), + }; + + return allData; } diff --git a/src/app_modules/admin/forum/fun/get/get_list_report_komentar_by_id.ts b/src/app_modules/admin/forum/fun/get/get_list_report_komentar_by_id.ts index 8f479e14..004c560f 100644 --- a/src/app_modules/admin/forum/fun/get/get_list_report_komentar_by_id.ts +++ b/src/app_modules/admin/forum/fun/get/get_list_report_komentar_by_id.ts @@ -1,9 +1,26 @@ "use server"; import prisma from "@/app/lib/prisma"; +import { ceil } from "lodash"; + +export async function adminForum_getListReportKomentarbyId({ + komentarId, + page, + search, +}: { + komentarId: string; + page: number; + search?: string; +}) { + const takeData = 10; + const skipData = page * takeData - takeData; -export async function adminForum_getListReportKomentarbyId(komentarId: string) { const data = await prisma.forum_ReportKomentar.findMany({ + take: takeData, + skip: skipData, + orderBy: { + createdAt: "desc" + }, where: { forum_KomentarId: komentarId, }, @@ -26,5 +43,16 @@ export async function adminForum_getListReportKomentarbyId(komentarId: string) { }, }); - return data; + const nCount = await prisma.forum_ReportKomentar.count({ + where: { + forum_KomentarId: komentarId, + }, + }); + + const allData = { + data: data, + nPage: ceil(nCount / takeData) + } + + return allData; } diff --git a/src/app_modules/admin/forum/fun/get/get_list_report_posting_by_id.ts b/src/app_modules/admin/forum/fun/get/get_list_report_posting_by_id.ts index 033515a5..03a26f4a 100644 --- a/src/app_modules/admin/forum/fun/get/get_list_report_posting_by_id.ts +++ b/src/app_modules/admin/forum/fun/get/get_list_report_posting_by_id.ts @@ -1,9 +1,24 @@ "use server"; import prisma from "@/app/lib/prisma"; +import { ceil } from "lodash"; + +export async function adminForum_getListReportPostingById({ + postingId, + page, +}: { + postingId: string; + page: number; +}) { + const takeData = 10; + const skipData = page * takeData - takeData; -export async function adminForum_getListReportPostingById(postingId: string) { const data = await prisma.forum_ReportPosting.findMany({ + take: takeData, + skip: skipData, + orderBy: { + createdAt: "desc", + }, where: { forum_PostingId: postingId, }, @@ -13,6 +28,8 @@ export async function adminForum_getListReportPostingById(postingId: string) { createdAt: true, User: { select: { + id: true, + username: true, Profile: { select: { name: true, @@ -30,5 +47,16 @@ export async function adminForum_getListReportPostingById(postingId: string) { }, }); - return data; + const nCount = await prisma.forum_ReportPosting.count({ + where: { + forum_PostingId: postingId, + }, + }); + + const allData = { + data: data, + nPage: ceil(nCount / takeData), + }; + + return allData; } diff --git a/src/app_modules/admin/forum/fun/get/get_one_komentar_by_id.ts b/src/app_modules/admin/forum/fun/get/get_one_komentar_by_id.ts new file mode 100644 index 00000000..f1f0ff57 --- /dev/null +++ b/src/app_modules/admin/forum/fun/get/get_one_komentar_by_id.ts @@ -0,0 +1,31 @@ +"use server"; + +import prisma from "@/app/lib/prisma"; + +export default async function adminForum_funGetOneKomentarById({ + komentarId, +}: { + komentarId: string; +}) { + + const data = await prisma.forum_Komentar.findFirst({ + where: { + id: komentarId, + }, + select: { + id: true, + isActive: true, + authorId: true, + Author: { + select: { + id: true, + username: true, + }, + }, + komentar: true, + forum_PostingId: true, + }, + }); + + return data; +} diff --git a/src/app_modules/admin/forum/fun/get/get_one_posting_by_id.ts b/src/app_modules/admin/forum/fun/get/get_one_posting_by_id.ts index 234f9f21..a84c0949 100644 --- a/src/app_modules/admin/forum/fun/get/get_one_posting_by_id.ts +++ b/src/app_modules/admin/forum/fun/get/get_one_posting_by_id.ts @@ -10,11 +10,20 @@ export async function adminForum_getOnePostingById(postingId: string) { select: { id: true, diskusi: true, + ForumMaster_StatusPosting: { + select: { + id: true, + status: true, + }, + }, + authorId: true, Author: { select: { + id: true, + username: true, Profile: { select: { - name: true + name: true, }, }, }, @@ -22,7 +31,7 @@ export async function adminForum_getOnePostingById(postingId: string) { }, }); -// console.log(data); + // console.log(data); return data; } diff --git a/src/app_modules/admin/forum/hasil_report/komentar/index.tsx b/src/app_modules/admin/forum/hasil_report/komentar/index.tsx deleted file mode 100644 index e9b9156c..00000000 --- a/src/app_modules/admin/forum/hasil_report/komentar/index.tsx +++ /dev/null @@ -1,219 +0,0 @@ -"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_MASTER_REPORT, - MODEL_FORUM_REPORT, -} from "@/app_modules/forum/model/interface"; -import { - Badge, - Box, - Button, - Center, - Group, - Modal, - ScrollArea, - Spoiler, - Stack, - Table, - Text, - Title, -} from "@mantine/core"; -import { IconMessageCircle, IconFlag3, 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 } from "@mantine/hooks"; - -export default function AdminForum_HasilReportKomentar({ - komentarId, - listReport, -}: { - komentarId: string; - listReport: any[]; -}) { - return ( - <> - - - - - - - - {/*
{JSON.stringify(listReport, null, 2)}
*/} -
- - ); -} - -function ButtonDeleteKomentar({ komentarId }: { komentarId: string }) { - const router = useRouter(); - const [opened, { open, close }] = useDisclosure(false); - const [loadindDel, setLoadingDel] = useState(false); - const [loadingDel2, setLoadingDel2] = useState(false); - - async function onDelete() { - await adminForum_funDeleteKomentarById(komentarId).then((res) => { - if (res.status === 200) { - setLoadingDel(false); - setLoadingDel2(false); - close(); - router.back(); - ComponentGlobal_NotifikasiBerhasil(res.message); - } else { - ComponentGlobal_NotifikasiGagal(res.message); - } - }); - } - return ( - <> - - - Anda yakin menghapus komentar ini ? - - - - - - - - - - ); -} - -function HasilReportPosting({ - listReport, -}: { - listReport: MODEL_FORUM_REPORT[]; -}) { - const router = useRouter(); - const [data, setData] = useState(listReport); - - const TableRows = data?.map((e, i) => ( - - -
- {e?.User?.Profile?.name} -
- - -
- - {e?.ForumMaster_KategoriReport?.title - ? e?.ForumMaster_KategoriReport?.title - : "-"} - -
- - - -
- - {e?.ForumMaster_KategoriReport?.deskripsi ? ( - {e?.ForumMaster_KategoriReport?.deskripsi} - ) : ( - - - )} - -
- - - -
- - {e?.deskripsi ? {e?.deskripsi} : -} - -
- - - )); - - return ( - <> - - - - REPORT KOMENTAR - - - - - - - - - - - - - {TableRows} -
-
Author
-
-
Title
-
-
Deskripsi
-
-
Deskripsi Lainnya
-
-
- -
- {_.isEmpty(TableRows) ? ( -
- Tidak Ada Data -
- ) : ( - "" - )} -
-
- - ); -} diff --git a/src/app_modules/admin/forum/hasil_report/posting/index.tsx b/src/app_modules/admin/forum/hasil_report/posting/index.tsx deleted file mode 100644 index 756ba301..00000000 --- a/src/app_modules/admin/forum/hasil_report/posting/index.tsx +++ /dev/null @@ -1,222 +0,0 @@ -"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_MASTER_REPORT, - MODEL_FORUM_REPORT, -} from "@/app_modules/forum/model/interface"; -import { - Badge, - Box, - Button, - Center, - Group, - Modal, - ScrollArea, - Spoiler, - Stack, - Table, - Text, - Title, -} from "@mantine/core"; -import { IconMessageCircle, IconFlag3, 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 { useDisclosure } from "@mantine/hooks"; - -export default function AdminForum_HasilReportPosting({ - postingId, - listReport, -}: { - postingId: string; - listReport: any[]; -}) { - return ( - <> - - - - - - - - {/*
{JSON.stringify(listReport, null, 2)}
*/} -
- - ); -} - -function ButtonDeletePosting({ postingId }: { postingId: string }) { - const router = useRouter(); - const [opened, { open, close }] = useDisclosure(false); - const [loadingDel, setLoadingDel] = useState(false); - const [loadingDel2, setLoadingDel2] = useState(false); - - async function onDelete() { - await adminForum_funDeletePostingById(postingId).then((res) => { - if (res.status === 200) { - setLoadingDel2(false); - setLoadingDel(false); - close(); - router.back(); - ComponentGlobal_NotifikasiBerhasil(res.message); - } else { - ComponentGlobal_NotifikasiGagal(res.message); - } - }); - } - return ( - <> - - - Anda yakin menghapus posting ini - - - - - - - - - ); -} - -function HasilReportPosting({ - listReport, -}: { - listReport: MODEL_FORUM_REPORT[]; -}) { - const router = useRouter(); - const [data, setData] = useState(listReport); - - const TableRows = data?.map((e, i) => ( - - -
- {e?.User?.Profile?.name} -
- - -
- - {e?.ForumMaster_KategoriReport?.title - ? e?.ForumMaster_KategoriReport?.title - : "-"} - -
- - - -
- - {e?.ForumMaster_KategoriReport?.deskripsi ? ( - {e?.ForumMaster_KategoriReport?.deskripsi} - ) : ( - - - )} - -
- - - -
- - {e?.deskripsi ? {e?.deskripsi} : -} - -
- - - )); - - return ( - <> - - - - REPORT POSTING - - - - - - - - - - - - - {TableRows} -
-
Author
-
-
Title
-
-
Deskripsi
-
-
Deskripsi Lainnya
-
-
- -
- {_.isEmpty(TableRows) ? ( -
- Tidak Ada Data -
- ) : ( - "" - )} -
-
- - ); -} diff --git a/src/app_modules/admin/forum/index.tsx b/src/app_modules/admin/forum/index.tsx index 595b747a..df3d8971 100644 --- a/src/app_modules/admin/forum/index.tsx +++ b/src/app_modules/admin/forum/index.tsx @@ -1,17 +1,17 @@ -import AdminForum_Main from "./main"; -import AdminForum_TablePublish from "./child/publish"; -import AdminForum_TableReportKomentar from "./child/report_komentar"; -import AdminForum_TableReportPosting from "./child/report_posting"; -import AdminForum_LihatSemuaKomentar from "./children/semua_komentar"; -import AdminForum_HasilReportPosting from "./hasil_report/posting"; -import AdminForum_HasilReportKomentar from "./hasil_report/komentar"; +import AdminForum_Main from "./main/dashboard"; +import AdminForum_TablePosting from "./sub_menu/table_posting"; +import AdminForum_TableReportPosting from "./sub_menu/table_report_posting"; +import AdminForum_DetailPosting from "./detail/detail_posting"; +import AdminForum_HasilReportPosting from "./sub_detail/hasil_report_posting"; +import AdminForum_HasilReportKomentar from "./sub_detail/hasil_report_komentar"; +import AdminForum_TableReportKomentar from "./sub_menu/table_report_komentar"; export { AdminForum_Main, - AdminForum_TablePublish, - AdminForum_TableReportKomentar, + AdminForum_TablePosting as AdminForum_TablePublish, AdminForum_TableReportPosting, - AdminForum_LihatSemuaKomentar, + AdminForum_DetailPosting as AdminForum_LihatSemuaKomentar, AdminForum_HasilReportPosting, AdminForum_HasilReportKomentar, + AdminForum_TableReportKomentar, }; diff --git a/src/app_modules/admin/forum/main/index.tsx b/src/app_modules/admin/forum/main/dashboard.tsx similarity index 94% rename from src/app_modules/admin/forum/main/index.tsx rename to src/app_modules/admin/forum/main/dashboard.tsx index d17fc5c5..989cadc4 100644 --- a/src/app_modules/admin/forum/main/index.tsx +++ b/src/app_modules/admin/forum/main/dashboard.tsx @@ -23,7 +23,7 @@ export default function AdminForum_Main({ countLaporanKomentar={countLaporanKomentar} /> - {/* */} + {/* */} ); } @@ -46,13 +46,13 @@ function ForumMain({ }, { id: 2, - name: "Laporan Posting", + name: "Report Posting", jumlah: countLaporanPosting, color: "orange", }, { id: 3, - name: "Laporan Komentar", + name: "Report Komentar", jumlah: countLaporanKomentar, color: "red", }, diff --git a/src/app_modules/admin/forum/sub_detail/hasil_report_komentar.tsx b/src/app_modules/admin/forum/sub_detail/hasil_report_komentar.tsx new file mode 100644 index 00000000..bf65a746 --- /dev/null +++ b/src/app_modules/admin/forum/sub_detail/hasil_report_komentar.tsx @@ -0,0 +1,308 @@ +"use client"; + +import ComponentAdminGlobal_HeaderTamplate from "@/app_modules/admin/component_global/header_tamplate"; +import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; +import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal"; +import { + MODEL_FORUM_KOMENTAR, + MODEL_FORUM_REPORT_POSTING +} from "@/app_modules/forum/model/interface"; +import mqtt_client from "@/util/mqtt_client"; +import { + Button, + Center, + Group, + Modal, + Pagination, + Paper, + ScrollArea, + Spoiler, + Stack, + Table, + Text, + Title +} from "@mantine/core"; +import { useDisclosure } from "@mantine/hooks"; +import { + IconTrash +} from "@tabler/icons-react"; +import _ from "lodash"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; +import ComponentAdminGlobal_BackButton from "../../component_global/back_button"; +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, + listReport, + dataKomentar, +}: { + komentarId: string; + listReport: any; + dataKomentar: MODEL_FORUM_KOMENTAR; +}) { + const [data, setData] = useState(dataKomentar); + console.log(komentarId); + + return ( + <> + + + + + { + setData(val); + }} + /> + + + + {/*
{JSON.stringify(listReport, null, 2)}
*/} +
+ + ); +} + +function ButtonDeleteKomentar({ + komentarId, + data, + onSuccess, +}: { + komentarId: string; + data: MODEL_FORUM_KOMENTAR; + onSuccess: (val: any) => void; +}) { + const router = useRouter(); + const [opened, { open, close }] = useDisclosure(false); + const [loadingDel2, setLoadingDel2] = useState(false); + + async function onDelete() { + await adminForum_funDeleteKomentarById(komentarId).then(async (res) => { + if (res.status === 200) { + setLoadingDel2(false); + close(); + + const dataKomentar = await adminForum_funGetOneKomentarById({ + komentarId: komentarId, + }); + onSuccess(dataKomentar); + + const dataNotif = { + appId: data.id, + status: "Report Komentar", + // userId harus sama seperti author + userId: data.authorId, + pesan: data.komentar, + kategoriApp: "FORUM", + title: "Komentar anda telah di laporkan", + }; + + const notif = await adminNotifikasi_funCreateToUser({ + data: dataNotif as any, + }); + if (notif.status === 201) { + mqtt_client.publish( + "USER", + JSON.stringify({ userId: data.authorId, count: 1 }) + ); + } + + ComponentGlobal_NotifikasiBerhasil(res.message); + } else { + ComponentGlobal_NotifikasiGagal(res.message); + } + }); + } + + return ( + <> + + + Anda yakin menghapus komentar ini ? + + + + + + + + {data.isActive ? ( + + ) : ( + "" + )} + + ); +} + +function HasilReportPosting({ + listReport, + komentarId, +}: { + listReport: any; + komentarId: string; +}) { + const router = useRouter(); + const [data, setData] = useState( + listReport.data + ); + const [nPage, setNPage] = useState(listReport.nPage); + const [activePage, setActivePage] = useState(1); + const [isSearch, setSearch] = useState(""); + + async function onPageClick(p: any) { + setActivePage(p); + const loadData = await adminForum_getListReportKomentarbyId({ + komentarId: komentarId, + page: p, + }); + setData(loadData.data as any); + setNPage(loadData.nPage); + } + + const TableRows = data?.map((e, i) => ( + + +
+ {e?.User?.Profile?.name} +
+ + +
+ + {e?.ForumMaster_KategoriReport?.title + ? e?.ForumMaster_KategoriReport?.title + : "-"} + +
+ + + +
+ + {e?.ForumMaster_KategoriReport?.deskripsi ? ( + {e?.ForumMaster_KategoriReport?.deskripsi} + ) : ( + - + )} + +
+ + + +
+ + {e?.deskripsi ? {e?.deskripsi} : -} + +
+ + + )); + + return ( + <> + + + + Report Komentar + + {/* } + radius={"xl"} + placeholder="Cari postingan" + onChange={(val) => { + onSearch(val.currentTarget.value); + }} + /> */} + + + {_.isEmpty(data) ? ( + + ) : ( + + + + + + + + + + + + + {TableRows} +
+
Username
+
+
Kategori
+
+
Deskripsi
+
+
Deskripsi Lainnya
+
+
+
+ { + onPageClick(val); + }} + /> +
+
+ )} +
+ + ); +} diff --git a/src/app_modules/admin/forum/sub_detail/hasil_report_posting.tsx b/src/app_modules/admin/forum/sub_detail/hasil_report_posting.tsx new file mode 100644 index 00000000..8c83187f --- /dev/null +++ b/src/app_modules/admin/forum/sub_detail/hasil_report_posting.tsx @@ -0,0 +1,286 @@ +"use client"; + +import ComponentAdminGlobal_HeaderTamplate from "@/app_modules/admin/component_global/header_tamplate"; +import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; +import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal"; +import { + MODEL_FORUM_POSTING, + MODEL_FORUM_REPORT_POSTING, +} from "@/app_modules/forum/model/interface"; +import { + Button, + Center, + Group, + Modal, + Pagination, + Paper, + ScrollArea, + Spoiler, + Stack, + Table, + Text, + Title, +} from "@mantine/core"; +import { useDisclosure } from "@mantine/hooks"; +import { IconTrash } from "@tabler/icons-react"; +import _ from "lodash"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; +import ComponentAdminGlobal_BackButton from "../../component_global/back_button"; +import ComponentAdminGlobal_IsEmptyData from "../../component_global/is_empty_data"; +import { adminForum_funDeletePostingById } from "../fun/delete/fun_delete_posting_by_id"; +import { adminForum_getListReportPostingById } from "../fun/get/get_list_report_posting_by_id"; +import ComponentAdminForum_ViewOneDetailPosting from "../component/detail_one_posting"; +import mqtt_client from "@/util/mqtt_client"; +import adminNotifikasi_funCreateToUser from "../../notifikasi/fun/create/fun_create_notif_user"; + +export default function AdminForum_HasilReportPosting({ + dataPosting, + listReport, +}: { + dataPosting: MODEL_FORUM_POSTING; + listReport: any; +}) { + return ( + <> + + + + + + + + + {/*
{JSON.stringify(listReport, null, 2)}
*/} +
+ + ); +} + +function ButtonDeletePosting({ + dataPosting, +}: { + dataPosting: MODEL_FORUM_POSTING; +}) { + 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) { + setLoadingDel2(false); + close(); + router.back(); + + const dataNotif = { + appId: dataPosting.id, + status: "Report Posting", + userId: dataPosting.authorId, + pesan: dataPosting.diskusi, + kategoriApp: "FORUM", + title: "Postingan anda telah di laporkan", + }; + const notif = await adminNotifikasi_funCreateToUser({ + data: dataNotif as any, + }); + if (notif.status === 201) { + mqtt_client.publish( + "USER", + JSON.stringify({ userId: dataPosting.authorId, count: 1 }) + ); + } + + ComponentGlobal_NotifikasiBerhasil(del.message); + } else { + ComponentGlobal_NotifikasiGagal(del.message); + } + } + return ( + <> + + + Anda yakin menghapus posting ini + + + + + + + + + ); +} + +function HasilReportPosting({ + listReport, + postingId, +}: { + listReport: any; + postingId: string; +}) { + const router = useRouter(); + const [data, setData] = useState( + listReport.data + ); + const [nPage, setNPage] = useState(listReport.nPage); + const [activePage, setActivePage] = useState(1); + + async function onPageClick(p: any) { + setActivePage(p); + const loadData = await adminForum_getListReportPostingById({ + postingId: postingId, + page: p, + }); + setData(loadData.data as any); + setNPage(loadData.nPage); + } + + const TableRows = data?.map((e, i) => ( + + +
+ {e?.User?.username} +
+ + +
+ + {e?.ForumMaster_KategoriReport?.title + ? e?.ForumMaster_KategoriReport?.title + : "-"} + +
+ + + +
+ + {e?.ForumMaster_KategoriReport?.deskripsi ? ( + {e?.ForumMaster_KategoriReport?.deskripsi} + ) : ( + - + )} + +
+ + + +
+ + {e?.deskripsi ? {e?.deskripsi} : -} + +
+ + + )); + + return ( + <> + + + + Report Postingan + + {/* } + radius={"xl"} + placeholder="Cari postingan" + onChange={(val) => { + onSearch(val.currentTarget.value); + }} + /> */} + + + {_.isEmpty(data) ? ( + + ) : ( + + + + + + + + + + + + + {TableRows} +
+
Username
+
+
Kategori
+
+
Deskripsi
+
+
Deskripsi Lainnya
+
+
+
+ { + onPageClick(val); + }} + /> +
+
+ )} +
+ + ); +} diff --git a/src/app_modules/admin/forum/sub_menu/table_posting.tsx b/src/app_modules/admin/forum/sub_menu/table_posting.tsx new file mode 100644 index 00000000..a681d5d6 --- /dev/null +++ b/src/app_modules/admin/forum/sub_menu/table_posting.tsx @@ -0,0 +1,357 @@ +"use client"; + +import { RouterAdminForum } from "@/app/lib/router_admin/router_admin_forum"; +import { RouterForum } from "@/app/lib/router_hipmi/router_forum"; +import ComponentAdminGlobal_HeaderTamplate from "@/app_modules/admin/component_global/header_tamplate"; +import { MODEL_FORUM_POSTING } from "@/app_modules/forum/model/interface"; +import { + Badge, + Box, + Button, + Center, + Group, + Modal, + Pagination, + Paper, + ScrollArea, + Spoiler, + Stack, + Table, + Text, + TextInput, + Title, +} from "@mantine/core"; +import { IconMessageCircle, IconSearch } from "@tabler/icons-react"; +import { IconFlag3 } from "@tabler/icons-react"; +import { IconEyeCheck, IconTrash } from "@tabler/icons-react"; +import _, { isEmpty } from "lodash"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; +import { adminForum_funDeletePostingById } from "../fun/delete/fun_delete_posting_by_id"; +import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; +import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal"; +import { useDisclosure } from "@mantine/hooks"; +import { adminForum_getListPosting } from "../fun/get/get_list_publish"; +import adminJob_getListPublish from "@/app_modules/admin/job/fun/get/get_list_publish"; +import ComponentAdminForum_ButtonDeletePosting from "../component/button_delete"; +import ComponentAdminGlobal_IsEmptyData from "../../component_global/is_empty_data"; + +export default function AdminForum_TablePosting({ + listPublish, +}: { + listPublish: any; +}) { + return ( + <> + + + + {/*
{JSON.stringify(listPublish, null, 2)}
*/} +
+ + ); +} + +function TablePublish({ listPublish }: { listPublish: any }) { + const router = useRouter(); + const [data, setData] = useState(listPublish.data); + const [nPage, setNPage] = useState(listPublish.nPage); + const [activePage, setActivePage] = useState(1); + const [isSearch, setSearch] = useState(""); + + async function onSearch(s: string) { + setSearch(s); + setActivePage(1); + const loadData = await adminForum_getListPosting({ + page: 1, + search: s, + }); + setData(loadData.data as any); + setNPage(loadData.nPage); + } + + async function onPageClick(p: any) { + setActivePage(p); + const loadData = await adminForum_getListPosting({ + search: isSearch, + page: p, + }); + setData(loadData.data as any); + setNPage(loadData.nPage); + } + + async function onLoadData() { + const loadData = await adminForum_getListPosting({ + page: 1, + }); + setData(loadData.data as any); + setNPage(loadData.nPage); + } + + const TableRows = data?.map((e, i) => ( + + +
+ {e?.Author?.username} +
+ + +
+ + {e?.ForumMaster_StatusPosting?.status} + +
+ + + + +
+ + + + +
+ + {new Intl.DateTimeFormat(["id-ID"], { dateStyle: "medium" }).format( + e.createdAt + )} + +
+ + +
+ + {e?.Forum_Komentar.length} + +
+ + +
+ = 3 ? "red" : "black"} + fw={"bold"} + fz={"lg"} + > + {e?.Forum_ReportPosting.length} + +
+ + + + + { + if (val) { + onLoadData(); + } + }} + /> + + + + )); + + return ( + <> + + + + Posting + + } + radius={"xl"} + placeholder="Cari postingan" + onChange={(val) => { + onSearch(val.currentTarget.value); + }} + /> + + {isEmpty(data) ? ( + + ) : ( + + + + + + + + + + + + + + + {TableRows} +
+
Username
+
+
Status
+
+ Postingan + +
Tanggal Publish
+
+
Komentar Aktif
+
+
Total Report Posting
+
+
Aksi
+
+
+
+ { + onPageClick(val); + }} + /> +
+
+ )} +
+ + ); +} + +function ButtonAction({ postingId }: { postingId: string }) { + const router = useRouter(); + const [loadingKomentar, setLoadingKomentar] = useState(false); + const [loadingReport, setLoadingReport] = useState(false); + + return ( + <> + + + + ); +} + +// function ButtonDeletePosting({ postingId }: { postingId: string }) { +// const [opened, { open, close }] = useDisclosure(false); +// const [loadingDel, setLoadingDel] = useState(false); +// const [loadingDel2, setLoadingDel2] = useState(false); + +// async function onDelete() { +// await adminForum_funDeletePostingById(postingId).then((res) => { +// if (res.status === 200) { +// setLoadingDel2(false); +// setLoadingDel(false); +// close(); +// ComponentGlobal_NotifikasiBerhasil(res.message); +// } else { +// ComponentGlobal_NotifikasiGagal(res.message); +// } +// }); +// } +// return ( +// <> +// +// +// Anda yakin menghapus posting ini +// +// +// +// +// +// +// +// +// ); +// } diff --git a/src/app_modules/admin/forum/sub_menu/table_report_komentar.tsx b/src/app_modules/admin/forum/sub_menu/table_report_komentar.tsx new file mode 100644 index 00000000..acdfde05 --- /dev/null +++ b/src/app_modules/admin/forum/sub_menu/table_report_komentar.tsx @@ -0,0 +1,261 @@ +"use client"; + +import { RouterAdminForum } from "@/app/lib/router_admin/router_admin_forum"; +import ComponentAdminGlobal_HeaderTamplate from "@/app_modules/admin/component_global/header_tamplate"; +import { + MODEL_FORUM_REPORT_KOMENTAR, + MODEL_FORUM_REPORT_POSTING, +} from "@/app_modules/forum/model/interface"; +import { + Badge, + Box, + Button, + Center, + Group, + Pagination, + Paper, + ScrollArea, + Spoiler, + Stack, + Table, + Text, + TextInput, + Title, +} from "@mantine/core"; +import { IconFlag3, IconSearch } from "@tabler/icons-react"; +import { isEmpty } from "lodash"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; +import ComponentAdminGlobal_IsEmptyData from "../../component_global/is_empty_data"; +import ComponentAdminForum_ButtonDeletePosting from "../component/button_delete"; +import adminForum_funGetAllReportPosting from "../fun/get/get_all_report_posting"; +import { Forum_Komentar } from "@/app_modules/forum"; +import adminForum_funGetAllReportKomentar from "../fun/get/get_all_report_komentar"; +import { useShallowEffect } from "@mantine/hooks"; + +export default function AdminForum_TableReportKomentar({ + listData, +}: { + listData: any; +}) { + return ( + <> + + + + {/*
{JSON.stringify(listPublish, null, 2)}
*/} +
+ + ); +} + +function TableView({ listData }: { listData: any }) { + const router = useRouter(); + const [data, setData] = useState( + listData.data + ); + const [nPage, setNPage] = useState(listData.nPage); + const [activePage, setActivePage] = useState(1); + const [isSearch, setSearch] = useState(""); + + useShallowEffect(() => { + onLoadData({ + onLoad(val) { + setData(val.data as any); + setNPage(val.nPage); + setActivePage(1); + }, + }); + }, [setData, setNPage]); + + async function onLoadData({ onLoad }: { onLoad: (val: any) => void }) { + const loadData = await adminForum_funGetAllReportKomentar({ page: 1 }); + onLoad(loadData); + + // setData(loadData.data as any); + // setNPage(loadData.nPage); + } + + async function onSearch(s: string) { + setSearch(s); + setActivePage(1); + const loadData = await adminForum_funGetAllReportKomentar({ + page: 1, + search: s, + }); + setData(loadData.data as any); + setNPage(loadData.nPage); + } + + async function onPageClick(p: any) { + setActivePage(p); + const loadData = await adminForum_funGetAllReportKomentar({ + search: isSearch, + page: p, + }); + setData(loadData.data as any); + setNPage(loadData.nPage); + } + + const TableRows = data?.map((e, i) => ( + + +
+ {e?.User.username} +
+ + +
+ {e?.forumMaster_KategoriReportId === null ? ( + Lainnya + ) : ( + {e?.ForumMaster_KategoriReport.title} + )} +
+ + + + + +
+ + + + + +
+ + {new Intl.DateTimeFormat(["id-ID"], { dateStyle: "medium" }).format( + e.createdAt + )} + +
+ + + + + {/* */} + + {/* { + if (val) { + onLoadData(); + } + }} + /> */} + + + + )); + + return ( + <> + + + + Report Komentar + + } + radius={"xl"} + placeholder="Cari postingan" + onChange={(val) => { + onSearch(val.currentTarget.value); + }} + /> + + + {isEmpty(data) ? ( + + ) : ( + + + + + + + + + + + + + + + + + + {TableRows} +
+
Pelapor
+
+
Jenis Laporan
+
+ Komentar + +
Tanggal Report
+
+
Aksi
+
+
+
+ { + onPageClick(val); + }} + /> +
+
+ )} +
+ + ); +} + +function ButtonLihatReportLainnya({ komentarId }: { komentarId: string }) { + const router = useRouter(); + const [loading, setLoading] = useState(false); + return ( + <> + + + ); +} diff --git a/src/app_modules/admin/forum/sub_menu/table_report_posting.tsx b/src/app_modules/admin/forum/sub_menu/table_report_posting.tsx new file mode 100644 index 00000000..0dac9b93 --- /dev/null +++ b/src/app_modules/admin/forum/sub_menu/table_report_posting.tsx @@ -0,0 +1,268 @@ +"use client"; + +import { RouterAdminForum } from "@/app/lib/router_admin/router_admin_forum"; +import ComponentAdminGlobal_HeaderTamplate from "@/app_modules/admin/component_global/header_tamplate"; +import { + MODEL_FORUM_REPORT_POSTING +} from "@/app_modules/forum/model/interface"; +import { + Badge, + Box, + Button, + Center, + Group, + Pagination, + Paper, + ScrollArea, + Spoiler, + Stack, + Table, + Text, + TextInput, + Title +} from "@mantine/core"; +import { IconFlag3, IconSearch } from "@tabler/icons-react"; +import { isEmpty } from "lodash"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; +import ComponentAdminGlobal_IsEmptyData from "../../component_global/is_empty_data"; +import ComponentAdminForum_ButtonDeletePosting from "../component/button_delete"; +import adminForum_funGetAllReportPosting from "../fun/get/get_all_report_posting"; + +export default function AdminForum_TableReportPosting({ + listData, +}: { + listData: any; +}) { + return ( + <> + + + + {/*
{JSON.stringify(listPublish, null, 2)}
*/} +
+ + ); +} + +function TableView({ listData }: { listData: any }) { + const router = useRouter(); + const [data, setData] = useState(listData.data); + const [nPage, setNPage] = useState(listData.nPage); + const [activePage, setActivePage] = useState(1); + const [isSearch, setSearch] = useState(""); + + async function onSearch(s: string) { + setSearch(s); + setActivePage(1); + const loadData = await adminForum_funGetAllReportPosting({ + page: 1, + search: s, + }); + setData(loadData.data as any); + setNPage(loadData.nPage); + } + + async function onPageClick(p: any) { + setActivePage(p); + const loadData = await adminForum_funGetAllReportPosting({ + search: isSearch, + page: p, + }); + setData(loadData.data as any); + setNPage(loadData.nPage); + } + + async function onLoadData() { + const loadData = await adminForum_funGetAllReportPosting({ + page: 1, + }); + setData(loadData.data as any); + setNPage(loadData.nPage); + } + + const TableRows = data?.map((e, i) => ( + + +
+ {e?.User.username} +
+ + +
+ {e?.forumMaster_KategoriReportId === null ? ( + Lainnya + ) : ( + {e?.ForumMaster_KategoriReport.title} + )} +
+ + + {/* +
+ {e?.Forum_Posting.Author.username} +
+ + + + + +
+ + + */} + + +
+ + {e?.Forum_Posting.ForumMaster_StatusPosting?.status} + +
+ + + +
+ + {new Intl.DateTimeFormat(["id-ID"], { dateStyle: "medium" }).format( + e.createdAt + )} + +
+ + + + + {/* */} + + {/* { + if (val) { + onLoadData(); + } + }} + /> */} + + + + )); + + return ( + <> + + + + Report Posting + + } + radius={"xl"} + placeholder="Cari postingan" + onChange={(val) => { + + onSearch(val.currentTarget.value); + }} + /> + + + {isEmpty(data) ? ( + + ) : ( + + + + + + + + {/* + */} + + + + + + + {TableRows} +
+
Pelapor
+
+
Jenis Laporan
+
+
Author
+
+ Postingan + +
Status Posting
+
+
Tanggal Report
+
+
Aksi
+
+
+
+ { + onPageClick(val); + }} + /> +
+
+ )} +
+ + ); +} + +function ButtonLihatReportLainnya({ postingId }: { postingId: string }) { + const router = useRouter(); + const [loading, setLoading] = useState(false); + return ( + <> + + + ); +} diff --git a/src/app_modules/admin/investasi/bukti_transfer/layout.tsx b/src/app_modules/admin/investasi/bukti_transfer/layout.tsx index 86297172..3b0c4f86 100644 --- a/src/app_modules/admin/investasi/bukti_transfer/layout.tsx +++ b/src/app_modules/admin/investasi/bukti_transfer/layout.tsx @@ -1,6 +1,6 @@ "use client"; -import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate"; +import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate"; import { AppShell } from "@mantine/core"; import React from "react"; diff --git a/src/app_modules/admin/investasi/halaman_aksi/layout.tsx b/src/app_modules/admin/investasi/halaman_aksi/layout.tsx index cd8624d9..c377be43 100644 --- a/src/app_modules/admin/investasi/halaman_aksi/layout.tsx +++ b/src/app_modules/admin/investasi/halaman_aksi/layout.tsx @@ -1,6 +1,6 @@ "use client"; -import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate"; +import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate"; import { AppShell } from "@mantine/core"; import React from "react"; diff --git a/src/app_modules/admin/investasi/konfirmasi/layout.tsx b/src/app_modules/admin/investasi/konfirmasi/layout.tsx index e0199368..f5e88d03 100644 --- a/src/app_modules/admin/investasi/konfirmasi/layout.tsx +++ b/src/app_modules/admin/investasi/konfirmasi/layout.tsx @@ -1,6 +1,6 @@ "use client"; -import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate"; +import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate"; import { AppShell } from "@mantine/core"; import React from "react"; diff --git a/src/app_modules/admin/investasi/status_transfer/layout.tsx b/src/app_modules/admin/investasi/status_transfer/layout.tsx index d28c0c8a..21088daa 100644 --- a/src/app_modules/admin/investasi/status_transfer/layout.tsx +++ b/src/app_modules/admin/investasi/status_transfer/layout.tsx @@ -1,6 +1,6 @@ "use client"; -import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate"; +import ComponentGlobal_HeaderTamplate from "@/app_modules/_global/header_tamplate"; import { AppShell } from "@mantine/core"; import React from "react"; diff --git a/src/app_modules/admin/job/child/arsip/index.tsx b/src/app_modules/admin/job/child/arsip/index.tsx index e9809966..d09283e0 100644 --- a/src/app_modules/admin/job/child/arsip/index.tsx +++ b/src/app_modules/admin/job/child/arsip/index.tsx @@ -3,7 +3,7 @@ import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; import ComponentAdminGlobal_HeaderTamplate from "@/app_modules/admin/component_global/header_tamplate"; import { AdminEvent_getListPesertaById } from "@/app_modules/admin/event/fun/get/get_list_peserta_by_id"; -import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; +import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan"; import { MODEL_EVENT, MODEL_EVENT_PESERTA, diff --git a/src/app_modules/admin/job/child/publish/index.tsx b/src/app_modules/admin/job/child/publish/index.tsx index 57e97917..dcd0e6fe 100644 --- a/src/app_modules/admin/job/child/publish/index.tsx +++ b/src/app_modules/admin/job/child/publish/index.tsx @@ -114,7 +114,7 @@ function TableStatus({ dataPublish }: { dataPublish: any }) { Lihat ) : ( -
+
Tidak ada poster @@ -176,7 +176,7 @@ function TableStatus({ dataPublish }: { dataPublish: any }) { verticalSpacing={"md"} horizontalSpacing={"md"} p={"md"} - w={1500} + w={"100%"} h={"100%"} striped highlightOnHover diff --git a/src/app_modules/admin/job/child/reject/index.tsx b/src/app_modules/admin/job/child/reject/index.tsx index c18e3829..9302a734 100644 --- a/src/app_modules/admin/job/child/reject/index.tsx +++ b/src/app_modules/admin/job/child/reject/index.tsx @@ -2,9 +2,9 @@ import { RouterAdminJob } from "@/app/lib/router_admin/router_admin_job"; import ComponentAdminGlobal_HeaderTamplate from "@/app_modules/admin/component_global/header_tamplate"; -import ComponentGlobal_InputCountDown from "@/app_modules/component_global/input_countdown"; -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 ComponentGlobal_InputCountDown from "@/app_modules/_global/component/input_countdown"; +import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; +import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal"; import { MODEL_JOB } from "@/app_modules/job/model/interface"; import { Button, @@ -249,7 +249,7 @@ function TableStatus({ listReject }: { listReject: any }) { verticalSpacing={"md"} horizontalSpacing={"md"} p={"md"} - w={1500} + w={"100%"} h={"100%"} striped highlightOnHover diff --git a/src/app_modules/admin/job/child/review/index.tsx b/src/app_modules/admin/job/child/review/index.tsx index e3805437..8ba765d3 100644 --- a/src/app_modules/admin/job/child/review/index.tsx +++ b/src/app_modules/admin/job/child/review/index.tsx @@ -3,8 +3,8 @@ import { RouterAdminJob } from "@/app/lib/router_admin/router_admin_job"; import ComponentAdminGlobal_HeaderTamplate from "@/app_modules/admin/component_global/header_tamplate"; import adminNotifikasi_funCreateToUser from "@/app_modules/admin/notifikasi/fun/create/fun_create_notif_user"; -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 { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; +import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal"; import { MODEL_JOB } from "@/app_modules/job/model/interface"; import mqtt_client from "@/util/mqtt_client"; import { @@ -37,7 +37,7 @@ import { AdminJob_funEditCatatanById } from "../../fun/edit/fun_edit_catatan_by_ import { AdminJob_funEditStatusPublishById } from "../../fun/edit/fun_edit_status_publish_by_id"; import adminJob_getListReview from "../../fun/get/get_list_review"; import { IconPhotoCheck } from "@tabler/icons-react"; -import ComponentGlobal_InputCountDown from "@/app_modules/component_global/input_countdown"; +import ComponentGlobal_InputCountDown from "@/app_modules/_global/component/input_countdown"; export default function AdminJob_TableReview({ dataReview, @@ -278,7 +278,7 @@ function TableStatus({ listReview }: { listReview: any }) { verticalSpacing={"md"} horizontalSpacing={"md"} p={"md"} - w={1500} + w={"100%"} h={"100%"} striped highlightOnHover @@ -375,6 +375,7 @@ async function onReject({ if (reject.status === 200) { const loadData = await adminJob_getListReview({ page: 1 }); onLoadData(loadData); + ComponentGlobal_NotifikasiBerhasil(reject.message); const dataNotif = { @@ -393,7 +394,7 @@ async function onReject({ if (notif.status === 201) { mqtt_client.publish( "USER", - JSON.stringify({ userId: reject?.data?.authorId, count: 1 }) + JSON.stringify({ userId: dataNotif.userId, count: 1 }) ); } } else { diff --git a/src/app_modules/admin/job/detail/detail_poster.tsx b/src/app_modules/admin/job/detail/detail_poster.tsx index a3757528..49b9dfa9 100644 --- a/src/app_modules/admin/job/detail/detail_poster.tsx +++ b/src/app_modules/admin/job/detail/detail_poster.tsx @@ -2,7 +2,7 @@ import { RouterJob } from "@/app/lib/router_hipmi/router_job"; import { Center, Image, Stack } from "@mantine/core"; -import ComponentGlobalAdmin_BackButton from "../../component_global/back_button"; +import ComponentAdminGlobal_BackButton from "../../component_global/back_button"; export default function AdminJob_DetailPoster({ imageId, @@ -12,7 +12,7 @@ export default function AdminJob_DetailPoster({ return ( <> - +
Foto { e?.kategoriApp === "JOB" && - findRouterJob({ + adminNotifikasi_findRouterJob({ data: e, router: router, - onChangeNavbar2: (val: any) => { + onChangeNavbar: (val: any) => { onChangeNavbar(val); }, - onToggleNavbar2: onToggleNavbar, + onToggleNavbar: onToggleNavbar, + }); + + e?.kategoriApp === "FORUM" && + adminNotifikasi_findRouterForum({ + data: e, + router: router, + onChangeNavbar(val) { + onChangeNavbar(val); + }, + onToggleNavbar(val) { + onToggleNavbar(val); + }, }); const updateIsRead = await adminNotifikasi_funUpdateIsReadById({ @@ -480,35 +494,3 @@ function DrawerNotifikasi({ ); } - -async function findRouterJob({ - data, - router, - onChangeNavbar2, - onToggleNavbar2, -}: { - data: MODEL_NOTIFIKASI; - router: AppRouterInstance; - onChangeNavbar2: (val: any) => void; - onToggleNavbar2: (val: any) => void; -}) { - const routeName = "/dev/admin/job/child/"; - - if (data.status === "Review") { - router.push(routeName + _.lowerCase(data.status)); - onChangeNavbar2({ - id: 6, - childId: 63, - }); - } - - if (data.status === "Draft") { - router.push(routeName + "review"); - onChangeNavbar2({ - id: 6, - childId: 63, - }); - } - - onToggleNavbar2(true); -} diff --git a/src/app_modules/admin/list_page.tsx b/src/app_modules/admin/list_page.tsx index 583b3244..d7e09358 100644 --- a/src/app_modules/admin/list_page.tsx +++ b/src/app_modules/admin/list_page.tsx @@ -229,18 +229,18 @@ export const listAdminPage = [ { id: 72, name: "Table Posting", - path: RouterAdminForum.publish, + path: RouterAdminForum.table_posting, + }, + { + id: 73, + name: "Report Posting", + path: RouterAdminForum.table_report_posting, + }, + { + id: 74, + name: "Report Komentar", + path: RouterAdminForum.table_report_komentar, }, - // { - // id: 73, - // name: "Laporan Posting", - // path: RouterAdminForum.report_posting, - // }, - // { - // id: 74, - // name: "Laporan Komentar", - // path: RouterAdminForum.report_komentar, - // }, ], }, diff --git a/src/app_modules/admin/notifikasi/route_setting/forum.ts b/src/app_modules/admin/notifikasi/route_setting/forum.ts new file mode 100644 index 00000000..99dd044a --- /dev/null +++ b/src/app_modules/admin/notifikasi/route_setting/forum.ts @@ -0,0 +1,33 @@ +import { RouterAdminForum } from "@/app/lib/router_admin/router_admin_forum"; +import { MODEL_NOTIFIKASI } from "@/app_modules/notifikasi/model/interface"; +import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime"; + +export default async function adminNotifikasi_findRouterForum({ + data, + router, + onChangeNavbar, + onToggleNavbar, +}: { + data: MODEL_NOTIFIKASI; + router: AppRouterInstance; + onChangeNavbar: (val: any) => void; + onToggleNavbar: (val: any) => void; +}) { + 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, + }); + } +} diff --git a/src/app_modules/admin/notifikasi/route_setting/job.ts b/src/app_modules/admin/notifikasi/route_setting/job.ts new file mode 100644 index 00000000..badc572e --- /dev/null +++ b/src/app_modules/admin/notifikasi/route_setting/job.ts @@ -0,0 +1,35 @@ +import { MODEL_NOTIFIKASI } from "@/app_modules/notifikasi/model/interface"; +import _ from "lodash"; +import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime"; + +export default async function adminNotifikasi_findRouterJob({ + data, + router, + onChangeNavbar, + onToggleNavbar, +}: { + data: MODEL_NOTIFIKASI; + router: AppRouterInstance; + onChangeNavbar: (val: any) => void; + onToggleNavbar: (val: any) => void; +}) { + const routeName = "/dev/admin/job/child/"; + + if (data.status === "Review") { + router.push(routeName + _.lowerCase(data.status)); + onChangeNavbar({ + id: 6, + childId: 63, + }); + } + + if (data.status === "Draft") { + router.push(routeName + "review"); + onChangeNavbar({ + id: 6, + childId: 63, + }); + } + + onToggleNavbar(true); +} diff --git a/src/app_modules/admin/user-access/view/index.tsx b/src/app_modules/admin/user-access/view/index.tsx index 3180cda9..c8b7d527 100644 --- a/src/app_modules/admin/user-access/view/index.tsx +++ b/src/app_modules/admin/user-access/view/index.tsx @@ -17,8 +17,8 @@ import { IconSearch } from "@tabler/icons-react"; import adminUserAccess_funEditAccess from "../fun/edit/fun_edit_access"; import { useState } from "react"; import adminUserAccess_getListUser from "../fun/get/get_list_all_user"; -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 { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; +import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal"; export default function AdminUserAccess_View({ listUser }: { listUser: any }) { const [data, setData] = useState(listUser.data); diff --git a/src/app_modules/admin/vote/child/riwayat/index.tsx b/src/app_modules/admin/vote/child/riwayat/index.tsx index e1f513c8..84d76f3b 100644 --- a/src/app_modules/admin/vote/child/riwayat/index.tsx +++ b/src/app_modules/admin/vote/child/riwayat/index.tsx @@ -3,7 +3,7 @@ import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; import ComponentAdminGlobal_HeaderTamplate from "@/app_modules/admin/component_global/header_tamplate"; import { AdminEvent_getListPesertaById } from "@/app_modules/admin/event/fun/get/get_list_peserta_by_id"; -import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; +import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan"; import { MODEL_VOTING } from "@/app_modules/vote/model/interface"; import { Stack, diff --git a/src/app_modules/admin/vote/child/table_publish/index.tsx b/src/app_modules/admin/vote/child/table_publish/index.tsx index ddc2224b..de6d2c9f 100644 --- a/src/app_modules/admin/vote/child/table_publish/index.tsx +++ b/src/app_modules/admin/vote/child/table_publish/index.tsx @@ -3,7 +3,7 @@ import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; import ComponentAdminGlobal_HeaderTamplate from "@/app_modules/admin/component_global/header_tamplate"; import { AdminEvent_getListPesertaById } from "@/app_modules/admin/event/fun/get/get_list_peserta_by_id"; -import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; +import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan"; import { MODEL_EVENT, MODEL_EVENT_PESERTA, diff --git a/src/app_modules/admin/vote/child/table_reject/index.tsx b/src/app_modules/admin/vote/child/table_reject/index.tsx index 5e7b544e..e396446b 100644 --- a/src/app_modules/admin/vote/child/table_reject/index.tsx +++ b/src/app_modules/admin/vote/child/table_reject/index.tsx @@ -29,8 +29,8 @@ import { useRouter } from "next/navigation"; import { useState } from "react"; import { AdminVote_funEditCatatanRejectById } from "../../fun/edit/fun_edit_catatan_reject_by_id"; import { AdminVote_getListTableByStatusId } from "../../fun/get/get_list_table_by_status_id"; -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 { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; +import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal"; export default function AdminVote_TableReject({ dataVote, diff --git a/src/app_modules/admin/vote/child/table_review/index.tsx b/src/app_modules/admin/vote/child/table_review/index.tsx index 643466cb..db8463bf 100644 --- a/src/app_modules/admin/vote/child/table_review/index.tsx +++ b/src/app_modules/admin/vote/child/table_review/index.tsx @@ -32,10 +32,10 @@ import { useState } from "react"; import { AdminVote_funEditStatusPublishById } from "../../fun/edit/fun_edit_status_publish_by_id"; import toast from "react-simple-toasts"; import { AdminVote_getListTableByStatusId } from "../../fun/get/get_list_table_by_status_id"; -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 { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; +import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal"; import { AdminEvent_funEditCatatanById } from "../../fun/edit/fun_edit_status_reject_by_id"; -import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; +import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan"; import moment from "moment"; export default function AdminVote_TableReview({ diff --git a/src/app_modules/auth/index.ts b/src/app_modules/auth/index.ts index 97d3dd97..e7f9843f 100644 --- a/src/app_modules/auth/index.ts +++ b/src/app_modules/auth/index.ts @@ -1,15 +1,13 @@ import SplashScreen from "./splash/view"; import Login from "./login/view"; import Validasi from "./validasi/view"; -import LayoutValidasi from "./validasi/layout"; import Register from "./register/view"; -import User_Logout from "./logout/view"; +import Component_Logout from "./logout/view"; export { SplashScreen, Login, Validasi, Register, - User_Logout as Logout, - LayoutValidasi, + Component_Logout as Logout, }; diff --git a/src/app_modules/auth/login/view.tsx b/src/app_modules/auth/login/view.tsx index a8dfc89f..c7bf866b 100644 --- a/src/app_modules/auth/login/view.tsx +++ b/src/app_modules/auth/login/view.tsx @@ -1,6 +1,7 @@ "use client"; import { + BackgroundImage, Box, Button, Center, @@ -18,12 +19,17 @@ import { useRouter } from "next/navigation"; import { useState } from "react"; import { useAtom } from "jotai"; import { gs_kodeId } from "../state/state"; -import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; +import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan"; import { auth_funLogin } from "@/app_modules/auth/fun/fun_login"; import { RouterAuth } from "@/app/lib/router_hipmi/router_auth"; -import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil"; +import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; import { PhoneInput } from "react-international-phone"; import "react-international-phone/style.css"; +import { + AccentColor, + MainColor, +} from "@/app_modules/_global/color/color_pallet"; +import ComponentGlobal_ErrorInput from "@/app_modules/_global/component/error_input"; export default function Login() { const router = useRouter(); @@ -31,15 +37,12 @@ export default function Login() { const focusTrapRef = useFocusTrap(); const [phone, setPhone] = useState(""); const [loading, setLoading] = useState(false); + const [isError, setError] = useState(false); async function onLogin() { - // if (nomor.length < 10) - // return ComponentGlobal_NotifikasiPeringatan("Nomor minimal 10 digit"); - // if (nomor.length > 13) - // return ComponentGlobal_NotifikasiPeringatan("Nomor maximal 13 digit"); - const nomorHp = phone.substring(1); - // console.log(nomorHp) + + if (nomorHp.length <= 4) return setError(true); await auth_funLogin(nomorHp).then((res) => { if (res.status === 200) { @@ -79,27 +82,24 @@ export default function Login() { return ( <> - -
- -
- logo -
- - Selamat Datang di HIPMI App - - Silahkan masukan nomor telepon anda untuk masuk ! - - + + + + + WELCOME TO + + HIPMI APPS + + +
+ Nomor telepon +
{ @@ -107,20 +107,31 @@ export default function Login() { }} /> + {isError ? ( + + ) : ( + "" + )} +
-
-
+ + ); } diff --git a/src/app_modules/auth/logout/view.tsx b/src/app_modules/auth/logout/view.tsx index 51524892..e0a3dc33 100644 --- a/src/app_modules/auth/logout/view.tsx +++ b/src/app_modules/auth/logout/view.tsx @@ -1,24 +1,32 @@ "use client"; -import { ActionIcon, Button, Group, Modal, Stack, Title } from "@mantine/core"; +import { + ActionIcon, + Button, + Group, + Modal, + Stack, + Text, + Title, +} from "@mantine/core"; import { useRouter } from "next/navigation"; import { useAtom } from "jotai"; import { gs_kodeId, gs_nomor, gs_otp } from "../state/state"; import { IconLogout } from "@tabler/icons-react"; import { Warna } from "@/app/lib/warna"; import { useDisclosure } from "@mantine/hooks"; -import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil"; +import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; import { auth_Logout } from "../fun/fun_logout"; -import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; +import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan"; import { RouterAuth } from "@/app/lib/router_hipmi/router_auth"; import { useState } from "react"; +import UIGlobal_Modal from "@/app_modules/_global/ui/ui_modal"; -export default function User_Logout() { +export default function Component_Logout() { const router = useRouter(); - const [opened, { toggle }] = useDisclosure(false); + const [opened, setOpened] = useState(false); const [kodeId, setKodeId] = useAtom(gs_kodeId); const [loading, setLoading] = useState(false); - const [loading2, setLoading2] = useState(false); async function onClickLogout() { // await auth_Logout(kodeId).then((res) => { @@ -36,50 +44,52 @@ export default function User_Logout() { return ( <> - - - Anda yakin ingin keluar ? - - - - - - - {/* - - */} - + { + setLoading(false); + setOpened(false); + }} + radius={50} + > + Batal + + } + buttonKanan={ + + } + opened={opened} + close={() => setOpened(false)} + /> + + + { + setOpened(true); + }} + > + + + + Keluar + + ); } diff --git a/src/app_modules/auth/register/view.tsx b/src/app_modules/auth/register/view.tsx index 9b0012a5..2e8fc7fa 100644 --- a/src/app_modules/auth/register/view.tsx +++ b/src/app_modules/auth/register/view.tsx @@ -10,8 +10,13 @@ import { Center, PinInput, Stack, + BackgroundImage, } from "@mantine/core"; -import { IconCircleLetterH, IconCloudLockOpen } from "@tabler/icons-react"; +import { + IconCircleLetterH, + IconCloudLockOpen, + IconUserCircle, +} from "@tabler/icons-react"; import { gs_nomor } from "../state/state"; import { useAtom } from "jotai"; import { useState } from "react"; @@ -22,12 +27,16 @@ import { useRouter } from "next/navigation"; import _ from "lodash"; import { useFocusTrap } from "@mantine/hooks"; import { Auth_funRegister } from "../fun/fun_register"; -import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; -import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil"; +import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan"; +import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; import { IconPencilCheck } from "@tabler/icons-react"; import { RouterHome } from "@/app/lib/router_hipmi/router_home"; import { auth_funEditAktivasiKodeOtpById } from "../fun/fun_edit_aktivasi_kode_otp_by_id"; -import ComponentGlobal_ErrorInput from "@/app_modules/component_global/error_input"; +import ComponentGlobal_ErrorInput from "@/app_modules/_global/component/error_input"; +import { + AccentColor, + MainColor, +} from "@/app_modules/_global/color/color_pallet"; export default function Register({ dataOtp }: { dataOtp: any }) { const router = useRouter(); @@ -57,7 +66,7 @@ export default function Register({ dataOtp }: { dataOtp: any }) { if (val.status === 200) { ComponentGlobal_NotifikasiBerhasil(res.message); setLoading(true); - router.push(RouterHome.main_home); + router.push(RouterHome.main_home, { scroll: false }); } else { ComponentGlobal_NotifikasiPeringatan(val.message); } @@ -71,25 +80,26 @@ export default function Register({ dataOtp }: { dataOtp: any }) { return ( <> {/*
{JSON.stringify(dataOtp,null,2)}
*/} + +
+ + + REGISTRASI + -
- -
- -
+ - - - REGISTRASI - Masukan username anda ! - - + + + Anda akan terdaftar dengan nomor berikut{" "} + + +{nomor} + + - - Anda akan terdaftar dengan nomor berikut{" "} - - +{nomor} - - - - - - + + + - -
+
+
); } diff --git a/src/app_modules/auth/splash/view.tsx b/src/app_modules/auth/splash/view.tsx index 80df56af..30d5e934 100644 --- a/src/app_modules/auth/splash/view.tsx +++ b/src/app_modules/auth/splash/view.tsx @@ -1,50 +1,47 @@ "use client"; -import { - AspectRatio, - Box, - Center, - Flex, - Image, - Paper, - Stack, - Text, - Title, -} from "@mantine/core"; +import { MainColor } from "@/app_modules/_global/color/color_pallet"; +import UIGlobal_SplashScreen from "@/app_modules/_global/ui/ui_splash"; +import { BackgroundImage, Center, Image, Paper, Stack } from "@mantine/core"; import { useShallowEffect } from "@mantine/hooks"; import { useRouter } from "next/navigation"; -import { useState } from "react"; export default function SplashScreen({ data }: { data: any }) { const router = useRouter(); - const [val, setVal] = useState(false); useShallowEffect(() => { if (!data) { setTimeout(() => { - return router.push("/dev/auth/login"); - }, 2000); + return router.push("/dev/auth/login", { scroll: false }); + }, 1000); } else { setTimeout(() => { - return router.push("/dev/home"); - }, 2000); + return router.push("/dev/home", { scroll: false }); + }, 1000); } }, []); + return ( <> -
- - {/* Welcome to */} - - - - -
+ +
+ + {/* Welcome to */} + + + + +
+
); } diff --git a/src/app_modules/auth/validasi/layout.tsx b/src/app_modules/auth/validasi/layout.tsx deleted file mode 100644 index 9e611223..00000000 --- a/src/app_modules/auth/validasi/layout.tsx +++ /dev/null @@ -1,34 +0,0 @@ -"use client"; - -import { ActionIcon, Box, Stack } from "@mantine/core"; -import { IconChevronLeft } from "@tabler/icons-react"; -import { useRouter } from "next/navigation"; -import React from "react"; - -export default function LayoutValidasi({ - children, -}: { - children: React.ReactNode; -}) { - const router = useRouter(); - - return ( - - - router.back()}> - - - - {children} - - ); -} - diff --git a/src/app_modules/auth/validasi/view.tsx b/src/app_modules/auth/validasi/view.tsx index 083882f2..502b62c7 100644 --- a/src/app_modules/auth/validasi/view.tsx +++ b/src/app_modules/auth/validasi/view.tsx @@ -1,41 +1,31 @@ "use client"; -import { useAtom } from "jotai"; +import { RouterAdminDashboard } from "@/app/lib/router_hipmi/router_admin"; +import { RouterAuth } from "@/app/lib/router_hipmi/router_auth"; +import { RouterHome } from "@/app/lib/router_hipmi/router_home"; +import { + AccentColor, + MainColor, +} from "@/app_modules/_global/color/color_pallet"; +import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; +import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan"; import { ActionIcon, + BackgroundImage, + Box, Button, Center, - Flex, PinInput, Stack, Text, Title, } from "@mantine/core"; -import { gs_nomor, gs_otp } from "../state/state"; -import { Warna } from "@/app/lib/warna"; -import { useState } from "react"; -import { myConsole } from "@/app/fun/my_console"; -import { - IconChevronLeft, - IconCircleLetterH, - IconCloudLockOpen, -} from "@tabler/icons-react"; -import toast from "react-simple-toasts"; -import { ApiHipmi } from "@/app/lib/api"; -import { useRouter } from "next/navigation"; -import { funGetUserProfile } from "@/app_modules/fun_global/get_user_profile"; import { useFocusTrap } from "@mantine/hooks"; -import { NotifBerhasil } from "@/app_modules/donasi/component/notifikasi/notif_berhasil"; -import { NotifGagal } from "@/app_modules/donasi/component/notifikasi/notif_gagal"; -import { NotifPeringatan } from "@/app_modules/donasi/component/notifikasi/notif_peringatan"; -import Countdown from "react-countdown"; -import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; -import { auth_funValidasi } from "../fun/fun_validasi"; -import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil"; -import { RouterAuth } from "@/app/lib/router_hipmi/router_auth"; -import { RouterHome } from "@/app/lib/router_hipmi/router_home"; +import { IconChevronLeft } from "@tabler/icons-react"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; import { auth_funEditAktivasiKodeOtpById } from "../fun/fun_edit_aktivasi_kode_otp_by_id"; -import { RouterAdminDashboard } from "@/app/lib/router_hipmi/router_admin"; +import { auth_funValidasi } from "../fun/fun_validasi"; export default function Validasi({ dataOtp }: { dataOtp: any }) { const router = useRouter(); @@ -45,37 +35,6 @@ export default function Validasi({ dataOtp }: { dataOtp: any }) { const focusTrapRef = useFocusTrap(); const [loading, setLoading] = useState(false); - const onValid = async () => { - // MyConsole(inputCode) - const body = { - nomor: nomor, - otp: code, - }; - - if (!inputCode) return toast("Lengkapi Kode"); - if (body.otp != inputCode) return toast("Kode Salah"); - - // await fetch(ApiHipmi.validasi, { - // method: "POST", - // headers: { - // "Content-Type": "application/json", - // }, - // body: JSON.stringify(body), - // }) - // .then((res) => res.json()) - // .then((val) => { - // myConsole(val); - // if (val.status == 200) { - // setTimeout(() => router.push("/dev/home"), 2000); - // funGetUserProfile(val.data.id); - // NotifBerhasil("Berhasil Login"); - // } else { - // router.push("/dev/auth/register"); - // NotifPeringatan("Silahkan Registrasi"); - // } - // }); - }; - async function onVerifikasi() { if (!inputCode) return ComponentGlobal_NotifikasiPeringatan("Lengkapi Kode"); @@ -89,7 +48,7 @@ export default function Validasi({ dataOtp }: { dataOtp: any }) { if (res.role === "1") { ComponentGlobal_NotifikasiBerhasil(res.message); setLoading(true); - router.push(RouterHome.main_home); + router.push(RouterHome.main_home, {scroll: false}); } else { router.push(RouterAdminDashboard.splash_admin); } @@ -106,51 +65,74 @@ export default function Validasi({ dataOtp }: { dataOtp: any }) { return ( <> -
- -
- -
+ + + + router.back()}> + + + - - - Verifikasi Kode OTP - - Silahkan masukan 4 digit kode otp yang dikirim ke{" "} + + + Verifikasi Kode OTP + + + + + Masukan 4 digit kode otp + + + Yang dikirim ke{" "} + {" "} +{nomor} +
+ { + setInputOtp(val); + }} + /> +
- -
- { - setInputOtp(val); - }} - /> -
- - - +
-
+ ); } diff --git a/src/app_modules/colab/component/card_view/card_beranda.tsx b/src/app_modules/colab/component/card_view/card_beranda.tsx new file mode 100644 index 00000000..1c1ecbf3 --- /dev/null +++ b/src/app_modules/colab/component/card_view/card_beranda.tsx @@ -0,0 +1,53 @@ +import { RouterColab } from "@/app/lib/router_hipmi/router_colab"; +import { AccentColor } from "@/app_modules/_global/color/color_pallet"; +import { Card, Stack } from "@mantine/core"; +import { MODEL_COLLABORATION } from "../../model/interface"; +import ComponentColab_CardSectionData from "./card_section_data"; +import ComponentColab_CardSectionHeaderAuthorName from "./card_section_header_author_name"; +import ComponentColab_JumlahPartisipan from "./card_section_jumlah_partisipan"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; + +export function ComponentColab_CardBeranda({ + data, + userLoginId, +}: { + data: MODEL_COLLABORATION; + userLoginId: string; +}) { + const router = useRouter(); + const [loadingCreate, setLoadingCreate] = useState(false); + + return ( + <> + + + + + + + + + ); +} diff --git a/src/app_modules/colab/component/card_view/card_proyek_saya.tsx b/src/app_modules/colab/component/card_view/card_proyek_saya.tsx new file mode 100644 index 00000000..e99d4415 --- /dev/null +++ b/src/app_modules/colab/component/card_view/card_proyek_saya.tsx @@ -0,0 +1,34 @@ +import { RouterColab } from "@/app/lib/router_hipmi/router_colab"; +import { Card, Stack } from "@mantine/core"; +import ComponentColab_CardSectionData from "./card_section_data"; +import ComponentColab_JumlahPartisipan from "./card_section_jumlah_partisipan"; +import { MODEL_COLLABORATION } from "../../model/interface"; +import { AccentColor } from "@/app_modules/_global/color/color_pallet"; + +export function ComponentColab_CardProyekSaya({data, path}: {data: MODEL_COLLABORATION, path: string}) { + return ( + <> + + + + + + + + ); +} \ No newline at end of file diff --git a/src/app_modules/colab/component/card_view/card_section_data.tsx b/src/app_modules/colab/component/card_view/card_section_data.tsx index dfe205bd..971efb30 100644 --- a/src/app_modules/colab/component/card_view/card_section_data.tsx +++ b/src/app_modules/colab/component/card_view/card_section_data.tsx @@ -1,11 +1,8 @@ "use client"; -import { RouterColab } from "@/app/lib/router_hipmi/router_colab"; -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; -import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; -import { Card, Center, Title, Stack, Grid, Text } from "@mantine/core"; +import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan"; +import { Card, Center, Grid, Stack, Text, Title } from "@mantine/core"; import { useRouter } from "next/navigation"; -import { useState } from "react"; import { MODEL_COLLABORATION } from "../../model/interface"; export default function ComponentColab_CardSectionData({ diff --git a/src/app_modules/colab/component/card_view/card_section_header_author_name.tsx b/src/app_modules/colab/component/card_view/card_section_header_author_name.tsx index 0110ccb6..b627686b 100644 --- a/src/app_modules/colab/component/card_view/card_section_header_author_name.tsx +++ b/src/app_modules/colab/component/card_view/card_section_header_author_name.tsx @@ -1,6 +1,6 @@ "use client"; -import ComponentGlobal_AuthorNameOnHeader from "@/app_modules/component_global/author_name_on_header"; +import ComponentGlobal_AuthorNameOnHeader from "@/app_modules/_global/author_name_on_header"; import { ActionIcon, Avatar, @@ -13,12 +13,13 @@ import { } from "@mantine/core"; import ComponentColab_AuthorNameOnHeader from "../header_author_name"; import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; -import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; +import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan"; import { useRouter } from "next/navigation"; import { IconDots, IconEdit } from "@tabler/icons-react"; import { RouterColab } from "@/app/lib/router_hipmi/router_colab"; import { useDisclosure } from "@mantine/hooks"; import { useState } from "react"; +import UIGlobal_Drawer from "@/app_modules/_global/ui/ui_drawer"; export default function ComponentColab_CardSectionHeaderAuthorName({ profileId, @@ -93,10 +94,20 @@ function ButtonAction({ colabId: string; }) { const router = useRouter(); - const [opened, setOpened] = useState(false); + const [openDrawe, setOpenDrawer] = useState(false); + + const listPage = [ + { + id: "1", + name: "Edit Proyek", + icon: , + path: RouterColab.edit + colabId, + }, + ]; + return ( <> - - + */} + + setOpenDrawer(true)}> + {isAuthor ? : ""} + + + setOpenDrawer(false)} + component={listPage} + /> ); } diff --git a/src/app_modules/colab/component/card_view/card_semua_partisipan.tsx b/src/app_modules/colab/component/card_view/card_semua_partisipan.tsx new file mode 100644 index 00000000..2354a2af --- /dev/null +++ b/src/app_modules/colab/component/card_view/card_semua_partisipan.tsx @@ -0,0 +1,49 @@ +import { Card, Stack } from "@mantine/core"; +import { + MODEL_COLLABORATION, + MODEL_COLLABORATION_PARTISIPASI, +} from "../../model/interface"; +import { RouterColab } from "@/app/lib/router_hipmi/router_colab"; +import ComponentColab_CardSectionData from "./card_section_data"; +import ComponentColab_CardSectionHeaderAuthorName from "./card_section_header_author_name"; +import ComponentColab_JumlahPartisipan from "./card_section_jumlah_partisipan"; +import { AccentColor } from "@/app_modules/_global/color/color_pallet"; + +export function ComponentColab_CardSemuaPartisipan({ + data, + path, +}: { + data: MODEL_COLLABORATION_PARTISIPASI; + path: string; +}) { + return ( + <> + + + + + + + + + ); +} diff --git a/src/app_modules/colab/component/card_view/crad_grup.tsx b/src/app_modules/colab/component/card_view/crad_grup.tsx new file mode 100644 index 00000000..5b405b30 --- /dev/null +++ b/src/app_modules/colab/component/card_view/crad_grup.tsx @@ -0,0 +1,62 @@ +import { RouterColab } from "@/app/lib/router_hipmi/router_colab"; +import { AccentColor } from "@/app_modules/_global/color/color_pallet"; +import ComponentGlobal_Loader from "@/app_modules/_global/component/loader"; +import { Paper, Grid, Stack, Center, Loader, Text } from "@mantine/core"; +import { IconChevronRight } from "@tabler/icons-react"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; + +export function ComponentColab_CardGrup({ data }: { data: any }) { + const router = useRouter(); + const [loading, setLoading] = useState(false); + const [idRoom, setIdRoom] = useState(""); + + return ( + <> + { + router.push( + RouterColab.group_chat + data?.ProjectCollaboration_RoomChat.id, + { scroll: false } + ); + setIdRoom(data?.ProjectCollaboration_RoomChat.id); + setLoading(true); + }} + > + + + + + {data?.ProjectCollaboration_RoomChat?.name} + + + { + data?.ProjectCollaboration_RoomChat + ?.ProjectCollaboration_AnggotaRoomChat.length + }{" "} + Anggota + + + + +
+ {data?.ProjectCollaboration_RoomChat?.id === idRoom ? ( + + ) : ( + + )} +
+
+
+
+ + ); +} diff --git a/src/app_modules/colab/component/detail/header_author_list_partisipan.tsx b/src/app_modules/colab/component/detail/header_author_list_partisipan.tsx index 29315a21..e9577049 100644 --- a/src/app_modules/colab/component/detail/header_author_list_partisipan.tsx +++ b/src/app_modules/colab/component/detail/header_author_list_partisipan.tsx @@ -1,27 +1,26 @@ "use client"; import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; -import { - Stack, - Grid, - Avatar, - Divider, - Text, - Group, - ActionIcon, - Drawer, - ScrollArea, - Title, - Paper, - Button, -} from "@mantine/core"; -import { useRouter } from "next/navigation"; -import moment from "moment"; -import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; +import { AccentColor } from "@/app_modules/_global/color/color_pallet"; +import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan"; import { MODEL_USER } from "@/app_modules/home/model/interface"; -import { IconEyeCheck, IconZoomCheck } from "@tabler/icons-react"; +import { + ActionIcon, + Avatar, + Button, + Divider, + Drawer, + Grid, + Group, + Paper, + ScrollArea, + Stack, + Text, + Title, +} from "@mantine/core"; import { useDisclosure } from "@mantine/hooks"; -import { IconFileCheck } from "@tabler/icons-react"; +import { IconCaretRight, IconX } from "@tabler/icons-react"; +import { useRouter } from "next/navigation"; export default function ComponentColab_AuthorNameOnListPartisipan({ author, @@ -41,19 +40,52 @@ export default function ComponentColab_AuthorNameOnListPartisipan({ opened={opened} onClose={close} position="bottom" - size={"40vh"} + size={"auto"} withCloseButton={false} + styles={{ + content: { + padding: 0, + position: "absolute", + margin: "auto", + backgroundColor: "transparent", + left: 0, + right: 0, + width: 500, + }, + body: { + backgroundColor: AccentColor.darkblue, + borderTop: `2px solid ${AccentColor.blue}`, + borderRight: `1px solid ${AccentColor.blue}`, + borderLeft: `1px solid ${AccentColor.blue}`, + borderRadius: "20px 20px 0px 0px", + color: "white", + paddingBottom: "5%", + }, + }} > - Deskripsi Diri - + + Deskripsi Diri + + + + + {deskripsi} - + */} @@ -96,7 +128,7 @@ export default function ComponentColab_AuthorNameOnListPartisipan({ radius={"xl"} variant="transparent" > - + ) : ( "" diff --git a/src/app_modules/colab/component/detail/list_partisipasi_user.tsx b/src/app_modules/colab/component/detail/list_partisipasi_user.tsx index ee4a932c..6f9f4153 100644 --- a/src/app_modules/colab/component/detail/list_partisipasi_user.tsx +++ b/src/app_modules/colab/component/detail/list_partisipasi_user.tsx @@ -1,31 +1,34 @@ "use client"; import { - Paper, - Center, - Title, - ScrollArea, + AccentColor, + MainColor, +} from "@/app_modules/_global/color/color_pallet"; +import ComponentGlobal_InputCountDown from "@/app_modules/_global/component/input_countdown"; +import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil"; +import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal"; +import { + ActionIcon, Box, + Button, + Center, + Drawer, + Group, + Paper, + ScrollArea, Stack, Text, - Divider, - Button, - Drawer, Textarea, - Group, + Title } from "@mantine/core"; -import ComponentColab_AuthorNameOnHeader from "../header_author_name"; -import { - MODEL_COLLABORATION_MASTER, - MODEL_COLLABORATION_PARTISIPASI, -} from "../../model/interface"; -import _ from "lodash"; +import { useDisclosure } from "@mantine/hooks"; +import { IconX } from "@tabler/icons-react"; import { useState } from "react"; import colab_funCreatePartisipan from "../../fun/create/fun_create_partisipan_by_user_id"; import colab_getListPartisipanByColabId from "../../fun/get/get_list_partisipan_by_id"; -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 { useDisclosure } from "@mantine/hooks"; +import { + MODEL_COLLABORATION_PARTISIPASI +} from "../../model/interface"; import ComponentColab_AuthorNameOnListPartisipan from "./header_author_list_partisipan"; export default function ComponentColab_DetailListPartisipasiUser({ @@ -71,11 +74,37 @@ export default function ComponentColab_DetailListPartisipasiUser({ opened={opened} onClose={close} position="bottom" - size={"30vh"} + size={"auto"} withCloseButton={false} + styles={{ + content: { + padding: 0, + position: "absolute", + margin: "auto", + backgroundColor: "transparent", + left: 0, + right: 0, + width: 500, + }, + body: { + backgroundColor: AccentColor.darkblue, + borderTop: `2px solid ${AccentColor.blue}`, + borderRight: `1px solid ${AccentColor.blue}`, + borderLeft: `1px solid ${AccentColor.blue}`, + borderRadius: "20px 20px 0px 0px", + color: "white", + paddingBottom: "5%", + }, + }} > - + + + + + +