diff --git a/app/(root)/page.tsx b/app/(root)/page.tsx new file mode 100644 index 00000000..5c618e91 --- /dev/null +++ b/app/(root)/page.tsx @@ -0,0 +1,7 @@ +import React from "react"; + +const page = () => { + return
ppp
; +}; + +export default page; diff --git a/app/[locale]/(protected)/blog/table-blog/blog-table.tsx b/app/[locale]/(protected)/blog/table-blog/blog-table.tsx index 9a0426a8..210931e0 100644 --- a/app/[locale]/(protected)/blog/table-blog/blog-table.tsx +++ b/app/[locale]/(protected)/blog/table-blog/blog-table.tsx @@ -165,11 +165,11 @@ const BlogTable = () => { React.useState({}); const [rowSelection, setRowSelection] = React.useState({}); const [pagination, setPagination] = React.useState({ - pageIndex: 0, // Halaman pertama - pageSize: 10, // Jumlah baris per halaman + pageIndex: 0, + pageSize: 10, }); - const [page, setPage] = React.useState(1); // Halaman aktif - const [totalPage, setTotalPage] = React.useState(1); // Total halaman + const [page, setPage] = React.useState(1); + const [totalPage, setTotalPage] = React.useState(1); const [limit, setLimit] = React.useState(10); const table = useReactTable({ @@ -201,7 +201,7 @@ const BlogTable = () => { try { const res = await paginationBlog(limit, page); const data = res.data.data.content.map((item: any, index: number) => ({ - no: (page - 1) * limit + index + 1, // Hitung nomor urut + no: (page - 1) * limit + index + 1, title: item.title, categoryName: item.categoryName, tags: item.tags, @@ -211,7 +211,7 @@ const BlogTable = () => { })); setBlogTable(data); - setTotalPage(res.data.totalPages); // Total halaman + setTotalPage(res.data.totalPages); } catch (error) { console.error("Error fetching tasks:", error); } diff --git a/app/[locale]/(protected)/content/image/table-image/index.tsx b/app/[locale]/(protected)/content/image/table-image/index.tsx index ec5cc934..ef80c67a 100644 --- a/app/[locale]/(protected)/content/image/table-image/index.tsx +++ b/app/[locale]/(protected)/content/image/table-image/index.tsx @@ -268,7 +268,7 @@ const TableImage = () => { endDateString ); const data = res.data.data.content.map((item: any, index: number) => ({ - no: (page - 1) * limit + index + 1, // Hitung nomor urut + no: (page - 1) * limit + index + 1, title: item.title, categoryName: item.categoryName, creatorGroup: item.creatorGroup, @@ -281,7 +281,7 @@ const TableImage = () => { })); setImageTable(data); - setTotalPage(res.data.totalPages); // Total halaman + setTotalPage(res.data.totalPages); } catch (error) { console.error("Error fetching tasks:", error); } diff --git a/app/[locale]/(protected)/planning/mediahub/table-mediahub/mediahub-table.tsx b/app/[locale]/(protected)/planning/mediahub/table-mediahub/mediahub-table.tsx index 506ea04d..d1185740 100644 --- a/app/[locale]/(protected)/planning/mediahub/table-mediahub/mediahub-table.tsx +++ b/app/[locale]/(protected)/planning/mediahub/table-mediahub/mediahub-table.tsx @@ -156,12 +156,12 @@ const MediahubTable = () => { React.useState({}); const [rowSelection, setRowSelection] = React.useState({}); const [pagination, setPagination] = React.useState({ - pageIndex: 0, // Halaman pertama - pageSize: 10, // Jumlah baris per halaman + pageIndex: 0, + pageSize: 10, }); - const [page, setPage] = React.useState(1); // Halaman aktif - const [totalPage, setTotalPage] = React.useState(1); // Total halaman - const [limit, setLimit] = React.useState(10); // Jumlah baris per halaman + const [page, setPage] = React.useState(1); + const [totalPage, setTotalPage] = React.useState(1); + const [limit, setLimit] = React.useState(10); // const [search, setSearch] = React.useState(title); const table = useReactTable({ @@ -193,14 +193,14 @@ const MediahubTable = () => { try { const res = await getPlanningSentPagination(limit, page, 1); const data = res.data.data.content.map((item: any, index: number) => ({ - no: (page - 1) * limit + index + 1, // Hitung nomor urut + no: (page - 1) * limit + index + 1, title: item.title, createdAt: item.createdAt, isActive: item.isActive === true, })); setMediahubTable(data); - setTotalPage(res.data.totalPages); // Total halaman + setTotalPage(res.data.totalPages); } catch (error) { console.error("Error fetching tasks:", error); } diff --git a/app/[locale]/(protected)/planning/medsos-mediahub/table-medsos/medsos-table.tsx b/app/[locale]/(protected)/planning/medsos-mediahub/table-medsos/medsos-table.tsx index 89e53e08..14eda2a6 100644 --- a/app/[locale]/(protected)/planning/medsos-mediahub/table-medsos/medsos-table.tsx +++ b/app/[locale]/(protected)/planning/medsos-mediahub/table-medsos/medsos-table.tsx @@ -97,7 +97,7 @@ export const columns: ColumnDef[] = [ header: "Status", cell: ({ row }) => { const isActive = row.getValue("isActive"); - console.log("isActive value:", isActive); // TypeScript type is inferred correctly + console.log("isActive value:", isActive); return (
{isActive ? ( @@ -156,12 +156,12 @@ const MedsosTable = () => { React.useState({}); const [rowSelection, setRowSelection] = React.useState({}); const [pagination, setPagination] = React.useState({ - pageIndex: 0, // Halaman pertama - pageSize: 10, // Jumlah baris per halaman + pageIndex: 0, + pageSize: 10, }); - const [page, setPage] = React.useState(1); // Halaman aktif - const [totalPage, setTotalPage] = React.useState(1); // Total halaman - const [limit, setLimit] = React.useState(10); // Jumlah baris per halaman + const [page, setPage] = React.useState(1); + const [totalPage, setTotalPage] = React.useState(1); + const [limit, setLimit] = React.useState(10); // const [search, setSearch] = React.useState(title); const table = useReactTable({ @@ -193,14 +193,14 @@ const MedsosTable = () => { try { const res = await getPlanningSentPagination(limit, page, 2); const data = res.data.data.content.map((item: any, index: number) => ({ - no: (page - 1) * limit + index + 1, // Hitung nomor urut + no: (page - 1) * limit + index + 1, title: item.title, createdAt: item.createdAt, isActive: item.isActive === true, })); setMediahubTable(data); - setTotalPage(res.data.totalPages); // Total halaman + setTotalPage(res.data.totalPages); } catch (error) { console.error("Error fetching tasks:", error); } diff --git a/app/[locale]/(protected)/task/table-task/task-table.tsx b/app/[locale]/(protected)/task/table-task/task-table.tsx index b5a7ddee..80646b0d 100644 --- a/app/[locale]/(protected)/task/table-task/task-table.tsx +++ b/app/[locale]/(protected)/task/table-task/task-table.tsx @@ -197,12 +197,12 @@ const TaskTable = () => { React.useState({}); const [rowSelection, setRowSelection] = React.useState({}); const [pagination, setPagination] = React.useState({ - pageIndex: 0, // Halaman pertama - pageSize: 10, // Jumlah baris per halaman + pageIndex: 0, + pageSize: 10, }); - const [page, setPage] = React.useState(1); // Halaman aktif - const [totalPage, setTotalPage] = React.useState(1); // Total halaman - const [limit, setLimit] = React.useState(10); // Jumlah baris per halaman + const [page, setPage] = React.useState(1); + const [totalPage, setTotalPage] = React.useState(1); + const [limit, setLimit] = React.useState(10); const [search, setSearch] = React.useState(title); const table = useReactTable({ @@ -230,7 +230,7 @@ const TaskTable = () => { try { const res = await listTask(limit, page); const data = res.data.data.content.map((item: any, index: number) => ({ - no: (page - 1) * limit + index + 1, // Hitung nomor urut + no: (page - 1) * limit + index + 1, title: item.title, uniqueCode: item.uniqueCode || "-", assignmentMainType: item.assignmentMainType?.name || "-", @@ -240,7 +240,7 @@ const TaskTable = () => { })); setTaskTable(data); - setTotalPage(res.data.totalPages); // Total halaman + setTotalPage(res.data.totalPages); } catch (error) { console.error("Error fetching tasks:", error); } diff --git a/app/[locale]/(public)/audio/filter/page.tsx b/app/[locale]/(public)/audio/filter/page.tsx new file mode 100644 index 00000000..45a8e560 --- /dev/null +++ b/app/[locale]/(public)/audio/filter/page.tsx @@ -0,0 +1,183 @@ +"use client"; +import React, { 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" }, +]; + +const categories = [ + { id: 1, title: "HUT HUMAS KE - 73" }, + { id: 2, title: "OPERASI ZEBRA 2024" }, + { id: 3, title: "PON XXI" }, + { id: 4, title: "OPS LILIN NATARU 2024" }, + { id: 5, title: "HUT HUMAS KE - 72" }, + { id: 6, title: "OPS MANTAP PRAJA & PILKADA 2024" }, + { id: 6, title: "OPS KETUPAT 2024" }, + { id: 6, title: "OPS PATUH 2024" }, + { id: 6, title: "HARI JUANG POLRI" }, + { id: 6, title: "HUT RI KE-79" }, + { id: 6, title: "HARI BHAYANGKARA KE-78" }, +]; + +const formatAudio = [ + { id: 1, title: "WAV" }, + { id: 2, title: "MP3" }, +]; + +const FilterPage = () => { + return ( +
+ {/* Header */} +
+

+ {" "} + Audio {">"} Semua Audio +

+

|

+

Terdapat 32499 artikel berisi Audio yang dapat diunduh

+
+ {/* Left */} +
+ {/* Sidebar Kiri */} +
+

Filter

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

Kategori

+
    + {categories.map((category) => ( +
  • + +
  • + ))} +
+
+ {/* Garis */} +
+ {/* Garis */} +
+

Format Foto

+
    + {formatAudio.map((format) => ( +
  • + +
  • + ))} +
+
+
+
+ + {/* Konten Kanan */} +
+
+

Urutkan berdasarkan

+ +
+ {/* Card */} + +
+
+ + + + + + + 1 + + + + 2 + + + + 3 + + + + + + + + + +
+ ); +}; + +export default FilterPage; diff --git a/app/[locale]/(public)/audio/layout.tsx b/app/[locale]/(public)/audio/layout.tsx new file mode 100644 index 00000000..5eca8060 --- /dev/null +++ b/app/[locale]/(public)/audio/layout.tsx @@ -0,0 +1,22 @@ +import LayoutProvider from "@/providers/layout.provider"; +import LayoutContentProvider from "@/providers/content.provider"; +import DashCodeSidebar from "@/components/partials/sidebar"; +import DashCodeFooter from "@/components/partials/footer"; +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 Footer from "@/components/landing-page/footer"; + +const layout = async ({ children }: { children: React.ReactNode }) => { + return ( + <> + + {children} +