index.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. import React, { Component } from "react";
  2. import Router from "next/router";
  3. import ContentWrapper from "@/components/Layout/ContentWrapper";
  4. import { Row, Col, Progress, Modal, ModalHeader, ModalBody, ModalFooter, Button, Table } 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 Keberatan extends Component {
  10. constructor(props) {
  11. super(props);
  12. this.state = {
  13. modal: false,
  14. };
  15. }
  16. // static getInitialProps = async () => {
  17. // const pelaporan = await getPelaporan();
  18. // return { pelaporan };
  19. // };
  20. detailKeberatanClick = (e, ptId, number) => {
  21. e.preventDefault();
  22. Router.push({
  23. pathname: "/app/pt/keberatan/detail",
  24. });
  25. };
  26. render() {
  27. console.log(this.state);
  28. // const { pelaporan } = this.props;
  29. return (
  30. <ContentWrapper>
  31. <div className="content-heading">Permohonan Keberatan</div>
  32. <Row>
  33. <Col lg={12}>
  34. <div className="card b">
  35. <div className="card-body">
  36. <Table options={{ responsive: true }}>
  37. {/* <table className="table w-100"> */}
  38. <thead>
  39. <tr>
  40. <th>#ID</th>
  41. <th>Description</th>
  42. <th>Created</th>
  43. <th>Status</th>
  44. <th></th>
  45. </tr>
  46. </thead>
  47. <tbody>
  48. {/* {pelaporan.data.map((value) => {
  49. return ( */}
  50. <tr key={1}>
  51. <td>BI:408066447929</td>
  52. <td className="text-nowrap">
  53. <div className="media align-items-center">
  54. <img className="img-fluid rounded thumb64" src="/static/img/dummy-search.png" alt="Dummy" />
  55. <div className="media-body d-flex">
  56. <div>
  57. <h4 className="m-0">Universitas Satyagama</h4>
  58. <small className="text-muted">0742/O/1990 - www.satyagama.ac.id - info@satyagama.ac.id</small>
  59. <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Reprehenderit, animi?</p>
  60. </div>
  61. </div>
  62. </div>
  63. </td>
  64. <td>{moment().fromNow()}</td>
  65. <td>
  66. <div className="inline wd-xxs badge badge-success">open</div>
  67. </td>
  68. <td>
  69. <Button color="primary" onClick={(e) => this.detailKeberatanClick(e)}>
  70. Detail
  71. </Button>
  72. {/* <Swal options={this.state.swalOption} callback={this.swalCallback} className="btn btn-primary">
  73. Ajukan
  74. </Swal> */}
  75. {/* START card */}
  76. {/* Button trigger modal */}
  77. {/* <Button color="primary" onClick={(e) => this.permohonanClick(e, value.pt_id, value.number)}>
  78. Ajukan
  79. </Button> */}
  80. {/* END card */}
  81. {/* <Button onClick={(e) => this.permohonanClick(e, value.pt_id, value.number)} className="btn-primary">
  82. Ajukan
  83. </Button> */}
  84. </td>
  85. </tr>
  86. {/* );
  87. })} */}
  88. </tbody>
  89. {/* </table> */}
  90. </Table>
  91. </div>
  92. </div>
  93. </Col>
  94. </Row>
  95. </ContentWrapper>
  96. );
  97. }
  98. }
  99. export default Keberatan;