| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 | 
							- import Scrollable from "@/components/Common/Scrollable";
 
- import moment from "moment";
 
- import { Col, FormGroup } from "reactstrap";
 
- function DetailLaporan({ data, noTitle = false }) {
 
- 	return (
 
- 		<>
 
- 			{noTitle ? "" : <p className="lead bb">Detail Laporan</p>}
 
- 			<form className="form-horizontal">
 
- 				<FormGroup row>
 
- 					<Col md="4">Nomor Laporan:</Col>
 
- 					<Col md="8">
 
- 						<strong>{data._number}</strong>
 
- 					</Col>
 
- 				</FormGroup>
 
- 				<FormGroup row>
 
- 					<Col md="4">Nama Perguruan Tinggi:</Col>
 
- 					<Col md="8">
 
- 						<strong>Universitas Satyagama</strong>
 
- 					</Col>
 
- 				</FormGroup>
 
- 				<FormGroup row>
 
- 					<Col md="4">Jenis Pelanggaran:</Col>
 
- 					<Col md="8">
 
- 						<Scrollable height="75px" className="list-group">
 
- 							<ul>
 
- 								<li>Lorem ipsum dolor sit.</li>
 
- 								<li>Lorem ipsum dolor sit.</li>
 
- 								{/* {data.pelanggaran.map((e) => (
 
- 									<li>{e.data}</li>
 
- 								))} */}
 
- 							</ul>
 
- 						</Scrollable>
 
- 					</Col>
 
- 				</FormGroup>
 
- 				<FormGroup row>
 
- 					<Col md="4">Keterangan Laporan:</Col>
 
- 					<Col md="8">
 
- 						<Scrollable height="100px" className="list-group">
 
- 							<p>{data.description}</p>
 
- 						</Scrollable>
 
- 					</Col>
 
- 				</FormGroup>
 
- 				<FormGroup row>
 
- 					<Col md="4">Dibuat Pada:</Col>
 
- 					<Col md="8">
 
- 						<strong>{moment(data.createdAt).format("D MMMM YYYY")}</strong>
 
- 					</Col>
 
- 				</FormGroup>
 
- 				{data.status ? (
 
- 					<FormGroup row>
 
- 						<Col md="4">Status:</Col>
 
- 						<Col md="8">
 
- 							<div className="badge badge-info">{data.status}</div>
 
- 						</Col>
 
- 					</FormGroup>
 
- 				) : (
 
- 					""
 
- 				)}
 
- 				<FormGroup row>
 
- 					<Col md="4">File Pendukung:</Col>
 
- 					<Col md="8">
 
- 						<Scrollable height="120px" className="list-group">
 
- 							<table className="table table-bordered bg-transparent">
 
- 								<tbody>
 
- 									{data.files.map((e) => (
 
- 										<tr>
 
- 											<td>
 
- 												<em className="fa-lg far fa-file-code"></em>
 
- 											</td>
 
- 											<td>
 
- 												<a className="text-muted" href={`data:${e.type};base64, ${Buffer.from(e.data).toString("base64")}`} download={e.name}>
 
- 													{e.name}
 
- 												</a>
 
- 											</td>
 
- 										</tr>
 
- 									))}
 
- 								</tbody>
 
- 							</table>
 
- 						</Scrollable>
 
- 					</Col>
 
- 				</FormGroup>
 
- 			</form>
 
- 		</>
 
- 	);
 
- }
 
- export default DetailLaporan;
 
 
  |