114 lines
3.7 KiB
TypeScript
114 lines
3.7 KiB
TypeScript
|
|
"use client";
|
||
|
|
import SiteBreadcrumb from "@/components/site-breadcrumb";
|
||
|
|
import {
|
||
|
|
Accordion,
|
||
|
|
AccordionContent,
|
||
|
|
AccordionItem,
|
||
|
|
AccordionTrigger,
|
||
|
|
} from "@/components/ui/accordion";
|
||
|
|
import { useState } from "react";
|
||
|
|
import { addDays, format } from "date-fns";
|
||
|
|
import { Calendar as CalendarIcon } from "lucide-react";
|
||
|
|
import { DateRange } from "react-day-picker";
|
||
|
|
|
||
|
|
import { cn } from "@/lib/utils";
|
||
|
|
import { Button } from "@/components/ui/button";
|
||
|
|
import { Calendar } from "@/components/ui/calendar";
|
||
|
|
import {
|
||
|
|
Popover,
|
||
|
|
PopoverContent,
|
||
|
|
PopoverTrigger,
|
||
|
|
} from "@/components/ui/popover";
|
||
|
|
|
||
|
|
const users = [
|
||
|
|
{ id: 1, name: "POLRI" },
|
||
|
|
{ id: 2, name: "JURNALIS" },
|
||
|
|
];
|
||
|
|
|
||
|
|
export default function FeedbackCenter() {
|
||
|
|
const [startDate, setStartDate] = useState<any>(new Date());
|
||
|
|
const [endDate, setEndDate] = useState<any>(new Date());
|
||
|
|
|
||
|
|
return (
|
||
|
|
<div>
|
||
|
|
<SiteBreadcrumb />
|
||
|
|
<div className="flex flex-col gap-3">
|
||
|
|
<Accordion
|
||
|
|
id="feedback-center"
|
||
|
|
type="single"
|
||
|
|
collapsible
|
||
|
|
className="w-full"
|
||
|
|
>
|
||
|
|
<AccordionItem value="item-1" className="bg-white w-full">
|
||
|
|
<AccordionTrigger className="bg-white">
|
||
|
|
TICKET PADA FEEDBACK CENTER{" "}
|
||
|
|
</AccordionTrigger>
|
||
|
|
<AccordionContent>
|
||
|
|
<div className="flex flex-row gap-3">
|
||
|
|
<div className="flex flex-col">
|
||
|
|
<p>Tanggal Mulai</p>
|
||
|
|
<Popover>
|
||
|
|
<PopoverTrigger asChild>
|
||
|
|
<Button
|
||
|
|
variant={"outline"}
|
||
|
|
className={cn(
|
||
|
|
"w-[280px] justify-start text-left font-normal",
|
||
|
|
!startDate && "text-muted-foreground"
|
||
|
|
)}
|
||
|
|
>
|
||
|
|
<CalendarIcon />
|
||
|
|
{startDate ? (
|
||
|
|
format(startDate, "PPP")
|
||
|
|
) : (
|
||
|
|
<span>Pick a date</span>
|
||
|
|
)}
|
||
|
|
</Button>
|
||
|
|
</PopoverTrigger>
|
||
|
|
<PopoverContent className="w-auto p-0">
|
||
|
|
<Calendar
|
||
|
|
mode="single"
|
||
|
|
selected={startDate}
|
||
|
|
onSelect={setStartDate}
|
||
|
|
initialFocus
|
||
|
|
/>
|
||
|
|
</PopoverContent>
|
||
|
|
</Popover>
|
||
|
|
</div>
|
||
|
|
<div className="flex flex-col">
|
||
|
|
<p>Tanggal Mulai</p>
|
||
|
|
<Popover>
|
||
|
|
<PopoverTrigger asChild>
|
||
|
|
<Button
|
||
|
|
variant={"outline"}
|
||
|
|
className={cn(
|
||
|
|
"w-[280px] justify-start text-left font-normal",
|
||
|
|
!startDate && "text-muted-foreground"
|
||
|
|
)}
|
||
|
|
>
|
||
|
|
<CalendarIcon />
|
||
|
|
{startDate ? (
|
||
|
|
format(startDate, "PPP")
|
||
|
|
) : (
|
||
|
|
<span>Pick a date</span>
|
||
|
|
)}
|
||
|
|
</Button>
|
||
|
|
</PopoverTrigger>
|
||
|
|
<PopoverContent className="w-auto p-0">
|
||
|
|
<Calendar
|
||
|
|
mode="single"
|
||
|
|
selected={endDate}
|
||
|
|
onSelect={setEndDate}
|
||
|
|
initialFocus
|
||
|
|
/>
|
||
|
|
</PopoverContent>
|
||
|
|
</Popover>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</AccordionContent>
|
||
|
|
</AccordionItem>
|
||
|
|
</Accordion>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
);
|
||
|
|
}
|