diff --git a/app/[locale]/(public)/image/detail/[slug]/page.tsx b/app/[locale]/(public)/image/detail/[slug]/page.tsx index 3c0fa4d4..a54fb676 100644 --- a/app/[locale]/(public)/image/detail/[slug]/page.tsx +++ b/app/[locale]/(public)/image/detail/[slug]/page.tsx @@ -43,5 +43,5 @@ export async function generateMetadata({ params }: any): Promise { } export default async function DetailInfo({ params }: Props) { - return ; + return
; } diff --git a/components/landing-page/content-category.tsx b/components/landing-page/content-category.tsx index 6277b169..2212cff2 100644 --- a/components/landing-page/content-category.tsx +++ b/components/landing-page/content-category.tsx @@ -72,7 +72,7 @@ const ContentCategory = (props: { group?: string; type: string }) => { )}
- {(seeAllValue ? categories : categories?.slice(0, 8))?.map((category: any) => ( + {(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 */} @@ -98,7 +98,7 @@ const ContentCategory = (props: { group?: string; type: string }) => {
{/* Tombol See More / See Less */} - {categories?.length > 8 && ( + {categories?.length > 4 && (
gambar-utama { + const router = useRouter(); + const asPath: any = usePathname(); + const params = useParams(); + const poldaName: any = params?.polda_name; + const [categorySelect, setCategorySelect] = useState("0"); + const t = useTranslations("LandingPage"); + const [contentType, setContentType] = useState("all"); + const [search, setSearch] = useState(""); + + useEffect(() => { + function initState() { + console.log(categorySelect); + } + + initState(); + }, [categorySelect]); + + return ( +
+
+ {/* Heading */} +

+ {t("welcome")} Di Polda {poldaName.replace("-", " ")} +

+
+

+ {t("polda")} {poldaName.replace("-", " ")} +

+ + {/* Search Form */} + {/*
*/} + {/* Dropdown */} + {/*
+ + + + + + + {t("content")} + + + + + + + + + + {t("video")} + + + + + + {t("audio")} + + + + + + {t("image")} + + + + + + {t("text")} + + + + +
+ + + + + + +
+
*/} + + {/* Button */} + {/* */} + {/*
*/} + +
+ {/* Dropdown */} +
+ +
+ + + + + + setSearch(e.target.value)} /> +
+
+ + {/* Search Input */} + +
+
+
+ ); +}; + +export default WelcomePoldaKaltara; diff --git a/components/landing-page/left-banner.tsx b/components/landing-page/left-banner.tsx new file mode 100644 index 00000000..61b468e4 --- /dev/null +++ b/components/landing-page/left-banner.tsx @@ -0,0 +1,83 @@ +import { listDataAdvertisements } from "@/service/broadcast/broadcast"; +import { useEffect, useState } from "react"; +import * as React from "react"; + +interface Advertisement { + id: string; + imageUrl: string; + [key: string]: any; // Tambahan kalau ada properti lain +} + +// // Simulasi fungsi API (replace dengan yang asli) +// async function listDataAdvertisements( +// page: number, +// size: number, +// search: string, +// category: string, +// status: string +// ) { +// // contoh struktur response dummy +// return { +// data: { +// data: { +// content: [ +// { id: "1", imageUrl: "/images/all-img/kiri1.png" }, +// { id: "2", imageUrl: "/images/all-img/kiri2.png" }, +// ], +// totalElements: 2, +// totalPages: 1, +// }, +// }, +// }; +// } + +const LeftBanner = () => { + const [ads, setAds] = useState([]); + const [loading, setLoading] = useState(false); + const [showData, setShowData] = React.useState("10"); + const [categories, setCategories] = React.useState(); + const [dataTable, setDataTable] = React.useState([]); + const [totalData, setTotalData] = React.useState(1); + const [categoryFilter, setCategoryFilter] = React.useState([]); + const [statusFilter, setStatusFilter] = React.useState([]); + const [page, setPage] = React.useState(1); + + + const fetchData = async () => { + try { + setLoading(true); + const res = await listDataAdvertisements( page - 1, + showData, + "", + categoryFilter?.sort().join(","), + statusFilter?.sort().join(",")); + const data = res?.data?.data; + const contentData = data?.content; + + contentData.forEach((item: Advertisement, index: number) => { + item.no = index + 1; + }); + + setAds(contentData); + } catch (error) { + console.error("Error fetching advertisements:", error); + } finally { + setLoading(false); + } + }; + + useEffect(() => { + fetchData(); + }, []); + + return ( +
+ {loading &&

Loading...

} + {ads.map((ad) => ( + {`Banner + ))} +
+ ); +}; + +export default LeftBanner; diff --git a/components/landing-page/navbar.tsx b/components/landing-page/navbar.tsx index d22b2cd4..9c5e335b 100644 --- a/components/landing-page/navbar.tsx +++ b/components/landing-page/navbar.tsx @@ -23,6 +23,7 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; 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"; type Detail = { id: number; @@ -162,7 +163,7 @@ const Navbar = () => { Media Hub Logo - + {/* Nav Menu */}
diff --git a/components/landing-page/search-section-new.tsx b/components/landing-page/search-section-new.tsx index 0287f64e..4e5d12d0 100644 --- a/components/landing-page/search-section-new.tsx +++ b/components/landing-page/search-section-new.tsx @@ -10,10 +10,13 @@ import { getHeroData } from "@/service/landing/landing"; import { title } from "process"; import { htmlToString } from "@/utils/globals"; import { Link } from "@/i18n/routing"; +import { Button } from "../ui/button"; const ScrollableContent = () => { const [contentType, setContentType] = useState("all"); const [search, setSearch] = useState(""); + const [seeAllValueSatker, setSeeAllValueSatker] = useState(false); + const [seeAllValuePolda, setSeeAllValuePolda] = useState(false); const router = useRouter(); const params = useParams(); const locale = params?.locale; @@ -112,7 +115,7 @@ const ScrollableContent = () => {
- {content?.slice(0, 4).map((item: any, index: number) => ( + {(seeAllValuePolda ? content : content?.slice(0, 3))?.map((item: any, index: number) => (
{ : `${locale}/audio/detail/${item?.slug}` } > - {item.title} + {item?.title}
@@ -158,14 +161,26 @@ const ScrollableContent = () => {
))} - {" "} + {" "} */} + {/* Tombol See More / See Less */} + {content?.length > 3 && ( +
+ +
+ )}
@@ -175,9 +190,9 @@ const ScrollableContent = () => {
- {content + {/* {seeAllValue ? content : content ?.filter((item: any) => item.isPublishOnPolda === true) - .slice(0, 4) + .slice(0, 3) .map((item: any, index: number) => (
@@ -212,15 +227,75 @@ const ScrollableContent = () => {

{htmlToString(item.description)}

- ))} - + */} + {(seeAllValueSatker ? content : content?.slice(0, 3))?.map((item: any, index: number) => ( +
+
+ + {item?.title} +
+ + + + + + +
+ +
+ {/* */} +
+

{item.categoryName}

+

{item.title}

+

{htmlToString(item.description)}

+
+
+ ))} + {/* Tombol See More / See Less */} + {content?.length > 3 && ( +
+ +
+ )}
diff --git a/components/landing-page/search-section.tsx b/components/landing-page/search-section.tsx index 42af184e..5307d836 100644 --- a/components/landing-page/search-section.tsx +++ b/components/landing-page/search-section.tsx @@ -18,7 +18,6 @@ import ContentCategory from "./content-category"; import AreaCoverageWorkUnits from "./area-coverage-and-work-units"; import EventCalender from "./event-calender"; import UserSurveyBox from "./survey-box"; -import ScrollableContentPolda from "./scrollable-content-polda"; const LeftBanner = () => (
diff --git a/components/landing-page/welcome-polda.tsx b/components/landing-page/welcome-polda.tsx index cc477989..9feab181 100644 --- a/components/landing-page/welcome-polda.tsx +++ b/components/landing-page/welcome-polda.tsx @@ -25,7 +25,7 @@ const WelcomePolda = () => { }, [categorySelect]); return ( -
+
{/* Heading */}

diff --git a/components/main/image-detail.tsx b/components/main/image-detail.tsx index d9ae7532..e0690fcd 100644 --- a/components/main/image-detail.tsx +++ b/components/main/image-detail.tsx @@ -513,29 +513,29 @@ const DetailImage = (data: any) => { return ( <> -
-
+
+
{/* Bagian Kiri */} -
+
{/* Gambar Besar */} {isLoading ? (
) : ( -
- Main -
-
+
+ Main + +
+
+ )} {/* Gambar bawah Kecil */} @@ -616,7 +616,7 @@ const DetailImage = (data: any) => {
{/* Bagian Kanan */} -
+ {/* Konten Serupa */} -
+
diff --git a/package-lock.json b/package-lock.json index ae5f763c..227a30e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21565,6 +21565,7 @@ } }, "vendor/ckeditor5": { + "name": "ckeditor5-custom-build", "version": "0.0.1", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { diff --git a/public/assets/satker/rumkit.png b/public/assets/satker/RUMKIT-BHAYANGKARA.png similarity index 100% rename from public/assets/satker/rumkit.png rename to public/assets/satker/RUMKIT-BHAYANGKARA.png diff --git a/public/assets/satker/sebasa.png b/public/assets/satker/SEBASA-POLRI.png similarity index 100% rename from public/assets/satker/sebasa.png rename to public/assets/satker/SEBASA-POLRI.png diff --git a/public/assets/satker/sepolwan.png b/public/assets/satker/SEPOLWAN-POLRI.png similarity index 100% rename from public/assets/satker/sepolwan.png rename to public/assets/satker/SEPOLWAN-POLRI.png diff --git a/public/logo/polda/polda-bangkabelitung.png b/public/logo/polda/polda-bangka-belitung.png similarity index 100% rename from public/logo/polda/polda-bangkabelitung.png rename to public/logo/polda/polda-bangka-belitung.png diff --git a/public/logo/polda/polda-jawabarat.png b/public/logo/polda/polda-jawa-barat.png similarity index 100% rename from public/logo/polda/polda-jawabarat.png rename to public/logo/polda/polda-jawa-barat.png diff --git a/public/logo/polda/polda-jawatengah.png b/public/logo/polda/polda-jawa-tengah.png similarity index 100% rename from public/logo/polda/polda-jawatengah.png rename to public/logo/polda/polda-jawa-tengah.png diff --git a/public/logo/polda/polda-jawatimur.png b/public/logo/polda/polda-jawa-timur.png similarity index 100% rename from public/logo/polda/polda-jawatimur.png rename to public/logo/polda/polda-jawa-timur.png diff --git a/public/logo/polda/polda-kalbar.png b/public/logo/polda/polda-kalimantan-barat.png similarity index 100% rename from public/logo/polda/polda-kalbar.png rename to public/logo/polda/polda-kalimantan-barat.png diff --git a/public/logo/polda/polda-kalsel.png b/public/logo/polda/polda-kalimantan-selatan.png similarity index 100% rename from public/logo/polda/polda-kalsel.png rename to public/logo/polda/polda-kalimantan-selatan.png diff --git a/public/logo/polda/polda-kalteng.png b/public/logo/polda/polda-kalimantan-tengah.png similarity index 100% rename from public/logo/polda/polda-kalteng.png rename to public/logo/polda/polda-kalimantan-tengah.png diff --git a/public/logo/polda/polda-kaltim.png b/public/logo/polda/polda-kalimantan-timur.png similarity index 100% rename from public/logo/polda/polda-kaltim.png rename to public/logo/polda/polda-kalimantan-timur.png diff --git a/public/logo/polda/polda-kepri.png b/public/logo/polda/polda-kepulauan-riau.png similarity index 100% rename from public/logo/polda/polda-kepri.png rename to public/logo/polda/polda-kepulauan-riau.png diff --git a/public/logo/polda/polda-metro.png b/public/logo/polda/polda-metro-jaya.png similarity index 100% rename from public/logo/polda/polda-metro.png rename to public/logo/polda/polda-metro-jaya.png diff --git a/public/logo/polda/polda-sulbar.png b/public/logo/polda/polda-sulawesi-barat.png similarity index 100% rename from public/logo/polda/polda-sulbar.png rename to public/logo/polda/polda-sulawesi-barat.png diff --git a/public/logo/polda/polda-sulsel.png b/public/logo/polda/polda-sulawesi-selatan.png similarity index 100% rename from public/logo/polda/polda-sulsel.png rename to public/logo/polda/polda-sulawesi-selatan.png diff --git a/public/logo/polda/polda-sumsel.png b/public/logo/polda/polda-sumatera-selatan.png similarity index 100% rename from public/logo/polda/polda-sumsel.png rename to public/logo/polda/polda-sumatera-selatan.png diff --git a/public/logo/polda/polda-sumut.png b/public/logo/polda/polda-sumatera-utara.png similarity index 100% rename from public/logo/polda/polda-sumut.png rename to public/logo/polda/polda-sumatera-utara.png diff --git a/public/logo/satker/DENSUS88.png b/public/logo/satker/DENSUS-88.png similarity index 100% rename from public/logo/satker/DENSUS88.png rename to public/logo/satker/DENSUS-88.png diff --git a/public/logo/satker/RUMKIT-BHAYANGKARA.png b/public/logo/satker/RUMKIT-BHAYANGKARA.png new file mode 100644 index 00000000..7e8867d7 Binary files /dev/null and b/public/logo/satker/RUMKIT-BHAYANGKARA.png differ diff --git a/public/logo/satker/SEBASA-POLRI.png b/public/logo/satker/SEBASA-POLRI.png new file mode 100644 index 00000000..7245536b Binary files /dev/null and b/public/logo/satker/SEBASA-POLRI.png differ diff --git a/public/logo/satker/SEPOLWAN-POLRI.png b/public/logo/satker/SEPOLWAN-POLRI.png new file mode 100644 index 00000000..120c91d4 Binary files /dev/null and b/public/logo/satker/SEPOLWAN-POLRI.png differ diff --git a/public/logo/satker/SETUPA-POLRI.png b/public/logo/satker/SETUPA-POLRI.png new file mode 100644 index 00000000..09c07531 Binary files /dev/null and b/public/logo/satker/SETUPA-POLRI.png differ diff --git a/vendor/ckeditor5/node_modules/.bin/tsc b/vendor/ckeditor5/node_modules/.bin/tsc index 0863208a..c4864b9a 120000 --- a/vendor/ckeditor5/node_modules/.bin/tsc +++ b/vendor/ckeditor5/node_modules/.bin/tsc @@ -1 +1,16 @@ -../typescript/bin/tsc \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@" +else + exec node "$basedir/../typescript/bin/tsc" "$@" +fi diff --git a/vendor/ckeditor5/node_modules/.bin/tsc.cmd b/vendor/ckeditor5/node_modules/.bin/tsc.cmd new file mode 100644 index 00000000..40bf1284 --- /dev/null +++ b/vendor/ckeditor5/node_modules/.bin/tsc.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\typescript\bin\tsc" %* diff --git a/vendor/ckeditor5/node_modules/.bin/tsc.ps1 b/vendor/ckeditor5/node_modules/.bin/tsc.ps1 new file mode 100644 index 00000000..112413b5 --- /dev/null +++ b/vendor/ckeditor5/node_modules/.bin/tsc.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args + } else { + & "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../typescript/bin/tsc" $args + } else { + & "node$exe" "$basedir/../typescript/bin/tsc" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/vendor/ckeditor5/node_modules/.bin/tsserver b/vendor/ckeditor5/node_modules/.bin/tsserver index f8f8f1a0..6c19ce3d 120000 --- a/vendor/ckeditor5/node_modules/.bin/tsserver +++ b/vendor/ckeditor5/node_modules/.bin/tsserver @@ -1 +1,16 @@ -../typescript/bin/tsserver \ No newline at end of file +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@" +else + exec node "$basedir/../typescript/bin/tsserver" "$@" +fi diff --git a/vendor/ckeditor5/node_modules/.bin/tsserver.cmd b/vendor/ckeditor5/node_modules/.bin/tsserver.cmd new file mode 100644 index 00000000..57f851fd --- /dev/null +++ b/vendor/ckeditor5/node_modules/.bin/tsserver.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\typescript\bin\tsserver" %* diff --git a/vendor/ckeditor5/node_modules/.bin/tsserver.ps1 b/vendor/ckeditor5/node_modules/.bin/tsserver.ps1 new file mode 100644 index 00000000..249f417d --- /dev/null +++ b/vendor/ckeditor5/node_modules/.bin/tsserver.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args + } else { + & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../typescript/bin/tsserver" $args + } else { + & "node$exe" "$basedir/../typescript/bin/tsserver" $args + } + $ret=$LASTEXITCODE +} +exit $ret