|  | @@ -1,84 +1,28 @@
 | 
	
		
			
				|  |  |  import React, { Component } from "react";
 | 
	
		
			
				|  |  | -import Router from "next/router";
 | 
	
		
			
				|  |  |  import ContentWrapper from "@/components/Layout/ContentWrapper";
 | 
	
		
			
				|  |  | -import { Row, Col, Progress, Button } from "reactstrap";
 | 
	
		
			
				|  |  | -import { getPelaporan } from "../../../../actions/pelaporan";
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -import Sparkline from "@/components/Common/Sparklines";
 | 
	
		
			
				|  |  | -import Datatable from "@/components/Tables/Datatable";
 | 
	
		
			
				|  |  | -import moment from "moment";
 | 
	
		
			
				|  |  | +import { Row, Col } from "reactstrap";
 | 
	
		
			
				|  |  | +import { getSanksi } from "@/actions/sanksi";
 | 
	
		
			
				|  |  | +import TableSanksi from "@/components/PT/TableSanksi";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  class Pelaporan extends Component {
 | 
	
		
			
				|  |  |  	constructor(props) {
 | 
	
		
			
				|  |  |  		super(props);
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -	// static getInitialProps = async () => {
 | 
	
		
			
				|  |  | -	// 	const pelaporan = await getPelaporan();
 | 
	
		
			
				|  |  | -	// 	return { pelaporan };
 | 
	
		
			
				|  |  | -	// };
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -	detailLaporanClick = (e, ptId, number) => {
 | 
	
		
			
				|  |  | -		e.preventDefault();
 | 
	
		
			
				|  |  | -		Router.push({
 | 
	
		
			
				|  |  | -			pathname: "/app/pt/dokumen-perbaikan/detail",
 | 
	
		
			
				|  |  | -			// query: { ptId, number },
 | 
	
		
			
				|  |  | -		});
 | 
	
		
			
				|  |  | +	static getInitialProps = async () => {
 | 
	
		
			
				|  |  | +		const sanksi = await getSanksi({ ptId: "0BCE4DB7-B207-445D-8D03-0C54B7688252", docPerbaikan: true });
 | 
	
		
			
				|  |  | +		return { sanksi };
 | 
	
		
			
				|  |  |  	};
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	render() {
 | 
	
		
			
				|  |  | -		// const { pelaporan } = this.props;
 | 
	
		
			
				|  |  | +		const { sanksi } = this.props;
 | 
	
		
			
				|  |  | +		const { keberatan, banding } = sanksi.data[0].sanksi.doc_perbaikan;
 | 
	
		
			
				|  |  | +		console.log(sanksi.data[0].sanksi.doc_perbaikan);
 | 
	
		
			
				|  |  |  		return (
 | 
	
		
			
				|  |  |  			<ContentWrapper>
 | 
	
		
			
				|  |  |  				<div className="content-heading">Dokumen Perbaikan</div>
 | 
	
		
			
				|  |  |  				<Row>
 | 
	
		
			
				|  |  | -					<Col lg={12}>
 | 
	
		
			
				|  |  | -						<div className="card b">
 | 
	
		
			
				|  |  | -							<div className="card-body">
 | 
	
		
			
				|  |  | -								<Datatable options={{ responsive: true }}>
 | 
	
		
			
				|  |  | -									<table className="table w-100">
 | 
	
		
			
				|  |  | -										<thead>
 | 
	
		
			
				|  |  | -											<tr>
 | 
	
		
			
				|  |  | -												<th>#ID</th>
 | 
	
		
			
				|  |  | -												<th>Description</th>
 | 
	
		
			
				|  |  | -												<th>Created</th>
 | 
	
		
			
				|  |  | -												<th>Status</th>
 | 
	
		
			
				|  |  | -												<th></th>
 | 
	
		
			
				|  |  | -											</tr>
 | 
	
		
			
				|  |  | -										</thead>
 | 
	
		
			
				|  |  | -										<tbody>
 | 
	
		
			
				|  |  | -											{/* {pelaporan.data.map((value) => {
 | 
	
		
			
				|  |  | -												return ( */}
 | 
	
		
			
				|  |  | -													<tr key={1}>
 | 
	
		
			
				|  |  | -														<td>BI:987654</td>
 | 
	
		
			
				|  |  | -														<td className="text-nowrap">
 | 
	
		
			
				|  |  | -															<div className="media align-items-center">
 | 
	
		
			
				|  |  | -																<img className="img-fluid rounded thumb64" src="/static/img/dummy-search.png" alt="Dummy" />
 | 
	
		
			
				|  |  | -																<div className="media-body d-flex">
 | 
	
		
			
				|  |  | -																	<div>
 | 
	
		
			
				|  |  | -																		<h4 className="m-0">Universitas Satyagama</h4>
 | 
	
		
			
				|  |  | -																		<small className="text-muted">0742/O/1990 - www.satyagama.ac.id - info@satyagama.ac.id</small>
 | 
	
		
			
				|  |  | -																		<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Blanditiis, reiciendis.</p>
 | 
	
		
			
				|  |  | -																	</div>
 | 
	
		
			
				|  |  | -																</div>
 | 
	
		
			
				|  |  | -															</div>
 | 
	
		
			
				|  |  | -														</td>
 | 
	
		
			
				|  |  | -														<td>{moment().fromNow()}</td>
 | 
	
		
			
				|  |  | -														<td>
 | 
	
		
			
				|  |  | -															<div className="inline wd-xxs badge badge-success">open</div>
 | 
	
		
			
				|  |  | -														</td>
 | 
	
		
			
				|  |  | -														<td>
 | 
	
		
			
				|  |  | -															<Button color="primary" onClick={(e) => this.detailLaporanClick(e)}>Detail</Button>
 | 
	
		
			
				|  |  | -														</td>
 | 
	
		
			
				|  |  | -													</tr>
 | 
	
		
			
				|  |  | -												{/* );
 | 
	
		
			
				|  |  | -											})} */}
 | 
	
		
			
				|  |  | -										</tbody>
 | 
	
		
			
				|  |  | -									</table>
 | 
	
		
			
				|  |  | -								</Datatable>
 | 
	
		
			
				|  |  | -							</div>
 | 
	
		
			
				|  |  | -						</div>
 | 
	
		
			
				|  |  | -					</Col>
 | 
	
		
			
				|  |  | +					<Col lg={12}>{/* <TableSanksi listData={} to="/app/pt/dokumen-perbaikan/detail" linkName="Detail" /> */}</Col>
 | 
	
		
			
				|  |  |  				</Row>
 | 
	
		
			
				|  |  |  			</ContentWrapper>
 | 
	
		
			
				|  |  |  		);
 |