- {(seeAllValue ? categories : categories?.slice(0, 4 ))?.map((category: any) => (
-
-
router.push(`${prefixPath}all/filter?category=${category?.id}`)} className="cursor-pointer relative group rounded-md overflow-hidden shadow-md hover:shadow-lg block">
- {/* Gambar */}
-
+ {(seeAllValue ? categories : categories?.slice(0, 4))?.map(
+ (category: any) => (
+
+
+ router.push(
+ `${prefixPath}all/filter?category=${category?.id}`
+ )
+ }
+ className="cursor-pointer relative group rounded-md overflow-hidden shadow-md hover:shadow-lg block"
+ >
+ {/* Gambar */}
+
- {/* Overlay gelap */}
-
+ {/* Overlay gelap */}
+
- {/* Judul */}
-
-
{category?.name}
+ {/* Judul */}
+
+
+ {category?.name}
+
+
-
- ))}
+ )
+ )}
{/* Tombol See More / See Less */}
- {categories?.length > 8 && (
+ {categories?.length > 10 && (
-
diff --git a/components/landing-page/coverage.tsx b/components/landing-page/coverage.tsx
index a7795f32..cd9ec958 100644
--- a/components/landing-page/coverage.tsx
+++ b/components/landing-page/coverage.tsx
@@ -8,55 +8,183 @@ import { usePathname } from "next/navigation";
import Image from "next/image";
const regions = [
- { name: "Polda Metro Jaya", slug: "metro-jaya", logo: "/logo/polda/polda-metro.png" },
- { name: "Polda Jawa Barat", slug: "jawa-barat", logo: "/logo/polda/polda-jawabarat.png" },
- { name: "Polda Banten", slug: "banten", logo: "/logo/polda/polda-banten.png" },
- { name: "Polda Jawa Tengah", slug: "jawa-tengah", logo: "/logo/polda/polda-jawatengah.png" },
- { name: "Polda D.I Yogyakarta", slug: "di-yogyakarta", logo: "/logo/polda/polda-jogja.png" },
- { name: "Polda Jawa Timur", slug: "jawa-timur", logo: "/logo/polda/polda-jawatimur.png" },
+ {
+ name: "Polda Metro Jaya",
+ slug: "metro-jaya",
+ logo: "/logo/polda/polda-metro.png",
+ },
+ {
+ name: "Polda Jawa Barat",
+ slug: "jawa-barat",
+ logo: "/logo/polda/polda-jawabarat.png",
+ },
+ {
+ name: "Polda Banten",
+ slug: "banten",
+ logo: "/logo/polda/polda-banten.png",
+ },
+ {
+ name: "Polda Jawa Tengah",
+ slug: "jawa-tengah",
+ logo: "/logo/polda/polda-jawatengah.png",
+ },
+ {
+ name: "Polda D.I Yogyakarta",
+ slug: "di-yogyakarta",
+ logo: "/logo/polda/polda-jogja.png",
+ },
+ {
+ name: "Polda Jawa Timur",
+ slug: "jawa-timur",
+ logo: "/logo/polda/polda-jawatimur.png",
+ },
{ name: "Polda Aceh", slug: "aceh", logo: "/logo/polda/polda-aceh.png" },
- { name: "Polda Sumatera Utara", slug: "sumatera-utara", logo: "/logo/polda/polda-sumut.png" },
- { name: "Polda Sumatera Barat", slug: "sumatera-barat", logo: "/logo/polda/polda-sumatera-barat.png" },
+ {
+ name: "Polda Sumatera Utara",
+ slug: "sumatera-utara",
+ logo: "/logo/polda/polda-sumut.png",
+ },
+ {
+ name: "Polda Sumatera Barat",
+ slug: "sumatera-barat",
+ logo: "/logo/polda/polda-sumatera-barat.png",
+ },
{ name: "Polda Riau", slug: "riau", logo: "/logo/polda/polda-riau.png" },
- { name: "Polda Kep. Riau", slug: "kepulauan-riau", logo: "/logo/polda/polda-kepri.png" },
+ {
+ name: "Polda Kep. Riau",
+ slug: "kepulauan-riau",
+ logo: "/logo/polda/polda-kepri.png",
+ },
{ name: "Polda Jambi", slug: "jambi", logo: "/logo/polda/polda-jambi.png" },
- { name: "Polda Sumatera Selatan", slug: "sumatera-selatan", logo: "/logo/polda/polda-sumsel.png" },
- { name: "Polda Kep. Bangka Belitung", slug: "bangka-belitung", logo: "/logo/polda/polda-bangkabelitung.png" },
- { name: "Polda Bengkulu", slug: "bengkulu", logo: "/logo/polda/polda-bengkulu.png" },
- { name: "Polda Lampung", slug: "lampung", logo: "/logo/polda/polda-lampung.png" },
- { name: "Polda Nusa Tenggara Barat", slug: "ntb", logo: "/logo/polda/polda-ntb.png" },
- { name: "Polda Nusa Tenggara Timur", slug: "ntt", logo: "/logo/polda/polda-ntt.png" },
+ {
+ name: "Polda Sumatera Selatan",
+ slug: "sumatera-selatan",
+ logo: "/logo/polda/polda-sumsel.png",
+ },
+ {
+ name: "Polda Kep. Bangka Belitung",
+ slug: "bangka-belitung",
+ logo: "/logo/polda/polda-bangkabelitung.png",
+ },
+ {
+ name: "Polda Bengkulu",
+ slug: "bengkulu",
+ logo: "/logo/polda/polda-bengkulu.png",
+ },
+ {
+ name: "Polda Lampung",
+ slug: "lampung",
+ logo: "/logo/polda/polda-lampung.png",
+ },
+ {
+ name: "Polda Nusa Tenggara Barat",
+ slug: "ntb",
+ logo: "/logo/polda/polda-ntb.png",
+ },
+ {
+ name: "Polda Nusa Tenggara Timur",
+ slug: "ntt",
+ logo: "/logo/polda/polda-ntt.png",
+ },
{ name: "Polda Bali", slug: "bali", logo: "/logo/polda/polda-bali.png" },
- { name: "Polda Kalimantan Barat", slug: "kalimantan-barat", logo: "/logo/polda/polda-kalbar.png" },
- { name: "Polda Kalimantan Tengah", slug: "kalimantan-tengah", logo: "/logo/polda/polda-kalteng.png" },
- { name: "Polda Kalimantan Selatan", slug: "kalimantan-selatan", logo: "/logo/polda/polda-kalsel.png" },
- { name: "Polda Kalimantan Timur", slug: "kalimantan-timur", logo: "/logo/polda/polda-kaltim.png" },
- { name: "Polda Kalimantan Utara", slug: "kaltara", logo: "/logo/polda/polda-kaltara.png" },
- { name: "Polda Sulawesi Tengah", slug: "sulawesi-tengah", logo: "/logo/polda/polda-sulawesi-tengah.png" },
- { name: "Polda Sulawesi Utara", slug: "sulawesi-utara", logo: "/logo/polda/polda-sulawesi-utara.png" },
- { name: "Polda Gorontalo", slug: "gorontalo", logo: "/logo/polda/polda-gorontalo.png" },
- { name: "Polda Sulawesi Barat", slug: "sulawesi-barat", logo: "/logo/polda/polda-sulbar.png" },
- { name: "Polda Sulawesi Selatan", slug: "sulawesi-selatan", logo: "/logo/polda/polda-sulsel.png" },
- { name: "Polda Sulawesi Tenggara", slug: "sulawesi-tenggara", logo: "/logo/polda/polda-sulawesi-tenggara.png" },
- { name: "Polda Maluku Utara", slug: "maluku-utara", logo: "/logo/polda/polda-maluku-utara.png" },
- { name: "Polda Maluku", slug: "maluku", logo: "/logo/polda/polda-maluku.png" },
- { name: "Polda Papua Barat", slug: "papua-barat", logo: "/logo/polda/polda-papua-barat.png" },
+ {
+ name: "Polda Kalimantan Barat",
+ slug: "kalimantan-barat",
+ logo: "/logo/polda/polda-kalbar.png",
+ },
+ {
+ name: "Polda Kalimantan Tengah",
+ slug: "kalimantan-tengah",
+ logo: "/logo/polda/polda-kalteng.png",
+ },
+ {
+ name: "Polda Kalimantan Selatan",
+ slug: "kalimantan-selatan",
+ logo: "/logo/polda/polda-kalsel.png",
+ },
+ {
+ name: "Polda Kalimantan Timur",
+ slug: "kalimantan-timur",
+ logo: "/logo/polda/polda-kaltim.png",
+ },
+ {
+ name: "Polda Kalimantan Utara",
+ slug: "kaltara",
+ logo: "/logo/polda/polda-kaltara.png",
+ },
+ {
+ name: "Polda Sulawesi Tengah",
+ slug: "sulawesi-tengah",
+ logo: "/logo/polda/polda-sulawesi-tengah.png",
+ },
+ {
+ name: "Polda Sulawesi Utara",
+ slug: "sulawesi-utara",
+ logo: "/logo/polda/polda-sulawesi-utara.png",
+ },
+ {
+ name: "Polda Gorontalo",
+ slug: "gorontalo",
+ logo: "/logo/polda/polda-gorontalo.png",
+ },
+ {
+ name: "Polda Sulawesi Barat",
+ slug: "sulawesi-barat",
+ logo: "/logo/polda/polda-sulbar.png",
+ },
+ {
+ name: "Polda Sulawesi Selatan",
+ slug: "sulawesi-selatan",
+ logo: "/logo/polda/polda-sulsel.png",
+ },
+ {
+ name: "Polda Sulawesi Tenggara",
+ slug: "sulawesi-tenggara",
+ logo: "/logo/polda/polda-sulawesi-tenggara.png",
+ },
+ {
+ name: "Polda Maluku Utara",
+ slug: "maluku-utara",
+ logo: "/logo/polda/polda-maluku-utara.png",
+ },
+ {
+ name: "Polda Maluku",
+ slug: "maluku",
+ logo: "/logo/polda/polda-maluku.png",
+ },
+ {
+ name: "Polda Papua Barat",
+ slug: "papua-barat",
+ logo: "/logo/polda/polda-papua-barat.png",
+ },
{ name: "Polda Papua", slug: "papua", logo: "/logo/polda/polda-papua.png" },
- { name: "Satuan Kerja POLRI", slug: "satker-polri", logo: "/logo/satker/SATUAN-KERJA-POLRI.png" },
- { name: "Internasional", slug: "internasional", logo: "/assets/polda/internasional.png" },
+ {
+ name: "Satuan Kerja POLRI",
+ slug: "satker-polri",
+ logo: "/logo/satker/SATUAN-KERJA-POLRI.png",
+ },
+ {
+ name: "Internasional",
+ slug: "internasional",
+ logo: "/assets/polda/internasional.png",
+ },
];
const Coverage: React.FC = () => {
const [seeAllValue, setSeeAllValue] = useState(false);
const [searchTerm, setSearchTerm] = useState("");
- const [filteredList, setFilteredList] = useState
(regions);
+ const [filteredList, setFilteredList] = useState(
+ regions
+ );
const pathname = usePathname();
const t = useTranslations("LandingPage");
const handleSearch = () => {
const value = searchTerm.toLowerCase();
- const filtered = regions.filter((polda) => polda.name.toLowerCase().includes(value));
+ const filtered = regions.filter((polda) =>
+ polda.name.toLowerCase().includes(value)
+ );
setFilteredList(filtered);
};
@@ -74,58 +202,38 @@ const Coverage: React.FC = () => {
`;
- const toBase64 = (str: string) => (typeof window === "undefined" ? Buffer.from(str).toString("base64") : window.btoa(str));
+ const toBase64 = (str: string) =>
+ typeof window === "undefined"
+ ? Buffer.from(str).toString("base64")
+ : window.btoa(str);
return (
- {/* Header */}
- {/*
- {pathname?.split("/")[1] == "in" ? (
- <>
- {t("coverageOnly")} {t("area")}{" "}
- >
- ) : (
- <>
- {t("area")}
- {t("coverageOnly")}
- >
- )}
-
*/}
-
- {/*
- Liputan Wilayah
-
*/}
-
- {/*
*/}
-
- {/* Pencarian */}
- {/*
- setSearchTerm(e.target.value)} type="text" placeholder={t("search")} className="w-4/5 px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-[#bb3523] focus:outline-none" />
-
- {t("searchRegional")}
-
-
-
*/}
-
- {/* Grid Wilayah */}
-
- {filteredList?.map((region: any) => (
-
-
-
-
-
{region.name}
-
- ))}
-
-
- {/* {filteredList && filteredList.length > 9 && (
-
-
setSeeAllValue(!seeAllValue)} className="bg-white hover:bg-[#bb3523] text-[#bb3523] hover:text-white border-2 border-[#bb3523]">
- {seeAllValue ? t("seeLess") : t("seeMore")}
-
+
+
+ {filteredList?.map((region: any) => (
+
+
+
+
+
{region.name}
+
+ ))}
- )} */}
+
);
};
diff --git a/components/landing-page/header-banner-satker.tsx b/components/landing-page/header-banner-satker.tsx
index 102b1091..ca46ffb0 100644
--- a/components/landing-page/header-banner-satker.tsx
+++ b/components/landing-page/header-banner-satker.tsx
@@ -1,5 +1,5 @@
"use client";
-import { listData } from "@/service/landing/landing";
+import { listData, listStaticBanner } from "@/service/landing/landing";
import { useParams, usePathname, useRouter } from "next/navigation";
import React, { useEffect, useState } from "react";
import Skeleton, { SkeletonTheme } from "react-loading-skeleton";
@@ -28,8 +28,17 @@ const HeaderBannerSatker = () => {
async function fetchData() {
const res = await listData("1", "", "", 5, 0, "createdAt", "", "", "satker-" + satkerName);
- let data = res?.data?.data?.content;
- setContent(data);
+ var data = res?.data?.data?.content;
+ if (data) {
+ const resStatic = await listStaticBanner(satkerName, false);
+ for (let i = 0; i < resStatic?.data?.data?.length; i++) {
+ const media = resStatic?.data.data[i]?.mediaUpload;
+ media.fileTypeId = media.fileType?.id;
+ data = data.filter((item: any) => item.id != media.id);
+ data.splice(0, 0, media);
+ }
+ setContent(data);
+ }
setCenterPadding(`${Math.trunc(Number(window.innerWidth) / 10 + 40)}px`);
setIsBannerLoading(false);
console.log("Done");
diff --git a/components/landing-page/header-banner.tsx b/components/landing-page/header-banner.tsx
index 19958146..c48c8bf4 100644
--- a/components/landing-page/header-banner.tsx
+++ b/components/landing-page/header-banner.tsx
@@ -1,5 +1,5 @@
"use client";
-import { listData } from "@/service/landing/landing";
+import { listData, listStaticBanner } from "@/service/landing/landing";
import { useParams } from "next/navigation";
import React, { useEffect, useState } from "react";
import Skeleton, { SkeletonTheme } from "react-loading-skeleton";
@@ -29,8 +29,17 @@ const HeaderBanner = () => {
async function fetchData() {
const res = await listData("1", "", "", 5, 0, "createdAt", "", "", poldaName);
- let data = res?.data?.data?.content;
- setContent(data);
+ var data = res?.data?.data?.content;
+ if (data) {
+ const resStatic = await listStaticBanner(poldaName, false);
+ for (let i = 0; i < resStatic?.data?.data?.length; i++) {
+ const media = resStatic?.data.data[i]?.mediaUpload;
+ media.fileTypeId = media.fileType?.id;
+ data = data.filter((item: any) => item.id != media.id);
+ data.splice(0, 0, media);
+ }
+ setContent(data);
+ }
setCenterPadding(`${Math.trunc(Number(window.innerWidth) / 10 + 40)}px`);
setIsBannerLoading(false);
console.log("Done");
diff --git a/components/landing-page/hero.tsx b/components/landing-page/hero.tsx
index 42ceaad6..3485d734 100644
--- a/components/landing-page/hero.tsx
+++ b/components/landing-page/hero.tsx
@@ -2,7 +2,7 @@ import { formatDateToIndonesian, shimmer, toBase64 } from "@/utils/globals";
import React, { useEffect, useState } from "react";
import "swiper/css/bundle";
import "swiper/css/navigation";
-import { getHeroData } from "@/service/landing/landing";
+import { getHeroData, listStaticBanner } from "@/service/landing/landing";
import Link from "next/link";
import { useParams, usePathname, useRouter } from "next/navigation";
import {
@@ -81,8 +81,20 @@ const HeroModal = ({ onClose }: { onClose: () => void }) => {
const initFetch = async () => {
const response = await getHeroData();
console.log(response);
- setHeroData(response?.data?.data?.content);
+ let data = response?.data?.data?.content;
+ if (data) {
+ const resStatic = await listStaticBanner();
+ for (let i = 0; i < resStatic?.data?.data?.length; i++) {
+ const media = resStatic?.data.data[i]?.mediaUpload;
+ media.fileTypeId = media.fileType?.id;
+ data = data.filter((item: any) => item.id != media.id);
+ data.splice(0, 0, media);
+ }
+ setHeroData(data);
+ }
};
+
+
return (
@@ -190,16 +202,19 @@ const SurveyIntroModal = ({ onNext }: { onNext: () => void }) => {
const ONE_MONTH = 30 * 24 * 60 * 60 * 1000;
-const Hero: React.FC = () => {
+const Hero = (props: { group?: string }) => {
const router = useRouter();
const pathname = usePathname();
const params = useParams();
const locale = params?.locale;
const [isLoading, setIsLoading] = useState
(true);
const [heroData, setHeroData] = useState();
+ const [content, setContent] = useState();
const [showModal, setShowModal] = useState(false);
const [showSurveyModal, setShowSurveyModal] = useState(false);
const [showFormModal, setShowFormModal] = useState(false);
+ const poldaName = params?.polda_name;
+ const satkerName = params?.satker_name;
useEffect(() => {
const timer = setTimeout(() => {
@@ -274,7 +289,28 @@ const Hero: React.FC = () => {
const initFetch = async () => {
const response = await getHeroData();
console.log(response);
+ let data = response?.data?.data?.content;
setHeroData(response?.data?.data?.content);
+ if (data) {
+ const resStatic = await listStaticBanner(
+ props.group == "mabes"
+ ? ""
+ : props.group == "polda" && poldaName && String(poldaName)?.length > 1
+ ? poldaName
+ : props.group == "satker" &&
+ satkerName &&
+ String(satkerName)?.length > 1
+ ? "satker-" + satkerName
+ : ""
+ );
+ for (let i = 0; i < resStatic?.data?.data?.length; i++) {
+ const media = resStatic?.data.data[i]?.mediaUpload;
+ media.fileTypeId = media.fileType?.id;
+ data = data.filter((item: any) => item.id != media.id);
+ data.splice(0, 0, media);
+ }
+ setContent(data);
+ }
};
const shimmer = (w: number, h: number) => `
@@ -322,7 +358,7 @@ const Hero: React.FC = () => {
) : (
- {heroData?.map((list: any) => (
+ {content?.map((list: any) => (
{
className="w-full h-[73px] object-cover rounded-lg"
/>
-
+
{item?.categoryName}
@@ -487,7 +523,7 @@ const Hero: React.FC = () => {
className="w-full h-[73px] object-cover rounded-lg"
/>
-
+
{item?.categoryName}
@@ -534,7 +570,7 @@ const Hero: React.FC = () => {
className="w-full h-[73px] object-cover rounded-lg"
/>
-
+
{item?.categoryName}
diff --git a/components/landing-page/navbar.tsx b/components/landing-page/navbar.tsx
index 78ed383c..848c6136 100644
--- a/components/landing-page/navbar.tsx
+++ b/components/landing-page/navbar.tsx
@@ -187,20 +187,24 @@ const Navbar = () => {
return (
-
-
- {/* Logo */}
+
+
-
+
-
{/* Nav Menu */}
-
+
{/* Mobile Menu Toggle */}
-
setMenuOpen(!menuOpen)}
- >
- {menuOpen ? (
-
- ) : (
-
- )}
-
{/* Desktop Navigation */}
-
+
{roleId == undefined ? (
""
) : (
@@ -398,7 +368,7 @@ const Navbar = () => {
{t("live")}
*/}
-
+
{/* Languange */}
-
+
{/* Dark Mode */}
-
+
+
+
-
+
{/*
setOnSearch(e.target.value)}
@@ -952,7 +924,7 @@ const Navbar = () => {
>
) : (
// Masuk and Daftar buttons for roleId === null
-
+
setMenuOpen(!menuOpen)}
+ >
+ {menuOpen ? (
+
+ ) : (
+
+ )}
+
{/* Mobile Menu */}
{menuOpen && (
-
-
-
-
-
-
-
);
};
diff --git a/lib/menus.ts b/lib/menus.ts
index 9ff5a783..75b33f17 100644
--- a/lib/menus.ts
+++ b/lib/menus.ts
@@ -82,7 +82,7 @@ export function getMenuList(pathname: string, t: any): Group[] {
{
href: "/contributor/content/teks",
label: t("text"),
- active: pathname.includes("/content/text"),
+ active: pathname.includes("/content/teks"),
icon: "heroicons:document",
children: [],
},
@@ -1492,7 +1492,7 @@ export function getMenuList(pathname: string, t: any): Group[] {
{
href: "/contributor/content/teks",
label: t("text"),
- active: pathname.includes("/content/text"),
+ active: pathname.includes("/content/teks"),
icon: "heroicons:document",
children: [],
},
@@ -1719,7 +1719,7 @@ export function getMenuList(pathname: string, t: any): Group[] {
{
href: "/contributor/content/teks",
label: t("text"),
- active: pathname.includes("/content/text"),
+ active: pathname.includes("/content/teks"),
icon: "heroicons:document",
children: [],
},
@@ -2421,7 +2421,7 @@ export function getMenuList(pathname: string, t: any): Group[] {
{
href: "/contributor/content/teks",
label: t("text"),
- active: pathname.includes("/content/text"),
+ active: pathname.includes("/content/teks"),
icon: "heroicons:document",
children: [],
},
@@ -2703,7 +2703,7 @@ export function getMenuList(pathname: string, t: any): Group[] {
id: "faq",
href: "/supervisor/faq",
label: t("faq"),
- active: pathname.includes("/frequently-asked-question"),
+ active: pathname.includes("/faq"),
icon: "wpf:faq",
submenus: [],
},
@@ -3470,70 +3470,70 @@ export function getMenuList(pathname: string, t: any): Group[] {
},
],
},
- // {
- // groupLabel: "",
- // id: "settings",
- // menus: [
- // {
- // id: "settings",
- // href: "/admin/settings",
- // label: t("settings"),
- // active: pathname.includes("/settinng"),
- // icon: "material-symbols:settings",
- // submenus: [
- // {
- // href: "/admin/settings/category",
- // label: t("category"),
- // active: pathname === "/admin/settings/category",
- // icon: "heroicons:arrow-trending-up",
- // children: [],
- // },
- // {
- // href: "/admin/settings/tag",
- // label: "Tag",
- // active: pathname === "/admin/settings/tag",
- // icon: "heroicons:arrow-trending-up",
- // children: [],
- // },
- // {
- // href: "/admin/settings/banner",
- // label: "Banner",
- // active: pathname === "/admin/settings/banner",
- // icon: "heroicons:arrow-trending-up",
- // children: [],
- // },
- // {
- // href: "/admin/settings/feedback",
- // label: "Feedback",
- // active: pathname === "/admin/settings/feedback",
- // icon: "heroicons:arrow-trending-up",
- // children: [],
- // },
- // {
- // href: "/admin/settings/faq",
- // label: "FAQ",
- // active: pathname === "/admin/settings/faq",
- // icon: "heroicons:arrow-trending-up",
- // children: [],
- // },
- // {
- // href: "https://nat-mediahub.polri.go.id/",
- // label: "Mediahub 2022",
- // active: pathname === "/admin/settings/mediahub-2022",
- // icon: "heroicons:arrow-trending-up",
- // children: [],
- // },
- // {
- // href: "/admin/settings/privacy",
- // label: t("privacy"),
- // active: pathname === "/admin/settings/privacy",
- // icon: "heroicons:arrow-trending-up",
- // children: [],
- // },
- // ],
- // },
- // ],
- // },
+ {
+ groupLabel: "",
+ id: "settings",
+ menus: [
+ {
+ id: "settings",
+ href: "/admin/settings",
+ label: t("settings"),
+ active: pathname.includes("/settinng"),
+ icon: "material-symbols:settings",
+ submenus: [
+ {
+ href: "/admin/settings/category",
+ label: t("category"),
+ active: pathname === "/admin/settings/category",
+ icon: "heroicons:arrow-trending-up",
+ children: [],
+ },
+ {
+ href: "/admin/settings/tag",
+ label: "Tag",
+ active: pathname === "/admin/settings/tag",
+ icon: "heroicons:arrow-trending-up",
+ children: [],
+ },
+ {
+ href: "/admin/settings/banner",
+ label: "Banner",
+ active: pathname === "/admin/settings/banner",
+ icon: "heroicons:arrow-trending-up",
+ children: [],
+ },
+ {
+ href: "/admin/settings/feedback",
+ label: "Feedback",
+ active: pathname === "/admin/settings/feedback",
+ icon: "heroicons:arrow-trending-up",
+ children: [],
+ },
+ {
+ href: "/admin/settings/faq",
+ label: "FAQ",
+ active: pathname === "/admin/settings/faq",
+ icon: "heroicons:arrow-trending-up",
+ children: [],
+ },
+ {
+ href: "https://nat-mediahub.polri.go.id/",
+ label: "Mediahub 2022",
+ active: pathname === "/admin/settings/mediahub-2022",
+ icon: "heroicons:arrow-trending-up",
+ children: [],
+ },
+ {
+ href: "/admin/settings/privacy",
+ label: t("privacy"),
+ active: pathname === "/admin/settings/privacy",
+ icon: "heroicons:arrow-trending-up",
+ children: [],
+ },
+ ],
+ },
+ ],
+ },
];
} else {
menusSelected = [
diff --git a/package-lock.json b/package-lock.json
index a0b9d181..50179adc 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -127,7 +127,7 @@
"react-player": "^2.16.0",
"react-quill": "^0.0.2",
"react-resizable-panels": "^2.0.19",
- "react-responsive": "^10.0.0",
+ "react-responsive": "^10.0.1",
"react-select": "^5.8.3",
"react-slick": "^0.30.2",
"react-syntax-highlighter": "^15.5.0",
@@ -15275,9 +15275,9 @@
}
},
"node_modules/react-responsive": {
- "version": "10.0.0",
- "resolved": "https://registry.npmjs.org/react-responsive/-/react-responsive-10.0.0.tgz",
- "integrity": "sha512-N6/UiRLGQyGUqrarhBZmrSmHi2FXSD++N5VbSKsBBvWfG0ZV7asvUBluSv5lSzdMyEVjzZ6Y8DL4OHABiztDOg==",
+ "version": "10.0.1",
+ "resolved": "https://registry.npmjs.org/react-responsive/-/react-responsive-10.0.1.tgz",
+ "integrity": "sha512-OM5/cRvbtUWEX8le8RCT8scA8y2OPtb0Q/IViEyCEM5FBN8lRrkUOZnu87I88A6njxDldvxG+rLBxWiA7/UM9g==",
"dependencies": {
"hyphenate-style-name": "^1.0.0",
"matchmediaquery": "^0.4.2",
diff --git a/package.json b/package.json
index f46cfcf0..b0d0ae21 100644
--- a/package.json
+++ b/package.json
@@ -128,7 +128,7 @@
"react-player": "^2.16.0",
"react-quill": "^0.0.2",
"react-resizable-panels": "^2.0.19",
- "react-responsive": "^10.0.0",
+ "react-responsive": "^10.0.1",
"react-select": "^5.8.3",
"react-slick": "^0.30.2",
"react-syntax-highlighter": "^15.5.0",
diff --git a/service/communication/communication.ts b/service/communication/communication.ts
index 008629d3..85c0e0ec 100644
--- a/service/communication/communication.ts
+++ b/service/communication/communication.ts
@@ -9,7 +9,7 @@ export async function listTicketingInternal(
page: number,
size: any,
title: string = "",
- category: any = "",
+ category: any = ""
) {
return await httpGetInterceptor(
`ticketing/internal/pagination?enablePage=1&size=${size}&page=${page}&title=${title}&category=${category}`
@@ -54,6 +54,21 @@ export async function saveTicketing(data: any) {
return httpPostInterceptor(url, data);
}
+export async function saveTicketReply(data: any) {
+ const url = "ticketing/reply";
+ return httpPostInterceptor(url, data);
+}
+
+export async function deleteTicket(id: any) {
+ const url = `ticketing?id=${id}`;
+ return httpDeleteInterceptor(url, id);
+}
+
+export async function closeTicket(id: any) {
+ const url = `ticketing/close?id=${id}`;
+ return httpPostInterceptor(url, id);
+}
+
export async function getTicketingInternalDetail(id: any) {
const url = `ticketing/internal?id=${id}`;
return httpGetInterceptor(url);
@@ -74,6 +89,11 @@ export async function getTicketingDetail(id: any) {
return httpGetInterceptor(url);
}
+export async function getTicketingReply(id: any) {
+ const url = `ticketing/reply?ticketId=${id}`;
+ return httpGetInterceptor(url);
+}
+
export async function getTicketCollaborationTeams(id: string | number) {
const url = `ticketing/collaboration/teams?ticketId=${id}`;
return httpGetInterceptor(url);
@@ -121,3 +141,13 @@ export async function getEscalationDiscussion(id: any) {
const url = `ticketing/escalation/discussion?ticketId=${id}`;
return httpGetInterceptor(url);
}
+
+export async function getQuestionTicket(id: any) {
+ const url = `question?id=${id}`;
+ return httpGetInterceptor(url);
+}
+
+export async function saveTicketsQuestion(data: any) {
+ const url = "ticketing/convert-question";
+ return httpPostInterceptor(url, data);
+}
diff --git a/service/landing/landing.ts b/service/landing/landing.ts
index 436c437a..ffdcc2d4 100644
--- a/service/landing/landing.ts
+++ b/service/landing/landing.ts
@@ -37,6 +37,14 @@ export async function getHeroData() {
);
}
+export async function listStaticBanner(
+ group: any = "",
+ isInt: Boolean = false
+) {
+ const url = `media/static-banner?group=${group}&isInt=${isInt}`;
+ return httpGetInterceptor(url);
+}
+
export async function getPublicCategoryData(
group: any = "",
type: string = "",
diff --git a/service/master/knowledge-base.ts b/service/master/knowledge-base.ts
index 2d842711..4ab81b82 100644
--- a/service/master/knowledge-base.ts
+++ b/service/master/knowledge-base.ts
@@ -1,4 +1,5 @@
import {
+ httpDeleteInterceptor,
httpGetInterceptor,
httpPostInterceptor,
} from "../http-config/http-interceptor-service";
@@ -14,6 +15,11 @@ export async function getKnowledgeBaseList(id: number) {
}
export async function saveKnowledgeBaseCategory(data: any) {
- const url = 'knowledge-base/category';
+ const url = "knowledge-base/category";
return httpPostInterceptor(url, data);
-}
\ No newline at end of file
+}
+
+export async function deleteKnowledgeBase(id: any) {
+ const url = `knowledge-base?id=${id}`;
+ return httpDeleteInterceptor(url);
+}
diff --git a/service/media-tracking/media-tracking.ts b/service/media-tracking/media-tracking.ts
index 6e04fe38..402f7e05 100644
--- a/service/media-tracking/media-tracking.ts
+++ b/service/media-tracking/media-tracking.ts
@@ -18,13 +18,24 @@ export async function mediaTrackingSave(data: any) {
return httpPostInterceptor(url, data);
}
-export async function getMediaTracking(data: any) {
- // const url = `/media/tracking/monitoring/pagination`;
- const url = `/media/tracking/monitoring/pagination?enablePagination=1&page=${
- data.page || 0
- }&size=${data?.size || 10}`;
- return httpGetInterceptor(url);
+export async function getMediaTracking(
+ page: any,
+ title: string = "",
+ size: any
+) {
+ return httpGetInterceptor(
+ `/media/tracking/monitoring/pagination?enablePagination=1&size=${size}&page=${page}&title=${title}`
+ );
}
+
+// export async function getMediaTracking(data: any) {
+// // const url = `/media/tracking/monitoring/pagination`;
+// const url = `/media/tracking/monitoring/pagination?enablePagination=1&page=${
+// data.page || 0
+// }&size=${data?.size || 10}`;
+// return httpGetInterceptor(url);
+// }
+
export async function getMediaTrackingResult(data: any) {
// const url = `/media/tracking/monitoring/pagination`;
const url = `/media/tracking/monitoring/results/pagination?trackingId=${
diff --git a/service/task.ts b/service/task.ts
index 2dd24898..a103a2e3 100644
--- a/service/task.ts
+++ b/service/task.ts
@@ -103,7 +103,7 @@ export async function getAcceptance(id: any, isAccept: any) {
return httpGetInterceptor(url);
}
-export async function acceptAssignment(id: any, isAccept: any) {
+export async function acceptAssignment(id: any) {
const url = `assignment/acceptance?id=${id}`;
return httpPostInterceptor(url, id);
}
diff --git a/tailwind.config.ts b/tailwind.config.ts
index 6f54737e..8586acd1 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -21,6 +21,7 @@ const config = {
extend: {
screens: {
"custom-lg": "1090px",
+ "custom-lg-button": "1030px",
},
fontFamily: {
sans: ["DM Sans", "sans-serif"],