index.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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/pencabutan-sanksi/detail",
  21. // query: { ptId, number },
  22. });
  23. };
  24. render() {
  25. const { pelaporan } = this.props;
  26. return (
  27. <ContentWrapper>
  28. <div className="content-heading">Permohonan Pencabutan Sanksi</div>
  29. <Row>
  30. <Col lg={12}>
  31. <div className="card b">
  32. <div className="card-body">
  33. <Datatable options={{ responsive: true }}>
  34. <table className="table w-100">
  35. <thead>
  36. <tr>
  37. <th>#ID</th>
  38. <th>Description</th>
  39. <th>Created</th>
  40. <th>Status</th>
  41. <th></th>
  42. </tr>
  43. </thead>
  44. <tbody>
  45. {/* {pelaporan.data.map((value) => {
  46. return ( */}
  47. <tr key={1}>
  48. <td>BI:1155937274981</td>
  49. <td className="text-nowrap">
  50. <div className="media align-items-center">
  51. <img className="img-fluid rounded thumb64" src="/static/img/dummy-search.png" alt="Dummy" />
  52. <div className="media-body d-flex">
  53. <div>
  54. <h4 className="m-0">Universitas Satyagama</h4>
  55. <small className="text-muted">0742/O/1990 - www.satyagama.ac.id - info@satyagama.ac.id</small>
  56. <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Reiciendis, sit.</p>
  57. </div>
  58. </div>
  59. </div>
  60. </td>
  61. <td>{moment().fromNow()}</td>
  62. <td>
  63. <div className="inline wd-xxs badge badge-success">open</div>
  64. </td>
  65. <td>
  66. <Button color="primary" onClick={(e) => this.detailLaporanClick(e)}>
  67. Detail
  68. </Button>
  69. </td>
  70. </tr>
  71. {/* );
  72. })} */}
  73. </tbody>
  74. </table>
  75. </Datatable>
  76. </div>
  77. </div>
  78. </Col>
  79. </Row>
  80. </ContentWrapper>
  81. );
  82. }
  83. }
  84. export default Pelaporan;