DetailLaporan.js 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. import Scrollable from "@/components/Common/Scrollable";
  2. import moment from "moment";
  3. import { Col, FormGroup } from "reactstrap";
  4. function DetailLaporan({ data, noTitle = false }) {
  5. return (
  6. <>
  7. {noTitle ? "" : <p className="lead bb">Detail Laporan</p>}
  8. <form className="form-horizontal">
  9. <FormGroup row>
  10. <Col md="4">Nomor Laporan:</Col>
  11. <Col md="8">
  12. <strong>{data._number}</strong>
  13. </Col>
  14. </FormGroup>
  15. <FormGroup row>
  16. <Col md="4">Nama Perguruan Tinggi:</Col>
  17. <Col md="8">
  18. <strong>Universitas Satyagama</strong>
  19. </Col>
  20. </FormGroup>
  21. <FormGroup row>
  22. <Col md="4">Jenis Pelanggaran:</Col>
  23. <Col md="8">
  24. <Scrollable height="75px" className="list-group">
  25. <ul>
  26. <li>Lorem ipsum dolor sit.</li>
  27. <li>Lorem ipsum dolor sit.</li>
  28. {/* {data.pelanggaran.map((e) => (
  29. <li>{e.data}</li>
  30. ))} */}
  31. </ul>
  32. </Scrollable>
  33. </Col>
  34. </FormGroup>
  35. <FormGroup row>
  36. <Col md="4">Keterangan Laporan:</Col>
  37. <Col md="8">
  38. <Scrollable height="100px" className="list-group">
  39. <p>{data.description}</p>
  40. </Scrollable>
  41. </Col>
  42. </FormGroup>
  43. <FormGroup row>
  44. <Col md="4">Dibuat Pada:</Col>
  45. <Col md="8">
  46. <strong>{moment(data.createdAt).format("D MMMM YYYY")}</strong>
  47. </Col>
  48. </FormGroup>
  49. {data.status ? (
  50. <FormGroup row>
  51. <Col md="4">Status:</Col>
  52. <Col md="8">
  53. <div className="badge badge-info">{data.status}</div>
  54. </Col>
  55. </FormGroup>
  56. ) : (
  57. ""
  58. )}
  59. <FormGroup row>
  60. <Col md="4">File Pendukung:</Col>
  61. <Col md="8">
  62. <Scrollable height="120px" className="list-group">
  63. <table className="table table-bordered bg-transparent">
  64. <tbody>
  65. {/* {data.dokumen.map((e) => (
  66. <tr>
  67. <td>
  68. <em className="fa-lg far fa-file-code"></em>
  69. </td>
  70. <td>
  71. <a className="text-muted" href="">
  72. {e.filename}
  73. </a>
  74. </td>
  75. </tr>
  76. ))} */}
  77. </tbody>
  78. </table>
  79. </Scrollable>
  80. </Col>
  81. </FormGroup>
  82. </form>
  83. </>
  84. );
  85. }
  86. export default DetailLaporan;