"use client"; import { useState } from "react"; import { format } from "date-fns"; import { Calendar } from "@/components/ui/calendar"; import { Popover, PopoverContent, PopoverTrigger, } from "@/components/ui/popover"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { CalendarIcon, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem, } from "@/components/ui/select"; import { Badge } from "@/components/ui/badge"; const scheduleData = [ { date: "Jul 1 2025", type: "POLRI", title: "HUT Bhayangkara RI - 79", location: "Mabes Polri, Jakarta, Indonesia", }, { date: "Jul 1 2025", type: "POLRI", title: "Hari Lahir Pancasila", location: "Mabes Polri, Jakarta, Indonesia", }, { date: "Jul 1 2025", type: "POLRI", title: "Pers Rilis Kasus", location: "Mabes Polri, Jakarta, Indonesia", }, { date: "Jul 1 2025", type: "POLRI", title: "Rapat Koordinasi HUT Bhayangkara RI - 79", location: "Mabes Polri, Jakarta, Indonesia", }, { date: "Jul 1 2025", type: "MPR", title: "Rapat PIMPINAN MPR RI", location: "Gedung MPR, Jakarta, Indonesia", }, { date: "Jul 1 2025", type: "DPR", title: "Rapat Anggota Komisi I", location: "Gedung DPR, Jakarta, Indonesia", }, { date: "Jul 1 2025", type: "MPR", title: "Sidang Paripurna", location: "Gedung MPR, Jakarta, Indonesia", }, { date: "Jul 1 2025", type: "KEJAKSAAN AGUNG", title: "Hari Lahir Pancasila", location: "Kejaksaan Agung, Jakarta, Indonesia", }, { date: "Jul 1 2025", type: "KPU", title: "Hari Lahir Pancasila", location: "Kantor KPU, Jakarta Indonesia", }, { date: "Jul 1 2025", type: "DPR", title: "Rapat Anggota Komisi II", location: "Gedung DPR, Jakarta, Indonesia", }, { date: "Jul 1 2025", type: "MPR", title: "Rapat DPR dan Basarnas", location: "Gedung MPR, Jakarta, Indonesia", }, { date: "Jul 1 2025", type: "BUMN", title: "Hari Lahir Pancasila", location: "Kantor BUMN, Jakarta Indonesia", }, { date: "Jul 1 2025", type: "BUMN", title: "Focus Group Discussion", location: "Kantor BUMN, Jakarta Indonesia", }, { date: "Jul 1 2025", type: "MPR", title: "Rapat Anggota MPR RI", location: "Gedung MPR, Jakarta, Indonesia", }, { date: "Jul 1 2025", type: "BUMN", title: "Seremoni Sinergi BUMN", location: "Kantor BUMN, Jakarta Indonesia", }, { date: "Jul 1 2025", type: "MPR", title: "Sumpah Janji Anggota MPR RI", location: "Gedung MPR, Jakarta, Indonesia", }, { date: "Jul 1 2025", type: "KPK", title: "Hari Lahir Pancasila", location: "Kantor KPK, Jakarta Indonesia", }, { date: "Jul 1 2025", type: "BUMN", title: "Monitoring dan Evaluasi Keterbukaan Informasi Publik Tahun 2025", location: "Kantor BUMN, Jakarta Indonesia", }, { date: "Jul 1 2025", type: "KEJAKSAAN AGUNG", title: "Hari Lahir Pancasila", location: "Kejaksaan Agung, Jakarta, Indonesia", }, { date: "Jul 2 2025", type: "MPR", title: "Monitoring dan Evaluasi Informasi MPR Tahun 2025", location: "Gedung MPR, Jakarta, Indonesia", }, ]; const categories = [ "SEMUA", "POLRI", "MAHKAMAH AGUNG", "DPR", "MPR", "KEJAKSAAN AGUNG", "KPK", "PUPR", "BSKDN", "BUMN", "KPU", ]; export default function Schedule() { const [search, setSearch] = useState(""); const [startDate, setStartDate] = useState( new Date("2025-07-01") ); const [endDate, setEndDate] = useState( new Date("2025-07-30") ); const [selectedCategory, setSelectedCategory] = useState("SEMUA"); const filteredData = scheduleData.filter((item) => { const matchesCategory = selectedCategory === "SEMUA" || item.type === selectedCategory; const matchesSearch = item.title .toLowerCase() .includes(search.toLowerCase()); return matchesCategory && matchesSearch; }); return (
{/* Filter Bar */}
setSearch(e.target.value)} /> {/* Tanggal Mulai */}
{/* Tanggal Selesai */}
{/* Publikasi */}
{/* Filter Chips */}
{categories.map((cat) => ( ))}
{/* Schedule Table */}

Semua Jadwal

{filteredData.map((item, index) => (
{item.date}
{item.type}
{item.title}
{item.location}
))}
); }