|  | @@ -1,75 +1,36 @@
 | 
	
		
			
				|  |  |  import React, { Component } from "react";
 | 
	
		
			
				|  |  |  import ContentWrapper from "@/components/Layout/ContentWrapper";
 | 
	
		
			
				|  |  | -import Link from "next/link";
 | 
	
		
			
				|  |  |  import { Row, Col, Button, Card, CardBody, Table } from "reactstrap";
 | 
	
		
			
				|  |  |  import { connect } from "react-redux";
 | 
	
		
			
				|  |  | -import Loader from "@/components/Common/Loader";
 | 
	
		
			
				|  |  | -import Router from "next/router";
 | 
	
		
			
				|  |  |  import TableRiwayat from "@/components/Riwayat/TableRiwayat";
 | 
	
		
			
				|  |  |  import ChartData from "@/components/Riwayat/ChartData";
 | 
	
		
			
				|  |  | -import ChartDataBar from "@/components/Riwayat/ChartDataBar";
 | 
	
		
			
				|  |  | -import Maps from "@/components/Riwayat/Maps"
 | 
	
		
			
				|  |  | -import TableRadar from "../../../components/Riwayat/TableRadar";
 | 
	
		
			
				|  |  | -import { getjumlahStatusLaporan } from "../../../actions/graph";
 | 
	
		
			
				|  |  | -import ChartRadarB from "../../../components/Riwayat/ChartRadarB";
 | 
	
		
			
				|  |  | -import ChartRadarA from "../../../components/Riwayat/ChartRadarA";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  class Riwayat extends Component {
 | 
	
		
			
				|  |  | -  constructor(props) {
 | 
	
		
			
				|  |  | -    super(props);
 | 
	
		
			
				|  |  | -    this.state = {
 | 
	
		
			
				|  |  | -      jumlahStatusLaporan: {}
 | 
	
		
			
				|  |  | -    };
 | 
	
		
			
				|  |  | -  }
 | 
	
		
			
				|  |  | -  handleClick = (e, idPembina) => {
 | 
	
		
			
				|  |  | -    e.preventDefault();
 | 
	
		
			
				|  |  | -    Router.push({
 | 
	
		
			
				|  |  | -      pathname: "/app/riwayat/detail",
 | 
	
		
			
				|  |  | -      query: { id: idPembina },
 | 
	
		
			
				|  |  | -    });
 | 
	
		
			
				|  |  | -  };
 | 
	
		
			
				|  |  | +    constructor(props) {
 | 
	
		
			
				|  |  | +        super(props);
 | 
	
		
			
				|  |  | +        this.state = {
 | 
	
		
			
				|  |  | +        };
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -  componentDidMount = async () => {
 | 
	
		
			
				|  |  | -    const { token } = this.props;
 | 
	
		
			
				|  |  | -    const jumlahStatusLaporan = await getjumlahStatusLaporan(token);
 | 
	
		
			
				|  |  | -    this.setState({ jumlahStatusLaporan });
 | 
	
		
			
				|  |  | -  };
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -  render() {
 | 
	
		
			
				|  |  | -    const { jumlahStatusLaporan } = this.state;
 | 
	
		
			
				|  |  | -    return (
 | 
	
		
			
				|  |  | -      <ContentWrapper>
 | 
	
		
			
				|  |  | -        <div className="content-heading">
 | 
	
		
			
				|  |  | -          <span className="font-color-white">Riwayat</span>
 | 
	
		
			
				|  |  | -        </div>
 | 
	
		
			
				|  |  | -        <Row>
 | 
	
		
			
				|  |  | -          <Col lg="6">
 | 
	
		
			
				|  |  | -            <ChartDataBar />
 | 
	
		
			
				|  |  | -          </Col>
 | 
	
		
			
				|  |  | -          <Col lg="6">
 | 
	
		
			
				|  |  | -            <Maps />
 | 
	
		
			
				|  |  | -          </Col>
 | 
	
		
			
				|  |  | -          <Col lg="6">
 | 
	
		
			
				|  |  | -            <ChartRadarA />
 | 
	
		
			
				|  |  | -          </Col>
 | 
	
		
			
				|  |  | -          <Col lg="6">
 | 
	
		
			
				|  |  | -            <ChartRadarB />
 | 
	
		
			
				|  |  | -          </Col>
 | 
	
		
			
				|  |  | -          <Col lg="12">
 | 
	
		
			
				|  |  | -            {jumlahStatusLaporan?.data ? <TableRadar listData={jumlahStatusLaporan.data} to="/app/riwayat/detail" jadwal="/app/riwayat/penjadwalan" all_Laporan="/app/riwayat/all_Laporan" pemeriksaan="/app/riwayat/pemeriksaan" sanksi="/app/riwayat/sanksi" keberatan="/app/riwayat/keberatan" banding="/app/riwayat/banding" perbaikan="/app/riwayat/perbaikan" cabutSanksi="/app/riwayat/cabutSanksi" linkName="Lihat" /> : <Loader />}
 | 
	
		
			
				|  |  | -          </Col>
 | 
	
		
			
				|  |  | -          <ChartData />
 | 
	
		
			
				|  |  | -          <Col lg="12">
 | 
	
		
			
				|  |  | -            <TableRiwayat />
 | 
	
		
			
				|  |  | -          </Col>
 | 
	
		
			
				|  |  | -        </Row>
 | 
	
		
			
				|  |  | -      </ContentWrapper>
 | 
	
		
			
				|  |  | -    );
 | 
	
		
			
				|  |  | -  }
 | 
	
		
			
				|  |  | +    render() {
 | 
	
		
			
				|  |  | +        return (
 | 
	
		
			
				|  |  | +            <ContentWrapper>
 | 
	
		
			
				|  |  | +                <div className="content-heading">
 | 
	
		
			
				|  |  | +                    <span className="font-color-white">Riwayat</span>
 | 
	
		
			
				|  |  | +                </div>
 | 
	
		
			
				|  |  | +                <Row>
 | 
	
		
			
				|  |  | +                    <ChartData />
 | 
	
		
			
				|  |  | +                    <Col lg="12">
 | 
	
		
			
				|  |  | +                        <TableRiwayat />
 | 
	
		
			
				|  |  | +                    </Col>
 | 
	
		
			
				|  |  | +                </Row>
 | 
	
		
			
				|  |  | +            </ContentWrapper>
 | 
	
		
			
				|  |  | +        );
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  const mapStateToProps = (state) => ({ user: state.user, token: state.token });
 | 
	
		
			
				|  |  |  export default connect(mapStateToProps)(Riwayat);
 |