| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 | 
							- import Datatable from "@/components/Tables/Datatable";
 
- import moment from "moment";
 
- import { Card, CardHeader, CardBody, CardTitle } from "reactstrap";
 
- import 'moment/locale/id';
 
- moment.locale('id')
 
- function Riwayat({ data }) {
 
- 	return (
 
- 		<Card className="card-default">
 
- 			<CardHeader>
 
- 				<CardTitle>Riwayat</CardTitle>
 
- 			</CardHeader>
 
- 			<CardBody>
 
- 				<Datatable options={{ responsive: true }}>
 
- 					<table className="table table-striped my-4 w-100" data-order='[[3, "desc"]]'>
 
- 						<thead>
 
- 							<tr>
 
- 								<th>Tanggal</th>
 
- 								<th>Ketarangan</th>
 
- 								<th>Dokumen</th>
 
- 								<th>Tahap</th>
 
- 							</tr>
 
- 						</thead>
 
- 						<tbody>
 
- 							{data.length
 
- 								? data.map((value) => (
 
- 									<tr>
 
- 										<td>{moment(value.createdAt).format("DD MMMM YYYY")}</td>
 
- 										<td>{value.keterangan}</td>
 
- 										<td>
 
- 											{value.dokumen.map((e) => (
 
- 												<>
 
- 													<em className="fa-lg far fa-file-code"></em>
 
- 													<a className="text-muted" href={e.path} target="_blank" download={e.judul}>
 
- 														{e.judul}
 
- 													</a>
 
- 												</>
 
- 											))}
 
- 										</td>
 
- 										<td>{value.index+ 1}</td>
 
- 									</tr>
 
- 								))
 
- 								: ""}
 
- 						</tbody>
 
- 					</table>
 
- 				</Datatable>
 
- 			</CardBody>
 
- 		</Card>
 
- 	);
 
- }
 
- export default Riwayat;
 
 
  |