import React, { Component } from "react"; import Link from "next/link"; import Select from "react-select"; import Datatable from "@/components/Tables/Datatable"; import DetailSanksi from "@/components/Main/DetailSanksi"; import Header from "@/components/Main/Header"; import DetailPT from "@/components/Main/DetailPT"; import { getSanksi } from "@/actions/sanksi"; import ContentWrapper from "@/components/Layout/ContentWrapper"; import { Row, Col, Card, CardHeader, CardBody, CardTitle, FormGroup, FormFeedback, FormText, Label, InputGroup, InputGroupAddon, InputGroupButtonDropdown, InputGroupText, Input, Button, DropdownToggle, DropdownMenu, CustomInput, DropdownItem, } from "reactstrap"; let Dropzone = null; class DropzoneWrapper extends Component { state = { isClient: false, }; componentDidMount = () => { Dropzone = require("react-dropzone").default; this.setState({ isClient: true }); }; render() { return Dropzone ? {this.props.children} : null; } } const selectInstanceId = 1; class UploadKeberatan extends Component { constructor(props) { super(props); this.state = { selectedOption: null, files: [], }; } static getInitialProps = async ({ query }) => { const sanksi = await getSanksi(query); return { sanksi, query }; }; handleChangeSelect = (selectedOption) => { this.setState({ selectedOption }); }; onDrop = (files) => { this.setState({ files: files.map((file) => Object.assign(file, { preview: URL.createObjectURL(file), }) ), stat: "Added " + files.length + " file(s)", }); }; uploadFiles = (e) => { e.preventDefault(); e.stopPropagation(); this.setState({ stat: this.state.files.length ? "Dropzone ready to upload " + this.state.files.length + " file(s)" : "No files added.", }); }; clearFiles = (e) => { e.preventDefault(); e.stopPropagation(); this.setState({ stat: this.state.files.length ? this.state.files.length + " file(s) cleared." : "No files to clear.", }); this.setState({ files: [], }); }; render() { const { files } = this.state; const { sanksi } = this.props; console.log(sanksi); const thumbs = files.map((file, index) => ( Item )); return (
Permohonan Keberatan {/* Form pembuatan laporan baru v.0.1 */}
{/* */}

Jawaban

{/* Deskripsi pelaporan minimum karakter 50 maksimum 200 karakter */}
{({ getRootProps, getInputProps, isDragActive }) => { return (
{this.state.files.length > 0 ? {thumbs} :
Drop files here to upload
}
); }}
{/* END card */}
Riwayat {/*
DataTables has most features enabled by default, so all you need to do to use it with your own tables is to call the construction function: $().DataTable();.
*/}
Tanggal Status Keterangan Dokumen Dokumen Jawaban
23/01/2022 Ditolak Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos, maxime. database.controller.js
23/01/2022 Ditolak Lorem ipsum dolor sit amet consectetur adipisicing. database.controller.js
23/01/2022 Ditolak Lorem ipsum dolor sit. database.controller.js
); } } export default UploadKeberatan;