index.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. import React, { Component } from "react";
  2. import Router from "next/router";
  3. import ContentWrapper from "@/components/Layout/ContentWrapper";
  4. import { Row, Col, Progress, Button } from "reactstrap";
  5. import { getPelaporan } from "../../../../actions/pelaporan";
  6. import Sparkline from "@/components/Common/Sparklines";
  7. import Datatable from "@/components/Tables/Datatable";
  8. import moment from "moment";
  9. class Pelaporan extends Component {
  10. constructor(props) {
  11. super(props);
  12. }
  13. static getInitialProps = async () => {
  14. const pelaporan = await getPelaporan();
  15. return { pelaporan };
  16. };
  17. detailLaporanClick = (e, ptId, number) => {
  18. e.preventDefault();
  19. Router.push({
  20. pathname: "/app/pt/jawaban-pencabutan-sanksi/detail",
  21. });
  22. };
  23. render() {
  24. const { pelaporan } = this.props;
  25. return (
  26. <ContentWrapper>
  27. <div className="content-heading">Jawaban Permohonan Pencabutan Sanksi</div>
  28. <Row>
  29. <Col lg={12}>
  30. <div className="card b">
  31. <div className="card-body">
  32. <Datatable options={{ responsive: true }}>
  33. <table className="table w-100">
  34. <thead>
  35. <tr>
  36. <th>#ID</th>
  37. <th>Description</th>
  38. <th>Created</th>
  39. <th>Status</th>
  40. <th></th>
  41. </tr>
  42. </thead>
  43. <tbody>
  44. {/* {pelaporan.data.map((value) => {
  45. return ( */}
  46. <tr key={1}>
  47. <td>BI:1155937274981</td>
  48. <td className="text-nowrap">
  49. <div className="media align-items-center">
  50. <img className="img-fluid rounded thumb64" src="/static/img/dummy-search.png" alt="Dummy" />
  51. <div className="media-body d-flex">
  52. <div>
  53. <h4 className="m-0">Universitas Satyagama</h4>
  54. <small className="text-muted">0742/O/1990 - www.satyagama.ac.id - info@satyagama.ac.id</small>
  55. <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Reiciendis, sit.</p>
  56. </div>
  57. </div>
  58. </div>
  59. </td>
  60. <td>{moment().fromNow()}</td>
  61. <td>
  62. <div className="inline wd-xxs badge badge-success">open</div>
  63. </td>
  64. <td>
  65. <Button color='primary' onClick={(e) => this.detailLaporanClick(e)}>Detail</Button>
  66. </td>
  67. </tr>
  68. {/* );
  69. })} */}
  70. </tbody>
  71. </table>
  72. </Datatable>
  73. </div>
  74. </div>
  75. </Col>
  76. </Row>
  77. </ContentWrapper>
  78. );
  79. }
  80. }
  81. export default Pelaporan;