From c46fdf1c5d2e27bc27ed345fa108840f0cddc333 Mon Sep 17 00:00:00 2001 From: Anang Yusman Date: Tue, 14 Apr 2026 15:51:47 +0800 Subject: [PATCH] update form promote user,add tabel executive --- app/dashboard/coordinator/page.tsx | 13 + components/dialog/campaign-detail.tsx | 6 + components/form/campaign-form.tsx | 371 ++++++++++++++++++++++--- components/form/login.tsx | 15 +- components/global/maps.tsx | 13 + components/table/coordinator-table.tsx | 122 ++++++++ package-lock.json | 36 ++- package.json | 2 + public/agatha1.jpg | Bin 0 -> 177817 bytes public/agatha2.png | Bin 0 -> 1069568 bytes public/ai1.png | Bin 0 -> 1026622 bytes public/ai2.png | Bin 0 -> 1493421 bytes public/ai3.png | Bin 0 -> 1637890 bytes public/ai4.png | Bin 0 -> 1013113 bytes public/m1.jpg | Bin 0 -> 58770 bytes public/m2.jpg | Bin 0 -> 38060 bytes public/m3.jpg | Bin 0 -> 185578 bytes public/m4.jpg | Bin 0 -> 162833 bytes public/meme1.png | Bin 0 -> 2479996 bytes public/meme2.png | Bin 0 -> 2804806 bytes public/meme3.png | Bin 0 -> 2571661 bytes public/meme4.png | Bin 0 -> 1209223 bytes public/sl1.jpg | Bin 0 -> 58770 bytes public/sl2.jpg | Bin 0 -> 72868 bytes public/sl3.jpg | Bin 0 -> 65033 bytes public/sl4.jpg | Bin 0 -> 94556 bytes public/ts1.jpg | Bin 0 -> 239179 bytes public/ts2.jpg | Bin 0 -> 197098 bytes public/ts3.jpg | Bin 0 -> 162607 bytes 29 files changed, 539 insertions(+), 39 deletions(-) create mode 100644 app/dashboard/coordinator/page.tsx create mode 100644 components/global/maps.tsx create mode 100644 components/table/coordinator-table.tsx create mode 100644 public/agatha1.jpg create mode 100644 public/agatha2.png create mode 100644 public/ai1.png create mode 100644 public/ai2.png create mode 100644 public/ai3.png create mode 100644 public/ai4.png create mode 100644 public/m1.jpg create mode 100644 public/m2.jpg create mode 100644 public/m3.jpg create mode 100644 public/m4.jpg create mode 100644 public/meme1.png create mode 100644 public/meme2.png create mode 100644 public/meme3.png create mode 100644 public/meme4.png create mode 100644 public/sl1.jpg create mode 100644 public/sl2.jpg create mode 100644 public/sl3.jpg create mode 100644 public/sl4.jpg create mode 100644 public/ts1.jpg create mode 100644 public/ts2.jpg create mode 100644 public/ts3.jpg diff --git a/app/dashboard/coordinator/page.tsx b/app/dashboard/coordinator/page.tsx new file mode 100644 index 0000000..cfda816 --- /dev/null +++ b/app/dashboard/coordinator/page.tsx @@ -0,0 +1,13 @@ +import DashboardNavbar from "@/components/dashboard/dashboard-navbar"; +import CoordinatorTable from "@/components/table/coordinator-table"; + +export default function CoordinatorPage() { + return ( +
+ +
+ +
+
+ ); +} diff --git a/components/dialog/campaign-detail.tsx b/components/dialog/campaign-detail.tsx index c39fda0..62cacf1 100644 --- a/components/dialog/campaign-detail.tsx +++ b/components/dialog/campaign-detail.tsx @@ -14,6 +14,7 @@ interface DialogCampaignDetailProps { isOpen: boolean; onClose: () => void; data?: { + deskripsi: string; durasi: string; media: string; tujuan: string; @@ -46,6 +47,11 @@ export default function DialogCampaignDetail({ {/* Detail Info */}
+

+ Deskripsi +
+ {data.deskripsi} +

Durasi
diff --git a/components/form/campaign-form.tsx b/components/form/campaign-form.tsx index 205cd61..3a31d44 100644 --- a/components/form/campaign-form.tsx +++ b/components/form/campaign-form.tsx @@ -24,6 +24,8 @@ import { id } from "date-fns/locale"; import { Progress } from "../ui/progress"; import DialogMediaOnline from "../dialog/media-online"; import DialogMediaSosial from "../dialog/media-sosial"; +import MapVideotron from "../global/maps"; +import dynamic from "next/dynamic"; export default function FormCampaign() { const [startDate, setStartDate] = useState(undefined); @@ -34,6 +36,10 @@ export default function FormCampaign() { const [media, setMedia] = useState("Media Online"); const [isDialogOpen, setIsDialogOpen] = useState(false); + const MapVideotron = dynamic(() => import("../global/maps"), { + ssr: false, + }); + // contoh data pilihan media online (bisa diganti sesuai kebutuhan) const mediaOnlineList = [ "Tribrata News Mabes", @@ -44,10 +50,13 @@ export default function FormCampaign() { ]; const [selectedMediaOnline, setSelectedMediaOnline] = useState([]); + const [contentType, setContentType] = useState("Meme"); + const [talkshowType, setTalkshowType] = useState("Renjani Nyrah"); + const [musicType, setMusicType] = useState("Sendrasena"); const toggleMediaOnline = (item: string) => { setSelectedMediaOnline((prev) => - prev.includes(item) ? prev.filter((m) => m !== item) : [...prev, item] + prev.includes(item) ? prev.filter((m) => m !== item) : [...prev, item], ); }; @@ -73,7 +82,7 @@ export default function FormCampaign() { // ✅ Simulasi upload progress const simulateUpload = ( - fileList: { file: File; progress: number; uploaded: boolean }[] + fileList: { file: File; progress: number; uploaded: boolean }[], ) => { fileList.forEach((fileObj) => { let progress = 0; @@ -83,8 +92,8 @@ export default function FormCampaign() { prev.map((f) => f.file === fileObj.file ? { ...f, progress, uploaded: progress >= 100 } - : f - ) + : f, + ), ); if (progress >= 100) clearInterval(interval); }, 300); @@ -214,17 +223,11 @@ export default function FormCampaign() { Tambahkan Media Sosial )} - {media === "Videotron" && ( - +

+ {/* Map tampil */} + +
)} {/* 🧩 Komponen DialogMediaOnline dipanggil di sini */} @@ -325,28 +328,332 @@ export default function FormCampaign() { {available === "Yes" ? ( - // ✅ Jika user pilih "Yes" → tampil upload file + // ✅ Upload
-
- -
+
) : ( - // ✅ Jika user pilih "Tidak" → tampil textarea deskripsi -
- -