| 
					
				 | 
			
			
				@@ -1,7 +1,10 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import React, { Component } from "react"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { Row, Col, Input, FormGroup } from "reactstrap"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import Select from "react-select"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import TmtDate from "./TmtDate"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// import TmtDate from "./TmtDate"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import DatePicker from "react-datepicker"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import "react-datepicker/dist/react-datepicker.css"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import ms from "ms"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 let Dropzone = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 class DropzoneWrapper extends Component { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -63,12 +66,16 @@ const formatOptionLabel = ({ value, sanksi, label_sanksi }) => ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export class UploadSurat extends Component { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	constructor(props) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		super(props); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		const tmt_awal = new Date(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		this.state = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			files: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			nomorSanksi: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			keterangan: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			listSanksi: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			tmtDate: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// tmtDate: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			startDay: tmt_awal, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			maxDay: new Date(+new Date(tmt_awal) + ms("180d")), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			isiTmt: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -124,8 +131,8 @@ export class UploadSurat extends Component { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		this.props.setUploadSuratSanksi(this.state); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	handleTmtDate = (tmtDate) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		this.setState({ tmtDate }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	handleTmtDate = (isiTmt) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		this.setState({ isiTmt }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		this.props.setUploadSuratSanksi(this.state); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -155,7 +162,34 @@ export class UploadSurat extends Component { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						{/* <span className="form-text">Deskripsi pelaporan minimum karakter 50 maksimum 200 karakter</span> */} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				</FormGroup> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				<TmtDate setTmt={this.handleTmtDate} /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				{/* <TmtDate setTmt={this.handleTmtDate} /> */} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				<FormGroup row className="mt-3"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					<label className="col-md-2 col-form-label">Isi TMT</label> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					<div className="col-md-10"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						<DatePicker 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							selected={this.state.isiTmt} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							onChange={(e) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+								this.handleTmtDate(e); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							}} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							dateFormat="dd/MM/yyyy" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							minDate={this.state.startDay} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							maxDate={this.state.maxDay} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							placeholderText="isi TMT" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						// maxDate={addDays(new Date(), 5)} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						<strong>Max pengisian TMT 6 bulan</strong> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				</FormGroup> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				<FormGroup row className="mt-1"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					<label className="col-md-2 col-form-label">TMT berlaku</label> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					<div className="col-md-10 mt-2"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						<b>{moment(this.state.startDay).format("DD-MM-YYYY")}</b> hingga <b>{this.state.isiTmt ? moment(this.state.isiTmt).format("DD-MM-YYYY") : "-"}</b> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				</FormGroup> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				<FormGroup row className="mt-3"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					<label className="col-md-2 col-form-label">List sanksi </label> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					<div className="col-md-10"> 
			 |