index.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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 JawabanKeberatan extends Component {
  10. constructor(props) {
  11. super(props);
  12. }
  13. static getInitialProps = async () => {
  14. const pelaporan = await getPelaporan();
  15. return { pelaporan };
  16. };
  17. newReportClick = (e) => {
  18. e.preventDefault();
  19. Router.push({
  20. pathname: "/app/pelaporan/search",
  21. });
  22. };
  23. detailJawabanKeberatanClick = (e, ptId, number) => {
  24. e.preventDefault();
  25. Router.push({
  26. pathname: "/app/pt/jawaban-banding/detail",
  27. // query: { ptId, number },
  28. });
  29. };
  30. render() {
  31. const { pelaporan } = this.props;
  32. return (
  33. <ContentWrapper>
  34. <div className="content-heading">Jawaban Atas Permohonan Banding</div>
  35. <Row>
  36. <Col lg={12}>
  37. <div className="card b">
  38. <div className="card-body">
  39. <Datatable options={{ responsive: true }}>
  40. <table className="table w-100">
  41. <thead>
  42. <tr>
  43. <th>#ID</th>
  44. <th>Description</th>
  45. <th>Created</th>
  46. <th>Status</th>
  47. </tr>
  48. </thead>
  49. <tbody>
  50. {/* {pelaporan.data.map((value) => {
  51. return ( */}
  52. <tr key={1}>
  53. <td>BI:1155937274981</td>
  54. <td className="text-nowrap">
  55. <div className="media align-items-center">
  56. <img className="img-fluid rounded thumb64" src="/static/img/dummy-search.png" alt="Dummy" />
  57. <div className="media-body d-flex">
  58. <div>
  59. <h4 className="m-0">Universitas Satyagama</h4>
  60. <small className="text-muted">0742/O/1990 - www.satyagama.ac.id - info@satyagama.ac.id</small>
  61. <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Fugiat, soluta.</p>
  62. </div>
  63. </div>
  64. </div>
  65. </td>
  66. <td>{moment().fromNow()}</td>
  67. <td>
  68. <Button color="primary" onClick={(e) => this.detailJawabanKeberatanClick(e)}>
  69. Detail
  70. </Button>
  71. </td>
  72. </tr>
  73. {/* );
  74. })} */}
  75. </tbody>
  76. </table>
  77. </Datatable>
  78. </div>
  79. </div>
  80. </Col>
  81. </Row>
  82. </ContentWrapper>
  83. );
  84. }
  85. }
  86. export default JawabanKeberatan;