+
Berikan Komentar
-
+
{/* Konten Serupa */}
-
-
+
+
Post Terkait
+
+
+ {relatedPost?.map((relate: any) => (
+
+
+
+
+
{relate?.categoryName}
+
{relate?.title}
+
+ {formatDateToIndonesian(new Date(relate?.createdAt))} {relate?.timezone ? relate?.timezone : "WIB"} | {relate.clickCount}{" "}
+
+
+
+
+ ))}
+
+
+
+
>
diff --git a/app/[locale]/(public)/schedule/page.tsx b/app/[locale]/(public)/schedule/page.tsx
index df2bdc31..e22a56e9 100644
--- a/app/[locale]/(public)/schedule/page.tsx
+++ b/app/[locale]/(public)/schedule/page.tsx
@@ -9,11 +9,11 @@ import { format } from "date-fns";
import { cn } from "@/lib/utils";
import { Checkbox } from "@/components/ui/checkbox";
import { Icon } from "@iconify/react/dist/iconify.js";
-import { listSchedule, listScheduleNextPublic, listSchedulePrevPublic, listScheduleTodayPublic } from "@/service/schedule/schedule";
+import { detailSchedule, listSchedule, listScheduleNextPublic, listSchedulePrevPublic, listScheduleTodayPublic } from "@/service/schedule/schedule";
import { useRouter } from "@/i18n/routing";
-import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "@/components/ui/alert-dialog";
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion";
+import { close, loading } from "@/config/swal";
const timeList = [
{
@@ -114,7 +114,7 @@ const timeList = [
},
];
-const Schedule = () => {
+const Schedule = (props: any) => {
const router = useRouter();
const [startDate, setStartDate] = useState
(new Date());
const [dateAWeek, setDateAWeek] = useState([]);
@@ -125,6 +125,19 @@ const Schedule = () => {
const [isOpen, setIsOpen] = React.useState(false);
const [schedules, setSchedules] = useState([]);
const [openDialog, setOpenDialog] = useState(false);
+ const [detail, setDetail] = useState();
+ const [content, setContent] = useState();
+ const { id } = props;
+
+ useEffect(() => {
+ async function getDataSchedule() {
+ const response = await detailSchedule(id);
+ setDetail(response.data?.data);
+ setContent(response.data?.data?.files);
+ }
+
+ getDataSchedule();
+ }, [id]);
useEffect(() => {
async function initState() {
@@ -256,7 +269,13 @@ const Schedule = () => {
}
};
- const getItem = (itemFound: any) => {
+ const getItem = async (itemFound: any) => {
+ loading();
+ const response = await detailSchedule(itemFound?.id);
+ setDetail(response.data?.data);
+ setContent(response.data?.data?.files);
+ console.log("item Found", itemFound);
+ close();
setOpenDialog(true);
};
@@ -687,29 +706,31 @@ const Schedule = () => {
- Test Event
+
+ JADWAL / {detail?.isYoutube == true ? "LIVE STREAMING" : "DETAIL"}
+ {detail?.title}
+
- 08.00 - 12.00 WIB
+ {detail?.date} {detail?.startTime} - {detail?.endTime} {detail?.timezone ? detail.timezone : "WIB"}
- Jl. Trunojoyo No.3 2, RT.2/RW.1, Selong, Kec. Kby. Baru, Kota Jakarta Selatan, Daerah Khusus Ibukota Jakarta 12110, Indonesia.
+ {detail?.address}
- Hanif Salafi
+ {detail?.speakerTitle || ""} {detail?.speakerName || ""}{" "}
- Cancel
- Continue
+ Close
diff --git a/app/[locale]/(public)/video/detail/[slug]/page.tsx b/app/[locale]/(public)/video/detail/[slug]/page.tsx
index 32b952a4..f4c323d7 100644
--- a/app/[locale]/(public)/video/detail/[slug]/page.tsx
+++ b/app/[locale]/(public)/video/detail/[slug]/page.tsx
@@ -49,20 +49,20 @@ const DetailVideo = () => {