diff --git a/app/[locale]/(protected)/contributor/agenda-setting/calender-view.tsx b/app/[locale]/(protected)/contributor/agenda-setting/calender-view.tsx index 78719a93..6713b9c8 100644 --- a/app/[locale]/(protected)/contributor/agenda-setting/calender-view.tsx +++ b/app/[locale]/(protected)/contributor/agenda-setting/calender-view.tsx @@ -10,7 +10,7 @@ import { Label } from "@/components/ui/label"; import ExternalDraggingevent from "./dragging-events"; import { Calendar } from "@/components/ui/calendar"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; -import { Plus } from "lucide-react"; +import { Book, Plus } from "lucide-react"; import { Checkbox } from "@/components/ui/checkbox"; import { EventContentArg } from "@fullcalendar/core"; import EventModal from "./event-modal"; @@ -25,6 +25,13 @@ import { PopoverContent, PopoverTrigger, } from "@/components/ui/popover"; +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, + DialogTrigger, +} from "@/components/ui/dialog"; const wait = () => new Promise((resolve) => setTimeout(resolve, 1000)); interface CalendarViewProps { @@ -103,7 +110,7 @@ const CalendarView = ({ categories }: CalendarViewProps) => { const [selectedEventDate, setSelectedEventDate] = useState(null); const roleId = Number(getCookiesDecrypt("urie")) || 0; const [apiEvents, setApiEvents] = useState([]); - const [loading, setLoading] = useState(false); + const [Isloading, setLoading] = useState(false); const [draggableInitialized, setDraggableInitialized] = useState(false); const t = useTranslations("CalendarApp"); @@ -116,6 +123,7 @@ const CalendarView = ({ categories }: CalendarViewProps) => { const TODAY = dayjs().format("yyyy-MM-dd"); const INITIAL_YEAR = dayjs().format("YYYY"); const INITIAL_MONTH = dayjs().format("M"); + const [open, setOpen] = useState(false); const [selectedYear, setSelectedYear] = useState(new Date()); const [selectedMonth, setSelectedMonth] = useState( @@ -503,13 +511,44 @@ const CalendarView = ({ categories }: CalendarViewProps) => { ); }; + const getModalContent = (type: "terkirim" | "diterima") => ( +
+ {Isloading ? ( +

Loading...

+ ) : ( + + + + + + + + + + + + + + + + + + + +
NoTicket NumberDate and TimeTitleStatus
{"1"}{"MIA - 001"}{"23/01/2025 13:00"}{"Daily Issue 25 Januari 2025 "} + {type === "terkirim" ? "Completed" : "Completed"} +
+ )} +
+ ); + return ( <>
- {roleId == 11 || roleId == 12 ? ( + {roleId == 11 || roleId == 2 || roleId == 12 ? ( + ) : null} + + + + Hasil Pantauan + + {getModalContent("terkirim")} + + +
diff --git a/components/form/task/task-detail-form.tsx b/components/form/task/task-detail-form.tsx index 5b1888e4..cb86bfac 100644 --- a/components/form/task/task-detail-form.tsx +++ b/components/form/task/task-detail-form.tsx @@ -47,6 +47,7 @@ import { DotSquare, ImageIcon, Music, + Search, TrashIcon, VideoIcon, } from "lucide-react"; @@ -63,6 +64,7 @@ import Image from "next/image"; import { Icon } from "@iconify/react/dist/iconify.js"; import WavesurferPlayer from "@wavesurfer/react"; import WaveSurfer from "wavesurfer.js"; +import { InputGroup, InputGroupText } from "@/components/ui/input-group"; const taskSchema = z.object({ uniqueCode: z.string().min(1, { message: "Judul diperlukan" }), @@ -242,6 +244,7 @@ export default function FormTaskDetail() { const [audioFile, setAudioFile] = useState(null); const [isRecording, setIsRecording] = useState(false); const [timer, setTimer] = useState(120); + const [search, setSearch] = React.useState(""); const [wavesurfer, setWavesurfer] = useState(); const [isPlaying, setIsPlaying] = useState(false); @@ -749,6 +752,11 @@ export default function FormTaskDetail() { const handleRemoveFile = (id: number) => {}; + const handleSearch = (e: React.ChangeEvent) => { + setSearch(e.target.value); // Perbarui state search + // getColumn("judul")?.setFilterValue(e.target.value); // Set filter tabel + }; + return ( {detail !== undefined ? ( @@ -1376,26 +1384,130 @@ export default function FormTaskDetail() {
{isTableResult && ( - - - - - - - - - - - {uploadResults.map((item) => ( - - - - - +
+
+
+ + + + + + +
+ + + + + + + + Daftar Wilayah Polda dan Polres + + +
+ {listDest.map((polda: any) => ( +
+ + {expandedPolda[polda.id] && ( +
+ + {polda?.subDestination?.map((polres: any) => ( + + ))} +
+ )} +
+ ))} +
+
+
+
+
JudulKontenKategoryDiupload Oleh
{item.title}{item.fileType.name}{item.category.name}{item.creatorName}
+ + + + + + - ))} - -
JudulKontenKategoryDiupload Oleh
+ + + {uploadResults.map((item) => ( + + + {item.title} + + {item.fileType.name} + {item.category.name} + {item.creatorName} + + ))} + + + )} {showInput && ( <>