From 8e049a1ac974e219edb54f6465767da012613bd7 Mon Sep 17 00:00:00 2001 From: sabdayagra Date: Thu, 12 Dec 2024 22:27:00 +0700 Subject: [PATCH 1/7] connect api to indeks and Konten --- app/[locale]/(public)/audio/filter/page.tsx | 33 ++-- app/[locale]/(public)/audio/layout.tsx | 2 +- app/[locale]/(public)/contact/layout.tsx | 2 +- .../(public)/document/filter/page.tsx | 22 ++- app/[locale]/(public)/document/layout.tsx | 2 +- app/[locale]/(public)/faqs/layout.tsx | 2 +- app/[locale]/(public)/feedback/layout.tsx | 2 +- app/[locale]/(public)/image/filter/page.tsx | 98 +++++++--- app/[locale]/(public)/image/layout.tsx | 2 +- app/[locale]/(public)/indeks/layout.tsx | 2 +- app/[locale]/(public)/indeks/page.tsx | 169 ++++++++---------- app/[locale]/(public)/schedule/layout.tsx | 2 +- app/[locale]/(public)/video/filter/page.tsx | 33 ++-- app/[locale]/(public)/video/layout.tsx | 2 +- app/[locale]/page.tsx | 2 +- components/landing-page/Hero.tsx | 3 - components/landing-page/new-content.tsx | 2 +- service/landing/landing.ts | 10 +- 18 files changed, 225 insertions(+), 165 deletions(-) diff --git a/app/[locale]/(public)/audio/filter/page.tsx b/app/[locale]/(public)/audio/filter/page.tsx index 7031681b..29121fb7 100644 --- a/app/[locale]/(public)/audio/filter/page.tsx +++ b/app/[locale]/(public)/audio/filter/page.tsx @@ -1,17 +1,10 @@ "use client"; -import React, { useState } from "react"; +import React, { useEffect, useState } from "react"; import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "@/components/ui/pagination"; import { Checkbox } from "@/components/ui/checkbox"; import { Icon } from "@iconify/react/dist/iconify.js"; - -const dummyDescription = [ - { id: 1, title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", date: "28 November 2024", time: "11.15 WIB", duration: "00:24:55" }, - { id: 2, title: "Kapolres Lahat Himbau Cipta Kondisi Cooling System Pasca Pemungutan Suara Pilkada 2024", date: "28 November 2024", time: "11.15 WIB", duration: "00:24:55" }, - { id: 3, title: "17 Ton Pupuk Bersubsidi yang Akan Diselewengkan ke Banyuasin Berhasil Digagalkan", date: "28 November 2024", time: "11.15 WIB", duration: "00:24:55" }, - { id: 4, title: "Kapolda Sumsel Apelkan 1471 Personel Persiapan Pengamanan Pengawalan Tahan Pungut dan Hitung Suara", date: "28 November 2024", time: "11.15 WIB", duration: "00:24:55" }, - { id: 5, title: "Polrestabes Palembang Berhasil Mengungkap Kasus Penganiayaan Berat di Ilir Barat II", date: "28 November 2024", time: "11.15 WIB", duration: "00:24:55" }, - { id: 6, title: "Tahapan Pilkada di Sumsel Berlangsung Kondusif", date: "28 November 2024", time: "11.15 WIB", duration: "00:24:55" }, -]; +import { getListContent } from "@/service/landing/landing"; +import { formatDateToIndonesian } from "@/utils/globals"; const categories = [ { id: 1, title: "HUT HUMAS KE - 73" }, @@ -33,6 +26,16 @@ const formatAudio = [ ]; const FilterPage = () => { + const [audioData, setAudioData] = useState(); + const [page, setPage] = useState(1); + useEffect(() => { + initFetch(); + }, []); + const initFetch = async () => { + const response = await getListContent({ page: page - 1, size: 12, sortBy: "createdAt", contentTypeId: "4" }); + console.log(response); + setAudioData(response?.data?.data?.content); + }; return (
{/* Header */} @@ -118,8 +121,8 @@ const FilterPage = () => {
{/* Card */}
- {dummyDescription.map((description) => ( - + {audioData?.map((audio: any) => ( +
{
- {description.date} | 518 + {formatDateToIndonesian(new Date(audio?.createdAt))} {audio?.timezone ? audio?.timezone : "WIB"} | 518
-
{description.title}
+
{audio?.title}
@@ -141,7 +144,7 @@ const FilterPage = () => {
# -
{description.duration}
+
{audio?.duration}
diff --git a/app/[locale]/(public)/audio/layout.tsx b/app/[locale]/(public)/audio/layout.tsx index 2cb8c934..b9f5668d 100644 --- a/app/[locale]/(public)/audio/layout.tsx +++ b/app/[locale]/(public)/audio/layout.tsx @@ -7,7 +7,7 @@ import DashCodeHeader from "@/components/partials/header"; import { auth } from "@/lib/auth"; import { redirect } from "@/components/navigation"; import Footer from "@/components/landing-page/footer"; -import Navbar from "@/components/landing-page/navbar"; +import Navbar from "@/components/landing-page/Navbar"; const layout = async ({ children }: { children: React.ReactNode }) => { return ( diff --git a/app/[locale]/(public)/contact/layout.tsx b/app/[locale]/(public)/contact/layout.tsx index 5eca8060..8dd8e8f6 100644 --- a/app/[locale]/(public)/contact/layout.tsx +++ b/app/[locale]/(public)/contact/layout.tsx @@ -6,7 +6,7 @@ import ThemeCustomize from "@/components/partials/customizer"; import DashCodeHeader from "@/components/partials/header"; import { auth } from "@/lib/auth"; import { redirect } from "@/components/navigation"; -import Navbar from "@/components/landing-page/navbar"; +import Navbar from "@/components/landing-page/Navbar"; import Footer from "@/components/landing-page/footer"; const layout = async ({ children }: { children: React.ReactNode }) => { diff --git a/app/[locale]/(public)/document/filter/page.tsx b/app/[locale]/(public)/document/filter/page.tsx index 8af5ce0b..e7277763 100644 --- a/app/[locale]/(public)/document/filter/page.tsx +++ b/app/[locale]/(public)/document/filter/page.tsx @@ -1,8 +1,10 @@ "use client"; -import React, { useState } from "react"; +import React, { useEffect, useState } from "react"; import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "@/components/ui/pagination"; import { Checkbox } from "@/components/ui/checkbox"; import { Icon } from "@iconify/react/dist/iconify.js"; +import { getListContent } from "@/service/landing/landing"; +import { formatDateToIndonesian } from "@/utils/globals"; const dummyDescription = [ { id: 1, title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", date: "28 November 2024", time: "11.15 WIB", duration: "00:24:55" }, @@ -44,6 +46,16 @@ const formatAudio = [ ]; const DocumentPage = () => { + const [documentData, setDocumentData] = useState(); + const [page, setPage] = useState(1); + useEffect(() => { + initFetch(); + }, []); + const initFetch = async () => { + const response = await getListContent({ page: page - 1, size: 12, sortBy: "createdAt", contentTypeId: "3" }); + console.log(response); + setDocumentData(response?.data?.data?.content); + }; return (
{/* Header */} @@ -130,8 +142,8 @@ const DocumentPage = () => { {/* Card */}
- {dummyDescription.map((description) => ( - + {documentData?.map((document: any) => ( +
{
- {description.date} | 518 + {formatDateToIndonesian(new Date(document?.createdAt))} {document?.timezone ? document?.timezone : "WIB"} | 518
-
{description.title}
+
{document?.title}
diff --git a/app/[locale]/(public)/document/layout.tsx b/app/[locale]/(public)/document/layout.tsx index 2cb8c934..b9f5668d 100644 --- a/app/[locale]/(public)/document/layout.tsx +++ b/app/[locale]/(public)/document/layout.tsx @@ -7,7 +7,7 @@ import DashCodeHeader from "@/components/partials/header"; import { auth } from "@/lib/auth"; import { redirect } from "@/components/navigation"; import Footer from "@/components/landing-page/footer"; -import Navbar from "@/components/landing-page/navbar"; +import Navbar from "@/components/landing-page/Navbar"; const layout = async ({ children }: { children: React.ReactNode }) => { return ( diff --git a/app/[locale]/(public)/faqs/layout.tsx b/app/[locale]/(public)/faqs/layout.tsx index 5eca8060..8dd8e8f6 100644 --- a/app/[locale]/(public)/faqs/layout.tsx +++ b/app/[locale]/(public)/faqs/layout.tsx @@ -6,7 +6,7 @@ import ThemeCustomize from "@/components/partials/customizer"; import DashCodeHeader from "@/components/partials/header"; import { auth } from "@/lib/auth"; import { redirect } from "@/components/navigation"; -import Navbar from "@/components/landing-page/navbar"; +import Navbar from "@/components/landing-page/Navbar"; import Footer from "@/components/landing-page/footer"; const layout = async ({ children }: { children: React.ReactNode }) => { diff --git a/app/[locale]/(public)/feedback/layout.tsx b/app/[locale]/(public)/feedback/layout.tsx index 5eca8060..8dd8e8f6 100644 --- a/app/[locale]/(public)/feedback/layout.tsx +++ b/app/[locale]/(public)/feedback/layout.tsx @@ -6,7 +6,7 @@ import ThemeCustomize from "@/components/partials/customizer"; import DashCodeHeader from "@/components/partials/header"; import { auth } from "@/lib/auth"; import { redirect } from "@/components/navigation"; -import Navbar from "@/components/landing-page/navbar"; +import Navbar from "@/components/landing-page/Navbar"; import Footer from "@/components/landing-page/footer"; const layout = async ({ children }: { children: React.ReactNode }) => { diff --git a/app/[locale]/(public)/image/filter/page.tsx b/app/[locale]/(public)/image/filter/page.tsx index 535ab989..4a5f7774 100644 --- a/app/[locale]/(public)/image/filter/page.tsx +++ b/app/[locale]/(public)/image/filter/page.tsx @@ -1,22 +1,22 @@ "use client"; -import React, { useState } from "react"; +import React, { useEffect, useState } from "react"; import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "@/components/ui/pagination"; import { Card, CardContent } from "@/components/ui/card"; import { Checkbox } from "@/components/ui/checkbox"; import { Icon } from "@iconify/react/dist/iconify.js"; -import { generateLocalizedPath } from "@/utils/globals"; +import { formatDateToIndonesian, generateLocalizedPath } from "@/utils/globals"; import { useParams, usePathname, useRouter } from "next/navigation"; +import { getListContent } from "@/service/landing/landing"; +import { ColumnDef, ColumnFiltersState, PaginationState, SortingState, VisibilityState, flexRender, getCoreRowModel, getFilteredRowModel, getPaginationRowModel, getSortedRowModel, useReactTable } from "@tanstack/react-table"; +import TablePagination from "@/components/table/table-pagination"; +import { Response } from "@dnd-kit/core/dist/sensors/types"; -const dummyImage = [ - { id: 1, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, - { id: 2, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, - { id: 3, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, - { id: 4, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, - { id: 5, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, - { id: 6, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, - { id: 7, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, - { id: 8, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, - { id: 9, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, +const columns: ColumnDef[] = [ + { + accessorKey: "no", + header: "No", + cell: ({ row }) => {row.getValue("no")}, + }, ]; const categories = [ @@ -43,6 +43,54 @@ const FilterPage = () => { const pathname = usePathname(); const params = useParams(); const locale = params?.locale; + const [totalData, setTotalData] = React.useState(1); + const [totalPage, setTotalPage] = useState(1); + const [dataTable, setDataTable] = React.useState([]); + const [sorting, setSorting] = React.useState([]); + const [columnFilters, setColumnFilters] = React.useState([]); + const [columnVisibility, setColumnVisibility] = React.useState({}); + const [rowSelection, setRowSelection] = React.useState({}); + const [pagination, setPagination] = React.useState({ + pageIndex: 0, + pageSize: 10, + }); + const [imageData, setImageData] = useState(); + const [page, setPage] = useState(1); + useEffect(() => { + initFetch(); + }, []); + const initFetch = async () => { + const response = await getListContent({ page: page - 1, size: 6, sortBy: "createdAt", contentTypeId: "1" }); + console.log(response); + + const data = response.data?.data; + const contentData = data?.content; + contentData.forEach((item: any, index: number) => { + item.no = (page - 1) * 6 + index + 1; + }); + setImageData(contentData); + }; + const table = useReactTable({ + data: imageData, + columns: columns, + onSortingChange: setSorting, + onColumnFiltersChange: setColumnFilters, + getCoreRowModel: getCoreRowModel(), + getPaginationRowModel: getPaginationRowModel(), + getSortedRowModel: getSortedRowModel(), + getFilteredRowModel: getFilteredRowModel(), + onColumnVisibilityChange: setColumnVisibility, + onRowSelectionChange: setRowSelection, + onPaginationChange: setPagination, + state: { + sorting, + columnFilters, + columnVisibility, + rowSelection, + pagination, + }, + }); + console.log("table", table); return (
@@ -50,18 +98,16 @@ const FilterPage = () => {

{" "} - Foto {">"} Semua Foto + Audio Visual {">"} Semua Audio Visual

|

-

Terdapat 32499 artikel berisi Foto yang dapat diunduh

+

Terdapat 324911 artikel berisi Audio Visual yang dapat diunduh

{/* Left */}
- {/* Sidebar Kiri */}

Filter

- {/* Pencarian */}
- {/* Tahun & Bulan */}
- {/* Tanggal */}
- {/* Kategori */}

Kategori

    @@ -124,22 +167,23 @@ const FilterPage = () => {

    Urutkan berdasarkan

- {dummyImage.map((image) => ( - - router.push(generateLocalizedPath(`/image/detail/${image.id}`, String(locale)))} className="flex flex-col text-xs lg:text-sm p-0"> - -
- {image.date} {image.time} | 518{" "} + {imageData?.map((image: any) => ( + + + +
+ {formatDateToIndonesian(new Date(image?.createdAt))} {image?.timezone ? image?.timezone : "WIB"}| + {image?.clickCount}{" "} {" "}
-
{image.title}
+
{image?.title}
))} diff --git a/app/[locale]/(public)/image/layout.tsx b/app/[locale]/(public)/image/layout.tsx index 2cb8c934..b9f5668d 100644 --- a/app/[locale]/(public)/image/layout.tsx +++ b/app/[locale]/(public)/image/layout.tsx @@ -7,7 +7,7 @@ import DashCodeHeader from "@/components/partials/header"; import { auth } from "@/lib/auth"; import { redirect } from "@/components/navigation"; import Footer from "@/components/landing-page/footer"; -import Navbar from "@/components/landing-page/navbar"; +import Navbar from "@/components/landing-page/Navbar"; const layout = async ({ children }: { children: React.ReactNode }) => { return ( diff --git a/app/[locale]/(public)/indeks/layout.tsx b/app/[locale]/(public)/indeks/layout.tsx index 2cb8c934..b9f5668d 100644 --- a/app/[locale]/(public)/indeks/layout.tsx +++ b/app/[locale]/(public)/indeks/layout.tsx @@ -7,7 +7,7 @@ import DashCodeHeader from "@/components/partials/header"; import { auth } from "@/lib/auth"; import { redirect } from "@/components/navigation"; import Footer from "@/components/landing-page/footer"; -import Navbar from "@/components/landing-page/navbar"; +import Navbar from "@/components/landing-page/Navbar"; const layout = async ({ children }: { children: React.ReactNode }) => { return ( diff --git a/app/[locale]/(public)/indeks/page.tsx b/app/[locale]/(public)/indeks/page.tsx index 8543e2a3..f1f2854f 100644 --- a/app/[locale]/(public)/indeks/page.tsx +++ b/app/[locale]/(public)/indeks/page.tsx @@ -1,107 +1,96 @@ "use client"; +import { getIndeksData } from "@/service/landing/landing"; +import { formatDateToIndonesian } from "@/utils/globals"; import Link from "next/link"; import { usePathname } from "next/navigation"; -import React from "react"; +import React, { useEffect, useState } from "react"; -interface ImageCardProps { - imageUrl: string; - label: string; - title: string; - date: string; -} - -const ImageCard: React.FC = ({ imageUrl, label, title, date }) => { - return ( -
- {title} -
- {label} -

{title}

- {date} -
-
- ); -}; - -const ImageGallery: React.FC = () => { +const Indeks: React.FC = () => { const pathname = usePathname(); - - const images = [ - { - imageUrl: "/assets/banner-sample.png", - label: "Giat Pimpinan", - title: "Foto Kapolri Dorong Transformasi Polri Presisi", - date: "2024-11-12 10:09:20 WIB", - }, - { - imageUrl: "/assets/hot-topik-1.jpg", - label: "Giat Polri", - title: "Foto Kapolri Tinjau Pengungsi Gunung", - date: "2024-11-19 09:35:27 WIB", - }, - { - imageUrl: "/assets/hot-topik-2.jpg", - label: "Giat Polri", - title: "Foto Kapolri dalam Acara Bersama TNI", - date: "2024-11-20 15:45:00 WIB", - }, - ]; - - const imageBottom = [ - { - id: 1, - imageUrl: "/assets/hot-topik-1.jpg", - title: "Foto Kakorlantas Polri Tekankan Intervensi", - description: - "Kepala Korps Lalu Lintas (Kakorlantas) Polri Irjen. Pol. Dr. Drs. Aan Suhanan, M.Si. memimpin apel pagi di NTMC pada Senin (2/12/2024) dan menekankan pentingnya pengelolaan ekstra dalam pengamanan Natal dan Tahun Baru 2024.", - }, - { - id: 2, - imageUrl: "/assets/hot-topik-1.jpg", - title: "Foto Kakorlantas Tinjau Jalur Tol, Jalur Wisata", - description: "Kakorlantas Polri Irjen.Pol. Dr. Drs. Aan Suhanan, M.Si. memimpin survei jalur tol dari Cikopo, Purwakarta hingga Kalikangkung, Jawa Tengah, untuk persiapan Operasi Lilin 2024.", - }, - { - id: 3, - imageUrl: "/assets/hot-topik-2.jpg", - title: "Foto Kapolri Pastikan Kesiapan Polri Kawal Pilkada", - description: "Kapolri Jenderal Polisi Drs. Listyo Sigit Prabowo, M.Si menegaskan kesiapan Polri dalam mengawal Pilkada Serentak 2024 yang digelar Rabu, 27 November 2024.", - }, - ]; + const [indeksData, setIndeksData] = useState(); + useEffect(() => { + initFetch(); + }, []); + const initFetch = async () => { + const response = await getIndeksData(); + console.log(response); + setIndeksData(response?.data?.data?.content); + }; return ( - <> - {/* Hero */} -
-
- -
-
- - -
-
- {/* Bottom */} -
-
- {imageBottom.map((image) => ( -
-
- -
-
- - {image.title} +
+ {/* Hero Left */} +
+
+ {indeksData?.map((indeks: any) => ( +
+ image +
+ {indeks?.categoryName} + +

{indeks?.title}

-

{image.description}

+

+ {formatDateToIndonesian(new Date(indeks?.createdAt))} {indeks?.timezone ? indeks?.timezone : "WIB"}|{" "} + + + {" "} + {indeks?.clickCount} +

))}
+ + {/* Hero Right */} + {/*
+ {indeksData?.map((indeksRight: any) => ( +
+ image +
+ {indeksRight?.categoryName} + +

{indeksRight?.title}

+ +

+ {formatDateToIndonesian(new Date(indeksRight?.createdAt))} {indeksRight?.timezone ? indeksRight?.timezone : "WIB"}|{" "} + + + {" "} + {indeksRight?.clickCount} +

+
+
+ ))} +
*/}
- + + {/* Bottom */} + {/*
+
+ {indeksData?.map((indeksBottom: any) => ( +
+ +
+

{indeksBottom?.date}

+ + {indeksBottom?.title} + +

{indeksBottom?.description}

+
+
+ ))} +
+
*/} +
); }; -export default ImageGallery; +export default Indeks; diff --git a/app/[locale]/(public)/schedule/layout.tsx b/app/[locale]/(public)/schedule/layout.tsx index 2cb8c934..b9f5668d 100644 --- a/app/[locale]/(public)/schedule/layout.tsx +++ b/app/[locale]/(public)/schedule/layout.tsx @@ -7,7 +7,7 @@ import DashCodeHeader from "@/components/partials/header"; import { auth } from "@/lib/auth"; import { redirect } from "@/components/navigation"; import Footer from "@/components/landing-page/footer"; -import Navbar from "@/components/landing-page/navbar"; +import Navbar from "@/components/landing-page/Navbar"; const layout = async ({ children }: { children: React.ReactNode }) => { return ( diff --git a/app/[locale]/(public)/video/filter/page.tsx b/app/[locale]/(public)/video/filter/page.tsx index 2436984f..36f5b145 100644 --- a/app/[locale]/(public)/video/filter/page.tsx +++ b/app/[locale]/(public)/video/filter/page.tsx @@ -1,9 +1,11 @@ "use client"; -import React, { useState } from "react"; +import React, { useEffect, useState } from "react"; import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "@/components/ui/pagination"; import { Card, CardContent } from "@/components/ui/card"; import { Checkbox } from "@/components/ui/checkbox"; import { Icon } from "@iconify/react/dist/iconify.js"; +import { getListContent, getVideoData } from "@/service/landing/landing"; +import { formatDateToIndonesian } from "@/utils/globals"; const dummyImage = [ { id: 1, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, @@ -39,6 +41,17 @@ const formatPicture = [ ]; const FilterPage = () => { + const [videoData, setVideoData] = useState(); + const [page, setPage] = useState(1); + useEffect(() => { + initFetch(); + }, []); + const initFetch = async () => { + const response = await getListContent({page: page-1, size: 12, sortBy: "createdAt", contentTypeId: "2", }); + console.log(response); + setVideoData(response?.data?.data?.content); + }; + return (
{/* Header */} @@ -48,15 +61,13 @@ const FilterPage = () => { Audio Visual {">"} Semua Audio Visual

|

-

Terdapat 32499 artikel berisi Audio Visual yang dapat diunduh

+

Terdapat 324911 artikel berisi Audio Visual yang dapat diunduh

{/* Left */}
-

Filter

-
-
-
-

Kategori

    @@ -124,17 +132,18 @@ const FilterPage = () => {
- {dummyImage.map((image) => ( - + {videoData?.map((video: any) => ( + - +
- {image.date} {image.time} | 518{" "} + {formatDateToIndonesian(new Date(video?.createdAt))} {video?.timezone ? video?.timezone : "WIB"}| + {video?.clickCount}{" "} {" "}
-
{image.title}
+
{video?.title}
))} diff --git a/app/[locale]/(public)/video/layout.tsx b/app/[locale]/(public)/video/layout.tsx index 2cb8c934..b9f5668d 100644 --- a/app/[locale]/(public)/video/layout.tsx +++ b/app/[locale]/(public)/video/layout.tsx @@ -7,7 +7,7 @@ import DashCodeHeader from "@/components/partials/header"; import { auth } from "@/lib/auth"; import { redirect } from "@/components/navigation"; import Footer from "@/components/landing-page/footer"; -import Navbar from "@/components/landing-page/navbar"; +import Navbar from "@/components/landing-page/Navbar"; const layout = async ({ children }: { children: React.ReactNode }) => { return ( diff --git a/app/[locale]/page.tsx b/app/[locale]/page.tsx index 1e479373..4adf2105 100644 --- a/app/[locale]/page.tsx +++ b/app/[locale]/page.tsx @@ -8,7 +8,7 @@ import Coverage from "@/components/landing-page/coverage"; import Hero from "@/components/landing-page/hero"; import Footer from "@/components/landing-page/footer"; import Division from "@/components/landing-page/division"; -import Navbar from "@/components/landing-page/navbar"; +import Navbar from "@/components/landing-page/Navbar"; const Home = ({ params: { locale } }: { params: { locale: string } }) => { return ( diff --git a/components/landing-page/Hero.tsx b/components/landing-page/Hero.tsx index 5de0e3a4..67bef1eb 100644 --- a/components/landing-page/Hero.tsx +++ b/components/landing-page/Hero.tsx @@ -6,8 +6,6 @@ import "swiper/css/navigation"; import { getHeroData } from "@/service/landing/landing"; import Link from "next/link"; import { useParams, usePathname, useRouter } from "next/navigation"; -import { Navigation, Pagination } from "swiper/modules"; -import { Card, CardContent } from "@/components/ui/card"; import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "@/components/ui/carousel"; const Hero: React.FC = () => { @@ -28,7 +26,6 @@ const Hero: React.FC = () => { return (
{/* Section Gambar Utama */} - {heroData?.map((list: any) => ( diff --git a/components/landing-page/new-content.tsx b/components/landing-page/new-content.tsx index 299f955d..5bcfa6a6 100644 --- a/components/landing-page/new-content.tsx +++ b/components/landing-page/new-content.tsx @@ -20,7 +20,7 @@ const NewContent = (props: { type: string }) => { initFetch(); }, [selectedTab]); const initFetch = async () => { - const request = { sortBy: props.type == "popular" ? "clickCount" : "createdAt", contentTypeId: selectedTab == "image" ? "1" : selectedTab == "video" ? "2" : selectedTab == "text" ? "3" : selectedTab == "audio" ? "4" : "" }; + const request = {page: 0, size: 5, sortBy: props.type == "popular" ? "clickCount" : "createdAt", contentTypeId: selectedTab == "image" ? "1" : selectedTab == "video" ? "2" : selectedTab == "text" ? "3" : selectedTab == "audio" ? "4" : "" }; const response = await getListContent(request); console.log("category", response); setNewContent(response?.data?.data?.content); diff --git a/service/landing/landing.ts b/service/landing/landing.ts index 32437893..2456d914 100644 --- a/service/landing/landing.ts +++ b/service/landing/landing.ts @@ -8,10 +8,16 @@ export async function getCategoryData() { return await httpGetInterceptor(`media/categories/list/publish?enablePage=1&sort=desc&sortBy=updatedAt&size=12&type=`); } -export async function getListContent(data: { sortBy: string; contentTypeId: string }) { - return await httpGetInterceptor(`media/public/list?enablePage=1&sort=desc&sortBy=${data.sortBy}&size=5&page=0&typeId=${data.contentTypeId}&title=&categoryId=&fileFormats=&tags=&group=&startDate=&endDate=&month=&year=`); +export async function getListContent(data: { sortBy: string; contentTypeId: string; size: number; page: number }) { + return await httpGetInterceptor( + `media/public/list?enablePage=1&sort=desc&sortBy=${data.sortBy}&size=${data.size}&page=${data.page}&typeId=${data.contentTypeId}&title=&categoryId=&fileFormats=&tags=&group=&startDate=&endDate=&month=&year=` + ); } export async function getPrivacy() { return await httpGetInterceptor(`general/privacy-policy/1`); } + +export async function getIndeksData() { + return await httpGetInterceptor(`blog/public/pagination?enablePage=1&page=0&size=20`); +} From cec4259da89c68b731cff1d454f052f4ce25fe78 Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Fri, 13 Dec 2024 07:39:20 +0700 Subject: [PATCH 2/7] feat: restructure folder for contributor, supervisor, curator; update landing page pagination (image); etc --- .../agenda-setting/calender-view.tsx | 0 .../{ => contributor}/agenda-setting/data.ts | 0 .../agenda-setting/dragging-events.tsx | 0 .../agenda-setting/event-modal.tsx | 2 +- .../agenda-setting/layout.tsx | 0 .../{ => contributor}/agenda-setting/page.tsx | 0 .../{ => contributor}/agenda-setting/utils.ts | 0 .../blog/components/blog-table.tsx | 0 .../blog/components/columns.tsx | 0 .../{ => contributor}/blog/layout.tsx | 0 .../{ => contributor}/blog/page.tsx | 0 .../audio-visual/components/columns.tsx | 2 +- .../audio-visual/components/table-video.tsx | 0 .../content/audio-visual/create/page.tsx | 0 .../content/audio-visual/layout.tsx | 0 .../content/audio-visual/page.tsx | 2 +- .../content/audio}/components/columns.tsx | 2 +- .../content/audio/components/table-audio.tsx | 0 .../content/audio/layout.tsx | 0 .../{ => contributor}/content/audio/page.tsx | 0 .../content/image}/components/columns.tsx | 2 +- .../content/image/components/table-image.tsx | 0 .../content/image/create/page.tsx | 0 .../content/image/layout.tsx | 0 .../{ => contributor}/content/image/page.tsx | 3 +- .../content/nulis-ai/components/columns.tsx | 2 +- .../nulis-ai/components/table-nulis.tsx | 0 .../content/nulis-ai/layout.tsx | 0 .../content/nulis-ai/page.tsx | 0 .../{ => contributor}/content/spit/layout.tsx | 0 .../{ => contributor}/content/spit/page.tsx | 0 .../content/spit/table-spit/columns.tsx | 0 .../content/spit/table-spit/data.ts | 0 .../content/spit/table-spit/page.tsx | 2 +- .../spit/table-spit/table-pagination.tsx | 0 .../content/teks}/components/columns.tsx | 2 +- .../content/teks/components/table-teks.tsx | 0 .../{ => contributor}/content/teks/layout.tsx | 0 .../{ => contributor}/content/teks/page.tsx | 0 .../planning/mediahub/components/columns.tsx | 0 .../mediahub/components/mediahub-table.tsx | 0 .../planning/mediahub/layout.tsx | 0 .../planning/mediahub/page.tsx | 0 .../medsos-mediahub/components/columns.tsx | 0 .../components/medsos-table.tsx | 0 .../planning/medsos-mediahub/layout.tsx | 0 .../planning/medsos-mediahub/page.tsx | 0 .../schedule/event/components/columns.tsx | 0 .../schedule/event/components/event-table.tsx | 0 .../schedule/event/create/page.tsx | 0 .../schedule/event/layout.tsx | 0 .../{ => contributor}/schedule/event/page.tsx | 3 +- .../press-conference/components/columns.tsx | 2 +- .../components/presscon-table.tsx | 0 .../schedule/press-conference/create/page.tsx | 0 .../press-conference/detail/[id]/page.tsx | 0 .../schedule/press-conference/layout.tsx | 0 .../schedule/press-conference/page.tsx | 3 +- .../press-release/components/columns.tsx | 0 .../components/pressrilis-table.tsx | 0 .../schedule/press-release/create/page.tsx | 0 .../schedule/press-release/layout.tsx | 0 .../schedule/press-release/page.tsx | 3 +- .../task/components/columns.tsx | 0 .../task/components/task-table.tsx | 47 +++++--- .../{ => contributor}/task/create/page.tsx | 0 .../task/detail/[id]/page.tsx | 0 .../{ => contributor}/task/layout.tsx | 0 .../{ => contributor}/task/page.tsx | 3 +- app/[locale]/(protected)/dashboard/page.tsx | 6 +- .../components/collabroation-table.tsx | 0 .../collaboration/components/columns.tsx | 0 .../collaboration/create/page.tsx | 0 .../escalation/table-escalation/columns.tsx | 0 .../table-escalation/escalation-table.tsx | 0 .../internal/components/columns.tsx | 0 .../internal/components/internal-table.tsx | 0 .../communication/internal/create/page.tsx | 0 .../{ => shared}/communication/layout.tsx | 0 .../{ => shared}/communication/page.tsx | 0 .../contest/components/columns.tsx | 0 .../contest/components/contest-table.tsx | 0 .../{ => shared}/contest/layout.tsx | 0 .../(protected)/{ => shared}/contest/page.tsx | 2 +- .../giat-penugasan/audio-visual.tsx | 0 .../curated-content/giat-penugasan/audio.tsx | 0 .../curated-content/giat-penugasan/image.tsx | 0 .../curated-content/giat-penugasan/teks.tsx | 0 .../giat-routine/audio-visual.tsx | 0 .../curated-content/giat-routine/audio.tsx | 0 .../curated-content/giat-routine/image.tsx | 0 .../curated-content/giat-routine/teks.tsx | 0 .../{ => shared}/curated-content/layout.tsx | 0 .../{ => shared}/curated-content/page.tsx | 0 .../account-report/components/column.tsx | 0 .../account-report/components/table.tsx | 0 .../communications/account-report/layout.tsx | 0 .../communications/account-report/page.tsx | 0 .../collaboration/components/column.tsx | 0 .../collaboration/components/table.tsx | 0 .../communications/collaboration/layout.tsx | 0 .../communications/collaboration/page.tsx | 0 .../forward/components/column.tsx | 0 .../forward/components/table.tsx | 0 .../communications/forward/layout.tsx | 0 .../communications/forward/page.tsx | 0 .../internal/components/column.tsx | 0 .../internal/components/table.tsx | 0 .../communications/internal/layout.tsx | 0 .../communications/internal/page.tsx | 0 .../questions/components/column.tsx | 0 .../questions/components/table.tsx | 0 .../communications/questions/layout.tsx | 0 .../communications/questions/page.tsx | 0 .../components/column.tsx | 0 .../components/table.tsx | 0 .../frequently-asked-question/layout.tsx | 0 .../frequently-asked-question/page.tsx | 0 .../knowledge-base/layout.tsx | 0 .../{ => supervisor}/knowledge-base/page.tsx | 0 .../ticketing/components/columns.tsx | 0 .../ticketing/components/table.tsx | 0 .../{ => supervisor}/ticketing/layout.tsx | 0 .../{ => supervisor}/ticketing/page.tsx | 0 app/[locale]/(public)/audio/layout.tsx | 2 +- app/[locale]/(public)/contact/layout.tsx | 2 +- app/[locale]/(public)/document/layout.tsx | 2 +- app/[locale]/(public)/faqs/layout.tsx | 2 +- app/[locale]/(public)/feedback/layout.tsx | 2 +- app/[locale]/(public)/image/filter/page.tsx | 57 ++++----- app/[locale]/(public)/image/layout.tsx | 2 +- app/[locale]/(public)/indeks/layout.tsx | 2 +- app/[locale]/(public)/schedule/layout.tsx | 2 +- app/[locale]/(public)/video/layout.tsx | 2 +- app/[locale]/page.tsx | 2 +- .../form/communication/collaboration-form.tsx | 2 +- .../form/communication/internal-form.tsx | 2 +- components/form/content/image-form.tsx | 2 +- components/form/content/video-form.tsx | 2 +- components/form/schedule/event-form.tsx | 2 +- .../form/schedule/pers-release-form.tsx | 2 +- .../form/schedule/press-conference-form.tsx | 2 +- components/form/task/task-form.tsx | 2 +- components/landing-page/Navbar.tsx | 2 +- components/landing-page/pagination.tsx | 112 ++++++++++++++++++ lib/menus.ts | 106 ++++++++--------- 146 files changed, 252 insertions(+), 149 deletions(-) rename app/[locale]/(protected)/{ => contributor}/agenda-setting/calender-view.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/agenda-setting/data.ts (100%) rename app/[locale]/(protected)/{ => contributor}/agenda-setting/dragging-events.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/agenda-setting/event-modal.tsx (99%) rename app/[locale]/(protected)/{ => contributor}/agenda-setting/layout.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/agenda-setting/page.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/agenda-setting/utils.ts (100%) rename app/[locale]/(protected)/{ => contributor}/blog/components/blog-table.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/blog/components/columns.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/blog/layout.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/blog/page.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/content/audio-visual/components/columns.tsx (98%) rename app/[locale]/(protected)/{ => contributor}/content/audio-visual/components/table-video.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/content/audio-visual/create/page.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/content/audio-visual/layout.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/content/audio-visual/page.tsx (97%) rename app/[locale]/(protected)/{content/teks => contributor/content/audio}/components/columns.tsx (98%) rename app/[locale]/(protected)/{ => contributor}/content/audio/components/table-audio.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/content/audio/layout.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/content/audio/page.tsx (100%) rename app/[locale]/(protected)/{content/audio => contributor/content/image}/components/columns.tsx (98%) rename app/[locale]/(protected)/{ => contributor}/content/image/components/table-image.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/content/image/create/page.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/content/image/layout.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/content/image/page.tsx (96%) rename app/[locale]/(protected)/{ => contributor}/content/nulis-ai/components/columns.tsx (98%) rename app/[locale]/(protected)/{ => contributor}/content/nulis-ai/components/table-nulis.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/content/nulis-ai/layout.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/content/nulis-ai/page.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/content/spit/layout.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/content/spit/page.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/content/spit/table-spit/columns.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/content/spit/table-spit/data.ts (100%) rename app/[locale]/(protected)/{ => contributor}/content/spit/table-spit/page.tsx (99%) rename app/[locale]/(protected)/{ => contributor}/content/spit/table-spit/table-pagination.tsx (100%) rename app/[locale]/(protected)/{content/image => contributor/content/teks}/components/columns.tsx (98%) rename app/[locale]/(protected)/{ => contributor}/content/teks/components/table-teks.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/content/teks/layout.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/content/teks/page.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/planning/mediahub/components/columns.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/planning/mediahub/components/mediahub-table.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/planning/mediahub/layout.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/planning/mediahub/page.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/planning/medsos-mediahub/components/columns.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/planning/medsos-mediahub/components/medsos-table.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/planning/medsos-mediahub/layout.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/planning/medsos-mediahub/page.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/schedule/event/components/columns.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/schedule/event/components/event-table.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/schedule/event/create/page.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/schedule/event/layout.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/schedule/event/page.tsx (91%) rename app/[locale]/(protected)/{ => contributor}/schedule/press-conference/components/columns.tsx (98%) rename app/[locale]/(protected)/{ => contributor}/schedule/press-conference/components/presscon-table.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/schedule/press-conference/create/page.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/schedule/press-conference/detail/[id]/page.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/schedule/press-conference/layout.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/schedule/press-conference/page.tsx (90%) rename app/[locale]/(protected)/{ => contributor}/schedule/press-release/components/columns.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/schedule/press-release/components/pressrilis-table.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/schedule/press-release/create/page.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/schedule/press-release/layout.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/schedule/press-release/page.tsx (90%) rename app/[locale]/(protected)/{ => contributor}/task/components/columns.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/task/components/task-table.tsx (83%) rename app/[locale]/(protected)/{ => contributor}/task/create/page.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/task/detail/[id]/page.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/task/layout.tsx (100%) rename app/[locale]/(protected)/{ => contributor}/task/page.tsx (93%) rename app/[locale]/(protected)/{ => shared}/communication/collaboration/components/collabroation-table.tsx (100%) rename app/[locale]/(protected)/{ => shared}/communication/collaboration/components/columns.tsx (100%) rename app/[locale]/(protected)/{ => shared}/communication/collaboration/create/page.tsx (100%) rename app/[locale]/(protected)/{ => shared}/communication/escalation/table-escalation/columns.tsx (100%) rename app/[locale]/(protected)/{ => shared}/communication/escalation/table-escalation/escalation-table.tsx (100%) rename app/[locale]/(protected)/{ => shared}/communication/internal/components/columns.tsx (100%) rename app/[locale]/(protected)/{ => shared}/communication/internal/components/internal-table.tsx (100%) rename app/[locale]/(protected)/{ => shared}/communication/internal/create/page.tsx (100%) rename app/[locale]/(protected)/{ => shared}/communication/layout.tsx (100%) rename app/[locale]/(protected)/{ => shared}/communication/page.tsx (100%) rename app/[locale]/(protected)/{ => shared}/contest/components/columns.tsx (100%) rename app/[locale]/(protected)/{ => shared}/contest/components/contest-table.tsx (100%) rename app/[locale]/(protected)/{ => shared}/contest/layout.tsx (100%) rename app/[locale]/(protected)/{ => shared}/contest/page.tsx (95%) rename app/[locale]/(protected)/{ => shared}/curated-content/giat-penugasan/audio-visual.tsx (100%) rename app/[locale]/(protected)/{ => shared}/curated-content/giat-penugasan/audio.tsx (100%) rename app/[locale]/(protected)/{ => shared}/curated-content/giat-penugasan/image.tsx (100%) rename app/[locale]/(protected)/{ => shared}/curated-content/giat-penugasan/teks.tsx (100%) rename app/[locale]/(protected)/{ => shared}/curated-content/giat-routine/audio-visual.tsx (100%) rename app/[locale]/(protected)/{ => shared}/curated-content/giat-routine/audio.tsx (100%) rename app/[locale]/(protected)/{ => shared}/curated-content/giat-routine/image.tsx (100%) rename app/[locale]/(protected)/{ => shared}/curated-content/giat-routine/teks.tsx (100%) rename app/[locale]/(protected)/{ => shared}/curated-content/layout.tsx (100%) rename app/[locale]/(protected)/{ => shared}/curated-content/page.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/communications/account-report/components/column.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/communications/account-report/components/table.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/communications/account-report/layout.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/communications/account-report/page.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/communications/collaboration/components/column.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/communications/collaboration/components/table.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/communications/collaboration/layout.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/communications/collaboration/page.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/communications/forward/components/column.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/communications/forward/components/table.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/communications/forward/layout.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/communications/forward/page.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/communications/internal/components/column.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/communications/internal/components/table.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/communications/internal/layout.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/communications/internal/page.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/communications/questions/components/column.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/communications/questions/components/table.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/communications/questions/layout.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/communications/questions/page.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/frequently-asked-question/components/column.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/frequently-asked-question/components/table.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/frequently-asked-question/layout.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/frequently-asked-question/page.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/knowledge-base/layout.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/knowledge-base/page.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/ticketing/components/columns.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/ticketing/components/table.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/ticketing/layout.tsx (100%) rename app/[locale]/(protected)/{ => supervisor}/ticketing/page.tsx (100%) create mode 100644 components/landing-page/pagination.tsx diff --git a/app/[locale]/(protected)/agenda-setting/calender-view.tsx b/app/[locale]/(protected)/contributor/agenda-setting/calender-view.tsx similarity index 100% rename from app/[locale]/(protected)/agenda-setting/calender-view.tsx rename to app/[locale]/(protected)/contributor/agenda-setting/calender-view.tsx diff --git a/app/[locale]/(protected)/agenda-setting/data.ts b/app/[locale]/(protected)/contributor/agenda-setting/data.ts similarity index 100% rename from app/[locale]/(protected)/agenda-setting/data.ts rename to app/[locale]/(protected)/contributor/agenda-setting/data.ts diff --git a/app/[locale]/(protected)/agenda-setting/dragging-events.tsx b/app/[locale]/(protected)/contributor/agenda-setting/dragging-events.tsx similarity index 100% rename from app/[locale]/(protected)/agenda-setting/dragging-events.tsx rename to app/[locale]/(protected)/contributor/agenda-setting/dragging-events.tsx diff --git a/app/[locale]/(protected)/agenda-setting/event-modal.tsx b/app/[locale]/(protected)/contributor/agenda-setting/event-modal.tsx similarity index 99% rename from app/[locale]/(protected)/agenda-setting/event-modal.tsx rename to app/[locale]/(protected)/contributor/agenda-setting/event-modal.tsx index c84fdc07..864ea8d2 100644 --- a/app/[locale]/(protected)/agenda-setting/event-modal.tsx +++ b/app/[locale]/(protected)/contributor/agenda-setting/event-modal.tsx @@ -112,7 +112,7 @@ const EventModal = ({ confirmButtonColor: "#3085d6", confirmButtonText: "OK", }).then(() => { - router.push("/en/agenda-setting"); + router.push("/contributor/agenda-setting"); }); }; diff --git a/app/[locale]/(protected)/agenda-setting/layout.tsx b/app/[locale]/(protected)/contributor/agenda-setting/layout.tsx similarity index 100% rename from app/[locale]/(protected)/agenda-setting/layout.tsx rename to app/[locale]/(protected)/contributor/agenda-setting/layout.tsx diff --git a/app/[locale]/(protected)/agenda-setting/page.tsx b/app/[locale]/(protected)/contributor/agenda-setting/page.tsx similarity index 100% rename from app/[locale]/(protected)/agenda-setting/page.tsx rename to app/[locale]/(protected)/contributor/agenda-setting/page.tsx diff --git a/app/[locale]/(protected)/agenda-setting/utils.ts b/app/[locale]/(protected)/contributor/agenda-setting/utils.ts similarity index 100% rename from app/[locale]/(protected)/agenda-setting/utils.ts rename to app/[locale]/(protected)/contributor/agenda-setting/utils.ts diff --git a/app/[locale]/(protected)/blog/components/blog-table.tsx b/app/[locale]/(protected)/contributor/blog/components/blog-table.tsx similarity index 100% rename from app/[locale]/(protected)/blog/components/blog-table.tsx rename to app/[locale]/(protected)/contributor/blog/components/blog-table.tsx diff --git a/app/[locale]/(protected)/blog/components/columns.tsx b/app/[locale]/(protected)/contributor/blog/components/columns.tsx similarity index 100% rename from app/[locale]/(protected)/blog/components/columns.tsx rename to app/[locale]/(protected)/contributor/blog/components/columns.tsx diff --git a/app/[locale]/(protected)/blog/layout.tsx b/app/[locale]/(protected)/contributor/blog/layout.tsx similarity index 100% rename from app/[locale]/(protected)/blog/layout.tsx rename to app/[locale]/(protected)/contributor/blog/layout.tsx diff --git a/app/[locale]/(protected)/blog/page.tsx b/app/[locale]/(protected)/contributor/blog/page.tsx similarity index 100% rename from app/[locale]/(protected)/blog/page.tsx rename to app/[locale]/(protected)/contributor/blog/page.tsx diff --git a/app/[locale]/(protected)/content/audio-visual/components/columns.tsx b/app/[locale]/(protected)/contributor/content/audio-visual/components/columns.tsx similarity index 98% rename from app/[locale]/(protected)/content/audio-visual/components/columns.tsx rename to app/[locale]/(protected)/contributor/content/audio-visual/components/columns.tsx index f2dcd85f..4984ce42 100644 --- a/app/[locale]/(protected)/content/audio-visual/components/columns.tsx +++ b/app/[locale]/(protected)/contributor/content/audio-visual/components/columns.tsx @@ -139,7 +139,7 @@ const columns: ColumnDef[] = [ - + View diff --git a/app/[locale]/(protected)/content/audio-visual/components/table-video.tsx b/app/[locale]/(protected)/contributor/content/audio-visual/components/table-video.tsx similarity index 100% rename from app/[locale]/(protected)/content/audio-visual/components/table-video.tsx rename to app/[locale]/(protected)/contributor/content/audio-visual/components/table-video.tsx diff --git a/app/[locale]/(protected)/content/audio-visual/create/page.tsx b/app/[locale]/(protected)/contributor/content/audio-visual/create/page.tsx similarity index 100% rename from app/[locale]/(protected)/content/audio-visual/create/page.tsx rename to app/[locale]/(protected)/contributor/content/audio-visual/create/page.tsx diff --git a/app/[locale]/(protected)/content/audio-visual/layout.tsx b/app/[locale]/(protected)/contributor/content/audio-visual/layout.tsx similarity index 100% rename from app/[locale]/(protected)/content/audio-visual/layout.tsx rename to app/[locale]/(protected)/contributor/content/audio-visual/layout.tsx diff --git a/app/[locale]/(protected)/content/audio-visual/page.tsx b/app/[locale]/(protected)/contributor/content/audio-visual/page.tsx similarity index 97% rename from app/[locale]/(protected)/content/audio-visual/page.tsx rename to app/[locale]/(protected)/contributor/content/audio-visual/page.tsx index affcc207..264adef7 100644 --- a/app/[locale]/(protected)/content/audio-visual/page.tsx +++ b/app/[locale]/(protected)/contributor/content/audio-visual/page.tsx @@ -58,7 +58,7 @@ const ReactTableVideoPage = () => { Konten Video
- + - + View diff --git a/app/[locale]/(protected)/content/audio/components/table-audio.tsx b/app/[locale]/(protected)/contributor/content/audio/components/table-audio.tsx similarity index 100% rename from app/[locale]/(protected)/content/audio/components/table-audio.tsx rename to app/[locale]/(protected)/contributor/content/audio/components/table-audio.tsx diff --git a/app/[locale]/(protected)/content/audio/layout.tsx b/app/[locale]/(protected)/contributor/content/audio/layout.tsx similarity index 100% rename from app/[locale]/(protected)/content/audio/layout.tsx rename to app/[locale]/(protected)/contributor/content/audio/layout.tsx diff --git a/app/[locale]/(protected)/content/audio/page.tsx b/app/[locale]/(protected)/contributor/content/audio/page.tsx similarity index 100% rename from app/[locale]/(protected)/content/audio/page.tsx rename to app/[locale]/(protected)/contributor/content/audio/page.tsx diff --git a/app/[locale]/(protected)/content/audio/components/columns.tsx b/app/[locale]/(protected)/contributor/content/image/components/columns.tsx similarity index 98% rename from app/[locale]/(protected)/content/audio/components/columns.tsx rename to app/[locale]/(protected)/contributor/content/image/components/columns.tsx index f2dcd85f..4984ce42 100644 --- a/app/[locale]/(protected)/content/audio/components/columns.tsx +++ b/app/[locale]/(protected)/contributor/content/image/components/columns.tsx @@ -139,7 +139,7 @@ const columns: ColumnDef[] = [ - + View diff --git a/app/[locale]/(protected)/content/image/components/table-image.tsx b/app/[locale]/(protected)/contributor/content/image/components/table-image.tsx similarity index 100% rename from app/[locale]/(protected)/content/image/components/table-image.tsx rename to app/[locale]/(protected)/contributor/content/image/components/table-image.tsx diff --git a/app/[locale]/(protected)/content/image/create/page.tsx b/app/[locale]/(protected)/contributor/content/image/create/page.tsx similarity index 100% rename from app/[locale]/(protected)/content/image/create/page.tsx rename to app/[locale]/(protected)/contributor/content/image/create/page.tsx diff --git a/app/[locale]/(protected)/content/image/layout.tsx b/app/[locale]/(protected)/contributor/content/image/layout.tsx similarity index 100% rename from app/[locale]/(protected)/content/image/layout.tsx rename to app/[locale]/(protected)/contributor/content/image/layout.tsx diff --git a/app/[locale]/(protected)/content/image/page.tsx b/app/[locale]/(protected)/contributor/content/image/page.tsx similarity index 96% rename from app/[locale]/(protected)/content/image/page.tsx rename to app/[locale]/(protected)/contributor/content/image/page.tsx index 9d929942..d58f7f98 100644 --- a/app/[locale]/(protected)/content/image/page.tsx +++ b/app/[locale]/(protected)/contributor/content/image/page.tsx @@ -6,7 +6,6 @@ import { UploadIcon } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Icon } from "@iconify/react/dist/iconify.js"; import { Link } from "@/components/navigation"; -import TicketingTable from "../../ticketing/components/table"; const ReactTableImagePage = () => { return ( @@ -58,7 +57,7 @@ const ReactTableImagePage = () => { Konten Foto
- + - + View diff --git a/app/[locale]/(protected)/content/nulis-ai/components/table-nulis.tsx b/app/[locale]/(protected)/contributor/content/nulis-ai/components/table-nulis.tsx similarity index 100% rename from app/[locale]/(protected)/content/nulis-ai/components/table-nulis.tsx rename to app/[locale]/(protected)/contributor/content/nulis-ai/components/table-nulis.tsx diff --git a/app/[locale]/(protected)/content/nulis-ai/layout.tsx b/app/[locale]/(protected)/contributor/content/nulis-ai/layout.tsx similarity index 100% rename from app/[locale]/(protected)/content/nulis-ai/layout.tsx rename to app/[locale]/(protected)/contributor/content/nulis-ai/layout.tsx diff --git a/app/[locale]/(protected)/content/nulis-ai/page.tsx b/app/[locale]/(protected)/contributor/content/nulis-ai/page.tsx similarity index 100% rename from app/[locale]/(protected)/content/nulis-ai/page.tsx rename to app/[locale]/(protected)/contributor/content/nulis-ai/page.tsx diff --git a/app/[locale]/(protected)/content/spit/layout.tsx b/app/[locale]/(protected)/contributor/content/spit/layout.tsx similarity index 100% rename from app/[locale]/(protected)/content/spit/layout.tsx rename to app/[locale]/(protected)/contributor/content/spit/layout.tsx diff --git a/app/[locale]/(protected)/content/spit/page.tsx b/app/[locale]/(protected)/contributor/content/spit/page.tsx similarity index 100% rename from app/[locale]/(protected)/content/spit/page.tsx rename to app/[locale]/(protected)/contributor/content/spit/page.tsx diff --git a/app/[locale]/(protected)/content/spit/table-spit/columns.tsx b/app/[locale]/(protected)/contributor/content/spit/table-spit/columns.tsx similarity index 100% rename from app/[locale]/(protected)/content/spit/table-spit/columns.tsx rename to app/[locale]/(protected)/contributor/content/spit/table-spit/columns.tsx diff --git a/app/[locale]/(protected)/content/spit/table-spit/data.ts b/app/[locale]/(protected)/contributor/content/spit/table-spit/data.ts similarity index 100% rename from app/[locale]/(protected)/content/spit/table-spit/data.ts rename to app/[locale]/(protected)/contributor/content/spit/table-spit/data.ts diff --git a/app/[locale]/(protected)/content/spit/table-spit/page.tsx b/app/[locale]/(protected)/contributor/content/spit/table-spit/page.tsx similarity index 99% rename from app/[locale]/(protected)/content/spit/table-spit/page.tsx rename to app/[locale]/(protected)/contributor/content/spit/table-spit/page.tsx index b343e6a3..8b51bf27 100644 --- a/app/[locale]/(protected)/content/spit/table-spit/page.tsx +++ b/app/[locale]/(protected)/contributor/content/spit/table-spit/page.tsx @@ -177,7 +177,7 @@ const columns: ColumnDef[] = [ - + View diff --git a/app/[locale]/(protected)/content/spit/table-spit/table-pagination.tsx b/app/[locale]/(protected)/contributor/content/spit/table-spit/table-pagination.tsx similarity index 100% rename from app/[locale]/(protected)/content/spit/table-spit/table-pagination.tsx rename to app/[locale]/(protected)/contributor/content/spit/table-spit/table-pagination.tsx diff --git a/app/[locale]/(protected)/content/image/components/columns.tsx b/app/[locale]/(protected)/contributor/content/teks/components/columns.tsx similarity index 98% rename from app/[locale]/(protected)/content/image/components/columns.tsx rename to app/[locale]/(protected)/contributor/content/teks/components/columns.tsx index f2dcd85f..4984ce42 100644 --- a/app/[locale]/(protected)/content/image/components/columns.tsx +++ b/app/[locale]/(protected)/contributor/content/teks/components/columns.tsx @@ -139,7 +139,7 @@ const columns: ColumnDef[] = [ - + View diff --git a/app/[locale]/(protected)/content/teks/components/table-teks.tsx b/app/[locale]/(protected)/contributor/content/teks/components/table-teks.tsx similarity index 100% rename from app/[locale]/(protected)/content/teks/components/table-teks.tsx rename to app/[locale]/(protected)/contributor/content/teks/components/table-teks.tsx diff --git a/app/[locale]/(protected)/content/teks/layout.tsx b/app/[locale]/(protected)/contributor/content/teks/layout.tsx similarity index 100% rename from app/[locale]/(protected)/content/teks/layout.tsx rename to app/[locale]/(protected)/contributor/content/teks/layout.tsx diff --git a/app/[locale]/(protected)/content/teks/page.tsx b/app/[locale]/(protected)/contributor/content/teks/page.tsx similarity index 100% rename from app/[locale]/(protected)/content/teks/page.tsx rename to app/[locale]/(protected)/contributor/content/teks/page.tsx diff --git a/app/[locale]/(protected)/planning/mediahub/components/columns.tsx b/app/[locale]/(protected)/contributor/planning/mediahub/components/columns.tsx similarity index 100% rename from app/[locale]/(protected)/planning/mediahub/components/columns.tsx rename to app/[locale]/(protected)/contributor/planning/mediahub/components/columns.tsx diff --git a/app/[locale]/(protected)/planning/mediahub/components/mediahub-table.tsx b/app/[locale]/(protected)/contributor/planning/mediahub/components/mediahub-table.tsx similarity index 100% rename from app/[locale]/(protected)/planning/mediahub/components/mediahub-table.tsx rename to app/[locale]/(protected)/contributor/planning/mediahub/components/mediahub-table.tsx diff --git a/app/[locale]/(protected)/planning/mediahub/layout.tsx b/app/[locale]/(protected)/contributor/planning/mediahub/layout.tsx similarity index 100% rename from app/[locale]/(protected)/planning/mediahub/layout.tsx rename to app/[locale]/(protected)/contributor/planning/mediahub/layout.tsx diff --git a/app/[locale]/(protected)/planning/mediahub/page.tsx b/app/[locale]/(protected)/contributor/planning/mediahub/page.tsx similarity index 100% rename from app/[locale]/(protected)/planning/mediahub/page.tsx rename to app/[locale]/(protected)/contributor/planning/mediahub/page.tsx diff --git a/app/[locale]/(protected)/planning/medsos-mediahub/components/columns.tsx b/app/[locale]/(protected)/contributor/planning/medsos-mediahub/components/columns.tsx similarity index 100% rename from app/[locale]/(protected)/planning/medsos-mediahub/components/columns.tsx rename to app/[locale]/(protected)/contributor/planning/medsos-mediahub/components/columns.tsx diff --git a/app/[locale]/(protected)/planning/medsos-mediahub/components/medsos-table.tsx b/app/[locale]/(protected)/contributor/planning/medsos-mediahub/components/medsos-table.tsx similarity index 100% rename from app/[locale]/(protected)/planning/medsos-mediahub/components/medsos-table.tsx rename to app/[locale]/(protected)/contributor/planning/medsos-mediahub/components/medsos-table.tsx diff --git a/app/[locale]/(protected)/planning/medsos-mediahub/layout.tsx b/app/[locale]/(protected)/contributor/planning/medsos-mediahub/layout.tsx similarity index 100% rename from app/[locale]/(protected)/planning/medsos-mediahub/layout.tsx rename to app/[locale]/(protected)/contributor/planning/medsos-mediahub/layout.tsx diff --git a/app/[locale]/(protected)/planning/medsos-mediahub/page.tsx b/app/[locale]/(protected)/contributor/planning/medsos-mediahub/page.tsx similarity index 100% rename from app/[locale]/(protected)/planning/medsos-mediahub/page.tsx rename to app/[locale]/(protected)/contributor/planning/medsos-mediahub/page.tsx diff --git a/app/[locale]/(protected)/schedule/event/components/columns.tsx b/app/[locale]/(protected)/contributor/schedule/event/components/columns.tsx similarity index 100% rename from app/[locale]/(protected)/schedule/event/components/columns.tsx rename to app/[locale]/(protected)/contributor/schedule/event/components/columns.tsx diff --git a/app/[locale]/(protected)/schedule/event/components/event-table.tsx b/app/[locale]/(protected)/contributor/schedule/event/components/event-table.tsx similarity index 100% rename from app/[locale]/(protected)/schedule/event/components/event-table.tsx rename to app/[locale]/(protected)/contributor/schedule/event/components/event-table.tsx diff --git a/app/[locale]/(protected)/schedule/event/create/page.tsx b/app/[locale]/(protected)/contributor/schedule/event/create/page.tsx similarity index 100% rename from app/[locale]/(protected)/schedule/event/create/page.tsx rename to app/[locale]/(protected)/contributor/schedule/event/create/page.tsx diff --git a/app/[locale]/(protected)/schedule/event/layout.tsx b/app/[locale]/(protected)/contributor/schedule/event/layout.tsx similarity index 100% rename from app/[locale]/(protected)/schedule/event/layout.tsx rename to app/[locale]/(protected)/contributor/schedule/event/layout.tsx diff --git a/app/[locale]/(protected)/schedule/event/page.tsx b/app/[locale]/(protected)/contributor/schedule/event/page.tsx similarity index 91% rename from app/[locale]/(protected)/schedule/event/page.tsx rename to app/[locale]/(protected)/contributor/schedule/event/page.tsx index 0277772a..ab934287 100644 --- a/app/[locale]/(protected)/schedule/event/page.tsx +++ b/app/[locale]/(protected)/contributor/schedule/event/page.tsx @@ -5,7 +5,6 @@ import { UploadIcon } from "lucide-react"; import PressConferenceTable from "../press-conference/components/presscon-table"; import EventTable from "./components/event-table"; import { Link } from "@/components/navigation"; -import TicketingTable from "../../ticketing/components/table"; const EventPage = async () => { return ( @@ -20,7 +19,7 @@ const EventPage = async () => { Jadwal Event
- +
- +
- + - +
+ +
diff --git a/app/[locale]/(protected)/task/create/page.tsx b/app/[locale]/(protected)/contributor/task/create/page.tsx similarity index 100% rename from app/[locale]/(protected)/task/create/page.tsx rename to app/[locale]/(protected)/contributor/task/create/page.tsx diff --git a/app/[locale]/(protected)/task/detail/[id]/page.tsx b/app/[locale]/(protected)/contributor/task/detail/[id]/page.tsx similarity index 100% rename from app/[locale]/(protected)/task/detail/[id]/page.tsx rename to app/[locale]/(protected)/contributor/task/detail/[id]/page.tsx diff --git a/app/[locale]/(protected)/task/layout.tsx b/app/[locale]/(protected)/contributor/task/layout.tsx similarity index 100% rename from app/[locale]/(protected)/task/layout.tsx rename to app/[locale]/(protected)/contributor/task/layout.tsx diff --git a/app/[locale]/(protected)/task/page.tsx b/app/[locale]/(protected)/contributor/task/page.tsx similarity index 93% rename from app/[locale]/(protected)/task/page.tsx rename to app/[locale]/(protected)/contributor/task/page.tsx index 4564e125..00f328ef 100644 --- a/app/[locale]/(protected)/task/page.tsx +++ b/app/[locale]/(protected)/contributor/task/page.tsx @@ -7,7 +7,6 @@ import SiteBreadcrumb from "@/components/site-breadcrumb"; import { Link } from "@/components/navigation"; import { checkAuthorization, checkLoginSession } from "@/lib/utils"; import React, { useEffect } from "react"; -import TicketingTable from "../ticketing/components/table"; const TaskPage = () => { useEffect(() => { @@ -31,7 +30,7 @@ const TaskPage = () => { Table Penugasan
- +
- {/* + {/*
- - - - - - - 1 - - - - 2 - - - - 3 - - - - - - - - -
); }; diff --git a/app/[locale]/(public)/image/layout.tsx b/app/[locale]/(public)/image/layout.tsx index b9f5668d..2cb8c934 100644 --- a/app/[locale]/(public)/image/layout.tsx +++ b/app/[locale]/(public)/image/layout.tsx @@ -7,7 +7,7 @@ import DashCodeHeader from "@/components/partials/header"; import { auth } from "@/lib/auth"; import { redirect } from "@/components/navigation"; import Footer from "@/components/landing-page/footer"; -import Navbar from "@/components/landing-page/Navbar"; +import Navbar from "@/components/landing-page/navbar"; const layout = async ({ children }: { children: React.ReactNode }) => { return ( diff --git a/app/[locale]/(public)/indeks/layout.tsx b/app/[locale]/(public)/indeks/layout.tsx index b9f5668d..2cb8c934 100644 --- a/app/[locale]/(public)/indeks/layout.tsx +++ b/app/[locale]/(public)/indeks/layout.tsx @@ -7,7 +7,7 @@ import DashCodeHeader from "@/components/partials/header"; import { auth } from "@/lib/auth"; import { redirect } from "@/components/navigation"; import Footer from "@/components/landing-page/footer"; -import Navbar from "@/components/landing-page/Navbar"; +import Navbar from "@/components/landing-page/navbar"; const layout = async ({ children }: { children: React.ReactNode }) => { return ( diff --git a/app/[locale]/(public)/schedule/layout.tsx b/app/[locale]/(public)/schedule/layout.tsx index b9f5668d..2cb8c934 100644 --- a/app/[locale]/(public)/schedule/layout.tsx +++ b/app/[locale]/(public)/schedule/layout.tsx @@ -7,7 +7,7 @@ import DashCodeHeader from "@/components/partials/header"; import { auth } from "@/lib/auth"; import { redirect } from "@/components/navigation"; import Footer from "@/components/landing-page/footer"; -import Navbar from "@/components/landing-page/Navbar"; +import Navbar from "@/components/landing-page/navbar"; const layout = async ({ children }: { children: React.ReactNode }) => { return ( diff --git a/app/[locale]/(public)/video/layout.tsx b/app/[locale]/(public)/video/layout.tsx index b9f5668d..2cb8c934 100644 --- a/app/[locale]/(public)/video/layout.tsx +++ b/app/[locale]/(public)/video/layout.tsx @@ -7,7 +7,7 @@ import DashCodeHeader from "@/components/partials/header"; import { auth } from "@/lib/auth"; import { redirect } from "@/components/navigation"; import Footer from "@/components/landing-page/footer"; -import Navbar from "@/components/landing-page/Navbar"; +import Navbar from "@/components/landing-page/navbar"; const layout = async ({ children }: { children: React.ReactNode }) => { return ( diff --git a/app/[locale]/page.tsx b/app/[locale]/page.tsx index 4adf2105..1e479373 100644 --- a/app/[locale]/page.tsx +++ b/app/[locale]/page.tsx @@ -8,7 +8,7 @@ import Coverage from "@/components/landing-page/coverage"; import Hero from "@/components/landing-page/hero"; import Footer from "@/components/landing-page/footer"; import Division from "@/components/landing-page/division"; -import Navbar from "@/components/landing-page/Navbar"; +import Navbar from "@/components/landing-page/navbar"; const Home = ({ params: { locale } }: { params: { locale: string } }) => { return ( diff --git a/components/form/communication/collaboration-form.tsx b/components/form/communication/collaboration-form.tsx index fbb02466..f7555e3e 100644 --- a/components/form/communication/collaboration-form.tsx +++ b/components/form/communication/collaboration-form.tsx @@ -168,7 +168,7 @@ export default function FormCollaboration() { confirmButtonColor: "#3085d6", confirmButtonText: "OK", }).then(() => { - router.push("/en/communication"); + router.push("/contributor/communication"); }); }; diff --git a/components/form/communication/internal-form.tsx b/components/form/communication/internal-form.tsx index 86ab54a4..c75cae40 100644 --- a/components/form/communication/internal-form.tsx +++ b/components/form/communication/internal-form.tsx @@ -168,7 +168,7 @@ export default function FormInternal() { confirmButtonColor: "#3085d6", confirmButtonText: "OK", }).then(() => { - router.push("/en/communication"); + router.push("/contributor/communication"); }); }; diff --git a/components/form/content/image-form.tsx b/components/form/content/image-form.tsx index 74830c3c..ec996b60 100644 --- a/components/form/content/image-form.tsx +++ b/components/form/content/image-form.tsx @@ -168,7 +168,7 @@ export default function FormImage() { confirmButtonColor: "#3085d6", confirmButtonText: "OK", }).then(() => { - router.push("/en/content/image"); + router.push("/contributor/content/image"); }); }; diff --git a/components/form/content/video-form.tsx b/components/form/content/video-form.tsx index 48357d84..23c57810 100644 --- a/components/form/content/video-form.tsx +++ b/components/form/content/video-form.tsx @@ -168,7 +168,7 @@ export default function FormVideo() { confirmButtonColor: "#3085d6", confirmButtonText: "OK", }).then(() => { - router.push("/en/content/audio-visual"); + router.push("/contributor/content/audio-visual"); }); }; diff --git a/components/form/schedule/event-form.tsx b/components/form/schedule/event-form.tsx index 4b720e72..e6dabeb8 100644 --- a/components/form/schedule/event-form.tsx +++ b/components/form/schedule/event-form.tsx @@ -129,7 +129,7 @@ export default function FormEvent() { confirmButtonColor: "#3085d6", confirmButtonText: "OK", }).then(() => { - router.push("/en/schedule/event"); + router.push("/contributor/schedule/event"); }); }; diff --git a/components/form/schedule/pers-release-form.tsx b/components/form/schedule/pers-release-form.tsx index 54a97e26..cbd0f9a2 100644 --- a/components/form/schedule/pers-release-form.tsx +++ b/components/form/schedule/pers-release-form.tsx @@ -129,7 +129,7 @@ export default function FormPressRelease() { confirmButtonColor: "#3085d6", confirmButtonText: "OK", }).then(() => { - router.push("/en/schedule/press-release"); + router.push("/contributor/schedule/press-release"); }); }; diff --git a/components/form/schedule/press-conference-form.tsx b/components/form/schedule/press-conference-form.tsx index 2d72f477..7bd9b3c2 100644 --- a/components/form/schedule/press-conference-form.tsx +++ b/components/form/schedule/press-conference-form.tsx @@ -129,7 +129,7 @@ export default function FormPressConference() { confirmButtonColor: "#3085d6", confirmButtonText: "OK", }).then(() => { - router.push("/en/schedule/press-conference"); + router.push("/contributor/schedule/press-conference"); }); }; diff --git a/components/form/task/task-form.tsx b/components/form/task/task-form.tsx index 3415ec29..69b89bc3 100644 --- a/components/form/task/task-form.tsx +++ b/components/form/task/task-form.tsx @@ -121,7 +121,7 @@ export default function FormTask() { confirmButtonColor: "#3085d6", confirmButtonText: "OK", }).then(() => { - router.push("/en/task"); + router.push("/contributor/task"); }); }; diff --git a/components/landing-page/Navbar.tsx b/components/landing-page/Navbar.tsx index 0dda790e..ee6bd654 100644 --- a/components/landing-page/Navbar.tsx +++ b/components/landing-page/Navbar.tsx @@ -87,7 +87,7 @@ const Navbar = () => { - + ; + totalPage: number; // Total jumlah halaman + totalData: number; // Total jumlah data + visiblePageCount?: number; // Jumlah halaman yang ditampilkan (default 5) +} + +const LandingPagination = ({ + table, + totalPage, + totalData, + visiblePageCount = 5, +}: DataTablePaginationProps) => { + const router = useRouter(); + const searchParams = useSearchParams(); + + const [currentPageIndex, setCurrentPageIndex] = useState(1); + + useEffect(() => { + const pageFromUrl = searchParams?.get('page'); + if (pageFromUrl) { + const pageIndex = Math.min(Math.max(1, Number(pageFromUrl)), totalPage); + setCurrentPageIndex(pageIndex); + table.setPageIndex(pageIndex - 1); // Sinkronisasi tabel dengan URL + } + }, [searchParams, totalPage, table]); + + const handlePageChange = (pageIndex: number) => { + const clampedPageIndex = Math.min(Math.max(1, pageIndex), totalPage); + const searchParams = new URLSearchParams(window.location.search); + searchParams.set('page', clampedPageIndex.toString()); + + router.push(`${window.location.pathname}?${searchParams.toString()}`); + setCurrentPageIndex(clampedPageIndex); + table.setPageIndex(clampedPageIndex - 1); // Perbarui tabel dengan index berbasis 0 + }; + + const generatePageNumbers = () => { + const halfVisible = Math.floor(visiblePageCount / 2); + let startPage = Math.max(1, currentPageIndex - halfVisible); + let endPage = Math.min(totalPage, startPage + visiblePageCount - 1); + + if (endPage - startPage + 1 < visiblePageCount) { + startPage = Math.max(1, endPage - visiblePageCount + 1); + } + + return Array.from({ length: endPage - startPage + 1 }, (_, i) => startPage + i); + }; + + return ( +
+
+ + + {generatePageNumbers().map((pageIndex) => ( + + ))} + + +
+
+ ); +}; + +export default LandingPagination; \ No newline at end of file diff --git a/lib/menus.ts b/lib/menus.ts index 2ead339f..8aacc1dd 100644 --- a/lib/menus.ts +++ b/lib/menus.ts @@ -57,50 +57,50 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "content", - href: "/content/image", + href: "/contributor/content/image", label: t("content"), active: pathname.includes("/content"), icon: "line-md:youtube", submenus: [ { - href: "/content/image", + href: "/contributor/content/image", label: t("image"), - active: pathname === "/content/image", + active: pathname.includes("/content/image"), icon: "ic:outline-image", children: [], }, { - href: "/content/audio-visual", + href: "/contributor/content/video", label: t("video"), - active: pathname === "/content/audio-visual", + active: pathname.includes("/content/video"), icon: "line-md:youtube", children: [], }, { - href: "/content/teks", + href: "/contributor/content/teks", label: t("text"), - active: pathname === "/content/teks", + active: pathname.includes("/content/text"), icon: "heroicons:document", children: [], }, { - href: "/content/audio", + href: "/contributor/content/audio", label: t("audio"), - active: pathname === "/content/audio", + active: pathname.includes("/content/audio"), icon: "heroicons:share", children: [], }, { - href: "/content/spit", + href: "/contributor/content/spit", label: "spit", - active: pathname === "/content/spit", + active: pathname.includes("/content/spit"), icon: "heroicons:credit-card", children: [], }, { - href: "/content/nulis-ai", + href: "/contributor/content/nulis-ai", label: "nulis ai", - active: pathname === "/content/nulisai", + active: pathname.includes("/content/nulisai"), icon: "heroicons:credit-card", children: [], }, @@ -114,7 +114,7 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "agenda-setting", - href: "/agenda-setting", + href: "/contributor/agenda-setting", label: t("agenda-setting"), active: pathname.includes("/agenda-setting"), icon: "iconoir:journal-page", @@ -128,22 +128,22 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "planning", - href: "/planning", + href: "/contributor/planning", label: t("planning"), active: pathname.includes("/planning"), icon: "pajamas:planning", submenus: [ { - href: "/planning/mediahub", + href: "/contributor/planning/mediahub", label: "mediaHub", - active: pathname === "/planning/mediahub", + active: pathname.includes("/planning/mediahub"), icon: "heroicons:arrow-trending-up", children: [], }, { - href: "/planning/medsos-mediahub", + href: "/contributor/planning/medsos-mediahub", label: "medsos mediahub", - active: pathname === "/planning/medsos-mediahub", + active: pathname.includes("/planning/medsos-mediahub"), icon: "heroicons:shopping-cart", children: [], }, @@ -157,7 +157,7 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "task", - href: "/task", + href: "/contributor/task", label: t("task"), active: pathname.includes("/task"), icon: "fluent:clipboard-task-add-24-regular", @@ -171,29 +171,29 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "schedule", - href: "/schedule", + href: "/contributor/schedule", label: t("schedule"), active: pathname.includes("/schedule"), icon: "uil:schedule", submenus: [ { - href: "/schedule/press-conference", - label: "konfesensi pers", - active: pathname === "/schedule/press-conference", + href: "/contributor/schedule/press-conference", + label: "konferensi pers", + active: pathname.includes("/schedule/press-conference"), icon: "heroicons:arrow-trending-up", children: [], }, { - href: "/schedule/event", + href: "/contributor/schedule/event", label: "event", - active: pathname === "/schedule/event", + active: pathname.includes("/schedule/event"), icon: "heroicons:shopping-cart", children: [], }, { - href: "/schedule/press-release", + href: "/contributor/schedule/press-release", label: "pers rilis", - active: pathname === "/schedule/press-release", + active: pathname.includes("/schedule/press-release"), icon: "heroicons:shopping-cart", children: [], }, @@ -207,7 +207,7 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "blog", - href: "/blog", + href: "/contributor/blog", label: t("blog"), active: pathname.includes("/blog"), icon: "fluent:clipboard-text-32-regular", @@ -221,7 +221,7 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "curatedcontent", - href: "/curated-content", + href: "/shared/curated-content", label: t("curated-content"), active: pathname.includes("/curated-content"), icon: "pixelarticons:calendar-text", @@ -235,7 +235,7 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "communication", - href: "/communication", + href: "/shared/communication", label: t("communication"), active: pathname.includes("/communication"), icon: "token:chat", @@ -249,7 +249,7 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "contest", - href: "/contest", + href: "/shared/contest", label: t("contest"), active: pathname.includes("/contest"), icon: "ic:outline-emoji-events", @@ -1403,7 +1403,7 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "ticketing", - href: "/ticketing", + href: "/supervisor/ticketing", label: t("ticketing"), active: pathname.includes("/ticketing"), icon: "mdi:ticket-outline", @@ -1417,7 +1417,7 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "knowledge-base", - href: "/knowledge-base", + href: "/supervisor/knowledge-base", label: t("knowledge-base"), active: pathname.includes("/knowledge-base"), icon: "hugeicons:knowledge-02", @@ -1431,7 +1431,7 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "faq", - href: "/frequently-asked-question", + href: "/supervisor/faq", label: t("faq"), active: pathname.includes("/frequently-asked-question"), icon: "wpf:faq", @@ -1445,41 +1445,41 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "communication", - href: "/communications", + href: "/supervisor/communications", label: t("communication"), active: pathname.includes("/communications"), icon: "icon-park-outline:communication", submenus: [ { - href: "/communications/questions", + href: "/supervisor/communications/questions", label: t("questions"), active: pathname.includes("/communications/questions"), icon: "solar:inbox-line-outline", children: [], }, { - href: "/communications/internal", + href: "/supervisor/communications/internal", label: t("internal"), active: pathname.includes("/communications/internal"), icon: "ri:chat-private-line", children: [], }, { - href: "/communications/forward", + href: "/supervisor/communications/forward", label: t("forward"), active: pathname.includes("/communications/forward"), icon: "ri:share-forward-2-fill", children: [], }, { - href: "/communications/collaboration", + href: "/supervisor/communications/collaboration", label: t("collaboration"), active: pathname.includes("/communications/collaboration"), icon: "clarity:employee-group-line", children: [], }, { - href: "/communications/account-report", + href: "/supervisor/communications/account-report", label: t("account-report"), active: pathname.includes("/communications/account-report"), icon: "uiw:user-delete", @@ -1495,7 +1495,7 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "settings", - href: "/settings", + href: "/supervisor/settings", label: t("settings"), active: pathname.includes("/settings"), icon: "uil:setting", @@ -1541,7 +1541,7 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "content-production", - href: "/content-production", + href: "/curator/content-production", label: t("content-production"), active: pathname.includes("/content-production"), icon: "fluent:content-view-gallery-16-regular", @@ -1555,7 +1555,7 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "pattern-relation", - href: "/pattern-relation", + href: "/curator/pattern-relation", label: t("pattern-relation"), active: pathname.includes("/pattern-relation"), icon: "oui:app-index-pattern", @@ -1569,7 +1569,7 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "agenda-setting", - href: "/agenda-setting", + href: "/curator/agenda-setting", label: t("agenda-setting"), active: pathname.includes("/agenda-setting"), icon: "iconoir:journal-page", @@ -1583,20 +1583,20 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "task-plan", - href: "/task-plan", + href: "/curator/task-plan", label: t("task-plan"), active: pathname.includes("/task-plan"), icon: "pajamas:planning", submenus: [ { - href: "/task-plan/mediahub", + href: "/curator/task-plan/mediahub", label: "mediaHub", active: pathname === "/task-plan/mediahub", icon: "heroicons:arrow-trending-up", children: [], }, { - href: "/task-plan/medsos-mediahub", + href: "/curator/task-plan/medsos-mediahub", label: "medsos mediahub", active: pathname === "/task-plan/medsos-mediahub", icon: "heroicons:shopping-cart", @@ -1612,7 +1612,7 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "curatedcontent", - href: "/curated-content", + href: "/shared/curated-content", label: t("curated-content"), active: pathname.includes("/curated-content"), icon: "pixelarticons:calendar-text", @@ -1626,7 +1626,7 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "media-tracking", - href: "/media-tracking", + href: "/curator/media-tracking", label: t("media-tracking"), active: pathname.includes("/media-tracking"), icon: "material-symbols:map-search-outline", @@ -1640,7 +1640,7 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "communication", - href: "/communication", + href: "/shared/communication", label: t("communication"), active: pathname.includes("/communication"), icon: "token:chat", @@ -1654,7 +1654,7 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "contest", - href: "/contest", + href: "/shared/contest", label: t("contest"), active: pathname.includes("/contest"), icon: "ic:outline-emoji-events", @@ -1668,7 +1668,7 @@ export function getMenuList(pathname: string, t: any): Group[] { menus: [ { id: "feedback", - href: "/feedback", + href: "/curator/feedback", label: t("feedback"), active: pathname.includes("/feedback"), icon: "mdi:feedback-outline", From ae7d7916a2e757377b61f2c5c0fba170155cf7d8 Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Fri, 13 Dec 2024 00:41:28 +0000 Subject: [PATCH 3/7] Update Footer.tsx --- components/landing-page/{Footer.tsx => footer.tsx} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename components/landing-page/{Footer.tsx => footer.tsx} (100%) diff --git a/components/landing-page/Footer.tsx b/components/landing-page/footer.tsx similarity index 100% rename from components/landing-page/Footer.tsx rename to components/landing-page/footer.tsx From 89c89e12399af7d65b2f2478a44da3b53df4669f Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Fri, 13 Dec 2024 00:42:24 +0000 Subject: [PATCH 4/7] Update Hero.tsx --- components/landing-page/{Hero.tsx => hero.tsx} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename components/landing-page/{Hero.tsx => hero.tsx} (100%) diff --git a/components/landing-page/Hero.tsx b/components/landing-page/hero.tsx similarity index 100% rename from components/landing-page/Hero.tsx rename to components/landing-page/hero.tsx From cab810ef7df8160ee48d356a1dd76acd905cadb1 Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Fri, 13 Dec 2024 00:42:45 +0000 Subject: [PATCH 5/7] Update Navbar.tsx --- components/landing-page/{Navbar.tsx => navbar.tsx} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename components/landing-page/{Navbar.tsx => navbar.tsx} (100%) diff --git a/components/landing-page/Navbar.tsx b/components/landing-page/navbar.tsx similarity index 100% rename from components/landing-page/Navbar.tsx rename to components/landing-page/navbar.tsx From 53bb4bb8ade9f2c230e16fef41e8722e6622be6d Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Fri, 13 Dec 2024 13:55:30 +0700 Subject: [PATCH 6/7] feat: fixing error and update some file and folder --- .../(protected)/contributor/content/audio/page.tsx | 1 - .../{audio-visual => video}/components/columns.tsx | 0 .../components/table-video.tsx | 0 .../content/{audio-visual => video}/create/page.tsx | 0 .../content/{audio-visual => video}/layout.tsx | 0 .../content/{audio-visual => video}/page.tsx | 0 .../contributor/planning/mediahub/page.tsx | 1 - .../contributor/planning/medsos-mediahub/page.tsx | 1 - .../schedule/press-conference/create/page.tsx | 2 +- .../schedule/press-conference/detail/[id]/page.tsx | 2 +- .../schedule/press-release/create/page.tsx | 2 +- .../(protected)/contributor/task/create/page.tsx | 2 +- .../communication/collaboration/create/page.tsx | 3 +-- .../shared/communication/internal/create/page.tsx | 2 +- .../(protected)/shared/communication/page.tsx | 4 +--- app/[locale]/(protected)/shared/contest/page.tsx | 5 +---- .../(protected)/shared/curated-content/page.tsx | 2 +- app/[locale]/(public)/video/filter/page.tsx | 2 +- components/partials/footer/index.tsx | 13 +++++++++++-- components/partials/header/index.tsx | 4 +++- components/partials/header/profile-info.tsx | 12 +++++++++--- service/landing/landing.ts | 4 ++-- 22 files changed, 35 insertions(+), 27 deletions(-) rename app/[locale]/(protected)/contributor/content/{audio-visual => video}/components/columns.tsx (100%) rename app/[locale]/(protected)/contributor/content/{audio-visual => video}/components/table-video.tsx (100%) rename app/[locale]/(protected)/contributor/content/{audio-visual => video}/create/page.tsx (100%) rename app/[locale]/(protected)/contributor/content/{audio-visual => video}/layout.tsx (100%) rename app/[locale]/(protected)/contributor/content/{audio-visual => video}/page.tsx (100%) diff --git a/app/[locale]/(protected)/contributor/content/audio/page.tsx b/app/[locale]/(protected)/contributor/content/audio/page.tsx index 7b5f1a8a..a0f31679 100644 --- a/app/[locale]/(protected)/contributor/content/audio/page.tsx +++ b/app/[locale]/(protected)/contributor/content/audio/page.tsx @@ -5,7 +5,6 @@ import { Link, UploadIcon } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Icon } from "@iconify/react/dist/iconify.js"; import TableAudio from "./components/table-audio"; -import TableVideo from "../audio-visual/components/table-video"; const ReactTableAudioPage = () => { return ( diff --git a/app/[locale]/(protected)/contributor/content/audio-visual/components/columns.tsx b/app/[locale]/(protected)/contributor/content/video/components/columns.tsx similarity index 100% rename from app/[locale]/(protected)/contributor/content/audio-visual/components/columns.tsx rename to app/[locale]/(protected)/contributor/content/video/components/columns.tsx diff --git a/app/[locale]/(protected)/contributor/content/audio-visual/components/table-video.tsx b/app/[locale]/(protected)/contributor/content/video/components/table-video.tsx similarity index 100% rename from app/[locale]/(protected)/contributor/content/audio-visual/components/table-video.tsx rename to app/[locale]/(protected)/contributor/content/video/components/table-video.tsx diff --git a/app/[locale]/(protected)/contributor/content/audio-visual/create/page.tsx b/app/[locale]/(protected)/contributor/content/video/create/page.tsx similarity index 100% rename from app/[locale]/(protected)/contributor/content/audio-visual/create/page.tsx rename to app/[locale]/(protected)/contributor/content/video/create/page.tsx diff --git a/app/[locale]/(protected)/contributor/content/audio-visual/layout.tsx b/app/[locale]/(protected)/contributor/content/video/layout.tsx similarity index 100% rename from app/[locale]/(protected)/contributor/content/audio-visual/layout.tsx rename to app/[locale]/(protected)/contributor/content/video/layout.tsx diff --git a/app/[locale]/(protected)/contributor/content/audio-visual/page.tsx b/app/[locale]/(protected)/contributor/content/video/page.tsx similarity index 100% rename from app/[locale]/(protected)/contributor/content/audio-visual/page.tsx rename to app/[locale]/(protected)/contributor/content/video/page.tsx diff --git a/app/[locale]/(protected)/contributor/planning/mediahub/page.tsx b/app/[locale]/(protected)/contributor/planning/mediahub/page.tsx index 78696d28..dbc37e38 100644 --- a/app/[locale]/(protected)/contributor/planning/mediahub/page.tsx +++ b/app/[locale]/(protected)/contributor/planning/mediahub/page.tsx @@ -4,7 +4,6 @@ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { UploadIcon } from "lucide-react"; import TaskTable from "../../task/components/task-table"; import MediahubTable from "./components/mediahub-table"; -import TicketingTable from "../../ticketing/components/table"; const MediahubPage = async () => { return ( diff --git a/app/[locale]/(protected)/contributor/planning/medsos-mediahub/page.tsx b/app/[locale]/(protected)/contributor/planning/medsos-mediahub/page.tsx index 1107fb0d..e30eb803 100644 --- a/app/[locale]/(protected)/contributor/planning/medsos-mediahub/page.tsx +++ b/app/[locale]/(protected)/contributor/planning/medsos-mediahub/page.tsx @@ -1,7 +1,6 @@ import SiteBreadcrumb from "@/components/site-breadcrumb"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import MedsosTable from "./components/medsos-table"; -import TicketingTable from "../../ticketing/components/table"; const MedsosMediahubPage = async () => { return ( diff --git a/app/[locale]/(protected)/contributor/schedule/press-conference/create/page.tsx b/app/[locale]/(protected)/contributor/schedule/press-conference/create/page.tsx index 5da19f92..388c321c 100644 --- a/app/[locale]/(protected)/contributor/schedule/press-conference/create/page.tsx +++ b/app/[locale]/(protected)/contributor/schedule/press-conference/create/page.tsx @@ -3,7 +3,7 @@ import SiteBreadcrumb from "@/components/site-breadcrumb"; import FormTask from "@/components/form/task/task-form"; import FormPressConference from "@/components/form/schedule/press-conference-form"; -const PressConCreatePage = async () => { +const PressConCreatePage = () => { return (
diff --git a/app/[locale]/(protected)/contributor/schedule/press-conference/detail/[id]/page.tsx b/app/[locale]/(protected)/contributor/schedule/press-conference/detail/[id]/page.tsx index fb904a27..f7c5fc34 100644 --- a/app/[locale]/(protected)/contributor/schedule/press-conference/detail/[id]/page.tsx +++ b/app/[locale]/(protected)/contributor/schedule/press-conference/detail/[id]/page.tsx @@ -7,7 +7,7 @@ import FormDetailPressConference from "@/components/form/schedule/press-conferen import { useParams } from "next/navigation"; import { id } from "date-fns/locale"; -const PressConDetailPage = async () => { +const PressConDetailPage = () => { const params = useParams(); const id = params?.id; return ( diff --git a/app/[locale]/(protected)/contributor/schedule/press-release/create/page.tsx b/app/[locale]/(protected)/contributor/schedule/press-release/create/page.tsx index fe24fb7b..767af43f 100644 --- a/app/[locale]/(protected)/contributor/schedule/press-release/create/page.tsx +++ b/app/[locale]/(protected)/contributor/schedule/press-release/create/page.tsx @@ -4,7 +4,7 @@ import FormTask from "@/components/form/task/task-form"; import FormPressConference from "@/components/form/schedule/press-conference-form"; import FormPressRelease from "@/components/form/schedule/pers-release-form"; -const PressReleaseCreatePage = async () => { +const PressReleaseCreatePage = () => { return (
diff --git a/app/[locale]/(protected)/contributor/task/create/page.tsx b/app/[locale]/(protected)/contributor/task/create/page.tsx index 8531305f..2897575a 100644 --- a/app/[locale]/(protected)/contributor/task/create/page.tsx +++ b/app/[locale]/(protected)/contributor/task/create/page.tsx @@ -2,7 +2,7 @@ import { Card, CardContent } from "@/components/ui/card"; import SiteBreadcrumb from "@/components/site-breadcrumb"; import FormTask from "@/components/form/task/task-form"; -const TaskCreatePage = async () => { +const TaskCreatePage = () => { return (
diff --git a/app/[locale]/(protected)/shared/communication/collaboration/create/page.tsx b/app/[locale]/(protected)/shared/communication/collaboration/create/page.tsx index 9c51de4c..259779ac 100644 --- a/app/[locale]/(protected)/shared/communication/collaboration/create/page.tsx +++ b/app/[locale]/(protected)/shared/communication/collaboration/create/page.tsx @@ -1,8 +1,7 @@ import SiteBreadcrumb from "@/components/site-breadcrumb"; -import FormInternal from "@/components/form/communication/internal-form"; import FormCollaboration from "@/components/form/communication/collaboration-form"; -const CollaborationCreatePage = async () => { +const CollaborationCreatePage = () => { return (
diff --git a/app/[locale]/(protected)/shared/communication/internal/create/page.tsx b/app/[locale]/(protected)/shared/communication/internal/create/page.tsx index ddb27415..b66787ed 100644 --- a/app/[locale]/(protected)/shared/communication/internal/create/page.tsx +++ b/app/[locale]/(protected)/shared/communication/internal/create/page.tsx @@ -1,7 +1,7 @@ import SiteBreadcrumb from "@/components/site-breadcrumb"; import FormInternal from "@/components/form/communication/internal-form"; -const InternalCreatePage = async () => { +const InternalCreatePage = () => { return (
diff --git a/app/[locale]/(protected)/shared/communication/page.tsx b/app/[locale]/(protected)/shared/communication/page.tsx index 9a98b41f..2a542701 100644 --- a/app/[locale]/(protected)/shared/communication/page.tsx +++ b/app/[locale]/(protected)/shared/communication/page.tsx @@ -1,5 +1,3 @@ -import { StatisticsBlock } from "@/components/blocks/statistics-block"; -import DashboardDropdown from "@/components/dashboard-dropdown"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import InternalTable from "./internal/components/internal-table"; @@ -8,7 +6,7 @@ import SiteBreadcrumb from "@/components/site-breadcrumb"; import CollaborationTable from "./collaboration/components/collabroation-table"; import EscalationTable from "./escalation/table-escalation/escalation-table"; -const CommunicationPage = async () => { +const CommunicationPage = () => { return (
diff --git a/app/[locale]/(protected)/shared/contest/page.tsx b/app/[locale]/(protected)/shared/contest/page.tsx index db520189..da967231 100644 --- a/app/[locale]/(protected)/shared/contest/page.tsx +++ b/app/[locale]/(protected)/shared/contest/page.tsx @@ -1,11 +1,8 @@ import SiteBreadcrumb from "@/components/site-breadcrumb"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; -import { UploadIcon } from "lucide-react"; -import PressReleaseTable from "../schedule/press-conference/components/presscon-table"; -import { Button } from "@/components/ui/button"; import ContestTable from "./components/contest-table"; -const ContestPage = async () => { +const ContestPage = () => { return (
diff --git a/app/[locale]/(protected)/shared/curated-content/page.tsx b/app/[locale]/(protected)/shared/curated-content/page.tsx index ef4a069e..5509506b 100644 --- a/app/[locale]/(protected)/shared/curated-content/page.tsx +++ b/app/[locale]/(protected)/shared/curated-content/page.tsx @@ -26,7 +26,7 @@ import ImageSliderPage from "./giat-routine/image"; import TeksSliderPage from "./giat-routine/teks"; import ContestTable from "../contest/components/contest-table"; -const CuratedContentPage = async () => { +const CuratedContentPage = () => { return (
diff --git a/app/[locale]/(public)/video/filter/page.tsx b/app/[locale]/(public)/video/filter/page.tsx index 36f5b145..d4835e28 100644 --- a/app/[locale]/(public)/video/filter/page.tsx +++ b/app/[locale]/(public)/video/filter/page.tsx @@ -4,7 +4,7 @@ import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, Pagi import { Card, CardContent } from "@/components/ui/card"; import { Checkbox } from "@/components/ui/checkbox"; import { Icon } from "@iconify/react/dist/iconify.js"; -import { getListContent, getVideoData } from "@/service/landing/landing"; +import { getListContent } from "@/service/landing/landing"; import { formatDateToIndonesian } from "@/utils/globals"; const dummyImage = [ diff --git a/components/partials/footer/index.tsx b/components/partials/footer/index.tsx index 4d54d40f..c55c1e85 100644 --- a/components/partials/footer/index.tsx +++ b/components/partials/footer/index.tsx @@ -1,3 +1,5 @@ +"use client" + import React from 'react' import FooterContent from './footer-content' import { Link } from "@/components/navigation" @@ -5,8 +7,15 @@ import Image from 'next/image' import { Icon } from "@/components/ui/icon"; import { auth } from '@/lib/auth' -const DashCodeFooter = async () => { - const session = await auth() +const DashCodeFooter = () => { + + const [session, setSession] = React.useState(); + + const initSession = async () => { + const ses = await auth(); + setSession(ses); + } + return (
diff --git a/components/partials/header/index.tsx b/components/partials/header/index.tsx index 8f6314a6..7ad108a1 100644 --- a/components/partials/header/index.tsx +++ b/components/partials/header/index.tsx @@ -1,3 +1,5 @@ +"use client" + import React from "react"; import HeaderContent from "./header-content"; import HeaderSearch from "./header-search"; @@ -12,7 +14,7 @@ import HorizontalMenu from "./horizontal-menu"; import LocalSwitcher from "./locale-switcher"; import HeaderLogo from "./header-logo"; -const DashCodeHeader = async () => { +const DashCodeHeader = () => { return ( <> diff --git a/components/partials/header/profile-info.tsx b/components/partials/header/profile-info.tsx index 097272f5..66e48c8f 100644 --- a/components/partials/header/profile-info.tsx +++ b/components/partials/header/profile-info.tsx @@ -15,10 +15,16 @@ import { Icon } from "@/components/ui/icon"; import { signOut, auth } from "@/lib/auth"; import Image from "next/image"; import { Link } from "@/i18n/routing"; -import { Button } from "@/components/ui/button"; +import React from "react"; -const ProfileInfo = async () => { - const session = await auth(); +const ProfileInfo = () => { + + const [session, setSession] = React.useState(); + + const initSession = async () => { + const ses = await auth(); + setSession(ses); + } return (
diff --git a/service/landing/landing.ts b/service/landing/landing.ts index 2456d914..a4c33b24 100644 --- a/service/landing/landing.ts +++ b/service/landing/landing.ts @@ -8,9 +8,9 @@ export async function getCategoryData() { return await httpGetInterceptor(`media/categories/list/publish?enablePage=1&sort=desc&sortBy=updatedAt&size=12&type=`); } -export async function getListContent(data: { sortBy: string; contentTypeId: string; size: number; page: number }) { +export async function getListContent(props: any) { return await httpGetInterceptor( - `media/public/list?enablePage=1&sort=desc&sortBy=${data.sortBy}&size=${data.size}&page=${data.page}&typeId=${data.contentTypeId}&title=&categoryId=&fileFormats=&tags=&group=&startDate=&endDate=&month=&year=` + `media/public/list?enablePage=1&sort=desc&sortBy=${props.sortBy}&size=${props.size}&page=${props.page}&typeId=${props.contentTypeId}&title=&categoryId=&fileFormats=&tags=&group=&startDate=&endDate=&month=&year=` ); } From 0818be62d0f11654622921fc6c17f9740325b1a9 Mon Sep 17 00:00:00 2001 From: sabdayagra Date: Fri, 13 Dec 2024 21:33:59 +0700 Subject: [PATCH 7/7] add data api in detail content --- .../(public)/image/detail/[slug]/page.tsx | 207 +++-------------- app/[locale]/(public)/indeks/page.tsx | 140 ++++++----- app/[locale]/(public)/schedule/page.tsx | 30 +-- .../(public)/video/detail/[slug]/page.tsx | 218 ++---------------- components/landing-page/content-category.tsx | 36 ++- components/landing-page/navbar.tsx | 96 +++++++- components/landing-page/navigation-menu.tsx | 143 ++++++++++++ components/landing-page/new-content.tsx | 13 +- package-lock.json | 161 +++++-------- package.json | 1 + service/landing/landing.ts | 4 + service/schedule/schedule.ts | 13 +- utils/video-player.tsx | 29 +++ 13 files changed, 513 insertions(+), 578 deletions(-) create mode 100644 components/landing-page/navigation-menu.tsx create mode 100644 utils/video-player.tsx diff --git a/app/[locale]/(public)/image/detail/[slug]/page.tsx b/app/[locale]/(public)/image/detail/[slug]/page.tsx index fcc00b66..444b198f 100644 --- a/app/[locale]/(public)/image/detail/[slug]/page.tsx +++ b/app/[locale]/(public)/image/detail/[slug]/page.tsx @@ -5,9 +5,11 @@ import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { Textarea } from "@/components/ui/textarea"; import Link from "next/link"; import { useParams, usePathname, useRouter } from "next/navigation"; -import React, { useState } from "react"; +import React, { useEffect, useState } from "react"; import { Icon } from "@iconify/react/dist/iconify.js"; import { textEllipsis } from "@/utils/globals"; +import { getDetail } from "@/service/landing/landing"; +import NewContent from "@/components/landing-page/new-content"; const dummyImage = [ { id: 1, thumbnail: "/assets/banner-sample.png" }, @@ -55,7 +57,19 @@ const DetailInfo = () => { const router = useRouter(); const pathname = usePathname(); const params = useParams(); - const locale = params?.locale; + const slug = params?.slug; + const [detailDataImage, setDetailDataImage] = useState(); + const [selectedImage, setSelectedImage] = useState(0); + + useEffect(() => { + initFetch(); + }, []); + + const initFetch = async () => { + const response = await getDetail(String(slug)); + console.log("detailImage", response); + setDetailDataImage(response?.data?.data); + }; const sizes = [ { label: "XL", value: "3198 x 1798 px" }, @@ -73,19 +87,16 @@ const DetailInfo = () => {
{/* Gambar Utama */}
- Main + Main
- {/* Thumbnail */} + {/* Gambar bawah Kecil */}
- {[1, 2, 3, 4].map((_, index) => ( - {`Thumbnail + {detailDataImage?.files?.map((file: any, index: number) => ( + setSelectedImage(index)} key={file?.id}> + + ))}
@@ -102,12 +113,13 @@ const DetailInfo = () => {
- OPS MANTAP PRAJA & PILKADA 2024 + {detailDataImage?.category?.name}
-

poldajabar

-

pilkadamai2024

+ {detailDataImage?.tags?.split(",").map((tag: string) => ( +

{tag}

+ ))}
@@ -122,7 +134,7 @@ const DetailInfo = () => { ))} @@ -149,15 +161,16 @@ const DetailInfo = () => { {/* Footer Informasi */}

- oleh {dummyData.createdBy} | Diupdate pada {dummyData.createdAt} {dummyData.time} WIB | 👁️ 65 + oleh {detailDataImage?.uploadedBy?.userLevel?.name} | Diupdate pada {detailDataImage?.updatedAt} WIB | {" "} + {detailDataImage?.clickCount}

-

Kreator: poppy-PID-poldajabar

+

Kreator: {detailDataImage?.creatorName}

{/* Keterangan */}
-

{dummyData.title}

-
+

{detailDataImage?.title}

+
{/* Comment */} @@ -168,160 +181,8 @@ const DetailInfo = () => {
{/* Konten Serupa */} -
-
-
-

- Konten Terbaru -

- - - - Audio Visual - - - Audio - - - Foto - - - Teks - - - -
-
-
-
- - LIHAT SEMUA - -
+
+
); diff --git a/app/[locale]/(public)/indeks/page.tsx b/app/[locale]/(public)/indeks/page.tsx index f1f2854f..ef42eae2 100644 --- a/app/[locale]/(public)/indeks/page.tsx +++ b/app/[locale]/(public)/indeks/page.tsx @@ -2,6 +2,7 @@ import { getIndeksData } from "@/service/landing/landing"; import { formatDateToIndonesian } from "@/utils/globals"; +import { Lectern } from "lucide-react"; import Link from "next/link"; import { usePathname } from "next/navigation"; import React, { useEffect, useState } from "react"; @@ -9,6 +10,20 @@ import React, { useEffect, useState } from "react"; const Indeks: React.FC = () => { const pathname = usePathname(); const [indeksData, setIndeksData] = useState(); + const [currentImageIndex, setCurrentImageIndex] = useState(0); + let count: number = 0; + useEffect(() => { + if (indeksData) { + const intervalId = setInterval(() => { + // const asal = currentImageIndex + 1; + // setCurrentImageIndex(asal); + count = (count + 1) % indeksData.length; + }, 5000); + + return () => clearInterval(intervalId); + } + }, [indeksData]); + useEffect(() => { initFetch(); }, []); @@ -23,72 +38,81 @@ const Indeks: React.FC = () => { {/* Hero Left */}
- {indeksData?.map((indeks: any) => ( -
- image -
- {indeks?.categoryName} - -

{indeks?.title}

- -

- {formatDateToIndonesian(new Date(indeks?.createdAt))} {indeks?.timezone ? indeks?.timezone : "WIB"}|{" "} - - - {" "} - {indeks?.clickCount} -

-
-
- ))} + {indeksData?.map( + (indeks: any, index: number) => + index == count && ( +
+ image +
+ {indeks?.categoryName} + +

{indeks?.title}

+ +

+ {formatDateToIndonesian(new Date(indeks?.createdAt))} {indeks?.timezone ? indeks?.timezone : "WIB"}|{" "} + + + {" "} + {indeks?.clickCount} +

+
+
+ ) + )}
{/* Hero Right */} - {/*
- {indeksData?.map((indeksRight: any) => ( -
- image -
- {indeksRight?.categoryName} - -

{indeksRight?.title}

- -

- {formatDateToIndonesian(new Date(indeksRight?.createdAt))} {indeksRight?.timezone ? indeksRight?.timezone : "WIB"}|{" "} - - - {" "} - {indeksRight?.clickCount} -

-
-
- ))} -
*/} +
+ {indeksData?.map( + (indeksRight: any, index: number) => + (index == count + 1 || index == count + 2) && ( +
+ image +
+ {indeksRight?.categoryName} + +

{indeksRight?.title}

+ +

+ {formatDateToIndonesian(new Date(indeksRight?.createdAt))} {indeksRight?.timezone ? indeksRight?.timezone : "WIB"}|{" "} + + + {" "} + {indeksRight?.clickCount} +

+
+
+ ) + )} +
{/* Bottom */} - {/*
+
- {indeksData?.map((indeksBottom: any) => ( -
- -
-

{indeksBottom?.date}

- - {indeksBottom?.title} - -

{indeksBottom?.description}

-
-
- ))} + {indeksData?.map( + (indeksBottom: any, index: number) => + index < 3 && ( +
+ +
+

{indeksBottom?.date}

+ + {indeksBottom?.title} + +

{indeksBottom?.description}

+
+
+ ) + )}
-
*/} +
); }; diff --git a/app/[locale]/(public)/schedule/page.tsx b/app/[locale]/(public)/schedule/page.tsx index 371a1fce..d828c38b 100644 --- a/app/[locale]/(public)/schedule/page.tsx +++ b/app/[locale]/(public)/schedule/page.tsx @@ -286,35 +286,35 @@ const Schedule = () => { Time Table - +
changePrevWeek()}> {" "} -
-

{dateAWeek[0]?.split("-")[2]}

+
+

{dateAWeek[0]?.split("-")[2]}

Monday

- -
{dateAWeek[1]?.split("-")[2]}
Tuesday + +
{dateAWeek[1]?.split("-")[2]}
Tuesday - -
{dateAWeek[2]?.split("-")[2]}
Wednesday + +
{dateAWeek[2]?.split("-")[2]}
Wednesday - -
{dateAWeek[3]?.split("-")[2]}
Thursday + +
{dateAWeek[3]?.split("-")[2]}
Thursday - -
{dateAWeek[4]?.split("-")[2]}
Friday + +
{dateAWeek[4]?.split("-")[2]}
Friday - -
{dateAWeek[5]?.split("-")[2]}
Saturday + +
{dateAWeek[5]?.split("-")[2]}
Saturday - +
-

{dateAWeek[6]?.split("-")[2]}

+

{dateAWeek[6]?.split("-")[2]}

Sunday

changeNextWeek()} className="cursor-pointer h-fit p-0 m-0 self-center"> diff --git a/app/[locale]/(public)/video/detail/[slug]/page.tsx b/app/[locale]/(public)/video/detail/[slug]/page.tsx index 9c135339..5d2dbb28 100644 --- a/app/[locale]/(public)/video/detail/[slug]/page.tsx +++ b/app/[locale]/(public)/video/detail/[slug]/page.tsx @@ -5,28 +5,12 @@ import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { Textarea } from "@/components/ui/textarea"; import Link from "next/link"; import { useParams, usePathname, useRouter } from "next/navigation"; -import React, { useState } from "react"; +import React, { useEffect, useState } from "react"; import { Icon } from "@iconify/react/dist/iconify.js"; import { textEllipsis } from "@/utils/globals"; - -const dummyImage = [ - { id: 1, thumbnail: "/assets/banner-sample.png" }, - { id: 2, thumbnail: "https://mediahub.polri.go.id/api/media/categories/view-thumbnail?id=125¤tMilis=1732769540018" }, - { id: 3, thumbnail: "https://mediahub.polri.go.id/api/media/categories/view-thumbnail?id=128¤tMilis=1732769540018" }, - { id: 4, thumbnail: "https://mediahub.polri.go.id/api/media/categories/view-thumbnail?id=127¤tMilis=1732769540018" }, - { id: 5, thumbnail: "https://mediahub.polri.go.id/api/media/categories/view-thumbnail?id=93¤tMilis=1732769540018" }, -]; - -const dummyData = { - id: 12312, - title: "TITLE", - createdBy: "Mabes", - createdAt: "21-21-2021", - time: "18:23", - desc: "sdaasd", - htmlDescription: - '

Polres Kobar - Polres Kotawaringin Barat (Kobar) memberikan bantuan sosial kepada warga yang berada di Daerah Aliran Sungai (DAS) Arut khususnya yang terdampak banjir, Sabtu (30/11/2024) pagi.

Kapolda Kalteng Irjen Pol Drs. Djoko Poerwanto melalui Kapolres Kobar AKBP Yusfandi Usman, S.I.K., M.I.K., menjelaskan bahwa pihaknya membagikan 200 paket sembako sebagai bentuk kepedulian kepada masyarakat.

"Saya bersama personel turun langsung membagikan bantuan berupa paket sembako yang diserahkan kepada masyarakat sekaligus monitoring ke lokasi pinggiran sungai yang mulai sebagain terdampak banjir akibat curah hujan tinggi,” ungkap Kapolres.

Lebih lanjut, orang nomor satu di Polres Kobar ini, mengungkapkan kegiatan tersebut dilakukan dalam rangka tanggap waspada dan antisipasi bencana banjir di wilayah Kabupaten Kobar.

“Kami minta masyarakat tetap waspada banjir menyikapi cuaca yang berubah-ubah saat ini, tidak menutup kemungkinan bertambahnya volume air sungai, jika diguyur hujan terus menerus,” jelasnya.

', -}; +import { getDetail } from "@/service/landing/landing"; +import VideoPlayer from "@/utils/video-player"; +import NewContent from "@/components/landing-page/new-content"; const dummyImageContent = [ { id: 1, thumbnail: "/assets/banner-sample.png", date: "17 MEI 2024", title: "Kapolres Batam Berikan pengarahan pagi kepada para anggota dan staf yang terkait", time: "18.00 WIB" }, @@ -55,7 +39,18 @@ const DetailVideo = () => { const router = useRouter(); const pathname = usePathname(); const params = useParams(); - const locale = params?.locale; + const slug = params?.slug; + const [detailDataVideo, setDetailDataVideo] = useState(); + + useEffect(() => { + initFetch(); + }, []); + + const initFetch = async () => { + const response = await getDetail(String(slug)); + console.log("detailVideo", response); + setDetailDataVideo(response?.data?.data); + }; const sizes = [ { label: "XL", value: "3198 x 1798 px" }, @@ -73,21 +68,9 @@ const DetailVideo = () => {
{/* Gambar Utama */}
- Main +
- - {/* Thumbnail */} -
- {[1, 2, 3, 4].map((_, index) => ( - {`Thumbnail - ))} -
{/* Bagian Kanan */} @@ -102,7 +85,7 @@ const DetailVideo = () => {
- OPS MANTAP PRAJA & PILKADA 2024 + {detailDataVideo?.category?.name}
@@ -149,15 +132,16 @@ const DetailVideo = () => { {/* Footer Informasi */}

- oleh {dummyData.createdBy} | Diupdate pada {dummyData.createdAt} {dummyData.time} WIB | 👁️ 65 + oleh {detailDataVideo?.uploadedBy?.userLevel?.name} | Diupdate pada {detailDataVideo?.updatedAt} WIB | {" "} + {detailDataVideo?.clickCount}

-

Kreator: poppy-PID-poldajabar

+

Kreator: {detailDataVideo?.creatorName}

{/* Keterangan */}
-

{dummyData.title}

-
+

{detailDataVideo?.title}

+
{/* Comment */} @@ -168,160 +152,8 @@ const DetailVideo = () => {
{/* Konten Serupa */} -
-
-
-

- Konten Terbaru -

- - - - Audio Visual - - - Audio - - - Foto - - - Teks - - - -
-
-
-
- - LIHAT SEMUA - -
+
+
); diff --git a/components/landing-page/content-category.tsx b/components/landing-page/content-category.tsx index 97b37c80..32de0068 100644 --- a/components/landing-page/content-category.tsx +++ b/components/landing-page/content-category.tsx @@ -1,6 +1,7 @@ import { getCategoryData } from "@/service/landing/landing"; import Link from "next/link"; import React, { useEffect, useState } from "react"; +import { Button } from "../ui/button"; const ContentCategory = () => { const [categories, setCategories] = useState(); @@ -24,19 +25,32 @@ const ContentCategory = () => {
- {categories?.map((category: any) => ( - - -
-

{category?.name}

-
- - ))} + {categories?.map((category: any, index: number) => + !seeAllValue ? ( + index < 8 ? ( + + +
+

{category?.name}

+
+ + ) : ( + "" + ) + ) : ( + + +
+

{category?.name}

+
+ + ) + )}
- - LIHAT SEMUA - +
); diff --git a/components/landing-page/navbar.tsx b/components/landing-page/navbar.tsx index ee6bd654..1d44516f 100644 --- a/components/landing-page/navbar.tsx +++ b/components/landing-page/navbar.tsx @@ -7,6 +7,8 @@ import { FiFile, FiImage, FiMusic, FiYoutube } from "react-icons/fi"; import { useParams, usePathname, useRouter } from "next/navigation"; import { generateLocalizedPath } from "@/utils/globals"; import { Link } from "@/i18n/routing"; +import { cn } from "@/lib/utils"; +import { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, navigationMenuTriggerStyle } from "@/components/ui/navigation-menu"; const Navbar = () => { const [menuOpen, setMenuOpen] = useState(false); @@ -24,7 +26,7 @@ const Navbar = () => { return (
-
+
{/* Logo */} Media Hub Logo @@ -45,7 +47,7 @@ const Navbar = () => { {/* Desktop Navigation */}
- + {/* @@ -86,8 +88,86 @@ const Navbar = () => { - - + */} + + {/* Nav Menu */} + + + + + + + + + Konten + + + + router.push(generateLocalizedPath("/video/filter", String(locale)))} className="flex items-start gap-1.5 p-2 hover:bg-white"> + + + Video + + + router.push(generateLocalizedPath("/audio/filter", String(locale)))} className="flex place-items-start gap-1.5 p-2 hover:bg-white"> + + + Audio + + + router.push(generateLocalizedPath("/image/filter", String(locale)))} className="flex place-items-start gap-1.5 p-2 hover:bg-white"> + + + Foto + + + router.push(generateLocalizedPath("/document/filter", String(locale)))} className="flex place-items-start gap-1.5 p-2 hover:bg-white"> + + + Teks + + + + + + + + + + + + + Jadwal + + + + + + + + + + + + Indeks + + + + + + + {/* { Jadwal - + */} + {/* @@ -109,7 +190,7 @@ const Navbar = () => { Jadwal */} - + {/* { Indeks - + */} Live @@ -131,6 +212,7 @@ const Navbar = () => {
+
{/* Tombol Utama */}