| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- import React, { Component } from "react";
- import ContentWrapper from "@/components/Layout/ContentWrapper";
- import Link from "next/link";
- import { Row, Col, Button } from "reactstrap";
- import { getPelaporan } from "@/actions/pelaporan";
- import CaseProgress from "@/components/Main/CaseProgress";
- import TableLaporan from "@/components/Main/TableLaporan";
- class Pelaporan extends Component {
- constructor(props) {
- super(props);
- this.state = {
- user: {},
- };
- }
- static getInitialProps = async () => {
- const pelaporan = await getPelaporan();
- return { pelaporan };
- };
- render() {
- const { pelaporan } = this.props;
- console.log(this.state.user);
- return (
- <ContentWrapper>
- <div className="content-heading">Pelaporan</div>
- <Row>
- <Col lg="4">
- <CaseProgress />
- </Col>
- <Col lg="8">
- <div className="mb-3 d-flex">
- <div>
- <Link href="/app/pelaporan/search">
- <Button color="primary">Laporan Baru</Button>
- </Link>
- </div>
- </div>
- <TableLaporan listData={pelaporan.data} to="/app/pelaporan/detail" linkName="Detail" />
- </Col>
- </Row>
- </ContentWrapper>
- );
- }
- }
- export default Pelaporan;
|