From 9068631c33450520a7736547effee18bdcda7e76 Mon Sep 17 00:00:00 2001 From: Bagasbanuna02 Date: Tue, 9 Jul 2024 10:25:18 +0800 Subject: [PATCH 1/3] #style: Tampilan home Deskripsi: - Tampilan tamplate layout positionnya di ganti fixed ( tidak bisa di tarik ke bawah jika sudah menjadi aplikasi ) - UI Home selesai - UI User search selesai - UI Notifikasi selesai ## No issuee --- src/app/dev/home/layout.tsx | 20 -- src/app/dev/home/loading.tsx | 9 - src/app/dev/home/page.tsx | 9 +- src/app/dev/notifikasi/page.tsx | 3 +- .../main => user-search}/page.tsx | 4 +- src/app/dev/user_search/main/layout.tsx | 10 - .../lib/router_hipmi/router_user_search.ts | 2 +- src/app/zCoba/page.tsx | 2 +- src/app_modules/auth/splash/view.tsx | 9 +- .../component_global/splash/splash_global.tsx | 6 +- .../ui/ui_header_tamplate.tsx | 16 +- .../ui/ui_layout_tamplate.tsx | 148 ++++++--- .../component_global/ui/ui_loader.tsx | 10 + .../detail_component/ui_report_komentar.tsx | 66 ++++ .../detail_component/ui_report_posting.tsx | 61 ++++ src/app_modules/forum/create/layout.tsx | 10 +- .../forum/detail/detail_report_komentar.tsx | 71 +--- .../forum/detail/detail_report_posting.tsx | 57 +--- src/app_modules/forum/detail/layout.tsx | 10 +- src/app_modules/forum/edit/posting/layout.tsx | 10 +- src/app_modules/forum/forumku/layout.tsx | 10 +- src/app_modules/forum/main/beranda.tsx | 4 +- src/app_modules/forum/main/layout.tsx | 10 +- .../forum/report/komentar/layout.tsx | 10 +- .../forum/report/posting/layout.tsx | 10 +- src/app_modules/forum/splash/index.tsx | 4 +- .../home/component/button_header.tsx | 106 ++++++ .../home/{view.tsx => component/ui_home.tsx} | 193 +++++++++-- src/app_modules/home/index.ts | 5 +- src/app_modules/home/layout.tsx | 310 ------------------ src/app_modules/home/view_home.tsx | 43 +++ src/app_modules/job/create/layout.tsx | 10 +- src/app_modules/job/detail/arsip/layout.tsx | 10 +- src/app_modules/job/detail/draft/layout.tsx | 10 +- src/app_modules/job/detail/main/layout.tsx | 10 +- src/app_modules/job/detail/publish/layout.tsx | 10 +- src/app_modules/job/detail/reject/layout.tsx | 10 +- src/app_modules/job/detail/review/layout.tsx | 10 +- src/app_modules/job/edit/layout.tsx | 10 +- .../job/main/beranda/ui_beranda.tsx | 3 + src/app_modules/job/main/layout.tsx | 10 +- src/app_modules/job/non_user_view/layout.tsx | 10 +- src/app_modules/job/splash/ui_splash.tsx | 2 +- .../notifikasi/component/card_view.tsx | 141 ++++++++ .../notifikasi/component/path/forum.ts | 26 ++ .../notifikasi/component/path/job.ts | 31 ++ .../notifikasi/component/ui_notifiaksi.tsx | 81 +++++ .../fun/get/get_notifiaksi_by_id.ts | 6 +- src/app_modules/notifikasi/index.ts | 2 +- src/app_modules/notifikasi/main/index.tsx | 236 ------------- .../notifikasi/view_notifikasi.tsx | 19 ++ .../user_search/component/is_empty_data.tsx | 13 - .../user_search/component/ui_user_search.tsx | 310 ++++++++++++++++++ .../user_search/fun/get/get_all_user.ts | 58 ++++ .../user_search/fun/get/get_list_user.ts | 59 ---- .../fun/search/fun_search_by_name.ts | 28 -- src/app_modules/user_search/index.ts | 8 +- src/app_modules/user_search/main/index.tsx | 131 -------- src/app_modules/user_search/main/layout.tsx | 22 -- .../user_search/view_user_seach.tsx | 22 ++ src/app_modules/zCoba/index.tsx | 10 +- 61 files changed, 1390 insertions(+), 1156 deletions(-) delete mode 100644 src/app/dev/home/layout.tsx delete mode 100644 src/app/dev/home/loading.tsx rename src/app/dev/{user_search/main => user-search}/page.tsx (52%) delete mode 100644 src/app/dev/user_search/main/layout.tsx create mode 100644 src/app_modules/component_global/ui/ui_loader.tsx create mode 100644 src/app_modules/forum/component/detail_component/ui_report_komentar.tsx create mode 100644 src/app_modules/forum/component/detail_component/ui_report_posting.tsx create mode 100644 src/app_modules/home/component/button_header.tsx rename src/app_modules/home/{view.tsx => component/ui_home.tsx} (58%) delete mode 100644 src/app_modules/home/layout.tsx create mode 100644 src/app_modules/home/view_home.tsx create mode 100644 src/app_modules/notifikasi/component/card_view.tsx create mode 100644 src/app_modules/notifikasi/component/path/forum.ts create mode 100644 src/app_modules/notifikasi/component/path/job.ts create mode 100644 src/app_modules/notifikasi/component/ui_notifiaksi.tsx delete mode 100644 src/app_modules/notifikasi/main/index.tsx create mode 100644 src/app_modules/notifikasi/view_notifikasi.tsx delete mode 100644 src/app_modules/user_search/component/is_empty_data.tsx create mode 100644 src/app_modules/user_search/component/ui_user_search.tsx create mode 100644 src/app_modules/user_search/fun/get/get_all_user.ts delete mode 100644 src/app_modules/user_search/fun/get/get_list_user.ts delete mode 100644 src/app_modules/user_search/fun/search/fun_search_by_name.ts delete mode 100644 src/app_modules/user_search/main/index.tsx delete mode 100644 src/app_modules/user_search/main/layout.tsx create mode 100644 src/app_modules/user_search/view_user_seach.tsx 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 623b464d..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 3469f504..aa3e2356 100644 --- a/src/app/dev/home/page.tsx +++ b/src/app/dev/home/page.tsx @@ -4,6 +4,7 @@ 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() { @@ -24,9 +25,15 @@ export default async function Page() { // setTimeout(a, 3000); // }); + const countNotifikasi = await notifikasi_countUserNotifikasi(); + 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/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/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/zCoba/page.tsx b/src/app/zCoba/page.tsx index 6cccd737..be966c64 100644 --- a/src/app/zCoba/page.tsx +++ b/src/app/zCoba/page.tsx @@ -1,5 +1,5 @@ import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate"; -import ComponentGlobal_UI_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import Coba_TestLoading from "@/app_modules/zCoba"; import { Text } from "@mantine/core"; diff --git a/src/app_modules/auth/splash/view.tsx b/src/app_modules/auth/splash/view.tsx index 5ca2f9d8..0e84fa70 100644 --- a/src/app_modules/auth/splash/view.tsx +++ b/src/app_modules/auth/splash/view.tsx @@ -1,6 +1,7 @@ "use client"; import { MainColor } from "@/app_modules/component_global/color/color_pallet"; +import ComponentGlobal_SplashScreen from "@/app_modules/component_global/splash/splash_global"; import { BackgroundImage, Center, Image, Paper, Stack } from "@mantine/core"; import { useShallowEffect } from "@mantine/hooks"; import { useRouter } from "next/navigation"; @@ -11,12 +12,12 @@ export default function SplashScreen({ data }: { data: any }) { 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); } }, []); diff --git a/src/app_modules/component_global/splash/splash_global.tsx b/src/app_modules/component_global/splash/splash_global.tsx index 97463ec2..2f969605 100644 --- a/src/app_modules/component_global/splash/splash_global.tsx +++ b/src/app_modules/component_global/splash/splash_global.tsx @@ -1,20 +1,20 @@ "use client"; import { Stack, Loader, ActionIcon, ThemeIcon } from "@mantine/core"; -import ComponentGlobal_UI_LayoutTamplate from "../ui/ui_layout_tamplate"; +import LayoutGlobal_UI_Tamplate from "../ui/ui_layout_tamplate"; import { IconMessages, IconX } from "@tabler/icons-react"; export default function ComponentGlobal_SplashScreen({ icon }: { icon: any }) { return ( <> - + {icon} - + ); } diff --git a/src/app_modules/component_global/ui/ui_header_tamplate.tsx b/src/app_modules/component_global/ui/ui_header_tamplate.tsx index fdeab7d9..00df1c10 100644 --- a/src/app_modules/component_global/ui/ui_header_tamplate.tsx +++ b/src/app_modules/component_global/ui/ui_header_tamplate.tsx @@ -11,19 +11,21 @@ import { } from "@mantine/core"; import { IconArrowLeft, IconChevronLeft } from "@tabler/icons-react"; import { useRouter } from "next/navigation"; -import { useState } from "react"; +import React, { useState } from "react"; import { AccentColor, MainColor } from "../color/color_pallet"; -export default function ComponentGlobal_UI_HeaderTamplate({ +export default function LayoutGlobal_UI_HeaderTamplate({ title, posotion, // left button hideButtonLeft, iconLeft, routerLeft, + customButtonLeft, // right button iconRight, routerRight, + customButtonRight, }: { title: string; posotion?: any; @@ -31,9 +33,11 @@ export default function ComponentGlobal_UI_HeaderTamplate({ 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); @@ -53,6 +57,8 @@ export default function ComponentGlobal_UI_HeaderTamplate({ {hideButtonLeft ? ( + ) : customButtonLeft ? ( + customButtonLeft ) : ( {isLoading ? ( @@ -79,7 +85,9 @@ export default function ComponentGlobal_UI_HeaderTamplate({ {title} - {iconRight === undefined ? ( + {customButtonRight ? ( + customButtonRight + ) : iconRight === undefined ? ( ) : routerRight === undefined ? ( {iconRight} diff --git a/src/app_modules/component_global/ui/ui_layout_tamplate.tsx b/src/app_modules/component_global/ui/ui_layout_tamplate.tsx index 652254b1..d9823a7a 100644 --- a/src/app_modules/component_global/ui/ui_layout_tamplate.tsx +++ b/src/app_modules/component_global/ui/ui_layout_tamplate.tsx @@ -1,13 +1,17 @@ +"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 ComponentGlobal_UI_LayoutTamplate({ +export default function LayoutGlobal_UI_Tamplate({ children, header, footer, @@ -18,56 +22,104 @@ export default function ComponentGlobal_UI_LayoutTamplate({ }) { return ( <> - - {/* Header */} - {header ? ( - + + - {header} - - ) : ( - "" - )} + - {/* Children */} - - - {children} - - + {children} - {/* Footer */} - {footer ? ( - - - {footer} - - - ) : ( - "" - )} - + + + + + + ); +} + +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/component_global/ui/ui_loader.tsx b/src/app_modules/component_global/ui/ui_loader.tsx new file mode 100644 index 00000000..54333cf3 --- /dev/null +++ b/src/app_modules/component_global/ui/ui_loader.tsx @@ -0,0 +1,10 @@ +import { Loader } from "@mantine/core"; +import { MainColor } from "../color/color_pallet"; + +export default function ComponentGlobal_UI_Loader({ size }: { size?: number }) { + return ( + <> + + + ); +} diff --git a/src/app_modules/forum/component/detail_component/ui_report_komentar.tsx b/src/app_modules/forum/component/detail_component/ui_report_komentar.tsx new file mode 100644 index 00000000..7a1aaae2 --- /dev/null +++ b/src/app_modules/forum/component/detail_component/ui_report_komentar.tsx @@ -0,0 +1,66 @@ +"use client" + +import { Stack, Paper, Text, List, Box } from "@mantine/core"; +import { useState } from "react"; +import { MODEL_FORUM_KOMENTAR } from "../../model/interface"; +import { AccentColor, MainColor } from "@/app_modules/component_global/color/color_pallet"; + +export function ComponentForum_UiDetailReportKomentar({ + dataKomentar, +}: { + dataKomentar: any; +}) { + const [data, setData] = useState(dataKomentar.data); + const [list, setList] = useState(dataKomentar.list); + return ( + <> + + + + Komentar anda telah dihapus dari sebuah postingan oleh ADMIN, karena + memiliki beberapa laporan dari pengguna lain ! + + + + Komentar anda + + +
+ + + + + + + Pada postingan : {data.Forum_Posting.Author.username} + + + +
+ + + + + Laporan yang diterima : + + {list.map((x, i) => ( + {x} + ))} + + + + + + ); +} \ No newline at end of file diff --git a/src/app_modules/forum/component/detail_component/ui_report_posting.tsx b/src/app_modules/forum/component/detail_component/ui_report_posting.tsx new file mode 100644 index 00000000..84de8f62 --- /dev/null +++ b/src/app_modules/forum/component/detail_component/ui_report_posting.tsx @@ -0,0 +1,61 @@ +"use client"; + +import { Stack, Paper, Text, List, Box } from "@mantine/core"; +import { useState } from "react"; +import { MODEL_FORUM_POSTING } from "../../model/interface"; +import { + AccentColor, + MainColor, +} from "@/app_modules/component_global/color/color_pallet"; + +export function ComponentForum_UiDetailReportPosting({ + dataPosting, +}: { + dataPosting: any; +}) { + const [data, setData] = useState(dataPosting.data); + const [list, setList] = useState(dataPosting.list); + + return ( + <> + + + + Postingan anda telah dihapus dari beranda oleh ADMIN, karena + memiliki beberapa laporan dari pengguna lain ! + + + Pada postingan + + +
+ + + + + + Laporan yang diterima : + + {list.map((x, i) => ( + + {x} + + ))} + + + + + + ); +} diff --git a/src/app_modules/forum/create/layout.tsx b/src/app_modules/forum/create/layout.tsx index 5b9be6e3..121dad16 100644 --- a/src/app_modules/forum/create/layout.tsx +++ b/src/app_modules/forum/create/layout.tsx @@ -4,8 +4,8 @@ import { AppShell } from "@mantine/core"; import React from "react"; import ComponentForum_HeaderTamplate from "../component/header/header_tamplate"; import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate"; -import ComponentGlobal_UI_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; -import ComponentGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; export default function LayoutForum_Create({ children, @@ -14,11 +14,11 @@ export default function LayoutForum_Create({ }) { return ( <> - } + } > {children} - + {/* }> diff --git a/src/app_modules/forum/detail/detail_report_komentar.tsx b/src/app_modules/forum/detail/detail_report_komentar.tsx index 85bc8a68..f3c1e417 100644 --- a/src/app_modules/forum/detail/detail_report_komentar.tsx +++ b/src/app_modules/forum/detail/detail_report_komentar.tsx @@ -1,19 +1,7 @@ -"use client"; +import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import { ComponentForum_UiDetailReportKomentar } from "../component/detail_component/ui_report_komentar"; -import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate"; -import ComponentForum_HeaderTamplate from "../component/header/header_tamplate"; -import { - Box, - Center, - Group, - List, - Paper, - Stack, - Text, - Title, -} from "@mantine/core"; -import { MODEL_FORUM_KOMENTAR, MODEL_FORUM_POSTING } from "../model/interface"; -import { useState } from "react"; export default function Forum_DetailReportKomentar({ dataKomentar, @@ -22,58 +10,13 @@ export default function Forum_DetailReportKomentar({ }) { return ( <> - } + } > - {} - + {} + ); } -function View({ dataKomentar }: { dataKomentar: any }) { - const [data, setData] = useState(dataKomentar.data); - const [list, setList] = useState(dataKomentar.list); - return ( - <> - - - Komentar anda telah dihapus dari sebuah postingan oleh ADMIN, karena - memiliki beberapa laporan dari pengguna lain ! - - - Komentar anda - - -
- - - - - - - Pada postingan : {data.Forum_Posting.Author.username} - - - -
- - - - - Laporan yang diterima : - - {list.map((x, i) => ( - {x} - ))} - - - - - ); -} diff --git a/src/app_modules/forum/detail/detail_report_posting.tsx b/src/app_modules/forum/detail/detail_report_posting.tsx index 0f3f993c..0322485b 100644 --- a/src/app_modules/forum/detail/detail_report_posting.tsx +++ b/src/app_modules/forum/detail/detail_report_posting.tsx @@ -1,10 +1,7 @@ -"use client"; - -import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate"; -import ComponentForum_HeaderTamplate from "../component/header/header_tamplate"; -import { List, Paper, Stack, Text } from "@mantine/core"; -import { MODEL_FORUM_POSTING } from "../model/interface"; -import { useState } from "react"; +import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import { Stack, Text } from "@mantine/core"; +import { ComponentForum_UiDetailReportPosting } from "../component/detail_component/ui_report_posting"; export default function Forum_DetailReportPosting({ dataPosting, @@ -13,49 +10,11 @@ export default function Forum_DetailReportPosting({ }) { return ( <> - } + } > - - - - ); -} - -function View({ dataPosting }: { dataPosting: any }) { - const [data, setData] = useState(dataPosting.data); - const [list, setList] = useState(dataPosting.list); - - return ( - <> - - - Postingan anda telah dihapus dari beranda oleh ADMIN, karena memiliki - beberapa laporan dari pengguna lain ! - - - - Pada postingan - - -
- - - - - - Laporan yang diterima : - - {list.map((x, i) => ( - {x} - ))} - - - + + ); } diff --git a/src/app_modules/forum/detail/layout.tsx b/src/app_modules/forum/detail/layout.tsx index 51745523..e3339f95 100644 --- a/src/app_modules/forum/detail/layout.tsx +++ b/src/app_modules/forum/detail/layout.tsx @@ -8,8 +8,8 @@ import { IconChevronLeft } from "@tabler/icons-react"; import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; import { revalidatePath } from "next/cache"; import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate"; -import ComponentGlobal_UI_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; -import ComponentGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; export const dynamic = "force-dynamic"; export default function LayoutForum_Detail({ @@ -24,11 +24,11 @@ export default function LayoutForum_Detail({ return ( <> - } + } > {children} - + {/* - } + } > {children} - + {/* } diff --git a/src/app_modules/forum/forumku/layout.tsx b/src/app_modules/forum/forumku/layout.tsx index 2ea05fa3..8281d194 100644 --- a/src/app_modules/forum/forumku/layout.tsx +++ b/src/app_modules/forum/forumku/layout.tsx @@ -6,8 +6,8 @@ import ComponentForum_HeaderTamplate from "../component/header/header_tamplate"; import { MODEL_USER } from "@/app_modules/home/model/interface"; import { IconX } from "@tabler/icons-react"; import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate"; -import ComponentGlobal_UI_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; -import ComponentGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; export default function LayoutForum_Forumku({ children, @@ -18,16 +18,16 @@ export default function LayoutForum_Forumku({ }) { return ( <> - } /> } > {children} - + {/* - + (
diff --git a/src/app_modules/forum/main/layout.tsx b/src/app_modules/forum/main/layout.tsx index 39e9266e..798a58e5 100644 --- a/src/app_modules/forum/main/layout.tsx +++ b/src/app_modules/forum/main/layout.tsx @@ -26,8 +26,8 @@ import { MODEL_USER } from "@/app_modules/home/model/interface"; import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate"; -import ComponentGlobal_UI_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; -import ComponentGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; export default function LayoutForum_Main({ children, @@ -43,9 +43,9 @@ export default function LayoutForum_Main({ return ( <> - {children} - + {/* - + } > {children} - + {/* diff --git a/src/app_modules/forum/report/posting/layout.tsx b/src/app_modules/forum/report/posting/layout.tsx index 0b9b250b..784e3d60 100644 --- a/src/app_modules/forum/report/posting/layout.tsx +++ b/src/app_modules/forum/report/posting/layout.tsx @@ -1,7 +1,7 @@ "use client"; -import ComponentGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; -import ComponentGlobal_UI_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import React from "react"; export default function LayoutForum_ReportPosting({ @@ -11,13 +11,13 @@ export default function LayoutForum_ReportPosting({ }) { return ( <> - + } > {children} - + diff --git a/src/app_modules/forum/splash/index.tsx b/src/app_modules/forum/splash/index.tsx index 195c03db..03f44677 100644 --- a/src/app_modules/forum/splash/index.tsx +++ b/src/app_modules/forum/splash/index.tsx @@ -2,7 +2,7 @@ import { RouterForum } from "@/app/lib/router_hipmi/router_forum"; import ComponentGlobal_SplashScreen from "@/app_modules/component_global/splash/splash_global"; -import ComponentGlobal_UI_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import { Avatar, Center, @@ -20,7 +20,7 @@ export default function Forum_Splash() { const router = useRouter(); useShallowEffect(() => { setTimeout(() => { - router.replace(RouterForum.beranda); + router.replace(RouterForum.beranda, { scroll: false }); }, 1000); }, []); diff --git a/src/app_modules/home/component/button_header.tsx b/src/app_modules/home/component/button_header.tsx new file mode 100644 index 00000000..05e5898f --- /dev/null +++ b/src/app_modules/home/component/button_header.tsx @@ -0,0 +1,106 @@ +"use client"; + +import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import { ActionIcon, Indicator, Loader, Text } from "@mantine/core"; +import { MODEL_USER } from "../model/interface"; +import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; +import { useState } from "react"; +import { useRouter } from "next/navigation"; +import { RouterUserSearch } from "@/app/lib/router_hipmi/router_user_search"; +import { + AccentColor, + MainColor, +} from "@/app_modules/component_global/color/color_pallet"; +import { IconBell, IconUserSearch } from "@tabler/icons-react"; +import { RouterNotifikasi } from "@/app/lib/router_hipmi/router_notifikasi"; +import { useShallowEffect } from "@mantine/hooks"; +import notifikasi_countUserNotifikasi from "@/app_modules/notifikasi/fun/count/fun_count_by_id"; + +export function ComponentHome_ButtonHeaderLeft({ + dataUser, +}: { + dataUser: MODEL_USER; +}) { + const router = useRouter(); + const [isLoadingUS, setIsLoadingUS] = useState(false); + + return ( + <> + { + if (dataUser?.Profile === null) { + ComponentGlobal_NotifikasiPeringatan("Lengkapi Profile"); + } else { + setIsLoadingUS(true); + router.push(RouterUserSearch.main, { scroll: false }); + } + }} + > + {isLoadingUS ? ( + + ) : ( + + )} + + + ); +} + +export function ComponentHome_ButtonHeaderRight({ + dataUser, + countNotifikasi, +}: { + dataUser: MODEL_USER; + countNotifikasi: number; +}) { + const router = useRouter(); + const [count, setCount] = useState(countNotifikasi); + const [isLoadingBell, setIsLoadingBell] = useState(false); + + useShallowEffect(() => { + onLoadNotifkasi({ + onLoad(val) { + setCount(val); + }, + }); + }, []); + + async function onLoadNotifkasi({ onLoad }: { onLoad: (val: any) => void }) { + const loadNotifikasi = await notifikasi_countUserNotifikasi(); + onLoad(loadNotifikasi); + } + + return ( + <> + { + if (dataUser?.Profile === null) { + ComponentGlobal_NotifikasiPeringatan("Lengkapi Profile"); + } else { + router.push(RouterNotifikasi.main, { scroll: false }); + setIsLoadingBell(true); + } + }} + > + {isLoadingBell ? ( + + ) : ( + + {count > 99 ? "99+" : count} + + } + > + + + )} + + + ); +} diff --git a/src/app_modules/home/view.tsx b/src/app_modules/home/component/ui_home.tsx similarity index 58% rename from src/app_modules/home/view.tsx rename to src/app_modules/home/component/ui_home.tsx index bd984546..935c09fc 100644 --- a/src/app_modules/home/view.tsx +++ b/src/app_modules/home/component/ui_home.tsx @@ -1,43 +1,49 @@ "use client"; -import { - ActionIcon, - Box, - Center, - Group, - Image, - Loader, - LoadingOverlay, - Overlay, - Paper, - SimpleGrid, - Stack, - Text, -} from "@mantine/core"; - -import { - IconAffiliate, - IconBriefcase, - IconHeartHandshake, - IconPackageImport, - IconPresentation, - IconUserSearch, -} from "@tabler/icons-react"; - import { RouterColab } from "@/app/lib/router_hipmi/router_colab"; import { RouterEvent } from "@/app/lib/router_hipmi/router_event"; import { RouterJob } from "@/app/lib/router_hipmi/router_job"; import { RouterVote } from "@/app/lib/router_hipmi/router_vote"; +import { + AccentColor, + MainColor, +} from "@/app_modules/component_global/color/color_pallet"; +import ComponentGlobal_IsEmptyData from "@/app_modules/component_global/is_empty_data"; +import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; +import { + Box, + Paper, + Stack, + SimpleGrid, + ActionIcon, + Loader, + Group, + Image, + Text, + Avatar, + Center, +} from "@mantine/core"; +import { + IconPresentation, + IconAffiliate, + IconPackageImport, + IconHeartHandshake, + IconBriefcase, + IconUserSearch, + IconMap2, + IconMessages, + IconShoppingBag, + IconUserCircle, +} from "@tabler/icons-react"; import _ from "lodash"; import { useRouter } from "next/navigation"; import { useState } from "react"; -import { AccentColor, MainColor } from "../component_global/color/color_pallet"; -import ComponentGlobal_IsEmptyData from "../component_global/is_empty_data"; -import { ComponentGlobal_NotifikasiPeringatan } from "../component_global/notif_global/notifikasi_peringatan"; -import { MODEL_JOB } from "../job/model/interface"; -import { MODEL_USER } from "./model/interface"; +import { MODEL_USER } from "../model/interface"; +import { MODEL_JOB } from "@/app_modules/job/model/interface"; +import { RouterForum } from "@/app/lib/router_hipmi/router_forum"; +import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; -export default function HomeView({ +export function Home_UiView({ dataUser, dataJob, }: { @@ -86,7 +92,7 @@ export default function HomeView({ return ( <> - + @@ -230,3 +237,123 @@ export default function HomeView({ ); } + +const listHalamanFooter = [ + { + id: 1, + name: "Forums", + icon: , + link: RouterForum.splash, + }, + + { + id: 2, + name: "MarketPlace", + icon: , + link: "", + }, + { + id: 3, + name: "Business Maps", + icon: , + link: "", + }, +]; + +export function Home_UiFooter({ dataUser }: { dataUser: MODEL_USER }) { + const router = useRouter(); + const [isLoadingProfil, setIsLoadingProfile] = useState(false); + const [isLoadingPage, setIsLoadingPage] = useState(false); + const [pageId, setPageId] = useState(0); + return ( + <> + + + {listHalamanFooter.map((e, i) => ( +
+ + { + if (dataUser?.Profile === null) { + ComponentGlobal_NotifikasiPeringatan("Lengkapi Profile"); + } else { + e.link === "" + ? ComponentGlobal_NotifikasiPeringatan("Cooming Soon") + : (router.push(e.link, { scroll: false }), + setIsLoadingPage(true), + setPageId(e?.id)); + } + }} + > + {isLoadingPage && e.id === pageId ? ( + + ) : ( + e.icon + )} + + + {e.name} + + +
+ ))} + +
+ { + setIsLoadingProfile(true); + if (dataUser?.Profile === null) { + router.push(RouterProfile.create, { scroll: false }); + } else { + router.push( + RouterProfile.katalog + `${dataUser?.Profile?.id}`, + { scroll: false } + ); + } + }} + > + + {dataUser?.Profile === null ? ( + + ) : isLoadingProfil ? ( + + ) : ( + + )} + + + Profile + + +
+
+
+ + ); +} diff --git a/src/app_modules/home/index.ts b/src/app_modules/home/index.ts index 713cdd1b..07785dd4 100644 --- a/src/app_modules/home/index.ts +++ b/src/app_modules/home/index.ts @@ -1,5 +1,4 @@ -import HomeView from "./view"; -import HomeLayout from "./layout"; +import HomeView from "./view_home"; import Home_UserNotActive from "./user_non_active"; -export { HomeView, HomeLayout, Home_UserNotActive as Home_UserNonActive }; +export { HomeView, Home_UserNotActive as Home_UserNonActive }; diff --git a/src/app_modules/home/layout.tsx b/src/app_modules/home/layout.tsx deleted file mode 100644 index ba42b607..00000000 --- a/src/app_modules/home/layout.tsx +++ /dev/null @@ -1,310 +0,0 @@ -"use client"; -import { - ActionIcon, - AppShell, - Avatar, - BackgroundImage, - Box, - Center, - Flex, - Footer, - Grid, - Group, - Header, - Indicator, - Loader, - Paper, - ScrollArea, - SimpleGrid, - Stack, - Text, - ThemeIcon, - Title, -} from "@mantine/core"; -import { HomeView } from "."; -import { - IconUserSearch, - IconAward, - IconQrcode, - IconUserCircle, - IconBell, - IconMessages, - IconShoppingBag, - IconMap2, -} from "@tabler/icons-react"; -import { Logout } from "../auth"; -import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; -import { MODEL_USER } from "./model/interface"; -import React, { useState } from "react"; -import { useRouter } from "next/navigation"; -import { ComponentGlobal_NotifikasiPeringatan } from "../component_global/notif_global/notifikasi_peringatan"; -import { ComponentGlobal_NotifikasiBerhasil } from "../component_global/notif_global/notifikasi_berhasil"; -import { RouterUserSearch } from "@/app/lib/router_hipmi/router_user_search"; -import { RouterNotifikasi } from "@/app/lib/router_hipmi/router_notifikasi"; -import { useShallowEffect } from "@mantine/hooks"; -import notifikasi_countUserNotifikasi from "../notifikasi/fun/count/fun_count_by_id"; -import mqtt_client from "@/util/mqtt_client"; -import { AccentColor, MainColor } from "../component_global/color/color_pallet"; -import { RouterForum } from "@/app/lib/router_hipmi/router_forum"; - -export default function HomeLayout({ - dataUser, - children, - countNotifikasi, -}: { - dataUser: MODEL_USER; - children: React.ReactNode; - countNotifikasi: number; -}) { - const router = useRouter(); - // const [user, setUser] = useState(dataUser); - const [isLoadingProfil, setIsLoadingProfile] = useState(false); - const [isLoadingUS, setIsLoadingUS] = useState(false); - const [isLoadingBell, setIsLoadingBell] = useState(false); - const [isLoadingPage, setIsLoadingPage] = useState(false); - const [pageId, setPageId] = useState(0); - - const [countNotif, setCountNotif] = useState(countNotifikasi); - - const listHalamanFooter = [ - { - id: 1, - name: "Forums", - icon: , - link: RouterForum.splash, - }, - - { - id: 2, - name: "MarketPlace", - icon: , - link: "", - }, - { - id: 3, - name: "Business Maps", - icon: , - link: "", - }, - ]; - - useShallowEffect(() => { - mqtt_client.subscribe("USER"); - - mqtt_client.on("message", (topic: any, message: any) => { - // console.log(topic); - const data = JSON.parse(message.toString()); - - if (data.userId === dataUser.id) { - setCountNotif(countNotif + data.count); - } - }); - - onLoadNotifikasi({ - onLoad(val) { - setCountNotif(val); - }, - }); - }, [countNotif]); - - async function onLoadNotifikasi({ onLoad }: { onLoad: (val: any) => void }) { - const loadNotif = await notifikasi_countUserNotifikasi(); - onLoad(loadNotif); - } - - return ( - <> - - {/* Header */} - - - { - if (dataUser?.Profile === null) { - ComponentGlobal_NotifikasiPeringatan("Lengkapi Profile"); - } else { - setIsLoadingUS(true); - router.push(RouterUserSearch.main); - } - }} - > - {isLoadingUS ? ( - - ) : ( - - )} - - -
- - HIPMI - -
- { - if (dataUser?.Profile === null) { - ComponentGlobal_NotifikasiPeringatan("Lengkapi Profile"); - } else { - router.push(RouterNotifikasi.main); - setIsLoadingBell(true); - } - }} - > - {isLoadingBell ? ( - - ) : ( - - {countNotif} - - } - > - - - )} - -
-
- - {/* Children */} - - - {/* {Array(10) - .fill(0) - .map((e, i) => ( - - {i + 1} - - ))} */} - {children} - - - - - - {/* Footer */} - - - {listHalamanFooter.map((e, i) => ( -
- - { - if (dataUser?.Profile === null) { - ComponentGlobal_NotifikasiPeringatan( - "Lengkapi Profile" - ); - } else { - e.link === "" - ? ComponentGlobal_NotifikasiPeringatan("Cooming Soon") - : (router.push(e.link), - setIsLoadingPage(true), - setPageId(e?.id)); - } - }} - > - {isLoadingPage && e.id === pageId ? ( - - ) : ( - e.icon - )} - - - {e.name} - - -
- ))} - -
- { - setIsLoadingProfile(true); - if (dataUser?.Profile === null) { - router.push(RouterProfile.create); - } else { - router.push( - RouterProfile.katalog + `${dataUser.Profile.id}` - ); - } - }} - > - - {dataUser?.Profile === null ? ( - - ) : isLoadingProfil ? ( - - ) : ( - - )} - - - Profile - - -
-
-
-
- - ); -} diff --git a/src/app_modules/home/view_home.tsx b/src/app_modules/home/view_home.tsx new file mode 100644 index 00000000..78708e1a --- /dev/null +++ b/src/app_modules/home/view_home.tsx @@ -0,0 +1,43 @@ +import LayoutGlobal_UI_HeaderTamplate from "../component_global/ui/ui_header_tamplate"; +import LayoutGlobal_UI_Tamplate from "../component_global/ui/ui_layout_tamplate"; +import { MODEL_JOB } from "../job/model/interface"; +import { + ComponentHome_ButtonHeaderLeft, + ComponentHome_ButtonHeaderRight, +} from "./component/button_header"; +import { Home_UiFooter, Home_UiView } from "./component/ui_home"; +import { MODEL_USER } from "./model/interface"; + +export default function HomeView({ + dataUser, + dataJob, + countNotifikasi, +}: { + dataUser: MODEL_USER; + dataJob: MODEL_JOB[]; + countNotifikasi: number; +}) { + return ( + <> + + } + customButtonRight={ + + } + /> + } + footer={} + > + + + + ); +} diff --git a/src/app_modules/job/create/layout.tsx b/src/app_modules/job/create/layout.tsx index 5b6760db..2909f632 100644 --- a/src/app_modules/job/create/layout.tsx +++ b/src/app_modules/job/create/layout.tsx @@ -1,7 +1,7 @@ "use client"; -import ComponentGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; -import ComponentGlobal_UI_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import React from "react"; export default function LayoutJob_Create({ @@ -11,11 +11,11 @@ export default function LayoutJob_Create({ }) { return ( <> - } + } > {children} - + ); } diff --git a/src/app_modules/job/detail/arsip/layout.tsx b/src/app_modules/job/detail/arsip/layout.tsx index ba6f7284..de2c7329 100644 --- a/src/app_modules/job/detail/arsip/layout.tsx +++ b/src/app_modules/job/detail/arsip/layout.tsx @@ -1,7 +1,7 @@ "use client"; -import ComponentGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; -import ComponentGlobal_UI_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import React from "react"; export default function LayoutJob_DetailArsip({ @@ -11,11 +11,11 @@ export default function LayoutJob_DetailArsip({ }) { return ( <> - } + } > {children} - + ); } diff --git a/src/app_modules/job/detail/draft/layout.tsx b/src/app_modules/job/detail/draft/layout.tsx index 6d8946e2..90dc406a 100644 --- a/src/app_modules/job/detail/draft/layout.tsx +++ b/src/app_modules/job/detail/draft/layout.tsx @@ -17,8 +17,8 @@ import ComponentJob_HeaderTamplate from "../../component/header_tamplate"; import { IconDots, IconEdit, IconX } from "@tabler/icons-react"; import { RouterJob } from "@/app/lib/router_hipmi/router_job"; import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate"; -import ComponentGlobal_UI_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; -import ComponentGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; import { useRouter } from "next/navigation"; import { useDisclosure } from "@mantine/hooks"; import { @@ -48,9 +48,9 @@ export default function LayoutJob_DetailDraft({ return ( <> - open()}> @@ -62,7 +62,7 @@ export default function LayoutJob_DetailDraft({ } > {children} - + - } + } > {children} - + ); } diff --git a/src/app_modules/job/detail/publish/layout.tsx b/src/app_modules/job/detail/publish/layout.tsx index ef1caf7c..2b98cf44 100644 --- a/src/app_modules/job/detail/publish/layout.tsx +++ b/src/app_modules/job/detail/publish/layout.tsx @@ -1,7 +1,7 @@ "use client"; -import ComponentGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; -import ComponentGlobal_UI_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import React from "react"; export default function LayoutJob_DetailPublish({ @@ -11,11 +11,11 @@ export default function LayoutJob_DetailPublish({ }) { return ( <> - } + } > {children} - + ); } diff --git a/src/app_modules/job/detail/reject/layout.tsx b/src/app_modules/job/detail/reject/layout.tsx index e8d3e8b8..42eb63df 100644 --- a/src/app_modules/job/detail/reject/layout.tsx +++ b/src/app_modules/job/detail/reject/layout.tsx @@ -5,8 +5,8 @@ import React from "react"; import ComponentJob_HeaderTamplate from "../../component/header_tamplate"; import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate"; import { RouterJob } from "@/app/lib/router_hipmi/router_job"; -import ComponentGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; -import ComponentGlobal_UI_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import { IconEdit } from "@tabler/icons-react"; export default function LayoutJob_DetailReject({ @@ -16,11 +16,11 @@ export default function LayoutJob_DetailReject({ }) { return ( <> - } + } > {children} - + ); } diff --git a/src/app_modules/job/detail/review/layout.tsx b/src/app_modules/job/detail/review/layout.tsx index ccf9cc7d..dd7bf43d 100644 --- a/src/app_modules/job/detail/review/layout.tsx +++ b/src/app_modules/job/detail/review/layout.tsx @@ -1,7 +1,7 @@ "use client"; -import ComponentGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; -import ComponentGlobal_UI_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import React from "react"; export default function LayoutJob_DetailReview({ @@ -11,11 +11,11 @@ export default function LayoutJob_DetailReview({ }) { return ( <> - } + } > {children} - + ); } diff --git a/src/app_modules/job/edit/layout.tsx b/src/app_modules/job/edit/layout.tsx index 4d08b611..7b9b8763 100644 --- a/src/app_modules/job/edit/layout.tsx +++ b/src/app_modules/job/edit/layout.tsx @@ -1,7 +1,7 @@ "use client"; -import ComponentGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; -import ComponentGlobal_UI_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import React from "react"; export default function LayoutJob_Edit({ @@ -11,11 +11,11 @@ export default function LayoutJob_Edit({ }) { return ( <> - } + } > {children} - + ); diff --git a/src/app_modules/job/main/beranda/ui_beranda.tsx b/src/app_modules/job/main/beranda/ui_beranda.tsx index 0d282dd7..37ffff7f 100644 --- a/src/app_modules/job/main/beranda/ui_beranda.tsx +++ b/src/app_modules/job/main/beranda/ui_beranda.tsx @@ -9,6 +9,7 @@ import { ScrollOnly } from "next-scroll-loader"; import ComponentJob_BerandaCardView from "../../component/beranda/card_view"; import { job_getAllListPublish } from "../../fun/get/get_all_publish"; import ComponentJob_CreateButton from "../../component/button/create_button"; +import { IconSearch } from "@tabler/icons-react"; export function Job_UiBeranda({ listData }: { listData: MODEL_JOB[] }) { const [data, setData] = useState(listData); @@ -31,12 +32,14 @@ export function Job_UiBeranda({ listData }: { listData: MODEL_JOB[] }) { } placeholder="Pekerjaan apa yang anda cari ?" onChange={(val) => { onSearch(val.currentTarget.value); diff --git a/src/app_modules/job/main/layout.tsx b/src/app_modules/job/main/layout.tsx index 3c65fff7..e7e05fa9 100644 --- a/src/app_modules/job/main/layout.tsx +++ b/src/app_modules/job/main/layout.tsx @@ -3,8 +3,8 @@ import { RouterJob } from "@/app/lib/router_hipmi/router_job"; import { MainColor } from "@/app_modules/component_global/color/color_pallet"; import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; -import ComponentGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; -import ComponentGlobal_UI_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import { ActionIcon, SimpleGrid, Stack, Text } from "@mantine/core"; import { IconHistory, IconHome, IconReservedLine } from "@tabler/icons-react"; import { useAtom } from "jotai"; @@ -46,9 +46,9 @@ export default function LayoutJob_Main({ return ( <> - @@ -118,7 +118,7 @@ export default function LayoutJob_Main({ } > {children} - + ); } diff --git a/src/app_modules/job/non_user_view/layout.tsx b/src/app_modules/job/non_user_view/layout.tsx index 24906397..2d32cd54 100644 --- a/src/app_modules/job/non_user_view/layout.tsx +++ b/src/app_modules/job/non_user_view/layout.tsx @@ -4,8 +4,8 @@ import { AppShell, Center } from "@mantine/core"; import React from "react"; import ComponentJob_HeaderTamplate from "../component/header_tamplate"; import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate"; -import ComponentGlobal_UI_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; -import ComponentGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; export default function LayoutJob_NonUserView({ children, @@ -14,11 +14,11 @@ export default function LayoutJob_NonUserView({ }) { return ( <> - } + } > {children} - + ); } diff --git a/src/app_modules/job/splash/ui_splash.tsx b/src/app_modules/job/splash/ui_splash.tsx index c5f3ac6e..af1322e6 100644 --- a/src/app_modules/job/splash/ui_splash.tsx +++ b/src/app_modules/job/splash/ui_splash.tsx @@ -18,7 +18,7 @@ export function Job_UiSplash() { setTimeout(() => { setHotMenu(1); setStatus("Publish"); - router.replace(RouterJob.beranda); + router.replace(RouterJob.beranda, { scroll: false }); }, 1000); }, []); return ( diff --git a/src/app_modules/notifikasi/component/card_view.tsx b/src/app_modules/notifikasi/component/card_view.tsx new file mode 100644 index 00000000..7bed821c --- /dev/null +++ b/src/app_modules/notifikasi/component/card_view.tsx @@ -0,0 +1,141 @@ +"use client"; + +import { Badge, Card, Divider, Group, Stack, Text } from "@mantine/core"; +import { IconCheck, IconChecks } from "@tabler/icons-react"; +import { useRouter } from "next/navigation"; +import notifikasi_funUpdateIsReadById from "../fun/update/fun_update_is_read_by_user_id"; +import { MODEL_NOTIFIKASI } from "../model/interface"; +import { redirectDetailForumPage } from "./path/forum"; +import { redirectJobPage } from "./path/job"; +import { + AccentColor, + MainColor, +} from "@/app_modules/component_global/color/color_pallet"; +import notifikasi_getByUserId from "../fun/get/get_notifiaksi_by_id"; + +export function ComponentNotifiaksi_CardView({ + data, + onLoadData, + activePage, + onSetJob, +}: { + data: MODEL_NOTIFIKASI; + onLoadData: (val: any) => void; + activePage: number; + onSetJob: (val: any) => void; +}) { + const router = useRouter(); + return ( + <> + { + data?.kategoriApp === "JOB" && + redirectJobPage({ + data: data, + router: router, + onSetPage(val) { + onSetJob(val); + }, + }); + + data?.kategoriApp === "FORUM" && + redirectDetailForumPage({ + data: data, + router: router, + }); + + const updateIsRead = await notifikasi_funUpdateIsReadById({ + notifId: data?.id, + }); + + if (updateIsRead.status === 200) { + // console.log(updateIsRead.status); + // const loadData = await notifikasi_getByUserId({ page: activePage }); + // onLoadData(loadData); + // console.log("berhasil load") + } + }} + > + {/*
{JSON.stringify(e, null, 2)}
*/} + + + + + # {data?.kategoriApp} + + {data?.status ? ( + + {data?.status} + + ) : ( + "" + )} + + + + + + + + {data?.title} + + {data.kategoriApp === "FORUM" ? ( +
+ ) : ( + {data?.pesan} + )} + + + + + + {new Intl.DateTimeFormat("id-ID", { + dateStyle: "long", + }).format(data?.createdAt)} + + + {", "} + {new Intl.DateTimeFormat("id-ID", { + timeStyle: "short", + }).format(data?.createdAt)} + + + {data?.isRead ? ( + + + + Sudah dilihat + + + ) : ( + + + + Belum dilihat + + + )} + + + + + ); +} diff --git a/src/app_modules/notifikasi/component/path/forum.ts b/src/app_modules/notifikasi/component/path/forum.ts new file mode 100644 index 00000000..e31c9f88 --- /dev/null +++ b/src/app_modules/notifikasi/component/path/forum.ts @@ -0,0 +1,26 @@ +import { RouterForum } from "@/app/lib/router_hipmi/router_forum"; +import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime"; +import { MODEL_NOTIFIKASI } from "../../model/interface"; + +export function redirectDetailForumPage({ + data, + router, +}: { + data: MODEL_NOTIFIKASI; + router: AppRouterInstance; +}) { + if (data.status === null) { + const path = RouterForum.main_detail + data.appId; + router.push(path, { scroll: false }); + } + + if (data.status === "Report Komentar") { + const path = RouterForum.detail_report_komentar + data.appId; + router.push(path, { scroll: false }); + } + + if (data.status === "Report Posting") { + const path = RouterForum.detail_report_posting + data.appId; + router.push(path, { scroll: false }); + } +} diff --git a/src/app_modules/notifikasi/component/path/job.ts b/src/app_modules/notifikasi/component/path/job.ts new file mode 100644 index 00000000..03efdb2b --- /dev/null +++ b/src/app_modules/notifikasi/component/path/job.ts @@ -0,0 +1,31 @@ +import { RouterJob } from "@/app/lib/router_hipmi/router_job"; +import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime"; +import { MODEL_NOTIFIKASI } from "../../model/interface"; + +export function redirectJobPage({ + data, + router, + onSetPage, +}: { + data: MODEL_NOTIFIKASI; + router: AppRouterInstance; + onSetPage: (val: any) => void; +}) { + const path = RouterJob.status; + + if (data.status === "Publish") { + onSetPage({ + menuId: 2, + status: data.status, + }); + } + + if (data.status === "Reject") { + onSetPage({ + menuId: 2, + status: data.status, + }); + } + + router.push(path, {scroll: false}); +} diff --git a/src/app_modules/notifikasi/component/ui_notifiaksi.tsx b/src/app_modules/notifikasi/component/ui_notifiaksi.tsx new file mode 100644 index 00000000..827da9c2 --- /dev/null +++ b/src/app_modules/notifikasi/component/ui_notifiaksi.tsx @@ -0,0 +1,81 @@ +"use client"; + +import ComponentGlobal_IsEmptyData from "@/app_modules/component_global/is_empty_data"; +import ComponentGlobal_UI_Loader from "@/app_modules/component_global/ui/ui_loader"; +import { gs_job_hot_menu, gs_job_status } from "@/app_modules/job/global_state"; +import { Box, Center } from "@mantine/core"; +import { useShallowEffect } from "@mantine/hooks"; +import { useAtom } from "jotai"; +import _ from "lodash"; +import { ScrollOnly } from "next-scroll-loader"; +import { useState } from "react"; +import notifikasi_getByUserId from "../fun/get/get_notifiaksi_by_id"; +import { MODEL_NOTIFIKASI } from "../model/interface"; +import { ComponentNotifiaksi_CardView } from "./card_view"; + +export function Notifikasi_UiView({ + listNotifikasi, +}: { + listNotifikasi: MODEL_NOTIFIKASI[]; +}) { + const [data, setData] = useState(listNotifikasi); + const [activePage, setActivePage] = useState(1); + + // JOB + const [jobMenuId, setJobMenuId] = useAtom(gs_job_hot_menu); + const [jobStatus, setJobStatus] = useAtom(gs_job_status); + + useShallowEffect(() => { + onLoadData({ + onLoad(val) { + setData(val); + }, + }); + }, []); + + async function onLoadData({ onLoad }: { onLoad: (val: any) => void }) { + const loadData = await notifikasi_getByUserId({ page: 1 }); + onLoad(loadData); + } + + return ( + <> + + {_.isEmpty(data) ? ( + + ) : ( + ( +
+ +
+ )} + data={data} + setData={setData} + moreData={async () => { + const loadData = await notifikasi_getByUserId({ + page: activePage + 1, + }); + setActivePage((val) => val + 1); + + return loadData; + }} + > + {(item) => ( + setData(val)} + activePage={activePage} + onSetJob={(val) => { + setJobMenuId(val.menuId); + setJobStatus(val.status); + }} + /> + )} +
+ )} +
+ + ); +} diff --git a/src/app_modules/notifikasi/fun/get/get_notifiaksi_by_id.ts b/src/app_modules/notifikasi/fun/get/get_notifiaksi_by_id.ts index 9ba18fb9..856710b1 100644 --- a/src/app_modules/notifikasi/fun/get/get_notifiaksi_by_id.ts +++ b/src/app_modules/notifikasi/fun/get/get_notifiaksi_by_id.ts @@ -3,10 +3,14 @@ import prisma from "@/app/lib/prisma"; import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; -export default async function notifikasi_getByUserId() { +export default async function notifikasi_getByUserId({page}: {page: number }) { const userId = await user_getOneUserId(); + const takeData = 10; + const skipData = page * takeData - takeData; const data = await prisma.notifikasi.findMany({ + take: takeData, + skip: skipData, orderBy: { createdAt: "desc", }, diff --git a/src/app_modules/notifikasi/index.ts b/src/app_modules/notifikasi/index.ts index a347a8b2..25af39f6 100644 --- a/src/app_modules/notifikasi/index.ts +++ b/src/app_modules/notifikasi/index.ts @@ -1,3 +1,3 @@ -import Notifikasi_MainView from "./main"; +import Notifikasi_MainView from "./view_notifikasi"; export { Notifikasi_MainView }; \ No newline at end of file diff --git a/src/app_modules/notifikasi/main/index.tsx b/src/app_modules/notifikasi/main/index.tsx deleted file mode 100644 index 8ca7e69a..00000000 --- a/src/app_modules/notifikasi/main/index.tsx +++ /dev/null @@ -1,236 +0,0 @@ -"use client"; - -import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate"; -import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate"; -import { - Badge, - Card, - Divider, - Group, - Paper, - SimpleGrid, - Stack, - Text, -} from "@mantine/core"; -import { MODEL_NOTIFIKASI } from "../model/interface"; -import { useState } from "react"; -import adminNotifikasi_countNotifikasi from "@/app_modules/admin/notifikasi/fun/count/count_is_read"; -import adminNotifikasi_getByUserId from "@/app_modules/admin/notifikasi/fun/get/get_notifikasi_by_user_id"; -import adminNotifikasi_funUpdateIsReadById from "@/app_modules/admin/notifikasi/fun/update/fun_update_is_read_by_id"; -import { IconChecks, IconCheck } from "@tabler/icons-react"; -import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime"; -import { useRouter } from "next/navigation"; -import { RouterJob } from "@/app/lib/router_hipmi/router_job"; -import notifikasi_funUpdateIsReadById from "../fun/update/fun_update_is_read_by_user_id"; -import { useAtom } from "jotai"; -import { gs_job_hot_menu, gs_job_status } from "@/app_modules/job/global_state"; -import _ from "lodash"; -import ComponentGlobal_IsEmptyData from "@/app_modules/component_global/is_empty_data"; -import { RouterForum } from "@/app/lib/router_hipmi/router_forum"; -import notifikasi_getByUserId from "../fun/get/get_notifiaksi_by_id"; -import { useShallowEffect } from "@mantine/hooks"; -import { data } from "autoprefixer"; - -export default function Notifikasi_MainView({ - listNotifikasi, -}: { - listNotifikasi: any[]; -}) { - return ( - <> - } - > - - - - ); -} - -function MainView({ listNotifikasi }: { listNotifikasi: MODEL_NOTIFIKASI[] }) { - const router = useRouter(); - const [data, setData] = useState(listNotifikasi); - - // JOB - const [jobMenuId, setJobMenuId] = useAtom(gs_job_hot_menu); - const [jobStatus, setJobStatus] = useAtom(gs_job_status); - - useShallowEffect(() => { - onLoadData({ - onLoad(val) { - setData(val); - }, - }); - }, []); - - async function onLoadData({ onLoad }: { onLoad: (val: any) => void }) { - const loadData = await notifikasi_getByUserId(); - onLoad(loadData); - } - - if (_.isEmpty(data)) { - return ; - } - return ( - <> - - {data.map((e, i) => ( - { - e?.kategoriApp === "JOB" && - redirectJobPage({ - data: e, - router: router, - onSetPage(val) { - setJobMenuId(val.menuId); - setJobStatus(val.status); - }, - }); - - e?.kategoriApp === "FORUM" && - redirectDetailForumPage({ - data: e, - router: router, - }); - - const updateIsRead = await notifikasi_funUpdateIsReadById({ - notifId: e?.id, - }); - if (updateIsRead.status === 200) return null; - }} - > - {/*
{JSON.stringify(e, null, 2)}
*/} - - - - - # {e?.kategoriApp} - - {e?.status ? {e?.status} : ""} - - - - - - - - {e?.title} - - {e.kategoriApp === "FORUM" ? ( -
- ) : ( - // - // - - {e?.pesan} - - )} - - - - - - {new Intl.DateTimeFormat("id-ID", { - dateStyle: "long", - }).format(e?.createdAt)} - - - {", "} - {new Intl.DateTimeFormat("id-ID", { - timeStyle: "short", - }).format(e?.createdAt)} - - - {e?.isRead ? ( - - - - Sudah dilihat - - - ) : ( - - - - Belum dilihat - - - )} - - - - ))} - - - ); -} - -function redirectJobPage({ - data, - router, - onSetPage, -}: { - data: MODEL_NOTIFIKASI; - router: AppRouterInstance; - onSetPage: (val: any) => void; -}) { - const path = RouterJob.status; - - if (data.status === "Publish") { - onSetPage({ - menuId: 2, - status: data.status, - }); - } - - if (data.status === "Reject") { - onSetPage({ - menuId: 2, - status: data.status, - }); - } - - router.push(path); -} - -function redirectDetailForumPage({ - data, - router, -}: { - data: MODEL_NOTIFIKASI; - router: AppRouterInstance; -}) { - if (data.status === null) { - const path = RouterForum.main_detail + data.appId; - router.push(path); - } - - if (data.status === "Report Komentar") { - const path = RouterForum.detail_report_komentar + data.appId; - router.push(path); - } - - if (data.status === "Report Posting") { - const path = RouterForum.detail_report_posting + data.appId; - router.push(path); - } -} diff --git a/src/app_modules/notifikasi/view_notifikasi.tsx b/src/app_modules/notifikasi/view_notifikasi.tsx new file mode 100644 index 00000000..2cb64dbf --- /dev/null +++ b/src/app_modules/notifikasi/view_notifikasi.tsx @@ -0,0 +1,19 @@ +import LayoutGlobal_UI_HeaderTamplate from "../component_global/ui/ui_header_tamplate"; +import LayoutGlobal_UI_Tamplate from "../component_global/ui/ui_layout_tamplate"; +import { Notifikasi_UiView } from "./component/ui_notifiaksi"; + +export default function Notifikasi_MainView({ + listNotifikasi, +}: { + listNotifikasi: any[]; +}) { + return ( + <> + } + > + + + + ); +} diff --git a/src/app_modules/user_search/component/is_empty_data.tsx b/src/app_modules/user_search/component/is_empty_data.tsx deleted file mode 100644 index ccfd8217..00000000 --- a/src/app_modules/user_search/component/is_empty_data.tsx +++ /dev/null @@ -1,13 +0,0 @@ -"use client"; - -import { Center } from "@mantine/core"; - -export default function ComponentUserSearch_IsEmptyData({ text }: { text: string }) { - return ( - <> -
- {text} -
- - ); -} diff --git a/src/app_modules/user_search/component/ui_user_search.tsx b/src/app_modules/user_search/component/ui_user_search.tsx new file mode 100644 index 00000000..7803fb89 --- /dev/null +++ b/src/app_modules/user_search/component/ui_user_search.tsx @@ -0,0 +1,310 @@ +"use client"; + +import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; +import ComponentGlobal_IsEmptyData from "@/app_modules/component_global/is_empty_data"; +import { MODEL_USER } from "@/app_modules/home/model/interface"; +import { + ActionIcon, + Avatar, + Box, + Center, + Grid, + Group, + Loader, + Stack, + Text, + TextInput, +} from "@mantine/core"; +import { IconChevronRight, IconSearch } from "@tabler/icons-react"; +import _ from "lodash"; +import { ScrollOnly } from "next-scroll-loader"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; +import { userSearch_getAllUser } from "../fun/get/get_all_user"; +import { MainColor } from "@/app_modules/component_global/color/color_pallet"; +import ComponentGlobal_UI_Loader from "@/app_modules/component_global/ui/ui_loader"; + +export function UserSearch_UiView({ listUser }: { listUser: MODEL_USER[] }) { + const [data, setData] = useState(listUser); + const [activePage, setActivePage] = useState(1); + const [isSearch, setIsSearch] = useState(""); + + async function onSearch(name: string) { + setIsSearch(name); + const loadData = await userSearch_getAllUser({ + page: activePage, + search: name, + }); + setData(loadData as any); + setActivePage(1); + } + + return ( + <> + + } + placeholder="Masukan username " + onChange={(val) => onSearch(val.target.value)} + /> + + {_.isEmpty(data) ? ( + + ) : ( + ( +
+ +
+ )} + data={data} + setData={setData} + moreData={async () => { + const loadData = await userSearch_getAllUser({ + page: activePage + 1, + search: isSearch, + }); + setActivePage((val) => val + 1); + + return loadData; + }} + > + {(item) => } +
+ )} +
+
+ {/*
{JSON.stringify(data, null, 2)}
*/} + + ); +} + +function CardView({ data }: { data: MODEL_USER }) { + const router = useRouter(); + const [loading, setLoading] = useState(false); + + return ( + <> + { + setLoading(true); + router.push(RouterProfile.katalog + `${data?.Profile?.id}`); + }} + > + + + + + + {data?.username} + + + +{data?.nomor} + + + + + +
+ + {loading ? ( + + ) : ( + + )} + +
+
+
+
+ + ); +} + +let dataDummy = [ + { + id: "clx8pl7r90005su4mldioo0v1", + username: "amalia 1", + nomor: "628980185458", + active: true, + masterUserRoleId: "1", + Profile: { + id: "clx8ptp7w000esu4ma275qnc8", + name: "Amalia Dwi", + imagesId: "clx8ptp7m000bsu4mwzbfvd9w", + }, + }, + { + id: "clx8pl7r90005su4mldioo0v1", + username: "amalia 2", + nomor: "628980185458", + active: true, + masterUserRoleId: "1", + Profile: { + id: "clx8ptp7w000esu4ma275qnc8", + name: "Amalia Dwi", + imagesId: "clx8ptp7m000bsu4mwzbfvd9w", + }, + }, + { + id: "clx8pl7r90005su4mldioo0v1", + username: "amalia 1", + nomor: "628980185458", + active: true, + masterUserRoleId: "1", + Profile: { + id: "clx8ptp7w000esu4ma275qnc8", + name: "Amalia Dwi", + imagesId: "clx8ptp7m000bsu4mwzbfvd9w", + }, + }, + { + id: "clx8pl7r90005su4mldioo0v1", + username: "amalia 2", + nomor: "628980185458", + active: true, + masterUserRoleId: "1", + Profile: { + id: "clx8ptp7w000esu4ma275qnc8", + name: "Amalia Dwi", + imagesId: "clx8ptp7m000bsu4mwzbfvd9w", + }, + }, + { + id: "clx8pl7r90005su4mldioo0v1", + username: "amalia 1", + nomor: "628980185458", + active: true, + masterUserRoleId: "1", + Profile: { + id: "clx8ptp7w000esu4ma275qnc8", + name: "Amalia Dwi", + imagesId: "clx8ptp7m000bsu4mwzbfvd9w", + }, + }, + { + id: "clx8pl7r90005su4mldioo0v1", + username: "amalia 2", + nomor: "628980185458", + active: true, + masterUserRoleId: "1", + Profile: { + id: "clx8ptp7w000esu4ma275qnc8", + name: "Amalia Dwi", + imagesId: "clx8ptp7m000bsu4mwzbfvd9w", + }, + }, + { + id: "clx8pl7r90005su4mldioo0v1", + username: "amalia 1", + nomor: "628980185458", + active: true, + masterUserRoleId: "1", + Profile: { + id: "clx8ptp7w000esu4ma275qnc8", + name: "Amalia Dwi", + imagesId: "clx8ptp7m000bsu4mwzbfvd9w", + }, + }, + { + id: "clx8pl7r90005su4mldioo0v1", + username: "amalia 2", + nomor: "628980185458", + active: true, + masterUserRoleId: "1", + Profile: { + id: "clx8ptp7w000esu4ma275qnc8", + name: "Amalia Dwi", + imagesId: "clx8ptp7m000bsu4mwzbfvd9w", + }, + }, + { + id: "clx8pl7r90005su4mldioo0v1", + username: "amalia 1", + nomor: "628980185458", + active: true, + masterUserRoleId: "1", + Profile: { + id: "clx8ptp7w000esu4ma275qnc8", + name: "Amalia Dwi", + imagesId: "clx8ptp7m000bsu4mwzbfvd9w", + }, + }, + { + id: "clx8pl7r90005su4mldioo0v1", + username: "amalia 2", + nomor: "628980185458", + active: true, + masterUserRoleId: "1", + Profile: { + id: "clx8ptp7w000esu4ma275qnc8", + name: "Amalia Dwi", + imagesId: "clx8ptp7m000bsu4mwzbfvd9w", + }, + }, + { + id: "clx8pl7r90005su4mldioo0v1", + username: "amalia 1", + nomor: "628980185458", + active: true, + masterUserRoleId: "1", + Profile: { + id: "clx8ptp7w000esu4ma275qnc8", + name: "Amalia Dwi", + imagesId: "clx8ptp7m000bsu4mwzbfvd9w", + }, + }, + { + id: "clx8pl7r90005su4mldioo0v1", + username: "amalia 2", + nomor: "628980185458", + active: true, + masterUserRoleId: "1", + Profile: { + id: "clx8ptp7w000esu4ma275qnc8", + name: "Amalia Dwi", + imagesId: "clx8ptp7m000bsu4mwzbfvd9w", + }, + }, + { + id: "clx8pl7r90005su4mldioo0v1", + username: "amalia 1", + nomor: "628980185458", + active: true, + masterUserRoleId: "1", + Profile: { + id: "clx8ptp7w000esu4ma275qnc8", + name: "Amalia Dwi", + imagesId: "clx8ptp7m000bsu4mwzbfvd9w", + }, + }, + { + id: "clx8pl7r90005su4mldioo0v1", + username: "amalia 2", + nomor: "628980185458", + active: true, + masterUserRoleId: "1", + Profile: { + id: "clx8ptp7w000esu4ma275qnc8", + name: "Amalia Dwi", + imagesId: "clx8ptp7m000bsu4mwzbfvd9w", + }, + }, +]; diff --git a/src/app_modules/user_search/fun/get/get_all_user.ts b/src/app_modules/user_search/fun/get/get_all_user.ts new file mode 100644 index 00000000..0eb2ac43 --- /dev/null +++ b/src/app_modules/user_search/fun/get/get_all_user.ts @@ -0,0 +1,58 @@ +"use server"; + +import prisma from "@/app/lib/prisma"; +import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; + +export async function userSearch_getAllUser({ + page, + search, +}: { + page: number; + search?: string; +}) { + const userLoginId = await user_getOneUserId(); + const takeData = 20; + const skipData = page * takeData - takeData; + + const data = await prisma.user.findMany({ + take: takeData, + skip: skipData, + orderBy: { + username: "asc", + }, + where: { + active: true, + masterUserRoleId: "1", + username: { + contains: search, + mode: "insensitive", + }, + NOT: { + Profile: null, + }, + OR: [ + { + NOT: { + id: userLoginId, + }, + }, + ], + }, + select: { + id: true, + username: true, + nomor: true, + active: true, + masterUserRoleId: true, + Profile: { + select: { + id: true, + name: true, + imagesId: true, + }, + }, + }, + }); + + return data; +} diff --git a/src/app_modules/user_search/fun/get/get_list_user.ts b/src/app_modules/user_search/fun/get/get_list_user.ts deleted file mode 100644 index 447332b3..00000000 --- a/src/app_modules/user_search/fun/get/get_list_user.ts +++ /dev/null @@ -1,59 +0,0 @@ -"use server"; - -import prisma from "@/app/lib/prisma"; -import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token"; - -export async function UserSearch_getListUser({ name }: { name: string }) { - const userLoginId = await user_getOneUserId(); - - if (name === "") { - const data = await prisma.user.findMany({ - where: { - masterUserRoleId: "1", - NOT: { - id: userLoginId, - }, - }, - select: { - id: true, - username: true, - nomor: true, - active: true, - masterUserRoleId: true, - Profile: { - select: { - id: true, - name: true, - imagesId: true, - }, - }, - }, - }); - return data; - } - - const getDataCari = await prisma.user.findMany({ - where: { - masterUserRoleId: "1", - Profile: { - name: { - contains: name, - mode: "insensitive", - }, - }, - NOT: { - id: userLoginId, - }, - }, - select: { - id: true, - username: true, - nomor: true, - active: true, - masterUserRoleId: true, - Profile: true, - }, - }); - - return getDataCari; -} diff --git a/src/app_modules/user_search/fun/search/fun_search_by_name.ts b/src/app_modules/user_search/fun/search/fun_search_by_name.ts deleted file mode 100644 index cf7ed1fd..00000000 --- a/src/app_modules/user_search/fun/search/fun_search_by_name.ts +++ /dev/null @@ -1,28 +0,0 @@ -"use server"; - -import prisma from "@/app/lib/prisma"; -import { useSearchParams } from "next/navigation"; -import { NextRequest } from "next/server"; - -export async function UserSearch_searchByName(name: string) { - const data = await prisma.user.findMany({ - where: { - Profile: { - name: { - contains: name, - mode: "insensitive", - }, - }, - }, - select: { - id: true, - username: true, - nomor: true, - active: true, - masterUserRoleId: true, - Profile: true, - }, - }); - - return data; -} diff --git a/src/app_modules/user_search/index.ts b/src/app_modules/user_search/index.ts index 06d26ed9..a3b7ce39 100644 --- a/src/app_modules/user_search/index.ts +++ b/src/app_modules/user_search/index.ts @@ -1,7 +1,3 @@ -import UserSearch_MainView from "./main"; -import LayoutUserSearch_MainView from "./main/layout"; +import UserSearch_MainView from "./view_user_seach"; -export { - UserSearch_MainView, - LayoutUserSearch_MainView, -} \ No newline at end of file +export { UserSearch_MainView }; diff --git a/src/app_modules/user_search/main/index.tsx b/src/app_modules/user_search/main/index.tsx deleted file mode 100644 index 1ef06bf1..00000000 --- a/src/app_modules/user_search/main/index.tsx +++ /dev/null @@ -1,131 +0,0 @@ -"use client"; - -import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; -import { MODEL_USER } from "@/app_modules/home/model/interface"; -import { - ActionIcon, - Avatar, - Box, - Center, - Divider, - Grid, - Paper, - Stack, - Text, - TextInput, - Title, -} from "@mantine/core"; -import { IconChevronRight, IconSearch } from "@tabler/icons-react"; -import { useState } from "react"; -import { UserSearch_searchByName } from "../fun/search/fun_search_by_name"; -import { useRouter } from "next/navigation"; -import ComponentGlobal_MaintenanceInformation from "@/app_modules/component_global/maintenance_information"; -import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; -import { data } from "autoprefixer"; -import { UserSearch_getListUser } from "../fun/get/get_list_user"; -import _ from "lodash"; -import ComponentUserSearch_IsEmptyData from "../component/is_empty_data"; - -export default function UserSearch_MainView({ - listUser, -}: { - listUser: MODEL_USER[]; -}) { - const router = useRouter(); - const [data, setData] = useState(listUser); - const [loading, setLoading] = useState(false); - - async function onSearch(name: string) { - await UserSearch_getListUser({ name: name }).then((res) => - setData(res as any) - ); - } - - // return ( - // <> - //
- // - //
- // - // ); - - if (loading) return ; - - return ( - <> - - - } - placeholder="Masukan nama pegguna" - onChange={(val) => onSearch(val.target.value)} - /> - - {_.isEmpty(data) ? ( - - ) : ( - - {data?.map((e, i) => - e?.Profile === null ? ( - "" - ) : ( - - - -
- -
-
- - - - {e?.Profile?.name} - - - +{e?.nomor} - - - - -
- { - setLoading(true); - router.push( - RouterProfile.katalog + `${e?.Profile?.id}` - ); - }} - > - - -
-
-
- -
- ) - )} -
- )} -
-
-
- {/*
{JSON.stringify(data, null, 2)}
*/} - - ); -} diff --git a/src/app_modules/user_search/main/layout.tsx b/src/app_modules/user_search/main/layout.tsx deleted file mode 100644 index 90a09ba4..00000000 --- a/src/app_modules/user_search/main/layout.tsx +++ /dev/null @@ -1,22 +0,0 @@ -"use client"; - -import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate"; -import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate"; -import { AppShell } from "@mantine/core"; -import React from "react"; - -export default function LayoutUserSearch_MainView({ - children, -}: { - children: React.ReactNode; -}) { - return ( - <> - } - > - {children} - - - ); -} diff --git a/src/app_modules/user_search/view_user_seach.tsx b/src/app_modules/user_search/view_user_seach.tsx new file mode 100644 index 00000000..371cf957 --- /dev/null +++ b/src/app_modules/user_search/view_user_seach.tsx @@ -0,0 +1,22 @@ + +import { MODEL_USER } from "@/app_modules/home/model/interface"; +import LayoutGlobal_UI_HeaderTamplate from "../component_global/ui/ui_header_tamplate"; +import LayoutGlobal_UI_Tamplate from "../component_global/ui/ui_layout_tamplate"; +import { UserSearch_UiView } from "./component/ui_user_search"; + +export default function UserSearch_MainView({ + listUser, +}: { + listUser: MODEL_USER[]; +}) { + return ( + <> + } + > + + + {/*
{JSON.stringify(data, null, 2)}
*/} + + ); +} diff --git a/src/app_modules/zCoba/index.tsx b/src/app_modules/zCoba/index.tsx index aabf6483..50213dba 100644 --- a/src/app_modules/zCoba/index.tsx +++ b/src/app_modules/zCoba/index.tsx @@ -28,8 +28,8 @@ import { useShallowEffect } from "@mantine/hooks"; import { ScrollOnly } from "next-scroll-loader"; import _ from "lodash"; import ComponentGlobal_V2_LoadingPage from "../component_global/loading_page_v2"; -import ComponentGlobal_UI_LayoutTamplate from "../component_global/ui/ui_layout_tamplate"; -import ComponentGlobal_UI_HeaderTamplate from "../component_global/ui/ui_header_tamplate"; +import LayoutGlobal_UI_Tamplate from "../component_global/ui/ui_layout_tamplate"; +import LayoutGlobal_UI_HeaderTamplate from "../component_global/ui/ui_header_tamplate"; import { Icon123, IconPencilPlus, IconX } from "@tabler/icons-react"; import { AccentColor, MainColor } from "../component_global/color/color_pallet"; @@ -83,9 +83,9 @@ export default function Coba_TestLoading() { return ( <> - + - + ); @@ -203,7 +203,7 @@ function BackgroundImageComponent() { pos={"sticky"} top={0} > - + {/* Children */} From 5f620c030b813b6bcc0e0fce909112ef4888fc7f Mon Sep 17 00:00:00 2001 From: Bagasbanuna02 Date: Wed, 10 Jul 2024 10:11:43 +0800 Subject: [PATCH 2/3] #style: UI Katalog Desc: - Tampilan UI katalog selesai diubah ## No Issuee --- src/app/dev/katalog/[id]/layout.tsx | 25 ++- src/app/dev/katalog/[id]/loading.tsx | 9 - src/app/dev/katalog/[id]/page.tsx | 28 +--- src/app_modules/auth/index.ts | 4 +- src/app_modules/auth/logout/view.tsx | 106 ++++++------ src/app_modules/auth/register/view.tsx | 2 +- src/app_modules/auth/validasi/view.tsx | 2 +- .../component_global/ui/ui_drawer.tsx | 22 ++- .../ui/ui_layout_tamplate.tsx | 3 +- .../home/user_non_active/index.tsx | 4 +- src/app_modules/job/detail/draft/layout.tsx | 4 +- .../katalog/component/button_header_right.tsx | 44 +++++ .../katalog/component/drawer_katalog.tsx | 118 +++++++++++++ src/app_modules/katalog/index.ts | 3 +- src/app_modules/katalog/main/index.ts | 2 +- src/app_modules/katalog/main/layout.tsx | 103 +++--------- src/app_modules/katalog/main/view.tsx | 49 ------ src/app_modules/katalog/main/view_katalog.tsx | 33 ++++ .../katalog/portofolio/create/view.tsx | 24 +-- .../katalog/portofolio/list_view/view.tsx | 1 - .../katalog/portofolio/ui_portofolio.tsx | 141 ++++++++++++++++ src/app_modules/katalog/profile/edit/view.tsx | 14 +- .../profile/fun/get/get_one_user_profile.ts | 27 ++- src/app_modules/katalog/profile/index.ts | 16 +- .../main/{view.tsx => view_profile.tsx} | 11 +- .../katalog/profile/ui_profile.tsx | 156 ++++++++++++++++++ src/app_modules/katalog/ui/ui_katalog.tsx | 31 ++++ src/app_modules/katalog/view_katalog.tsx | 23 +++ src/app_modules/zCoba/index.tsx | 133 +-------------- 29 files changed, 722 insertions(+), 416 deletions(-) delete mode 100644 src/app/dev/katalog/[id]/loading.tsx create mode 100644 src/app_modules/katalog/component/button_header_right.tsx create mode 100644 src/app_modules/katalog/component/drawer_katalog.tsx delete mode 100644 src/app_modules/katalog/main/view.tsx create mode 100644 src/app_modules/katalog/main/view_katalog.tsx create mode 100644 src/app_modules/katalog/portofolio/ui_portofolio.tsx rename src/app_modules/katalog/profile/main/{view.tsx => view_profile.tsx} (96%) create mode 100644 src/app_modules/katalog/profile/ui_profile.tsx create mode 100644 src/app_modules/katalog/ui/ui_katalog.tsx create mode 100644 src/app_modules/katalog/view_katalog.tsx 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_modules/auth/index.ts b/src/app_modules/auth/index.ts index 599f9aaa..e7f9843f 100644 --- a/src/app_modules/auth/index.ts +++ b/src/app_modules/auth/index.ts @@ -2,12 +2,12 @@ import SplashScreen from "./splash/view"; import Login from "./login/view"; import Validasi from "./validasi/view"; 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, + Component_Logout as Logout, }; diff --git a/src/app_modules/auth/logout/view.tsx b/src/app_modules/auth/logout/view.tsx index 51524892..d50ad426 100644 --- a/src/app_modules/auth/logout/view.tsx +++ b/src/app_modules/auth/logout/view.tsx @@ -1,6 +1,14 @@ "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"; @@ -12,13 +20,13 @@ import { auth_Logout } from "../fun/fun_logout"; import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; import { RouterAuth } from "@/app/lib/router_hipmi/router_auth"; import { useState } from "react"; +import ComponentGlobal_UI_Modal from "@/app_modules/component_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 59dd2e1f..3eeec6e2 100644 --- a/src/app_modules/auth/register/view.tsx +++ b/src/app_modules/auth/register/view.tsx @@ -66,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); } diff --git a/src/app_modules/auth/validasi/view.tsx b/src/app_modules/auth/validasi/view.tsx index 2b729418..83c32c8d 100644 --- a/src/app_modules/auth/validasi/view.tsx +++ b/src/app_modules/auth/validasi/view.tsx @@ -48,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); } diff --git a/src/app_modules/component_global/ui/ui_drawer.tsx b/src/app_modules/component_global/ui/ui_drawer.tsx index ccbd53fe..7a52b0a7 100644 --- a/src/app_modules/component_global/ui/ui_drawer.tsx +++ b/src/app_modules/component_global/ui/ui_drawer.tsx @@ -12,6 +12,12 @@ import { MainColor, AccentColor } from "../color/color_pallet"; import React from "react"; import { useRouter } from "next/navigation"; +interface MODEL_DRAWER { + id: string; + name: string; + icon: string; + path: string; +} export default function ComponentGlobal_UI_Drawer({ opened, close, @@ -19,7 +25,7 @@ export default function ComponentGlobal_UI_Drawer({ }: { opened: boolean; close: () => void; - component: any[]; + component: MODEL_DRAWER[] | any[]; }) { const router = useRouter(); return ( @@ -32,10 +38,16 @@ export default function ComponentGlobal_UI_Drawer({ withCloseButton={false} styles={{ content: { + padding: 0, + position: "absolute", + margin: "auto", backgroundColor: "transparent", + left: 0, + right: 0, + width: 500, }, body: { - backgroundColor: MainColor.darkblue, + backgroundColor: AccentColor.darkblue, borderTop: `2px solid ${AccentColor.blue}`, borderRight: `1px solid ${AccentColor.blue}`, borderLeft: `1px solid ${AccentColor.blue}`, @@ -51,7 +63,7 @@ export default function ComponentGlobal_UI_Drawer({ - + {component.map((e, i) => ( {e.icon} - {e.name} + + {e.name} + ))} diff --git a/src/app_modules/component_global/ui/ui_layout_tamplate.tsx b/src/app_modules/component_global/ui/ui_layout_tamplate.tsx index d9823a7a..d7cce1d6 100644 --- a/src/app_modules/component_global/ui/ui_layout_tamplate.tsx +++ b/src/app_modules/component_global/ui/ui_layout_tamplate.tsx @@ -27,11 +27,12 @@ export default function LayoutGlobal_UI_Tamplate({ h={"100%"} style={{ overflowY: "auto", + overflowX: "auto", backgroundColor: MainColor.black, position: "fixed", }} > - + Tunggu Konfirmasi Admin ! - +
diff --git a/src/app_modules/job/detail/draft/layout.tsx b/src/app_modules/job/detail/draft/layout.tsx index 90dc406a..4d322916 100644 --- a/src/app_modules/job/detail/draft/layout.tsx +++ b/src/app_modules/job/detail/draft/layout.tsx @@ -14,7 +14,7 @@ import { } from "@mantine/core"; import React from "react"; import ComponentJob_HeaderTamplate from "../../component/header_tamplate"; -import { IconDots, IconEdit, IconX } from "@tabler/icons-react"; +import { IconDots, IconDotsVertical, IconEdit, IconX } from "@tabler/icons-react"; import { RouterJob } from "@/app/lib/router_hipmi/router_job"; import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate"; import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; @@ -54,7 +54,7 @@ export default function LayoutJob_DetailDraft({ title="Detail Draft" iconRight={ open()}> - + } // routerRight={} diff --git a/src/app_modules/katalog/component/button_header_right.tsx b/src/app_modules/katalog/component/button_header_right.tsx new file mode 100644 index 00000000..dc0bdd32 --- /dev/null +++ b/src/app_modules/katalog/component/button_header_right.tsx @@ -0,0 +1,44 @@ +"use client"; + +import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; +import ComponentGlobal_UI_Drawer from "@/app_modules/component_global/ui/ui_drawer"; +import { ActionIcon, Box } from "@mantine/core"; +import { useDisclosure } from "@mantine/hooks"; +import { + IconDots, + IconDotsVertical, + IconEdit, + IconPhotoEdit, + IconPolaroid, +} from "@tabler/icons-react"; +import { ComponentKatalog_DrawerKatalog } from "./drawer_katalog"; + +export function ComponentKatalog_ButtonHeaderRight({ + profileId, + userLoginId, + authorId, +}: { + profileId: string; + userLoginId: string; + authorId: string; +}) { + const [opened, { open, close }] = useDisclosure(); + + return ( + <> + {authorId !== userLoginId ? ( + + ) : ( + open()}> + + + )} + + close()} + profileId={profileId} + /> + + ); +} diff --git a/src/app_modules/katalog/component/drawer_katalog.tsx b/src/app_modules/katalog/component/drawer_katalog.tsx new file mode 100644 index 00000000..135837f0 --- /dev/null +++ b/src/app_modules/katalog/component/drawer_katalog.tsx @@ -0,0 +1,118 @@ +import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; +import Component_Logout from "@/app_modules/auth/logout/view"; +import { AccentColor } from "@/app_modules/component_global/color/color_pallet"; +import ComponentGlobal_UI_Loader from "@/app_modules/component_global/ui/ui_loader"; +import { + ActionIcon, + Drawer, + Group, + SimpleGrid, + Stack, + Text, +} from "@mantine/core"; +import { + IconEdit, + IconLogout, + IconLogout2, + IconPhotoEdit, + IconPolaroid, + IconX, +} from "@tabler/icons-react"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; + +export function ComponentKatalog_DrawerKatalog({ + opened, + close, + profileId, +}: { + opened: boolean; + close: () => void; + profileId: string; +}) { + const router = useRouter(); + const [pageId, setPageId] = useState(""); + const [isLoading, setIsLoading] = useState(false); + + const listPage = [ + { + id: "1", + name: "Edit profile", + icon: , + path: RouterProfile.edit + profileId, + }, + { + id: "2", + name: "Ubah Foto Profile", + icon: , + path: RouterProfile.update_foto_profile + profileId, + }, + { + id: "3", + name: "Ubah Latar Belakang", + icon: , + path: RouterProfile.update_foto_background + profileId, + }, + ]; + + 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%", + }, + }} + > + + + + + + + + {listPage.map((e, i) => ( + + { + router.push(e.path); + setPageId(e?.id); + setIsLoading(true) + }} + > + {isLoading && e.id === pageId ? : e.icon} + + + {e.name} + + + ))} + + + + + + ); +} diff --git a/src/app_modules/katalog/index.ts b/src/app_modules/katalog/index.ts index 215b6612..c95adbb5 100644 --- a/src/app_modules/katalog/index.ts +++ b/src/app_modules/katalog/index.ts @@ -1,3 +1,4 @@ import HeaderTransparent from "./component/header_transparent"; -export {HeaderTransparent as headerTransparent} \ No newline at end of file +export { HeaderTransparent as headerTransparent }; +export { Katalog_MainView } from "./view_katalog"; diff --git a/src/app_modules/katalog/main/index.ts b/src/app_modules/katalog/main/index.ts index e1ebf6e6..d45aca2e 100644 --- a/src/app_modules/katalog/main/index.ts +++ b/src/app_modules/katalog/main/index.ts @@ -1,4 +1,4 @@ -import KatalogView from "./view"; +import KatalogView from "./view_katalog"; import KatalogLayout from "./layout"; export {KatalogView, KatalogLayout} \ No newline at end of file diff --git a/src/app_modules/katalog/main/layout.tsx b/src/app_modules/katalog/main/layout.tsx index f6707ee2..c20e6148 100644 --- a/src/app_modules/katalog/main/layout.tsx +++ b/src/app_modules/katalog/main/layout.tsx @@ -1,103 +1,38 @@ "use client"; -import { Logout } from "@/app_modules/auth"; -import { - ActionIcon, - AppShell, - Group, - Header, - Text, - Title, -} from "@mantine/core"; -import { - IconUserSearch, - IconAward, - IconQrcode, - IconArrowLeft, - IconPencilPlus, - IconChevronLeft, - IconDashboard, -} from "@tabler/icons-react"; -import { useRouter } from "next/navigation"; -import ComponentKatalog_HeaderTamplate from "../component/header_tamplate"; -import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; -import { RouterHome } from "@/app/lib/router_hipmi/router_home"; -import { title } from "process"; -import { RouterAdminDashboard } from "@/app/lib/router_hipmi/router_admin"; -import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate"; +import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import { ComponentKatalog_ButtonHeaderRight } from "../component/button_header_right"; export default function KatalogLayout({ children, profileId, + userLoginId, + authorId, }: { children: any; profileId: any; + userLoginId: string; + authorId: string; }) { - const router = useRouter(); - return ( <> - - - { - router.back(); - }} - > - - - - Katalog - - - {/* router.push(RouterAdminDashboard.splash_admin)} - > - - */} - - + + } + /> } > {children} - - - ); - - return ( - <> - - - { - router.back(); - }} - > - - - - Katalog - - - {/* router.push(RouterAdminDashboard.splash_admin)} - > - - */} - - - } - > - {children} - + ); } diff --git a/src/app_modules/katalog/main/view.tsx b/src/app_modules/katalog/main/view.tsx deleted file mode 100644 index ae6263ce..00000000 --- a/src/app_modules/katalog/main/view.tsx +++ /dev/null @@ -1,49 +0,0 @@ -"use client"; - -import { Warna } from "@/app/lib/warna"; -import { - ActionIcon, - BackgroundImage, - Box, - Center, - Flex, - Grid, - Group, - Image, - Paper, - Stack, - Text, -} from "@mantine/core"; -import { ProfileView } from "../profile"; -import { ListPortofolioView } from "../portofolio"; -import { MODEL_PROFILE_OLD } from "@/app_modules/home/model/user_profile"; -import { MODEL_PORTOFOLIO_Lama } from "@/app_modules/model_global/portofolio"; -import User_Logout from "@/app_modules/auth/logout/view"; -import { MODEL_PORTOFOLIO } from "../portofolio/model/interface"; -import { MODEL_PROFILE } from "../profile/model/interface"; - -export default function KatalogView({ - profile, - listPorto, - userLoginId, -}: { - profile: MODEL_PROFILE; - listPorto: MODEL_PORTOFOLIO; - userLoginId: string; -}) { - return ( - <> - - - - - {profile?.User.id === userLoginId ? : ""} - - - - ); -} diff --git a/src/app_modules/katalog/main/view_katalog.tsx b/src/app_modules/katalog/main/view_katalog.tsx new file mode 100644 index 00000000..d8eb6f19 --- /dev/null +++ b/src/app_modules/katalog/main/view_katalog.tsx @@ -0,0 +1,33 @@ +"use client"; + +import Component_Logout from "@/app_modules/auth/logout/view"; +import { + Stack +} from "@mantine/core"; +import { MODEL_PORTOFOLIO } from "../portofolio/model/interface"; +import { Portofolio_UiView } from "../portofolio/ui_portofolio"; +import { MODEL_PROFILE } from "../profile/model/interface"; +import { Profile_UiView } from "../profile/ui_profile"; + +export default function KatalogView({ + profile, + listPorto, + userLoginId, +}: { + profile: MODEL_PROFILE; + listPorto: MODEL_PORTOFOLIO; + userLoginId: string; +}) { + return ( + <> + + + + + + ); +} diff --git a/src/app_modules/katalog/portofolio/create/view.tsx b/src/app_modules/katalog/portofolio/create/view.tsx index 33326b5d..b690a15b 100644 --- a/src/app_modules/katalog/portofolio/create/view.tsx +++ b/src/app_modules/katalog/portofolio/create/view.tsx @@ -1,8 +1,11 @@ "use client"; -import { myConsole } from "@/app/fun/my_console"; -import { ApiHipmi } from "@/app/lib/api"; import { Warna } from "@/app/lib/warna"; +import ComponentGlobal_ErrorInput from "@/app_modules/component_global/error_input"; +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_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; import { BIDANG_BISNIS_OLD, MODEL_PORTOFOLIO_OLD, @@ -16,25 +19,16 @@ import { Paper, Select, Stack, - Text, TextInput, - Textarea, - Title, + Textarea } from "@mantine/core"; +import { IconCamera } from "@tabler/icons-react"; import _ from "lodash"; +import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime"; import { useRouter } from "next/navigation"; import { useState } from "react"; -import toast from "react-simple-toasts"; -import funCreatePortofolio from "../fun/fun_create_portofolio"; -import { IconCamera } from "@tabler/icons-react"; import ComponentKatalog_NotedBox from "../../component/noted_box"; -import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime"; -import { NotifPeringatan } from "@/app_modules/donasi/component/notifikasi/notif_peringatan"; -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_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; -import ComponentGlobal_ErrorInput from "@/app_modules/component_global/error_input"; -import ComponentGlobal_InputCountDown from "@/app_modules/component_global/input_countdown"; +import funCreatePortofolio from "../fun/fun_create_portofolio"; export default function CreatePortofolio({ bidangBisnis, diff --git a/src/app_modules/katalog/portofolio/list_view/view.tsx b/src/app_modules/katalog/portofolio/list_view/view.tsx index 9906372b..f6efd726 100644 --- a/src/app_modules/katalog/portofolio/list_view/view.tsx +++ b/src/app_modules/katalog/portofolio/list_view/view.tsx @@ -42,7 +42,6 @@ export default function ListPortofolioView({ userLoginId: string; }) { const router = useRouter(); - // const [porto, setPorto] = useState(listPorto); const [loading, setLoading] = useState(false); const [loadingPorto, setLoadingPorto] = useState(false); const [idPorto, setIdPorto] = useState(""); diff --git a/src/app_modules/katalog/portofolio/ui_portofolio.tsx b/src/app_modules/katalog/portofolio/ui_portofolio.tsx new file mode 100644 index 00000000..0b04792b --- /dev/null +++ b/src/app_modules/katalog/portofolio/ui_portofolio.tsx @@ -0,0 +1,141 @@ +import { useRouter } from "next/navigation"; +import { MODEL_PROFILE } from "../profile/model/interface"; +import { MODEL_PORTOFOLIO } from "./model/interface"; +import { useState } from "react"; +import { RouterPortofolio } from "@/app/lib/router_hipmi/router_katalog"; +import { Warna } from "@/app/lib/warna"; +import { + Paper, + Stack, + Group, + ActionIcon, + Title, + Box, + ScrollArea, + Center, + SimpleGrid, + Grid, + Loader, + Text, +} from "@mantine/core"; +import { IconPencilPlus, IconCaretRight } from "@tabler/icons-react"; +import _ from "lodash"; +import { + AccentColor, + MainColor, +} from "@/app_modules/component_global/color/color_pallet"; +import ComponentGlobal_UI_Loader from "@/app_modules/component_global/ui/ui_loader"; + +export function Portofolio_UiView({ + listPorto, + profile, + userLoginId, +}: { + listPorto: MODEL_PORTOFOLIO[]; + profile: MODEL_PROFILE; + userLoginId: string; +}) { + const router = useRouter(); + const [loading, setLoading] = useState(false); + const [loadingPorto, setLoadingPorto] = useState(false); + const [idPorto, setIdPorto] = useState(""); + return ( + <> + + + + + Portofolio + {profile?.User.id === userLoginId ? ( + { + router.push(RouterPortofolio.create + `${profile.id}`); + setLoading(true); + }} + > + {loading ? ( + + ) : ( + + )} + + ) : ( + + )} + + + + {_.isEmpty(listPorto) ? ( +
+ + - Belum Ada Portofolio - + +
+ ) : ( + + {listPorto.map((e, i) => ( + { + setIdPorto(e?.id); + setLoadingPorto(true); + router.push(`/dev/portofolio/main/${e?.id}/`); + }} + > + + + + {e?.namaBisnis} + + + + + {idPorto === e?.id && loadingPorto ? ( + + ) : ( + + )} + + + + + ))} + + )} +
+
+
+
+ + ); +} diff --git a/src/app_modules/katalog/profile/edit/view.tsx b/src/app_modules/katalog/profile/edit/view.tsx index ff14742e..51793b8e 100644 --- a/src/app_modules/katalog/profile/edit/view.tsx +++ b/src/app_modules/katalog/profile/edit/view.tsx @@ -1,25 +1,17 @@ "use client"; -import { myConsole } from "@/app/fun/my_console"; -import { ApiHipmi } from "@/app/lib/api"; import { Warna } from "@/app/lib/warna"; import { Button, Loader, Select, Stack, TextInput } from "@mantine/core"; -import { useShallowEffect } from "@mantine/hooks"; -import { useAtom } from "jotai"; import _ from "lodash"; import { useRouter } from "next/navigation"; import { useState } from "react"; -import toast from "react-simple-toasts"; -import funEditProfile from "../fun/fun_edit_profile"; +import ComponentGlobal_ErrorInput from "@/app_modules/component_global/error_input"; 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_PROFILE } from "../model/interface"; -import { Profile_funEditById } from "../fun/update/fun_edit_profile_by_id"; -import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; import { validRegex } from "../../component/regular_expressions"; -import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; -import ComponentGlobal_ErrorInput from "@/app_modules/component_global/error_input"; +import { Profile_funEditById } from "../fun/update/fun_edit_profile_by_id"; +import { MODEL_PROFILE } from "../model/interface"; export default function EditProfile({ data }: { data: MODEL_PROFILE }) { const router = useRouter(); diff --git a/src/app_modules/katalog/profile/fun/get/get_one_user_profile.ts b/src/app_modules/katalog/profile/fun/get/get_one_user_profile.ts index 68a34ee7..9403b99a 100644 --- a/src/app_modules/katalog/profile/fun/get/get_one_user_profile.ts +++ b/src/app_modules/katalog/profile/fun/get/get_one_user_profile.ts @@ -8,21 +8,18 @@ export async function Profile_getOneProfileAndUserById(profileId: string) { id: profileId, }, select: { - userId: true, - User: true, - id: true, - name: true, - email: true, - alamat: true, - jenisKelamin: true, - imagesId: true, - imagesBackgroundId: true, - ImageProfile: true, - ImagesBackground: true - - - - } + userId: true, + User: true, + id: true, + name: true, + email: true, + alamat: true, + jenisKelamin: true, + imagesId: true, + imagesBackgroundId: true, + ImageProfile: true, + ImagesBackground: true, + }, }); // console.log(data) return data; diff --git a/src/app_modules/katalog/profile/index.ts b/src/app_modules/katalog/profile/index.ts index 2590cf5e..b23c734c 100644 --- a/src/app_modules/katalog/profile/index.ts +++ b/src/app_modules/katalog/profile/index.ts @@ -2,18 +2,12 @@ import ProfileLayout from "./create/layout"; import CreateProfile from "./create/view"; import EditProfileLayout from "./edit/layout"; import EditProfileView from "./edit/view"; +import ProfileView from "./main/view_profile"; import UploadFotoProfile from "./upload/foto_profile"; -import UploadFotoProfileLayout from "./upload/foto_profile/layout" -import ProfileView from "./main/view"; -import Profile_UpdateFotoBackground from "./upload/foto_background"; -import LayoutProfile_UpdateFotoBackground from "./upload/foto_background/layout"; +import UploadFotoProfileLayout from "./upload/foto_profile/layout"; export { - ProfileLayout, - CreateProfile, - EditProfileView, - EditProfileLayout, - UploadFotoProfile, - UploadFotoProfileLayout, - ProfileView + CreateProfile, EditProfileLayout, EditProfileView, ProfileLayout, ProfileView, UploadFotoProfile, + UploadFotoProfileLayout }; + diff --git a/src/app_modules/katalog/profile/main/view.tsx b/src/app_modules/katalog/profile/main/view_profile.tsx similarity index 96% rename from src/app_modules/katalog/profile/main/view.tsx rename to src/app_modules/katalog/profile/main/view_profile.tsx index 0a25fdf7..b8d0a8c4 100644 --- a/src/app_modules/katalog/profile/main/view.tsx +++ b/src/app_modules/katalog/profile/main/view_profile.tsx @@ -31,6 +31,7 @@ import { useState } from "react"; import { MODEL_PROFILE_OLD } from "@/app_modules/home/model/user_profile"; import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; import { MODEL_PROFILE } from "../model/interface"; +import { AccentColor, MainColor } from "@/app_modules/component_global/color/color_pallet"; export default function ProfileView({ profile, @@ -44,16 +45,14 @@ export default function ProfileView({ const [loadingBG, setLoadingBG] = useState(false); const [loadingEdit, setLoadingEdit] = useState(false); - // const [data, setData] = useState(profile); - // useShallowEffect(() => { - // funGetUserProfile(user.id ?? "").then(setProfile as any); - // }, []); - // if (!profile) return <>; return ( <> {/*
{JSON.stringify(profile, null,2)}
*/} - + {/* Background dan foto */} {/* Upload Background Profile */} diff --git a/src/app_modules/katalog/profile/ui_profile.tsx b/src/app_modules/katalog/profile/ui_profile.tsx new file mode 100644 index 00000000..541ab28d --- /dev/null +++ b/src/app_modules/katalog/profile/ui_profile.tsx @@ -0,0 +1,156 @@ +"use client"; + +import { + MainColor, + AccentColor, +} from "@/app_modules/component_global/color/color_pallet"; +import { + Avatar, + Box, + Center, + Group, + Image, + Paper, + Stack, + Text, + ThemeIcon, +} from "@mantine/core"; +import { MODEL_PROFILE } from "./model/interface"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; +import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; +import { + IconBrandGmail, + IconGenderFemale, + IconGenderMale, + IconHome, + IconPhone, +} from "@tabler/icons-react"; + +export function Profile_UiView({ + profile, + userLoginId, +}: { + profile: MODEL_PROFILE; + userLoginId: string; +}) { + const router = useRouter(); + const [loadingPP, setLoadingPP] = useState(false); + const [loadingBG, setLoadingBG] = useState(false); + const [loadingEdit, setLoadingEdit] = useState(false); + + const listInformation = [ + { + icon: , + value: profile?.User.nomor, + }, + { + icon: , + value: profile?.email, + }, + { + icon: , + value: profile?.alamat, + }, + { + icon: + profile.jenisKelamin === "Laki-laki" ? ( + + ) : ( + + ), + value: profile?.jenisKelamin, + }, + ]; + + return ( + <> + + + Background + +
+ +
+ + + {profile?.name} + + + @{profile?.User?.username} + + +
+
+ + + + {listInformation.map((e, i) => ( + + + {e.icon} + + + {e?.value} + + + ))} + + + {/*
+          {JSON.stringify(profile, null, 2)}
+        
*/} +
+ + ); +} diff --git a/src/app_modules/katalog/ui/ui_katalog.tsx b/src/app_modules/katalog/ui/ui_katalog.tsx new file mode 100644 index 00000000..bee69dbe --- /dev/null +++ b/src/app_modules/katalog/ui/ui_katalog.tsx @@ -0,0 +1,31 @@ +"use client" + +import { Stack } from "@mantine/core"; +import { Portofolio_UiView } from "../portofolio/ui_portofolio"; +import { Profile_UiView } from "../profile/ui_profile"; +import { MODEL_PORTOFOLIO } from "../portofolio/model/interface"; +import { MODEL_PROFILE } from "../profile/model/interface"; + + +export function Katalog_UiView({ + profile, + listPorto, + userLoginId, +}: { + profile: MODEL_PROFILE; + listPorto: MODEL_PORTOFOLIO; + userLoginId: string; +}) { + return ( + <> + + + + + + ); +} \ No newline at end of file diff --git a/src/app_modules/katalog/view_katalog.tsx b/src/app_modules/katalog/view_katalog.tsx new file mode 100644 index 00000000..5829b0a3 --- /dev/null +++ b/src/app_modules/katalog/view_katalog.tsx @@ -0,0 +1,23 @@ +import { MODEL_PORTOFOLIO } from "./portofolio/model/interface"; +import { MODEL_PROFILE } from "./profile/model/interface"; +import { Katalog_UiView } from "./ui/ui_katalog"; + +export async function Katalog_MainView({ + profile, + listPorto, + userLoginId, +}: { + profile: MODEL_PROFILE; + listPorto: MODEL_PORTOFOLIO; + userLoginId: string; +}) { + return ( + <> + + + ); +} diff --git a/src/app_modules/zCoba/index.tsx b/src/app_modules/zCoba/index.tsx index 50213dba..e38bc529 100644 --- a/src/app_modules/zCoba/index.tsx +++ b/src/app_modules/zCoba/index.tsx @@ -2,36 +2,16 @@ import { ActionIcon, - Affix, - BackgroundImage, Box, Button, - Center, - Group, - LoadingOverlay, - Paper, - ScrollArea, - SimpleGrid, - Skeleton, - Stack, - Text, - rem, + Stack } from "@mantine/core"; import { useState } from "react"; -import useInfiniteScroll, { - ScrollDirection, -} from "react-easy-infinite-scroll-hook"; -import { createItems, loadMore } from "./utils"; -import { v4 as uuidv4 } from "uuid"; -import { useShallowEffect } from "@mantine/hooks"; -import { ScrollOnly } from "next-scroll-loader"; +import { IconPencilPlus } from "@tabler/icons-react"; import _ from "lodash"; -import ComponentGlobal_V2_LoadingPage from "../component_global/loading_page_v2"; import LayoutGlobal_UI_Tamplate from "../component_global/ui/ui_layout_tamplate"; -import LayoutGlobal_UI_HeaderTamplate from "../component_global/ui/ui_header_tamplate"; -import { Icon123, IconPencilPlus, IconX } from "@tabler/icons-react"; -import { AccentColor, MainColor } from "../component_global/color/color_pallet"; + const newData = Array(20) .fill(0) @@ -56,49 +36,16 @@ const data2 = [ ]; export default function Coba_TestLoading() { - // const [data, setData] = useState(newData); - // const [isLoading, setIsLoading] = useState(false); - - // return ( - // <> - // { - // const newData = Array.from( - // { length: 50 }, - // (_, i) => i + data.length + 1 - // ); - // await new Promise((resolve) => setTimeout(resolve, 2000)); - // return newData; - // }} - // > - // {(item) =>
{item}
} - //
- // - // ); - const [data, setData] = useState(data2); + const [openDrawer, setOpenDrawer] = useState(false); return ( <> - + {/* */} + - - ); - return ( - <> - - {Array(50) - .fill(0) - .map((e, i) => ( - {i + 1} - ))} - - ); @@ -174,71 +121,3 @@ function CreateButton() { ); } - -function BackgroundImageComponent() { - const footer = ( - - {Array.from({ length: 4 }).map((e, i) => ( -
- - - - - Apa - -
- ))} -
- ); - return ( - <> - - {/* Header */} - - - - - {/* Children */} - - - {Array.from({ length: 10 }).map((e, i) => ( - - {i + 1} - - ))} - - - - {/* Footer */} - - - {footer} - - - - - ); -} From ab6f2fe8a75e479e21967e868f87fa6bdf336c3c Mon Sep 17 00:00:00 2001 From: Bagasbanuna02 Date: Wed, 10 Jul 2024 17:07:41 +0800 Subject: [PATCH 3/3] #style: UI Katalog Deskripsi: - UI Katalog selesai - UI Portofolio selesai - UI Profile selesa ## NO Isuuee --- .../55409a1f-8d3d-455a-b5bf-10cd64eda28b.png | Bin 0 -> 6638 bytes .../a7ebdb61-1200-45b3-b868-ed9cc811c8b8.png | Bin 0 -> 5200 bytes .../c457514a-9b0b-48b8-8ae6-2d903f8964bc.jpg | Bin 0 -> 3755 bytes .../dev/portofolio/create/[id]/loading.tsx | 9 - .../daftar-portofolio/[id]/page.tsx | 17 ++ .../dev/portofolio/edit/data/[id]/loading.tsx | 9 - .../dev/portofolio/edit/logo/[id]/loading.tsx | 9 - .../portofolio/edit/medsos/[id]/loading.tsx | 9 - src/app/dev/portofolio/main/[id]/loading.tsx | 9 - src/app/dev/portofolio/main/[id]/page.tsx | 9 +- src/app/dev/profile/create/loading.tsx | 9 - src/app/dev/profile/edit/[id]/loading.tsx | 9 - .../profile/upload/background/[id]/layout.tsx | 16 +- .../upload/background/[id]/loading.tsx | 9 - .../dev/profile/upload/foto/[id]/layout.tsx | 15 +- .../dev/profile/upload/foto/[id]/loading.tsx | 9 - src/app/lib/router_hipmi/router_katalog.ts | 4 + src/app/zCoba/page.tsx | 2 +- .../component_global/splash/splash_global.tsx | 6 +- .../component_global/ui/ui_drawer.tsx | 40 ++- .../ui/ui_header_tamplate.tsx | 2 +- .../ui/ui_layout_tamplate.tsx | 2 +- src/app_modules/forum/create/layout.tsx | 10 +- .../forum/detail/detail_report_komentar.tsx | 10 +- .../forum/detail/detail_report_posting.tsx | 10 +- src/app_modules/forum/detail/layout.tsx | 10 +- src/app_modules/forum/edit/posting/layout.tsx | 10 +- src/app_modules/forum/forumku/layout.tsx | 10 +- src/app_modules/forum/main/layout.tsx | 10 +- .../forum/report/komentar/layout.tsx | 10 +- .../forum/report/posting/layout.tsx | 10 +- src/app_modules/forum/splash/index.tsx | 2 +- .../home/component/button_header.tsx | 2 +- src/app_modules/home/view_home.tsx | 10 +- src/app_modules/job/create/layout.tsx | 10 +- src/app_modules/job/detail/arsip/layout.tsx | 10 +- src/app_modules/job/detail/draft/layout.tsx | 10 +- src/app_modules/job/detail/main/layout.tsx | 10 +- src/app_modules/job/detail/publish/layout.tsx | 10 +- src/app_modules/job/detail/reject/layout.tsx | 10 +- src/app_modules/job/detail/review/layout.tsx | 10 +- src/app_modules/job/edit/layout.tsx | 10 +- src/app_modules/job/main/layout.tsx | 10 +- src/app_modules/job/non_user_view/layout.tsx | 10 +- src/app_modules/katalog/main/index.ts | 3 +- src/app_modules/katalog/main/layout.tsx | 10 +- src/app_modules/katalog/main/view_katalog.tsx | 33 --- .../portofolio/component/button_delete.tsx | 80 ++++++ .../portofolio/component/button_more.tsx | 64 +++++ .../portofolio/component/card_view_daftar.tsx | 50 ++++ .../katalog/portofolio/create/layout.tsx | 14 +- .../katalog/portofolio/create/view.tsx | 77 +++++- .../katalog/portofolio/edit/data/layout.tsx | 11 +- .../edit/data/{index.tsx => ui_edit_data.tsx} | 58 ++++- .../katalog/portofolio/edit/logo/layout.tsx | 8 +- .../edit/logo/{index.tsx => ui_edit_logo.tsx} | 56 ++-- .../katalog/portofolio/edit/medsos/layout.tsx | 11 +- .../medsos/{index.tsx => ui_edit_medsos.tsx} | 46 +++- .../portofolio/fun/get/get_all_portofolio.tsx | 28 ++ .../portofolio/fun/get/get_list_portofolio.ts | 9 +- .../portofolio/fun/get/get_one_portofolio.ts | 1 + src/app_modules/katalog/portofolio/index.ts | 16 +- .../katalog/portofolio/list_view/view.tsx | 138 ---------- .../katalog/portofolio/main/layout.tsx | 114 --------- .../katalog/portofolio/main/view.tsx | 241 ------------------ .../katalog/portofolio/ui/ui_detail_data.tsx | 75 ++++++ .../katalog/portofolio/ui/ui_detail_logo.tsx | 36 +++ .../katalog/portofolio/ui/ui_detail_media.tsx | 98 +++++++ .../portofolio/ui/ui_detail_portofolio.tsx | 34 +++ .../katalog/portofolio/ui/ui_layout.tsx | 36 +++ .../ui/ui_list_detail_portofolio.tsx | 48 ++++ .../katalog/portofolio/ui_portofolio.tsx | 141 ---------- .../view/view_list_detail_portofolio.tsx | 23 ++ .../katalog/profile/create/layout.tsx | 22 +- .../katalog/profile/create/view.tsx | 68 ++--- .../katalog/profile/edit/layout.tsx | 23 +- src/app_modules/katalog/profile/edit/view.tsx | 36 ++- .../profile/upload/foto_background/index.tsx | 33 ++- .../profile/upload/foto_background/layout.tsx | 30 +-- .../profile/upload/foto_profile/index.tsx | 22 +- .../profile/upload/foto_profile/layout.tsx | 30 +-- src/app_modules/katalog/ui/ui_katalog.tsx | 8 +- .../katalog/ui/ui_list_portofolio.tsx | 146 +++++++++++ .../katalog/{profile => ui}/ui_profile.tsx | 2 +- .../fun/get/get_notifiaksi_by_id.ts | 2 +- .../notifikasi/view_notifikasi.tsx | 10 +- .../user_search/view_user_seach.tsx | 10 +- src/app_modules/zCoba/index.tsx | 6 +- 88 files changed, 1288 insertions(+), 1117 deletions(-) create mode 100644 public/portofolio/logo/55409a1f-8d3d-455a-b5bf-10cd64eda28b.png create mode 100644 public/portofolio/logo/a7ebdb61-1200-45b3-b868-ed9cc811c8b8.png create mode 100644 public/portofolio/logo/c457514a-9b0b-48b8-8ae6-2d903f8964bc.jpg delete mode 100644 src/app/dev/portofolio/create/[id]/loading.tsx create mode 100644 src/app/dev/portofolio/daftar-portofolio/[id]/page.tsx delete mode 100644 src/app/dev/portofolio/edit/data/[id]/loading.tsx delete mode 100644 src/app/dev/portofolio/edit/logo/[id]/loading.tsx delete mode 100644 src/app/dev/portofolio/edit/medsos/[id]/loading.tsx delete mode 100644 src/app/dev/portofolio/main/[id]/loading.tsx delete mode 100644 src/app/dev/profile/create/loading.tsx delete mode 100644 src/app/dev/profile/edit/[id]/loading.tsx delete mode 100644 src/app/dev/profile/upload/background/[id]/loading.tsx delete mode 100644 src/app/dev/profile/upload/foto/[id]/loading.tsx delete mode 100644 src/app_modules/katalog/main/view_katalog.tsx create mode 100644 src/app_modules/katalog/portofolio/component/button_delete.tsx create mode 100644 src/app_modules/katalog/portofolio/component/button_more.tsx create mode 100644 src/app_modules/katalog/portofolio/component/card_view_daftar.tsx rename src/app_modules/katalog/portofolio/edit/data/{index.tsx => ui_edit_data.tsx} (84%) rename src/app_modules/katalog/portofolio/edit/logo/{index.tsx => ui_edit_logo.tsx} (79%) rename src/app_modules/katalog/portofolio/edit/medsos/{index.tsx => ui_edit_medsos.tsx} (75%) create mode 100644 src/app_modules/katalog/portofolio/fun/get/get_all_portofolio.tsx delete mode 100644 src/app_modules/katalog/portofolio/list_view/view.tsx delete mode 100644 src/app_modules/katalog/portofolio/main/layout.tsx delete mode 100644 src/app_modules/katalog/portofolio/main/view.tsx create mode 100644 src/app_modules/katalog/portofolio/ui/ui_detail_data.tsx create mode 100644 src/app_modules/katalog/portofolio/ui/ui_detail_logo.tsx create mode 100644 src/app_modules/katalog/portofolio/ui/ui_detail_media.tsx create mode 100644 src/app_modules/katalog/portofolio/ui/ui_detail_portofolio.tsx create mode 100644 src/app_modules/katalog/portofolio/ui/ui_layout.tsx create mode 100644 src/app_modules/katalog/portofolio/ui/ui_list_detail_portofolio.tsx delete mode 100644 src/app_modules/katalog/portofolio/ui_portofolio.tsx create mode 100644 src/app_modules/katalog/portofolio/view/view_list_detail_portofolio.tsx create mode 100644 src/app_modules/katalog/ui/ui_list_portofolio.tsx rename src/app_modules/katalog/{profile => ui}/ui_profile.tsx (98%) 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 0000000000000000000000000000000000000000..176da5a2d2ca85f6e4d2a0d84abb4b76939769ab GIT binary patch literal 6638 zcma)>)n5}1pv4&_os;fnQqmwT-7PhwyHn{#av(7n-BP1Ly1NDG?vzqSbAR{!KHP^B zf5Q2kZ;Yn80xlK>77`K?u9Bjx_J6tkzrsNI&oP}D6#t77O;ugF*VotoDkCl3CVp1w{PEyi;IVcho`2dy1Ke}czAMh za?;Y$>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+P?Rzfs>^;&)Gg{|e3F@Yj9?5ZIyS8l>-7{HL?gtzxbRm zU~2Ts`uz=fb*=aY)G7{{Hac{k>(+KTu;XQ7Jy%18-Nh^}lVw;6qMaXGGxtSUnKR3j zemEJ3SH*I%CF{ro$88P!R;4U*4%a!YLb!>iFL3%hmnrX17TvUrTUlRAE=d5Qm| z#0a!uII23;5TAF-hICda_TikE;#aM z1H7d1E_ftm678K#fK>llN|-2IFuQD1(1zVSRM|3vE0M!9soU3Mx%>tv;?%}{X#ZTz zKaaRMKik|vTPjfX=C~yyDCzK}XV&7G%EYxiyU+GKEN9_GO zwH_b0Iwt1}&7kF!T$|r}$DD4}{cud%dJjUj6!fT8x{cA_9EmIat?_ai)nra=Ynb_y3|0|2MMO>W+Rz!Dm0(^LlZ?`H$KlDaonJ!ez|D{s-t@qp|=1 literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..256b64bac61f502a4f9c676b9b92b7e139604d04 GIT binary patch literal 5200 zcmZ{oRaBG>*M=XEP*PI5I|u0+U}zY+5lJ0th86@AkS^h+5obVJLKq1tk&^BPDV1)9 z?)g3a559x@y7$^^?Sp-K#Tn{rk`gfx0RTX%t)*uCuZRAn{o#Xu3{#qM z4Gj$h0>RGU?*Zi4=@|fcbp5k?bLj{6egR`+k1@8uZX{smY_K!R=wx6N0B$!n$^qc2 zrM0yVg{`cfAFXkNS=d2@v51P>}JfBc54z^?4`Xuw^;;hv}~IJkKdq0x)VWC zuj%{Hg#qO$bm7vWi}Mk0;-~F#Y0t4kqoKz^n|ZXJe%W;H#GY34W9iG=&T6e#nGM7A zC-|5z3=D!j~w9#Z(X9TZ|>EyKoP-R?3KArzcXU*o@29WYV?Y?UdTSd?8>{DK#?69;Im%zRvX~N@I2isL1Qje` zLw?nhP)x>QkHDQ!vcbLC3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dKVWv zjtr0AWFapPuiZAaOX`73`(x>(Kg1E6iQOqj zQRVQ=vjZU)=I-QW`iH!s@3%8w$JeEB$62MOx7b%rI^U)Y8aE+6!X~+Nx>q{1`T0|Z zZK>o&Dziwrwd#FDfY9f*QB79SyffB(PvXp?lxS%mSJsHpY%*XU|Kq6%jKToRf~OY(M3H~E0q<8k z(90OI#5bD_>U+4v3}TGya#)5z^K+sGqx%gOmndi!emN8x&4N07fRLgo@%M#v?C<6d zoq3=bsP=Ng5K$ks0G#dK2G&aTlMVI**16x{FB2@SCkyiOsI}^Sxj+23KCnh(wVgwu z`y!oR+P@B@4PO{s9tVFetP$!Z-BwX$x&AmPgzwrES($4t7|9r)zPQu4Wbnl!ES@%S z6X7vMHqmH!>-3gbiB#7yW7l;&Jqh_8`YU0;Q)^B$J7G1OIJ>vN+B%^p^Gz%Bar4?E zP5McO%qaf_@(Fh1CgIPOfG`IZa5yU`Lz3HmRuqBk7DjeLG;>_w-wIK4p}jiBaWq3b z7Aare1J%Cw#86gxmA-jownkbsPc^ANVAI-0E-z(YrQaB1Iv%+GdGF7s%eN$uk%|o! z>EEYl-rn*8mE}WLZKICQsL96bj~N+Rp2EJSUv8?`A*x=?{sPWpML!n|j-L6>R}FVi8j5}6~&m<$JbcXur;t4^HNrUfjY z#7VM%8)0!Q`7$^-8%}_elN6PYhY|3wzwJSz&;l@m+#!fz!@)uPMglBEg23VSm$A`@ o9y0ht!yyCzU@$l3Z%ffAHarXtKl}^*moOk57K-{S?j4N&8wiiA?*IS* literal 0 HcmV?d00001 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/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/zCoba/page.tsx b/src/app/zCoba/page.tsx index be966c64..5e9b43ce 100644 --- a/src/app/zCoba/page.tsx +++ b/src/app/zCoba/page.tsx @@ -1,5 +1,5 @@ import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate"; -import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import Coba_TestLoading from "@/app_modules/zCoba"; import { Text } from "@mantine/core"; diff --git a/src/app_modules/component_global/splash/splash_global.tsx b/src/app_modules/component_global/splash/splash_global.tsx index 2f969605..b4f6e906 100644 --- a/src/app_modules/component_global/splash/splash_global.tsx +++ b/src/app_modules/component_global/splash/splash_global.tsx @@ -1,20 +1,20 @@ "use client"; import { Stack, Loader, ActionIcon, ThemeIcon } from "@mantine/core"; -import LayoutGlobal_UI_Tamplate from "../ui/ui_layout_tamplate"; +import UIGlobal_LayoutTamplate from "../ui/ui_layout_tamplate"; import { IconMessages, IconX } from "@tabler/icons-react"; export default function ComponentGlobal_SplashScreen({ icon }: { icon: any }) { return ( <> - + {icon} - + ); } diff --git a/src/app_modules/component_global/ui/ui_drawer.tsx b/src/app_modules/component_global/ui/ui_drawer.tsx index 7a52b0a7..8a2c077d 100644 --- a/src/app_modules/component_global/ui/ui_drawer.tsx +++ b/src/app_modules/component_global/ui/ui_drawer.tsx @@ -1,16 +1,16 @@ import { - Drawer, - Stack, - Group, ActionIcon, + Drawer, + Group, SimpleGrid, + Stack, Text, - Box, } from "@mantine/core"; -import { IconX, IconEdit } from "@tabler/icons-react"; -import { MainColor, AccentColor } from "../color/color_pallet"; -import React from "react"; +import { IconX } from "@tabler/icons-react"; import { useRouter } from "next/navigation"; +import { useState } from "react"; +import { AccentColor } from "../color/color_pallet"; +import ComponentGlobal_UI_Loader from "./ui_loader"; interface MODEL_DRAWER { id: string; @@ -25,9 +25,19 @@ export default function ComponentGlobal_UI_Drawer({ }: { opened: boolean; close: () => void; - component: MODEL_DRAWER[] | any[]; + component: + | { + id: string; + name: string; + icon: string; + path: string; + }[] + | any[]; }) { const router = useRouter(); + const [isLoading, setIsLoading] = useState(false); + const [pageId, setPageId] = useState(""); + return ( <> router.push(e.path)} + onClick={() => { + setPageId(e?.id); + setIsLoading(true); + router.push(e?.path); + }} > - {e.icon} + {isLoading && e?.id === pageId ? ( + + ) : ( + e?.icon + )} - {e.name} + {e?.name}
))} diff --git a/src/app_modules/component_global/ui/ui_header_tamplate.tsx b/src/app_modules/component_global/ui/ui_header_tamplate.tsx index 00df1c10..85093b23 100644 --- a/src/app_modules/component_global/ui/ui_header_tamplate.tsx +++ b/src/app_modules/component_global/ui/ui_header_tamplate.tsx @@ -14,7 +14,7 @@ import { useRouter } from "next/navigation"; import React, { useState } from "react"; import { AccentColor, MainColor } from "../color/color_pallet"; -export default function LayoutGlobal_UI_HeaderTamplate({ +export default function UIGlobal_LayoutHeaderTamplate({ title, posotion, // left button diff --git a/src/app_modules/component_global/ui/ui_layout_tamplate.tsx b/src/app_modules/component_global/ui/ui_layout_tamplate.tsx index d7cce1d6..57c900c2 100644 --- a/src/app_modules/component_global/ui/ui_layout_tamplate.tsx +++ b/src/app_modules/component_global/ui/ui_layout_tamplate.tsx @@ -11,7 +11,7 @@ import { import { AccentColor, MainColor } from "../color/color_pallet"; import React from "react"; -export default function LayoutGlobal_UI_Tamplate({ +export default function UIGlobal_LayoutTamplate({ children, header, footer, diff --git a/src/app_modules/forum/create/layout.tsx b/src/app_modules/forum/create/layout.tsx index 121dad16..b5131ef3 100644 --- a/src/app_modules/forum/create/layout.tsx +++ b/src/app_modules/forum/create/layout.tsx @@ -4,8 +4,8 @@ import { AppShell } from "@mantine/core"; import React from "react"; import ComponentForum_HeaderTamplate from "../component/header/header_tamplate"; import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate"; -import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; -import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; export default function LayoutForum_Create({ children, @@ -14,11 +14,11 @@ export default function LayoutForum_Create({ }) { return ( <> - } + } > {children} - + {/* }> diff --git a/src/app_modules/forum/detail/detail_report_komentar.tsx b/src/app_modules/forum/detail/detail_report_komentar.tsx index f3c1e417..ebdf24ee 100644 --- a/src/app_modules/forum/detail/detail_report_komentar.tsx +++ b/src/app_modules/forum/detail/detail_report_komentar.tsx @@ -1,5 +1,5 @@ -import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; -import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import { ComponentForum_UiDetailReportKomentar } from "../component/detail_component/ui_report_komentar"; @@ -10,11 +10,11 @@ export default function Forum_DetailReportKomentar({ }) { return ( <> - } + } > {} - + ); } diff --git a/src/app_modules/forum/detail/detail_report_posting.tsx b/src/app_modules/forum/detail/detail_report_posting.tsx index 0322485b..71f09dfc 100644 --- a/src/app_modules/forum/detail/detail_report_posting.tsx +++ b/src/app_modules/forum/detail/detail_report_posting.tsx @@ -1,5 +1,5 @@ -import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; -import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import { Stack, Text } from "@mantine/core"; import { ComponentForum_UiDetailReportPosting } from "../component/detail_component/ui_report_posting"; @@ -10,11 +10,11 @@ export default function Forum_DetailReportPosting({ }) { return ( <> - } + } > - + ); } diff --git a/src/app_modules/forum/detail/layout.tsx b/src/app_modules/forum/detail/layout.tsx index e3339f95..20ddfe01 100644 --- a/src/app_modules/forum/detail/layout.tsx +++ b/src/app_modules/forum/detail/layout.tsx @@ -8,8 +8,8 @@ import { IconChevronLeft } from "@tabler/icons-react"; import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2"; import { revalidatePath } from "next/cache"; import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate"; -import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; -import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; export const dynamic = "force-dynamic"; export default function LayoutForum_Detail({ @@ -24,11 +24,11 @@ export default function LayoutForum_Detail({ return ( <> - } + } > {children} - + {/* - } + } > {children} - + {/* } diff --git a/src/app_modules/forum/forumku/layout.tsx b/src/app_modules/forum/forumku/layout.tsx index 8281d194..070adeeb 100644 --- a/src/app_modules/forum/forumku/layout.tsx +++ b/src/app_modules/forum/forumku/layout.tsx @@ -6,8 +6,8 @@ import ComponentForum_HeaderTamplate from "../component/header/header_tamplate"; import { MODEL_USER } from "@/app_modules/home/model/interface"; import { IconX } from "@tabler/icons-react"; import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate"; -import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; -import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; export default function LayoutForum_Forumku({ children, @@ -18,16 +18,16 @@ export default function LayoutForum_Forumku({ }) { return ( <> - } /> } > {children} - + {/* - {children} - + {/* - + } > {children} - + {/* diff --git a/src/app_modules/forum/report/posting/layout.tsx b/src/app_modules/forum/report/posting/layout.tsx index 784e3d60..53316d06 100644 --- a/src/app_modules/forum/report/posting/layout.tsx +++ b/src/app_modules/forum/report/posting/layout.tsx @@ -1,7 +1,7 @@ "use client"; -import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; -import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import React from "react"; export default function LayoutForum_ReportPosting({ @@ -11,13 +11,13 @@ export default function LayoutForum_ReportPosting({ }) { return ( <> - + } > {children} - + diff --git a/src/app_modules/forum/splash/index.tsx b/src/app_modules/forum/splash/index.tsx index 03f44677..2daa2c84 100644 --- a/src/app_modules/forum/splash/index.tsx +++ b/src/app_modules/forum/splash/index.tsx @@ -2,7 +2,7 @@ import { RouterForum } from "@/app/lib/router_hipmi/router_forum"; import ComponentGlobal_SplashScreen from "@/app_modules/component_global/splash/splash_global"; -import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import { Avatar, Center, diff --git a/src/app_modules/home/component/button_header.tsx b/src/app_modules/home/component/button_header.tsx index 05e5898f..6378216a 100644 --- a/src/app_modules/home/component/button_header.tsx +++ b/src/app_modules/home/component/button_header.tsx @@ -1,6 +1,6 @@ "use client"; -import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; import { ActionIcon, Indicator, Loader, Text } from "@mantine/core"; import { MODEL_USER } from "../model/interface"; import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; diff --git a/src/app_modules/home/view_home.tsx b/src/app_modules/home/view_home.tsx index 78708e1a..eae253b1 100644 --- a/src/app_modules/home/view_home.tsx +++ b/src/app_modules/home/view_home.tsx @@ -1,5 +1,5 @@ -import LayoutGlobal_UI_HeaderTamplate from "../component_global/ui/ui_header_tamplate"; -import LayoutGlobal_UI_Tamplate from "../component_global/ui/ui_layout_tamplate"; +import UIGlobal_LayoutHeaderTamplate from "../component_global/ui/ui_header_tamplate"; +import UIGlobal_LayoutTamplate from "../component_global/ui/ui_layout_tamplate"; import { MODEL_JOB } from "../job/model/interface"; import { ComponentHome_ButtonHeaderLeft, @@ -19,9 +19,9 @@ export default function HomeView({ }) { return ( <> - @@ -37,7 +37,7 @@ export default function HomeView({ footer={} > - + ); } diff --git a/src/app_modules/job/create/layout.tsx b/src/app_modules/job/create/layout.tsx index 2909f632..5dd2ccd2 100644 --- a/src/app_modules/job/create/layout.tsx +++ b/src/app_modules/job/create/layout.tsx @@ -1,7 +1,7 @@ "use client"; -import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; -import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import React from "react"; export default function LayoutJob_Create({ @@ -11,11 +11,11 @@ export default function LayoutJob_Create({ }) { return ( <> - } + } > {children} - + ); } diff --git a/src/app_modules/job/detail/arsip/layout.tsx b/src/app_modules/job/detail/arsip/layout.tsx index de2c7329..88d07b13 100644 --- a/src/app_modules/job/detail/arsip/layout.tsx +++ b/src/app_modules/job/detail/arsip/layout.tsx @@ -1,7 +1,7 @@ "use client"; -import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; -import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import React from "react"; export default function LayoutJob_DetailArsip({ @@ -11,11 +11,11 @@ export default function LayoutJob_DetailArsip({ }) { return ( <> - } + } > {children} - + ); } diff --git a/src/app_modules/job/detail/draft/layout.tsx b/src/app_modules/job/detail/draft/layout.tsx index 4d322916..7d117cec 100644 --- a/src/app_modules/job/detail/draft/layout.tsx +++ b/src/app_modules/job/detail/draft/layout.tsx @@ -17,8 +17,8 @@ import ComponentJob_HeaderTamplate from "../../component/header_tamplate"; import { IconDots, IconDotsVertical, IconEdit, IconX } from "@tabler/icons-react"; import { RouterJob } from "@/app/lib/router_hipmi/router_job"; import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate"; -import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; -import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; import { useRouter } from "next/navigation"; import { useDisclosure } from "@mantine/hooks"; import { @@ -48,9 +48,9 @@ export default function LayoutJob_DetailDraft({ return ( <> - open()}> @@ -62,7 +62,7 @@ export default function LayoutJob_DetailDraft({ } > {children} - + - } + } > {children} - + ); } diff --git a/src/app_modules/job/detail/publish/layout.tsx b/src/app_modules/job/detail/publish/layout.tsx index 2b98cf44..2313d9d5 100644 --- a/src/app_modules/job/detail/publish/layout.tsx +++ b/src/app_modules/job/detail/publish/layout.tsx @@ -1,7 +1,7 @@ "use client"; -import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; -import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import React from "react"; export default function LayoutJob_DetailPublish({ @@ -11,11 +11,11 @@ export default function LayoutJob_DetailPublish({ }) { return ( <> - } + } > {children} - + ); } diff --git a/src/app_modules/job/detail/reject/layout.tsx b/src/app_modules/job/detail/reject/layout.tsx index 42eb63df..7a237dbd 100644 --- a/src/app_modules/job/detail/reject/layout.tsx +++ b/src/app_modules/job/detail/reject/layout.tsx @@ -5,8 +5,8 @@ import React from "react"; import ComponentJob_HeaderTamplate from "../../component/header_tamplate"; import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate"; import { RouterJob } from "@/app/lib/router_hipmi/router_job"; -import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; -import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import { IconEdit } from "@tabler/icons-react"; export default function LayoutJob_DetailReject({ @@ -16,11 +16,11 @@ export default function LayoutJob_DetailReject({ }) { return ( <> - } + } > {children} - + ); } diff --git a/src/app_modules/job/detail/review/layout.tsx b/src/app_modules/job/detail/review/layout.tsx index dd7bf43d..8954e16a 100644 --- a/src/app_modules/job/detail/review/layout.tsx +++ b/src/app_modules/job/detail/review/layout.tsx @@ -1,7 +1,7 @@ "use client"; -import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; -import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import React from "react"; export default function LayoutJob_DetailReview({ @@ -11,11 +11,11 @@ export default function LayoutJob_DetailReview({ }) { return ( <> - } + } > {children} - + ); } diff --git a/src/app_modules/job/edit/layout.tsx b/src/app_modules/job/edit/layout.tsx index 7b9b8763..ca17e086 100644 --- a/src/app_modules/job/edit/layout.tsx +++ b/src/app_modules/job/edit/layout.tsx @@ -1,7 +1,7 @@ "use client"; -import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; -import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import React from "react"; export default function LayoutJob_Edit({ @@ -11,11 +11,11 @@ export default function LayoutJob_Edit({ }) { return ( <> - } + } > {children} - + ); diff --git a/src/app_modules/job/main/layout.tsx b/src/app_modules/job/main/layout.tsx index e7e05fa9..291296d4 100644 --- a/src/app_modules/job/main/layout.tsx +++ b/src/app_modules/job/main/layout.tsx @@ -3,8 +3,8 @@ import { RouterJob } from "@/app/lib/router_hipmi/router_job"; import { MainColor } from "@/app_modules/component_global/color/color_pallet"; import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; -import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; -import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import { ActionIcon, SimpleGrid, Stack, Text } from "@mantine/core"; import { IconHistory, IconHome, IconReservedLine } from "@tabler/icons-react"; import { useAtom } from "jotai"; @@ -46,9 +46,9 @@ export default function LayoutJob_Main({ return ( <> - @@ -118,7 +118,7 @@ export default function LayoutJob_Main({ } > {children} - + ); } diff --git a/src/app_modules/job/non_user_view/layout.tsx b/src/app_modules/job/non_user_view/layout.tsx index 2d32cd54..81798eec 100644 --- a/src/app_modules/job/non_user_view/layout.tsx +++ b/src/app_modules/job/non_user_view/layout.tsx @@ -4,8 +4,8 @@ import { AppShell, Center } from "@mantine/core"; import React from "react"; import ComponentJob_HeaderTamplate from "../component/header_tamplate"; import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate"; -import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; -import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; export default function LayoutJob_NonUserView({ children, @@ -14,11 +14,11 @@ export default function LayoutJob_NonUserView({ }) { return ( <> - } + } > {children} - + ); } diff --git a/src/app_modules/katalog/main/index.ts b/src/app_modules/katalog/main/index.ts index d45aca2e..793e49ee 100644 --- a/src/app_modules/katalog/main/index.ts +++ b/src/app_modules/katalog/main/index.ts @@ -1,4 +1,3 @@ -import KatalogView from "./view_katalog"; import KatalogLayout from "./layout"; -export {KatalogView, KatalogLayout} \ No newline at end of file +export { KatalogLayout }; diff --git a/src/app_modules/katalog/main/layout.tsx b/src/app_modules/katalog/main/layout.tsx index c20e6148..5ee0d691 100644 --- a/src/app_modules/katalog/main/layout.tsx +++ b/src/app_modules/katalog/main/layout.tsx @@ -1,7 +1,7 @@ "use client"; -import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; -import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; +import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; import { ComponentKatalog_ButtonHeaderRight } from "../component/button_header_right"; export default function KatalogLayout({ @@ -17,9 +17,9 @@ export default function KatalogLayout({ }) { return ( <> - {children} - + ); } diff --git a/src/app_modules/katalog/main/view_katalog.tsx b/src/app_modules/katalog/main/view_katalog.tsx deleted file mode 100644 index d8eb6f19..00000000 --- a/src/app_modules/katalog/main/view_katalog.tsx +++ /dev/null @@ -1,33 +0,0 @@ -"use client"; - -import Component_Logout from "@/app_modules/auth/logout/view"; -import { - Stack -} from "@mantine/core"; -import { MODEL_PORTOFOLIO } from "../portofolio/model/interface"; -import { Portofolio_UiView } from "../portofolio/ui_portofolio"; -import { MODEL_PROFILE } from "../profile/model/interface"; -import { Profile_UiView } from "../profile/ui_profile"; - -export default function KatalogView({ - profile, - listPorto, - userLoginId, -}: { - profile: MODEL_PROFILE; - listPorto: MODEL_PORTOFOLIO; - userLoginId: string; -}) { - return ( - <> - - - - - - ); -} diff --git a/src/app_modules/katalog/portofolio/component/button_delete.tsx b/src/app_modules/katalog/portofolio/component/button_delete.tsx new file mode 100644 index 00000000..10e552a3 --- /dev/null +++ b/src/app_modules/katalog/portofolio/component/button_delete.tsx @@ -0,0 +1,80 @@ +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 { Button, Group, Modal, Stack, Title } from "@mantine/core"; +import { IconTrash } from "@tabler/icons-react"; +import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime"; +import router from "next/router"; +import { useState } from "react"; +import { Portofolio_funDeletePortofolioById } from "../fun/delete/fun_delete_by_id"; +import { MODEL_PORTOFOLIO } from "../model/interface"; +import { useRouter } from "next/navigation"; +import ComponentGlobal_UI_Modal from "@/app_modules/component_global/ui/ui_modal"; + +export function ComponentPortofolio_ButtonDelete({ + userLoginId, + dataPorto, +}: { + userLoginId: string; + dataPorto: MODEL_PORTOFOLIO; +}) { + const router = useRouter(); + const [openModal, setModal] = useState(false); + const [loadingDel, setLoadingDel] = useState(false); + + return ( + <> + {userLoginId === dataPorto?.Profile.userId ? ( + + ) : ( + "" + )} + + setModal(false)} + buttonKiri={ + + } + buttonKanan={ + + } + /> + + ); +} + +async function onDelete( + router: AppRouterInstance, + dataPorto: MODEL_PORTOFOLIO, + setLoadingDel: any +) { + await Portofolio_funDeletePortofolioById(dataPorto).then((res) => { + if (res.status === 200) { + setLoadingDel(true); + ComponentGlobal_NotifikasiBerhasil(res.message); + router.back(); + } else { + ComponentGlobal_NotifikasiGagal(res.message); + } + }); +} diff --git a/src/app_modules/katalog/portofolio/component/button_more.tsx b/src/app_modules/katalog/portofolio/component/button_more.tsx new file mode 100644 index 00000000..590dc835 --- /dev/null +++ b/src/app_modules/katalog/portofolio/component/button_more.tsx @@ -0,0 +1,64 @@ +"use client"; + +import { RouterPortofolio } from "@/app/lib/router_hipmi/router_katalog"; +import ComponentGlobal_UI_Drawer from "@/app_modules/component_global/ui/ui_drawer"; +import { ActionIcon } from "@mantine/core"; +import { + IconDots, + IconDotsVertical, + IconEdit, + IconId, + IconPhotoEdit, +} from "@tabler/icons-react"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; + +export function ComponentPortofolio_ButtonMore({ + portoId, + userLoginId, + authorId, +}: { + portoId: string; + userLoginId: string; + authorId: string; +}) { + const [openDrawer, setOpenDrawer] = useState(false); + const listPage = [ + { + id: "1", + name: "Update detail bisnis", + icon: , + path: RouterPortofolio.edit_data_bisnis + `${portoId}`, + }, + { + id: "2", + name: "Update logo ", + icon: , + path: RouterPortofolio.edit_logo_bisnis + `${portoId}`, + }, + { + id: "3", + name: "Update sosial media", + icon: , + path: RouterPortofolio.edit_medsos_bisnis + `${portoId}`, + }, + ]; + + return ( + <> + {userLoginId === authorId ? ( + setOpenDrawer(true)}> + + + ) : ( + + )} + + setOpenDrawer(false)} + component={listPage} + /> + + ); +} diff --git a/src/app_modules/katalog/portofolio/component/card_view_daftar.tsx b/src/app_modules/katalog/portofolio/component/card_view_daftar.tsx new file mode 100644 index 00000000..4dca5bd8 --- /dev/null +++ b/src/app_modules/katalog/portofolio/component/card_view_daftar.tsx @@ -0,0 +1,50 @@ +import { Group, Paper, Stack, Text } from "@mantine/core"; +import { MODEL_PORTOFOLIO } from "../model/interface"; +import { AccentColor } from "@/app_modules/component_global/color/color_pallet"; +import ComponentGlobal_UI_Loader from "@/app_modules/component_global/ui/ui_loader"; +import { IconCaretRight } from "@tabler/icons-react"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; +import { RouterPortofolio } from "@/app/lib/router_hipmi/router_katalog"; + +export function ComponentPortofolio_DaftarBoxView({ + data, +}: { + data: MODEL_PORTOFOLIO; +}) { + const router = useRouter(); + const [isLoading, setIsLoading] = useState(false); + return ( + <> + { + setIsLoading(true); + router.push(RouterPortofolio.main_detail + data.id); + }} + style={{ + backgroundColor: AccentColor.darkblue, + border: `2px solid ${AccentColor.blue}`, + borderRadius: "10px ", + padding: "15px", + color: "white", + }} + > + + + {data?.namaBisnis} + + + {isLoading ? ( + + ) : ( + + )} + + + + + ); +} diff --git a/src/app_modules/katalog/portofolio/create/layout.tsx b/src/app_modules/katalog/portofolio/create/layout.tsx index b4165cf3..4bb550c7 100644 --- a/src/app_modules/katalog/portofolio/create/layout.tsx +++ b/src/app_modules/katalog/portofolio/create/layout.tsx @@ -1,22 +1,18 @@ "use client"; -import { ActionIcon, AppShell, Group, Header, Text } from "@mantine/core"; -import { IconArrowLeft } from "@tabler/icons-react"; -import { useRouter } from "next/navigation"; -import ComponentKatalog_HeaderTamplate from "../../component/header_tamplate"; -import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate"; +import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate"; +import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate"; export default function CreatePortofolioLayout({ children, profileId }: { children: any, profileId: any }) { - const router = useRouter(); return ( <> - + } > {children} - + ); } diff --git a/src/app_modules/katalog/portofolio/create/view.tsx b/src/app_modules/katalog/portofolio/create/view.tsx index b690a15b..f220efd9 100644 --- a/src/app_modules/katalog/portofolio/create/view.tsx +++ b/src/app_modules/katalog/portofolio/create/view.tsx @@ -20,7 +20,7 @@ import { Select, Stack, TextInput, - Textarea + Textarea, } from "@mantine/core"; import { IconCamera } from "@tabler/icons-react"; import _ from "lodash"; @@ -29,6 +29,11 @@ import { useRouter } from "next/navigation"; import { useState } from "react"; import ComponentKatalog_NotedBox from "../../component/noted_box"; import funCreatePortofolio from "../fun/fun_create_portofolio"; +import ComponentGlobal_BoxInformation from "@/app_modules/component_global/box_information"; +import { + AccentColor, + MainColor, +} from "@/app_modules/component_global/color/color_pallet"; export default function CreatePortofolio({ bidangBisnis, @@ -63,10 +68,15 @@ export default function CreatePortofolio({ <> {/* {JSON.stringify(profileId)} */} - + - +