diff --git a/app/[locale]/(public)/(polda)/polda/[polda_name]/audio/filter/page.tsx b/app/[locale]/(public)/(polda)/polda/[polda_name]/audio/filter/page.tsx index 5b3f5fb1..6c57b48c 100644 --- a/app/[locale]/(public)/(polda)/polda/[polda_name]/audio/filter/page.tsx +++ b/app/[locale]/(public)/(polda)/polda/[polda_name]/audio/filter/page.tsx @@ -54,7 +54,7 @@ const columns: ColumnDef[] = [ }, ]; -const FilterPage = (props: { group?: string; type: string }) => { +const FilterPage = () => { const router = useRouter(); const asPath = usePathname(); const params = useParams(); @@ -190,13 +190,9 @@ const FilterPage = (props: { group?: string; type: string }) => { }, []); const initFetch = async () => { const response = await getPublicCategoryData( - props.group == "mabes" - ? "" - : props.group == "polda" && poldaName && String(poldaName)?.length > 1 + poldaName && String(poldaName)?.length > 1 ? poldaName - : props.group == "satker" && - satkerName && - String(satkerName)?.length > 1 + : satkerName && String(satkerName)?.length > 1 ? "satker-" + satkerName : "", "", @@ -205,7 +201,7 @@ const FilterPage = (props: { group?: string; type: string }) => { console.log("category", response); setCategories(response?.data?.data?.content); }; - + useEffect(() => { function initState() { if (dateRange[0] != null && dateRange[1] != null) { diff --git a/app/[locale]/(public)/(polda)/polda/[polda_name]/document/filter/page.tsx b/app/[locale]/(public)/(polda)/polda/[polda_name]/document/filter/page.tsx index 46b6b609..ed6c0837 100644 --- a/app/[locale]/(public)/(polda)/polda/[polda_name]/document/filter/page.tsx +++ b/app/[locale]/(public)/(polda)/polda/[polda_name]/document/filter/page.tsx @@ -47,7 +47,7 @@ const columns: ColumnDef[] = [ }, ]; -const FilterPage = (props: { group?: string; type: string }) => { +const FilterPage = () => { const router = useRouter(); const asPath = usePathname(); const params = useParams(); @@ -181,13 +181,9 @@ const FilterPage = (props: { group?: string; type: string }) => { }, []); const initFetch = async () => { const response = await getPublicCategoryData( - props.group == "mabes" - ? "" - : props.group == "polda" && poldaName && String(poldaName)?.length > 1 + poldaName && String(poldaName)?.length > 1 ? poldaName - : props.group == "satker" && - satkerName && - String(satkerName)?.length > 1 + : satkerName && String(satkerName)?.length > 1 ? "satker-" + satkerName : "", "", diff --git a/app/[locale]/(public)/(polda)/polda/[polda_name]/image/filter/page.tsx b/app/[locale]/(public)/(polda)/polda/[polda_name]/image/filter/page.tsx index 0e373d3b..6b20beef 100644 --- a/app/[locale]/(public)/(polda)/polda/[polda_name]/image/filter/page.tsx +++ b/app/[locale]/(public)/(polda)/polda/[polda_name]/image/filter/page.tsx @@ -48,7 +48,7 @@ const columns: ColumnDef[] = [ }, ]; -const FilterPage = (props: { group?: string; type: string }) => { +const FilterPage = () => { const router = useRouter(); const asPath = usePathname(); const params = useParams(); @@ -187,13 +187,9 @@ const FilterPage = (props: { group?: string; type: string }) => { }, []); const initFetch = async () => { const response = await getPublicCategoryData( - props.group == "mabes" - ? "" - : props.group == "polda" && poldaName && String(poldaName)?.length > 1 + poldaName && String(poldaName)?.length > 1 ? poldaName - : props.group == "satker" && - satkerName && - String(satkerName)?.length > 1 + : satkerName && String(satkerName)?.length > 1 ? "satker-" + satkerName : "", "", @@ -202,7 +198,6 @@ const FilterPage = (props: { group?: string; type: string }) => { console.log("category", response); setCategories(response?.data?.data?.content); }; - useEffect(() => { function initState() { if (dateRange[0] != null && dateRange[1] != null) { diff --git a/app/[locale]/(public)/(polda)/polda/[polda_name]/video/filter/page.tsx b/app/[locale]/(public)/(polda)/polda/[polda_name]/video/filter/page.tsx index 1a6f1c8f..dbbdc146 100644 --- a/app/[locale]/(public)/(polda)/polda/[polda_name]/video/filter/page.tsx +++ b/app/[locale]/(public)/(polda)/polda/[polda_name]/video/filter/page.tsx @@ -49,7 +49,7 @@ const columns: ColumnDef[] = [ }, ]; -const FilterPage = (props: { group?: string; type: string }) => { +const FilterPage = () => { const router = useRouter(); const asPath = usePathname(); const params = useParams(); @@ -181,13 +181,9 @@ const FilterPage = (props: { group?: string; type: string }) => { }, []); const initFetch = async () => { const response = await getPublicCategoryData( - props.group == "mabes" - ? "" - : props.group == "polda" && poldaName && String(poldaName)?.length > 1 + poldaName && String(poldaName)?.length > 1 ? poldaName - : props.group == "satker" && - satkerName && - String(satkerName)?.length > 1 + : satkerName && String(satkerName)?.length > 1 ? "satker-" + satkerName : "", "", @@ -196,7 +192,6 @@ const FilterPage = (props: { group?: string; type: string }) => { console.log("category", response); setCategories(response?.data?.data?.content); }; - useEffect(() => { function initState() { if (dateRange[0] != null && dateRange[1] != null) { diff --git a/app/[locale]/(public)/(satker)/satker/[satker_name]/audio/filter/page.tsx b/app/[locale]/(public)/(satker)/satker/[satker_name]/audio/filter/page.tsx index 172232a4..416a309c 100644 --- a/app/[locale]/(public)/(satker)/satker/[satker_name]/audio/filter/page.tsx +++ b/app/[locale]/(public)/(satker)/satker/[satker_name]/audio/filter/page.tsx @@ -52,7 +52,7 @@ const columns: ColumnDef[] = [ }, ]; -const FilterPage = (props: { group?: string; type: string }) => { +const FilterPage = () => { const router = useRouter(); const asPath = usePathname(); const params = useParams(); @@ -179,13 +179,9 @@ const FilterPage = (props: { group?: string; type: string }) => { }, []); const initFetch = async () => { const response = await getPublicCategoryData( - props.group == "mabes" - ? "" - : props.group == "polda" && poldaName && String(poldaName)?.length > 1 + poldaName && String(poldaName)?.length > 1 ? poldaName - : props.group == "satker" && - satkerName && - String(satkerName)?.length > 1 + : satkerName && String(satkerName)?.length > 1 ? "satker-" + satkerName : "", "", diff --git a/app/[locale]/(public)/(satker)/satker/[satker_name]/document/filter/page.tsx b/app/[locale]/(public)/(satker)/satker/[satker_name]/document/filter/page.tsx index 43c4df04..19e546fa 100644 --- a/app/[locale]/(public)/(satker)/satker/[satker_name]/document/filter/page.tsx +++ b/app/[locale]/(public)/(satker)/satker/[satker_name]/document/filter/page.tsx @@ -46,7 +46,7 @@ const columns: ColumnDef[] = [ }, ]; -const FilterPage = (props: { group?: string; type: string }) => { +const FilterPage = () => { const router = useRouter(); const asPath = usePathname(); const params = useParams(); @@ -172,13 +172,9 @@ const FilterPage = (props: { group?: string; type: string }) => { }, []); const fetchContent = async () => { const response = await getPublicCategoryData( - props.group == "mabes" - ? "" - : props.group == "polda" && poldaName && String(poldaName)?.length > 1 + poldaName && String(poldaName)?.length > 1 ? poldaName - : props.group == "satker" && - satkerName && - String(satkerName)?.length > 1 + : satkerName && String(satkerName)?.length > 1 ? "satker-" + satkerName : "", "", @@ -187,7 +183,6 @@ const FilterPage = (props: { group?: string; type: string }) => { console.log("category", response); setCategories(response?.data?.data?.content); }; - useEffect(() => { function initState() { if (dateRange[0] != null && dateRange[1] != null) { diff --git a/app/[locale]/(public)/(satker)/satker/[satker_name]/image/filter/page.tsx b/app/[locale]/(public)/(satker)/satker/[satker_name]/image/filter/page.tsx index b7f0e3a4..7d46d0b7 100644 --- a/app/[locale]/(public)/(satker)/satker/[satker_name]/image/filter/page.tsx +++ b/app/[locale]/(public)/(satker)/satker/[satker_name]/image/filter/page.tsx @@ -45,7 +45,7 @@ const columns: ColumnDef[] = [ }, ]; -const FilterPage = (props: { group?: string; type: string }) => { +const FilterPage = () => { const router = useRouter(); const asPath = usePathname(); const params = useParams(); @@ -170,17 +170,13 @@ const FilterPage = (props: { group?: string; type: string }) => { // } useEffect(() => { - initFetch(); + fetchContent(); }, []); - const initFetch = async () => { + const fetchContent = async () => { const response = await getPublicCategoryData( - props.group == "mabes" - ? "" - : props.group == "polda" && poldaName && String(poldaName)?.length > 1 + poldaName && String(poldaName)?.length > 1 ? poldaName - : props.group == "satker" && - satkerName && - String(satkerName)?.length > 1 + : satkerName && String(satkerName)?.length > 1 ? "satker-" + satkerName : "", "", diff --git a/app/[locale]/(public)/(satker)/satker/[satker_name]/video/filter/page.tsx b/app/[locale]/(public)/(satker)/satker/[satker_name]/video/filter/page.tsx index ce697cda..afa6455c 100644 --- a/app/[locale]/(public)/(satker)/satker/[satker_name]/video/filter/page.tsx +++ b/app/[locale]/(public)/(satker)/satker/[satker_name]/video/filter/page.tsx @@ -46,7 +46,7 @@ const columns: ColumnDef[] = [ }, ]; -const FilterPage = (props: { group?: string; type: string }) => { +const FilterPage = () => { const router = useRouter(); const asPath = usePathname(); const params = useParams(); @@ -170,13 +170,9 @@ const FilterPage = (props: { group?: string; type: string }) => { }, []); const fetchContent = async () => { const response = await getPublicCategoryData( - props.group == "mabes" - ? "" - : props.group == "polda" && poldaName && String(poldaName)?.length > 1 + poldaName && String(poldaName)?.length > 1 ? poldaName - : props.group == "satker" && - satkerName && - String(satkerName)?.length > 1 + : satkerName && String(satkerName)?.length > 1 ? "satker-" + satkerName : "", "", @@ -472,7 +468,7 @@ const FilterPage = (props: { group?: string; type: string }) => {

- Filter + Filter

diff --git a/app/[locale]/(public)/audio/filter/page.tsx b/app/[locale]/(public)/audio/filter/page.tsx index 8b1f1388..fdbda5a4 100644 --- a/app/[locale]/(public)/audio/filter/page.tsx +++ b/app/[locale]/(public)/audio/filter/page.tsx @@ -46,7 +46,7 @@ const columns: ColumnDef[] = [ }, ]; -const FilterPage = (props: { group?: string; type: string }) => { +const FilterPage = () => { const router = useRouter(); const asPath = usePathname(); const params = useParams(); @@ -181,13 +181,9 @@ const FilterPage = (props: { group?: string; type: string }) => { }, []); const initFetch = async () => { const response = await getPublicCategoryData( - props.group == "mabes" - ? "" - : props.group == "polda" && poldaName && String(poldaName)?.length > 1 + poldaName && String(poldaName)?.length > 1 ? poldaName - : props.group == "satker" && - satkerName && - String(satkerName)?.length > 1 + : satkerName && String(satkerName)?.length > 1 ? "satker-" + satkerName : "", "", diff --git a/app/[locale]/(public)/document/filter/page.tsx b/app/[locale]/(public)/document/filter/page.tsx index 4a0d71e3..983398aa 100644 --- a/app/[locale]/(public)/document/filter/page.tsx +++ b/app/[locale]/(public)/document/filter/page.tsx @@ -47,7 +47,7 @@ const columns: ColumnDef[] = [ }, ]; -const FilterPage = (props: { group?: string; type: string }) => { +const FilterPage = () => { const router = useRouter(); const asPath = usePathname(); const params = useParams(); @@ -181,13 +181,9 @@ const FilterPage = (props: { group?: string; type: string }) => { }, []); const initFetch = async () => { const response = await getPublicCategoryData( - props.group == "mabes" - ? "" - : props.group == "polda" && poldaName && String(poldaName)?.length > 1 + poldaName && String(poldaName)?.length > 1 ? poldaName - : props.group == "satker" && - satkerName && - String(satkerName)?.length > 1 + : satkerName && String(satkerName)?.length > 1 ? "satker-" + satkerName : "", "", diff --git a/app/[locale]/(public)/image/filter/page.tsx b/app/[locale]/(public)/image/filter/page.tsx index 803e2a31..de0a9b78 100644 --- a/app/[locale]/(public)/image/filter/page.tsx +++ b/app/[locale]/(public)/image/filter/page.tsx @@ -48,7 +48,7 @@ const columns: ColumnDef[] = [ }, ]; -const FilterPage = (props: { group?: string; type: string }) => { +const FilterPage = () => { const router = useRouter(); const asPath = usePathname(); const params = useParams(); @@ -184,7 +184,7 @@ const FilterPage = (props: { group?: string; type: string }) => { }, []); const initFetch = async () => { const response = await getPublicCategoryData( - props.group == "mabes" ? "" : props.group == "polda" && poldaName && String(poldaName)?.length > 1 ? poldaName : props.group == "satker" && satkerName && String(satkerName)?.length > 1 ? "satker-" + satkerName : "", + poldaName && String(poldaName)?.length > 1 ? poldaName : satkerName && String(satkerName)?.length > 1 ? "satker-" + satkerName : "", "", locale == "en" ? true : false ); diff --git a/app/[locale]/(public)/video/filter/page.tsx b/app/[locale]/(public)/video/filter/page.tsx index 6197aedd..351f31a1 100644 --- a/app/[locale]/(public)/video/filter/page.tsx +++ b/app/[locale]/(public)/video/filter/page.tsx @@ -49,7 +49,7 @@ const columns: ColumnDef[] = [ }, ]; -const FilterPage = (props: { group?: string; type: string }) => { +const FilterPage = () => { const router = useRouter(); const asPath = usePathname(); const params = useParams(); @@ -176,13 +176,9 @@ const FilterPage = (props: { group?: string; type: string }) => { }, []); const initFetch = async () => { const response = await getPublicCategoryData( - props.group == "mabes" - ? "" - : props.group == "polda" && poldaName && String(poldaName)?.length > 1 + poldaName && String(poldaName)?.length > 1 ? poldaName - : props.group == "satker" && - satkerName && - String(satkerName)?.length > 1 + : satkerName && String(satkerName)?.length > 1 ? "satker-" + satkerName : "", "", diff --git a/components/landing-page/navbar.tsx b/components/landing-page/navbar.tsx index 9c5e335b..93abbe36 100644 --- a/components/landing-page/navbar.tsx +++ b/components/landing-page/navbar.tsx @@ -6,8 +6,23 @@ import { FiFile, FiImage, FiMusic, FiYoutube } from "react-icons/fi"; import { useParams, usePathname } from "next/navigation"; import { generateLocalizedPath } from "@/utils/globals"; import { Link } from "@/i18n/routing"; -import { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, navigationMenuTriggerStyle } from "@/components/ui/navigation-menu"; -import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from "../ui/dropdown-menu"; +import { + NavigationMenu, + NavigationMenuContent, + NavigationMenuItem, + NavigationMenuLink, + NavigationMenuList, + NavigationMenuTrigger, + navigationMenuTriggerStyle, +} from "@/components/ui/navigation-menu"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuGroup, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from "../ui/dropdown-menu"; import Image from "next/image"; import { Icon } from "../ui/icon"; import { getCookiesDecrypt } from "@/lib/utils"; @@ -17,10 +32,23 @@ import { useTranslations } from "next-intl"; import { useRouter } from "@/i18n/routing"; import { Button } from "@/components/ui/button"; import LocalSwitcher from "../partials/header/locale-switcher"; -import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog"; +import { + Dialog, + DialogClose, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, + DialogTrigger, +} from "@/components/ui/dialog"; import { getUserNotifications, listRole } from "@/service/landing/landing"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; -import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; +import { + Popover, + PopoverContent, + PopoverTrigger, +} from "@/components/ui/popover"; import PoldaLogo from "./polda-logo"; import { DynamicLogoPolda } from "./dynamic-logo-polda"; import { DynamicLogoSatker } from "./dynamic-logo-satker"; @@ -65,7 +93,11 @@ const Navbar = () => { const [notificationsUpdate, setNotificationsUpdate] = useState([]); const [selectedTab, setSelectedTab] = useState("image"); - let prefixPath = poldaName ? `/polda/${poldaName}` : satkerName ? `/satker/${satkerName}` : "/"; + let prefixPath = poldaName + ? `/polda/${poldaName}` + : satkerName + ? `/satker/${satkerName}` + : "/"; let menu = ""; @@ -77,6 +109,20 @@ const Navbar = () => { window.location.href = "/"; }; +// useEffect(() => { +// if (!roleId) { +// router.replace("/"); // Kalau roleId-nya belum tersedia, redirect juga (opsional) +// return; +// } + +// const token = Cookies.get(roleId); + +// if (!token) { +// router.replace("/"); // Redirect ke halaman home jika tidak ada token +// } +// }, []); + + // const profilePicture = Cookies.get("profile_picture"); const fullName = getCookiesDecrypt("ufne"); const roleName = getCookiesDecrypt("urne"); @@ -161,7 +207,13 @@ const Navbar = () => {
- Media Hub Logo + Media Hub Logo {/* Nav Menu */} @@ -171,7 +223,14 @@ const Navbar = () => { - + { - router.push(prefixPath + "/image/filter")} className="flex place-items-start gap-1 px-3 py-1 w-36"> + router.push(prefixPath + "/image/filter")} + className="flex place-items-start gap-1 px-3 py-1 w-36" + >

{t("image")}

- router.push(prefixPath + "/video/filter")} className="flex items-start gap-1 py-1 px-3 "> + router.push(prefixPath + "/video/filter")} + className="flex items-start gap-1 py-1 px-3 " + > {pathname?.split("/")[1] == "in" ? ( <>

@@ -204,13 +269,21 @@ const Navbar = () => { )} - router.push(prefixPath + "/document/filter")} className="flex place-items-start gap-1 py-1 px-3"> + + router.push(prefixPath + "/document/filter") + } + className="flex place-items-start gap-1 py-1 px-3" + >

{t("text")}

- router.push(prefixPath + "/audio/filter")} className="flex place-items-start gap-1 py-1 px-3 "> + router.push(prefixPath + "/audio/filter")} + className="flex place-items-start gap-1 py-1 px-3 " + >

{t("audio")}{" "} @@ -222,7 +295,14 @@ const Navbar = () => { - + { - + { */}

@@ -324,9 +417,20 @@ const Navbar = () => { placeholder={t("search")} className="pl-8 pr-4 py-1 w-28 text-[13px] border rounded-full focus:outline-none dark:text-white" /> */} - setOnSearch(e.target.value)} type="text" placeholder="Search..." className="pl-8 pr-4 py-1 w-28 text-[13px] border rounded-full focus:outline-none dark:text-white" /> + setOnSearch(e.target.value)} + type="text" + placeholder="Search..." + className="pl-8 pr-4 py-1 w-28 text-[13px] border rounded-full focus:outline-none dark:text-white" + /> - + { )}
*/} - {roleId === "5" || roleId === "6" || roleId === "7" || roleId === "8" ? ( + {roleId === "5" || + roleId === "6" || + roleId === "7" || + roleId === "8" ? ( <> {/* Inbox */} test()}> {" "} - + - - + + { {
{notifications?.map((list: any) => ( - +
- avatar + avatar +
+
+ {list?.message}
-
{list?.message}
- {`${new Date(list?.createdAt).getDate()}/${new Date(list?.createdAt).getMonth() + 1}/${new Date(list?.createdAt).getFullYear()} ${new Date(list?.createdAt).getHours()}:${new Date( + {`${new Date(list?.createdAt).getDate()}/${ + new Date(list?.createdAt).getMonth() + 1 + }/${new Date( + list?.createdAt + ).getFullYear()} ${new Date( + list?.createdAt + ).getHours()}:${new Date( list?.createdAt ).getMinutes()}`}{" "} @@ -440,7 +585,10 @@ const Navbar = () => { ))} -

+

{t("seeAll")}

@@ -449,15 +597,33 @@ const Navbar = () => {
{notificationsUpdate?.map((list: any) => ( - +
- ... + ...
-
{list?.message}
+
+ {list?.message} +
- {`${new Date(list?.createdAt).getDate()}/${new Date(list?.createdAt).getMonth() + 1}/${new Date(list?.createdAt).getFullYear()} ${new Date(list?.createdAt).getHours()}:${new Date( + {`${new Date(list?.createdAt).getDate()}/${ + new Date(list?.createdAt).getMonth() + 1 + }/${new Date( + list?.createdAt + ).getFullYear()} ${new Date( + list?.createdAt + ).getHours()}:${new Date( list?.createdAt ).getMinutes()}`}{" "} @@ -466,7 +632,10 @@ const Navbar = () => { ))} -

+

{t("seeAll")}

@@ -479,10 +648,20 @@ const Navbar = () => { {detail !== undefined ? (
- {"Image"} + {"Image"}
-
{detail?.fullname}
-

({detail?.fullname})

+
+ {detail?.fullname} +
+

+ ({detail?.fullname}) +

@@ -506,7 +685,11 @@ const Navbar = () => { href: "/content-management/galery", }, ].map((item, index) => ( - + {item.name} @@ -518,7 +701,11 @@ const Navbar = () => {
- @@ -528,22 +715,42 @@ const Navbar = () => { - ) : roleId === "2" || roleId === "3" || roleId === "4" || roleId === "9" || roleId === "10" || roleId === "11" || roleId === "12" || roleId === "13" ? ( + ) : roleId === "2" || + roleId === "3" || + roleId === "4" || + roleId === "9" || + roleId === "10" || + roleId === "11" || + roleId === "12" || + roleId === "13" ? ( <> {/* Inbox */} test()}> {" "} - + - - + + { { -
+
{notifications?.map((list: any) => (
- ... + ...
-
{list?.message}
+
+ {list?.message} +
- {`${new Date(list?.createdAt).getDate()}/${new Date(list?.createdAt).getMonth() + 1}/${new Date(list?.createdAt).getFullYear()} ${new Date(list?.createdAt).getHours()}:${new Date( + {`${new Date(list?.createdAt).getDate()}/${ + new Date(list?.createdAt).getMonth() + 1 + }/${new Date( + list?.createdAt + ).getFullYear()} ${new Date( + list?.createdAt + ).getHours()}:${new Date( list?.createdAt ).getMinutes()}`}{" "} @@ -593,17 +819,39 @@ const Navbar = () => {

-
+
{notificationsUpdate?.map((list: any) => ( - +
- ... + ...
-
{list?.message}
+
+ {list?.message} +
- {`${new Date(list?.createdAt).getDate()}/${new Date(list?.createdAt).getMonth() + 1}/${new Date(list?.createdAt).getFullYear()} ${new Date(list?.createdAt).getHours()}:${new Date( + {`${new Date(list?.createdAt).getDate()}/${ + new Date(list?.createdAt).getMonth() + 1 + }/${new Date( + list?.createdAt + ).getFullYear()} ${new Date( + list?.createdAt + ).getHours()}:${new Date( list?.createdAt ).getMinutes()}`}{" "} @@ -625,10 +873,20 @@ const Navbar = () => { {detail !== undefined ? (
- {"Image"} + {"Image"}
-
{detail?.fullname}
-

({detail?.fullname})

+
+ {detail?.fullname} +
+

+ ({detail?.fullname}) +

@@ -652,7 +910,11 @@ const Navbar = () => { href: "/dashboard", }, ].map((item, index) => ( - + {item.name} @@ -664,7 +926,11 @@ const Navbar = () => {
- @@ -677,22 +943,37 @@ const Navbar = () => { ) : ( // Masuk and Daftar buttons for roleId === null
- + {t("logIn")} - +
-

{t("categoryReg")}

+

+ {t("categoryReg")} +

{t("selectOne")}

{role?.map((row: any) => (
- setCategory(event.target.value)} /> + setCategory(event.target.value)} + /> @@ -701,7 +982,11 @@ const Navbar = () => {
- + {t("next")}{" "} @@ -710,14 +995,33 @@ const Navbar = () => {
)}
- @@ -732,7 +1036,14 @@ const Navbar = () => {
- + { - router.push(prefixPath + "/image/filter")} className="flex place-items-start gap-1.5 p-2 w-36"> + router.push(prefixPath + "/image/filter")} + className="flex place-items-start gap-1.5 p-2 w-36" + >

{t("image")}

- router.push(prefixPath + "/video/filter")} className="flex items-start gap-1.5 p-2 "> + router.push(prefixPath + "/video/filter")} + className="flex items-start gap-1.5 p-2 " + > {pathname?.split("/")[1] == "in" ? ( <>

@@ -765,13 +1082,21 @@ const Navbar = () => { )} - router.push(prefixPath + "/document/filter")} className="flex place-items-start gap-1.5 p-2"> + + router.push(prefixPath + "/document/filter") + } + className="flex place-items-start gap-1.5 p-2" + >

{t("text")}

- router.push(prefixPath + "/audio/filter")} className="flex place-items-start gap-1.5 p-2 "> + router.push(prefixPath + "/audio/filter")} + className="flex place-items-start gap-1.5 p-2 " + >

{t("audio")}{" "} @@ -781,9 +1106,18 @@ const Navbar = () => { - + - + { - + - + {

*/} @@ -894,7 +1243,13 @@ const Navbar = () => {
- setOnSearch(e.target.value)} type="text" placeholder="Search..." className="pl-8 pr-4 py-1 w-28 text-[13px] border rounded-full focus:outline-none dark:text-white" />{" "} + setOnSearch(e.target.value)} + type="text" + placeholder="Search..." + className="pl-8 pr-4 py-1 w-28 text-[13px] border rounded-full focus:outline-none dark:text-white" + />{" "}
@@ -966,22 +1321,43 @@ const Navbar = () => { )} */} - {roleId === "5" || roleId === "6" || roleId === "7" || roleId === "8" ? ( + {roleId === "5" || + roleId === "6" || + roleId === "7" || + roleId === "8" ? ( <> {/* Inbox */} test()}> {" "} - + - - + + - + { {
{notifications?.map((list: any) => ( - +
- ... + ... +
+
+ {list?.message}
-
{list?.message}
- {`${new Date(list?.createdAt).getDate()}/${new Date(list?.createdAt).getMonth() + 1}/${new Date(list?.createdAt).getFullYear()} ${new Date(list?.createdAt).getHours()}:${new Date( + {`${new Date(list?.createdAt).getDate()}/${ + new Date(list?.createdAt).getMonth() + 1 + }/${new Date( + list?.createdAt + ).getFullYear()} ${new Date( + list?.createdAt + ).getHours()}:${new Date( list?.createdAt ).getMinutes()}`}{" "} @@ -1024,7 +1422,10 @@ const Navbar = () => { ))} -

+

{t("seeAll")}

@@ -1033,15 +1434,35 @@ const Navbar = () => {
{notificationsUpdate?.map((list: any) => ( - +
- ... + ...
-
{list?.message}
+
+ {list?.message} +
- {`${new Date(list?.createdAt).getDate()}/${new Date(list?.createdAt).getMonth() + 1}/${new Date(list?.createdAt).getFullYear()} ${new Date(list?.createdAt).getHours()}:${new Date( + {`${new Date( + list?.createdAt + ).getDate()}/${ + new Date(list?.createdAt).getMonth() + 1 + }/${new Date( + list?.createdAt + ).getFullYear()} ${new Date( + list?.createdAt + ).getHours()}:${new Date( list?.createdAt ).getMinutes()}`}{" "} @@ -1050,7 +1471,10 @@ const Navbar = () => { ))} -

+

{t("seeAll")}

@@ -1063,10 +1487,20 @@ const Navbar = () => { {detail !== undefined ? (
- {"Image"} + {"Image"}
-
{detail?.fullname}
-

({detail?.fullname})

+
+ {detail?.fullname} +
+

+ ({detail?.fullname}) +

@@ -1090,7 +1524,11 @@ const Navbar = () => { href: "/content-management/galery", }, ].map((item, index) => ( - + {item.name} @@ -1102,8 +1540,15 @@ const Navbar = () => {
- @@ -1112,22 +1557,42 @@ const Navbar = () => { - ) : roleId === "2" || roleId === "3" || roleId === "4" || roleId === "9" || roleId === "10" || roleId === "11" || roleId === "12" || roleId === "13" ? ( + ) : roleId === "2" || + roleId === "3" || + roleId === "4" || + roleId === "9" || + roleId === "10" || + roleId === "11" || + roleId === "12" || + roleId === "13" ? ( <> {/* Inbox */} test()}> {" "} - + - - + + { { -
+
{notifications?.map((list: any) => (
- ... + ...
-
{list?.message}
+
+ {list?.message} +
- {`${new Date(list?.createdAt).getDate()}/${new Date(list?.createdAt).getMonth() + 1}/${new Date(list?.createdAt).getFullYear()} ${new Date(list?.createdAt).getHours()}:${new Date( + {`${new Date(list?.createdAt).getDate()}/${ + new Date(list?.createdAt).getMonth() + 1 + }/${new Date( + list?.createdAt + ).getFullYear()} ${new Date( + list?.createdAt + ).getHours()}:${new Date( list?.createdAt ).getMinutes()}`}{" "} @@ -1177,17 +1661,39 @@ const Navbar = () => {

-
+
{notificationsUpdate?.map((list: any) => ( - +
- ... + ...
-
{list?.message}
+
+ {list?.message} +
- {`${new Date(list?.createdAt).getDate()}/${new Date(list?.createdAt).getMonth() + 1}/${new Date(list?.createdAt).getFullYear()} ${new Date(list?.createdAt).getHours()}:${new Date( + {`${new Date(list?.createdAt).getDate()}/${ + new Date(list?.createdAt).getMonth() + 1 + }/${new Date( + list?.createdAt + ).getFullYear()} ${new Date( + list?.createdAt + ).getHours()}:${new Date( list?.createdAt ).getMinutes()}`}{" "} @@ -1196,7 +1702,10 @@ const Navbar = () => { ))} -

+

{t("seeAll")}

@@ -1209,10 +1718,20 @@ const Navbar = () => { {detail !== undefined ? (
- {"Image"} + {"Image"}
-
{detail?.fullname}
-

({detail?.fullname})

+
+ {detail?.fullname} +
+

+ ({detail?.fullname}) +

@@ -1236,7 +1755,11 @@ const Navbar = () => { href: "/dashboard", }, ].map((item, index) => ( - + {item.name} @@ -1248,8 +1771,15 @@ const Navbar = () => {
- @@ -1261,25 +1791,48 @@ const Navbar = () => { ) : ( // Masuk and Daftar buttons for roleId === null
- + {t("logIn")} -
-

{t("categoryReg")}

-

{t("selectOne")}

+

+ {t("categoryReg")} +

+

+ {t("selectOne")} +

{role?.map((row: any) => (
- setCategory(event.target.value)} /> -
@@ -1287,7 +1840,11 @@ const Navbar = () => {
- + {t("next")}{" "} diff --git a/public/logo/polda/polda-kaltara.png b/public/logo/polda/polda-kaltara.png new file mode 100644 index 00000000..acc0a0ab Binary files /dev/null and b/public/logo/polda/polda-kaltara.png differ