|  | @@ -2,7 +2,7 @@ import React, { Component } from "react";
 | 
	
		
			
				|  |  |  import ContentWrapper from "@/components/Layout/ContentWrapper";
 | 
	
		
			
				|  |  |  import { Row, Col } from "reactstrap";
 | 
	
		
			
				|  |  |  import { getPelaporan } from "@/actions/pelaporan";
 | 
	
		
			
				|  |  | -import { getGraph, getExcel,getlaporanselesai } from "@/actions/graph";
 | 
	
		
			
				|  |  | +import { getGraph, getExcel, getlaporanselesai } from "@/actions/graph";
 | 
	
		
			
				|  |  |  import CaseProgress from "@/components/PelaporanTuntas/CaseProgress";
 | 
	
		
			
				|  |  |  import TableLaporan from "@/components/PelaporanTuntas/TableLaporan";
 | 
	
		
			
				|  |  |  import { connect } from "react-redux";
 | 
	
	
		
			
				|  | @@ -25,9 +25,11 @@ class PelaporanTuntas extends Component {
 | 
	
		
			
				|  |  |      componentDidMount = async () => {
 | 
	
		
			
				|  |  |          const { token } = this.props;
 | 
	
		
			
				|  |  |          let laporanSelesai = await getlaporanselesai(token);
 | 
	
		
			
				|  |  | -        laporanSelesai = {...laporanSelesai, data: {
 | 
	
		
			
				|  |  | -            ...laporanSelesai.data, laporan: [...laporanSelesai.data.laporan, ...laporanSelesai.data.sanksi], sanksi: null
 | 
	
		
			
				|  |  | -        }}
 | 
	
		
			
				|  |  | +        laporanSelesai = {
 | 
	
		
			
				|  |  | +            ...laporanSelesai, data: {
 | 
	
		
			
				|  |  | +                ...laporanSelesai.data, laporan: [...laporanSelesai.data.laporan, ...laporanSelesai.data.sanksi], sanksi: null
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          const pelaporan = await getPelaporan(token, { jadwal: true, aktif: false });
 | 
	
		
			
				|  |  |          const graph = await getGraph(this.props.token, { evaluasi: true, listJadwal: true, aktif: false });
 | 
	
		
			
				|  |  |          this.setState({ pelaporan, graph, laporanSelesai });
 | 
	
	
		
			
				|  | @@ -53,6 +55,24 @@ class PelaporanTuntas extends Component {
 | 
	
		
			
				|  |  |          const url = getExcel(this.props.token, "Laporan", { tahun: this.state.tahun });
 | 
	
		
			
				|  |  |          Router.push(url);
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  | +    excelMenu = () => {
 | 
	
		
			
				|  |  | +        const url = getExcel(this.props.token, "Laporan", {
 | 
	
		
			
				|  |  | +            tahun: this.state.tahun,
 | 
	
		
			
				|  |  | +            pelaporan: true,
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +        Router.push(url);
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  | +    excelSemua = () => {
 | 
	
		
			
				|  |  | +        const url = getExcel(this.props.token, "Laporan", {
 | 
	
		
			
				|  |  | +            tahun: this.state.tahun,
 | 
	
		
			
				|  |  | +            pelaporan: true,
 | 
	
		
			
				|  |  | +            penjadwalan: true,
 | 
	
		
			
				|  |  | +            pemeriksaan: true,
 | 
	
		
			
				|  |  | +            sanksi: true,
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +        Router.push(url);
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      render() {
 | 
	
		
			
				|  |  |          const { pelaporan, graph, laporanSelesai } = this.state;
 | 
	
	
		
			
				|  | @@ -64,7 +84,7 @@ class PelaporanTuntas extends Component {
 | 
	
		
			
				|  |  |                      </span>
 | 
	
		
			
				|  |  |                  </div>
 | 
	
		
			
				|  |  |                  <Row>
 | 
	
		
			
				|  |  | -                    <Col lg="4">{laporanSelesai?.data ? <CaseProgress data={laporanSelesai.data} nextButton={this.nextButton} prevButton={this.prevButton} tahun={this.state.tahun} excel={this.excel} /> : <Loader />}</Col>
 | 
	
		
			
				|  |  | +                    <Col lg="4">{laporanSelesai?.data ? <CaseProgress data={laporanSelesai.data} nextButton={this.nextButton} prevButton={this.prevButton} tahun={this.state.tahun} excel={this.excel} excelMenu={this.excelMenu} excelSemua={this.excelSemua} /> : <Loader />}</Col>
 | 
	
		
			
				|  |  |                      <Col lg="8">{laporanSelesai?.data?.laporan ? <TableLaporan status noBy listData={laporanSelesai.data.laporan} to="/app/tuntas/detail" linkName="Detail" /> : <Loader />}</Col>
 | 
	
		
			
				|  |  |                  </Row>
 | 
	
		
			
				|  |  |              </ContentWrapper>
 |