import React from 'react'; import "@fullcalendar/react/dist/vdom"; import FullCalendar from '@fullcalendar/react' // must go before plugins import dayGridPlugin from '@fullcalendar/daygrid' // a plugin! import interactionPlugin from "@fullcalendar/interaction" // needed for dayClick import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout'; import { Head } from '@inertiajs/inertia-react'; export default function Dashboard(props) { const { count_active, count_update, count_expired, count_total, events } = props console.log(events) const calenderEvents = events.map(e => { return {title: `${e.document.no_doc} - ${e.document.pic_name}`, date: e.date} }) const handleDateClick = (arg) => { // bind with an arrow function alert(arg.dateStr) } return (
Dokumen Aktif
{count_active}
Dokumen Diperbarui
{count_update}
Dokumen Berakhir
{count_expired}
Total Dokumen
{count_total}
console.log(arg)} events={calenderEvents} />
); }