andi 2 years ago
parent
commit
719755d51c

+ 2 - 3
components/Riwayat/ChartDataBar.js

@@ -2,7 +2,6 @@ import React, { Component } from "react";
 import ContentWrapper from "@/components/Layout/ContentWrapper";
 import { Container, Row, Col, Card, CardHeader, CardBody } from "reactstrap";
 import { connect } from "react-redux";
-import { jumlahLaporan } from "@/actions/pelaporan";
 import { getjumlahStatusLaporan } from "@/actions/graph";
 import dynamic from "next/dynamic";
 const ReactApexChart = dynamic(() => import("react-apexcharts"), { ssr: false });
@@ -72,14 +71,14 @@ class ChartDataBar extends React.Component {
 
 	async componentDidMount() {
 		const { token } = this.props;
-		const data = await jumlahLaporan(token);
+		const data = await getjumlahStatusLaporan(token);
 		this.setState((prevState) => ({
 			...prevState,
 			series: [{ data: data.data.map((e) => e.jumlah_laporan), name: "jumlah laporan" }],
 			options: {
 				...prevState.options,
 				xaxis: {
-					categories: data.data.map((e) => e._id),
+					categories: data.data.map((e) => e.pembina.name),
 				},
 			},
 		}));

+ 0 - 1
components/Riwayat/ChartRadarA.js

@@ -2,7 +2,6 @@ import React, { Component } from "react";
 import ContentWrapper from "@/components/Layout/ContentWrapper";
 import { Container, Row, Col, Card, CardHeader, CardBody } from "reactstrap";
 import { connect } from "react-redux";
-import { jumlahLaporan } from "@/actions/pelaporan";
 import dynamic from "next/dynamic";
 import { getjumlahStatusLaporan } from "../../actions/graph";
 const ReactApexChart = dynamic(() => import("react-apexcharts"), { ssr: false });

+ 6 - 6
components/Riwayat/Maps.js

@@ -255,10 +255,10 @@ class Maps extends Component {
         const { token } = this.props;
         const data = await jumlahLaporan(token);
         const empat = "16"
-        console.log(data.data.filter(e => e._id.includes('LLDIKTI')))
+        // console.log(data.data.filter(e => e._id.includes('LLDIKTI')))
         this.setState({
             RegionValues: {
-                'ID_su': 2,
+                'ID_su': 0,
                 'ID_su': 0,
                 'ID_ss': 0,
                 'ID_la': 0,
@@ -268,10 +268,10 @@ class Maps extends Component {
                 'ID_jb': 0,
                 'ID_bt': 0,
                 'ID_yo': 0,
-                'ID_jt': 2,
-                'ID_jl': 21,
+                'ID_jt': 0,
+                'ID_jl': 0,
                 'ID_ba': 0,
-                'ID_nb': 123,
+                'ID_nb': 0,
                 'ID_sg': 0,
                 'ID_sn': 0,
                 'ID_sr': 0,
@@ -286,7 +286,7 @@ class Maps extends Component {
                 'ID_ku': 0,
                 'ID_ma': 0,
                 'ID_mu': 0,
-                'ID_ac': empat,
+                'ID_ac': 0,
                 'ID_pa': 0,
                 'ID_pb': 0,
                 'ID_nt': 0,

+ 1 - 0
components/Riwayat/TableRadar.js

@@ -24,6 +24,7 @@ function TableRadar({ listData, to, linkName, jadwal, pemeriksaan, sanksi, keber
                                 style={{
                                     color: "black",
                                     verticalAlign: "middle",
+                                    textAlign: "center",
                                 }}>Jumlah Laporan</th>
                             <th
                                 colSpan="2"