detail.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. import React, { Component } from "react";
  2. import Router from "next/router";
  3. import ContentWrapper from "@/components/Layout/ContentWrapper";
  4. import { Row, Col, Progress } 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 PelaporanDetail extends Component {
  10. constructor(props) {
  11. super(props);
  12. }
  13. render() {
  14. const { pelaporan } = this.props;
  15. return (
  16. <ContentWrapper>
  17. <div className="content-heading">Pelaporan</div>
  18. <Row>
  19. <Col lg="4">
  20. <div className="card b">
  21. <div className="card-body bb">
  22. <p>Overvall progress</p>
  23. <div className="d-flex align-items-center mb-2">
  24. <div className="w-100">
  25. <Progress className="progress-xs m0" color="info" value={20} />
  26. </div>
  27. <div className="ml-auto">
  28. <div className="col wd-xxs text-right">
  29. <div className="text-bold text-muted">20%</div>
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. <div className="card-body">
  35. <p>Metrics</p>
  36. <div className="row text-center">
  37. <div className="col-6 col-lg-6 col-xl-6">
  38. <Sparkline
  39. values={[20, 80]}
  40. options={{
  41. type: "pie",
  42. height: "50",
  43. sliceColors: ["#edf1f2", "#23b7e5"],
  44. }}
  45. className="sparkline"
  46. />
  47. <p className="mt-3">Open Case</p>
  48. </div>
  49. <div className="col-6 col-lg-6 col-xl-6">
  50. <Sparkline
  51. values={[80, 20]}
  52. options={{
  53. type: "pie",
  54. height: "50",
  55. sliceColors: ["#edf1f2", "#27c24c"],
  56. }}
  57. className="sparkline"
  58. />
  59. <p className="mt-3">Close Case</p>
  60. </div>
  61. </div>
  62. </div>
  63. <table className="table bb">
  64. <tbody>
  65. <tr>
  66. <td>
  67. <strong>Open Case</strong>
  68. </td>
  69. <td>80</td>
  70. </tr>
  71. <tr>
  72. <td>
  73. <strong>Close Case</strong>
  74. </td>
  75. <td>20</td>
  76. </tr>
  77. <tr>
  78. <td>
  79. <strong>Performance</strong>
  80. </td>
  81. <td>
  82. <em className="far fa-smile fa-lg text-warning"></em>
  83. </td>
  84. </tr>
  85. <tr>
  86. <td>
  87. <strong>Last Case Closed</strong>
  88. </td>
  89. <td>BI:1107 - 12/01/2016</td>
  90. </tr>
  91. </tbody>
  92. </table>
  93. </div>
  94. </Col>
  95. <Col lg="8">
  96. <div className="mb-3 d-flex">
  97. <div>
  98. <button className="btn btn-sm btn-info" type="button" onClick={(e) => this.newReportClick(e)}>
  99. Laporan Baru
  100. </button>
  101. </div>
  102. </div>
  103. <div className="card b">
  104. <div className="card-body">
  105. <Datatable options={{ responsive: true }}>
  106. <table className="table w-100">
  107. <thead>
  108. <tr>
  109. <th>#ID</th>
  110. <th>Description</th>
  111. <th>Created</th>
  112. <th>Status</th>
  113. </tr>
  114. </thead>
  115. <tbody>
  116. {pelaporan.data.map((value) => {
  117. return (
  118. <tr key={value._id}>
  119. <td>BI:{value._number}</td>
  120. <td className="text-nowrap">
  121. <div className="media align-items-center">
  122. <a className="mr-3" href="">
  123. <img className="img-fluid rounded thumb64" src="/static/img/dummy-search.png" alt="Dummy" />
  124. </a>
  125. <div className="media-body d-flex">
  126. <div>
  127. <h4 className="m-0">Universitas Satyagama</h4>
  128. <small className="text-muted">0742/O/1990 - www.satyagama.ac.id - info@satyagama.ac.id</small>
  129. <p>Jalan Kamal Raya No 2-A Cengkareng</p>
  130. <p> </p>
  131. </div>
  132. </div>
  133. </div>
  134. </td>
  135. <td>{moment(value.createdAt).fromNow()}</td>
  136. <td>
  137. <div className="inline wd-xxs badge badge-success">open</div>
  138. </td>
  139. </tr>
  140. );
  141. })}
  142. </tbody>
  143. </table>
  144. </Datatable>
  145. </div>
  146. </div>
  147. </Col>
  148. </Row>
  149. </ContentWrapper>
  150. );
  151. }
  152. }
  153. export default PelaporanDetail;