|  | @@ -3,49 +3,45 @@ import Scrollable from "@/components/Common/Scrollable";
 | 
	
		
			
				|  |  |  import moment from "moment";
 | 
	
		
			
				|  |  |  import { Col, FormGroup } from "reactstrap";
 | 
	
		
			
				|  |  |  import { useSelector } from "react-redux";
 | 
	
		
			
				|  |  | -import { getPT } from "@/actions/PT";
 | 
	
		
			
				|  |  | -import { API_URL } from "@/env";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  function DetailLaporan({ data, noTitle = false, noStatus = false }) {
 | 
	
		
			
				|  |  |  	const user = useSelector((state) => state.user);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	return (
 | 
	
		
			
				|  |  |  		<>
 | 
	
		
			
				|  |  | -			{(!data.user_id.isPrivate || user.peran[0].peran.id === 2020) && (
 | 
	
		
			
				|  |  | +			{(!data.user.isPrivate || user.role.id === 2020) && (
 | 
	
		
			
				|  |  |  				<>
 | 
	
		
			
				|  |  | -					{noTitle ? "" : <p className="lead bb">Identitas Pelapor - {data.user_id.isPublic ? "Umum" : "Internal"}</p>}
 | 
	
		
			
				|  |  | +					{noTitle ? "" : <p className="lead bb">Identitas Pelapor - {data.user.isPublic ? "Umum" : "Internal"}</p>}
 | 
	
		
			
				|  |  |  					<FormGroup row>
 | 
	
		
			
				|  |  |  						<Col md="4">Nama Pelapor:</Col>
 | 
	
		
			
				|  |  |  						<Col md="8">
 | 
	
		
			
				|  |  | -							<strong>{data.user_id.nama}</strong>
 | 
	
		
			
				|  |  | +							<strong>{data.user.nama}</strong>
 | 
	
		
			
				|  |  |  						</Col>
 | 
	
		
			
				|  |  |  					</FormGroup>
 | 
	
		
			
				|  |  |  					<FormGroup row>
 | 
	
		
			
				|  |  |  						<Col md="4">Nomor yang dapat dihubungi:</Col>
 | 
	
		
			
				|  |  |  						<Col md="8">
 | 
	
		
			
				|  |  | -							<strong>{data.user_id.no_hp}</strong>
 | 
	
		
			
				|  |  | +							<strong>{data.user.no_hp}</strong>
 | 
	
		
			
				|  |  |  						</Col>
 | 
	
		
			
				|  |  |  					</FormGroup>
 | 
	
		
			
				|  |  |  					<FormGroup row>
 | 
	
		
			
				|  |  |  						<Col md="4">Email:</Col>
 | 
	
		
			
				|  |  |  						<Col md="8">
 | 
	
		
			
				|  |  | -							<strong>{data.user_id.email}</strong>
 | 
	
		
			
				|  |  | +							<strong>{data.user.email}</strong>
 | 
	
		
			
				|  |  |  						</Col>
 | 
	
		
			
				|  |  |  					</FormGroup>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -					{data.user_id.isPublic && (
 | 
	
		
			
				|  |  | +					{data.user.isPublic && (
 | 
	
		
			
				|  |  |  						<>
 | 
	
		
			
				|  |  |  							<FormGroup row>
 | 
	
		
			
				|  |  |  								<Col md="4">Alamat:</Col>
 | 
	
		
			
				|  |  |  								<Col md="8">
 | 
	
		
			
				|  |  | -									<strong>{data.user_id.alamat}</strong>
 | 
	
		
			
				|  |  | +									<strong>{data.user.alamat}</strong>
 | 
	
		
			
				|  |  |  								</Col>
 | 
	
		
			
				|  |  |  							</FormGroup>
 | 
	
		
			
				|  |  |  							<FormGroup row>
 | 
	
		
			
				|  |  |  								<Col md="4">Foto Kartu Identitas:</Col>
 | 
	
		
			
				|  |  | -								<Col md="8">
 | 
	
		
			
				|  |  | -									<img src={API_URL + data.user_id.files[0].path} height={200} alt="Foto Identitas" />
 | 
	
		
			
				|  |  | -								</Col>
 | 
	
		
			
				|  |  | +								<Col md="8">{/* <img src={API_URL + data.user_id.files[0].path} height={200} alt="Foto Identitas" /> */}</Col>
 | 
	
		
			
				|  |  |  							</FormGroup>
 | 
	
		
			
				|  |  |  						</>
 | 
	
		
			
				|  |  |  					)}
 | 
	
	
		
			
				|  | @@ -56,7 +52,7 @@ function DetailLaporan({ data, noTitle = false, noStatus = false }) {
 | 
	
		
			
				|  |  |  				<FormGroup row>
 | 
	
		
			
				|  |  |  					<Col md="4">Nomor Laporan:</Col>
 | 
	
		
			
				|  |  |  					<Col md="8">
 | 
	
		
			
				|  |  | -						<strong>{data._number}</strong>
 | 
	
		
			
				|  |  | +						<strong>{data.no_laporan}</strong>
 | 
	
		
			
				|  |  |  					</Col>
 | 
	
		
			
				|  |  |  				</FormGroup>
 | 
	
		
			
				|  |  |  				<FormGroup row>
 | 
	
	
		
			
				|  | @@ -81,7 +77,7 @@ function DetailLaporan({ data, noTitle = false, noStatus = false }) {
 | 
	
		
			
				|  |  |  					<Col md="4">Keterangan Laporan:</Col>
 | 
	
		
			
				|  |  |  					<Col md="8">
 | 
	
		
			
				|  |  |  						<Scrollable height="100px" className="list-group">
 | 
	
		
			
				|  |  | -							<p>{data.description}</p>
 | 
	
		
			
				|  |  | +							<p>{data.keterangan}</p>
 | 
	
		
			
				|  |  |  						</Scrollable>
 | 
	
		
			
				|  |  |  					</Col>
 | 
	
		
			
				|  |  |  				</FormGroup>
 | 
	
	
		
			
				|  | @@ -91,30 +87,30 @@ function DetailLaporan({ data, noTitle = false, noStatus = false }) {
 | 
	
		
			
				|  |  |  						<strong>{moment(data.createdAt).format("D MMMM YYYY")}</strong>
 | 
	
		
			
				|  |  |  					</Col>
 | 
	
		
			
				|  |  |  				</FormGroup>
 | 
	
		
			
				|  |  | -				{!noStatus && data.status ? (
 | 
	
		
			
				|  |  | +				{/* {!noStatus && data.status ? (
 | 
	
		
			
				|  |  |  					<FormGroup row>
 | 
	
		
			
				|  |  |  						<Col md="4">Status:</Col>
 | 
	
		
			
				|  |  |  						<Col md="8">
 | 
	
		
			
				|  |  | -							<div className="badge badge-info">{data.status}</div>
 | 
	
		
			
				|  |  | +							<div className="badge badge-info">{data.role_data}</div>
 | 
	
		
			
				|  |  |  						</Col>
 | 
	
		
			
				|  |  |  					</FormGroup>
 | 
	
		
			
				|  |  |  				) : (
 | 
	
		
			
				|  |  |  					""
 | 
	
		
			
				|  |  | -				)}
 | 
	
		
			
				|  |  | +				)} */}
 | 
	
		
			
				|  |  |  				<FormGroup row>
 | 
	
		
			
				|  |  | -					<Col md="4">File Pendukung:</Col>
 | 
	
		
			
				|  |  | +					<Col md="4">Dokumen Pendukung:</Col>
 | 
	
		
			
				|  |  |  					<Col md="8">
 | 
	
		
			
				|  |  |  						<Scrollable height="120px" className="list-group">
 | 
	
		
			
				|  |  |  							<table className="table table-bordered bg-transparent">
 | 
	
		
			
				|  |  |  								<tbody>
 | 
	
		
			
				|  |  | -									{data.files.map((e, index) => (
 | 
	
		
			
				|  |  | +									{data.dokumen.map((e, index) => (
 | 
	
		
			
				|  |  |  										<tr key={`files-${index}`}>
 | 
	
		
			
				|  |  |  											<td>
 | 
	
		
			
				|  |  |  												<em className="fa-lg far fa-file-code"></em>
 | 
	
		
			
				|  |  |  											</td>
 | 
	
		
			
				|  |  |  											<td>
 | 
	
		
			
				|  |  | -												<a className="text-muted" href={API_URL + e.path} target="_blank" download={e.name}>
 | 
	
		
			
				|  |  | -													{e.name}
 | 
	
		
			
				|  |  | +												<a className="text-muted" href={e.path} target="_blank" download={e.judul}>
 | 
	
		
			
				|  |  | +													{e.judul}
 | 
	
		
			
				|  |  |  												</a>
 | 
	
		
			
				|  |  |  											</td>
 | 
	
		
			
				|  |  |  										</tr>
 |