import React, { Component } from "react"; import BasePage from "@/components/Layout/BasePage"; import { Row, Col, FormGroup, Input, Card, CardBody, Button, Navbar, NavItem, NavLink, NavbarBrand, NavbarToggler, Nav, Collapse } from "reactstrap"; import Link from "next/link"; import ContentWrapper from "@/components/Layout/ContentWrapper"; import { getPelaporanPublic } from "@/actions/pelaporan"; import DetailLaporan from "@/components/Public/DetailLaporan"; import { getLogPublic } from "@/actions/log"; import Timeline from "@/components/Main/Timeline"; import { Formik, Form, Field, ErrorMessage } from "formik"; import * as Yup from "yup"; const menu = [ { title: "Home", path: "/app", }, { title: "Buat Laporan", path: "/laporan/new", }, { title: "Pemantauan", path: "/pemantauan", }, ]; const pemantauanSchema = Yup.object().shape({ no_laporan: Yup.string().required("Harap Diisi"), no_hp: Yup.number().required("Harap Diisi"), }); class App extends Component { constructor(props) { super(props); this.state = { isOpen: false, no_laporan: "", no_hp: "", msgError: [], laporan: null, log: null, }; } static getInitialProps = ({ pathname }) => ({ pathname }); toggleCollapse = () => { this.setState({ isOpen: !this.state.isOpen, }); }; handleLihatPemantaun = async (data) => { const { no_hp, no_laporan } = data; const log = await getLogPublic({ no_hp, no_laporan }); this.setState({ laporan: log.data.laporan }); this.setState({ log: log.data.pemantauan }); }; render() { const { laporan, log } = this.state; return (

Pemantauan
Tidak Ada Laporan
)}