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'; import { Inertia } from '@inertiajs/inertia'; export default function Dashboard(props) { const { count_active, count_update, count_expired, count_total, events } = props const calenderEvents = events.map(e => { return { title: `${e.document.no_doc} - ${e.document.pic_name}`, date: e.date, id : e.id, url: route('docs.show', e.document) } }) const handleEventClick = (arg) => { // console.log(arg.event) } const handleDateClick = (arg) => { // bind with an arrow function // apa yang harus di handle: tampilkan saja modal yang ada event pada date ini kemudian bisa tambah reminder atau hapus reminder pada data ini, // untuk tambah reminder pilih form doc id saja kemudian tambah , untuk delete cukup confirm kemudian hilang alert(arg.dateStr) } return (
Dokumen Aktif
{count_active}
Dokumen Diperbarui
{count_update}
Dokumen Berakhir
{count_expired}
Total Dokumen
{count_total}
); }