TableRadar.js 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. import React, { Component } from 'react';
  2. import Link from "next/link";
  3. import { Row, Col, Card, CardHeader, CardBody, Table, Button } from 'reactstrap';
  4. function TableRadar({ listData, to, linkName, jadwal, pemeriksaan, sanksi, keberatan, banding, perbaikan, cabutSanksi, all_Laporan }) {
  5. return (
  6. <Card className="card-default">
  7. <CardBody>
  8. <Table bordered responsive>
  9. <thead>
  10. <tr >
  11. <th>Wilayah LLDikti\Menu</th>
  12. <th style={{
  13. color: "black",
  14. }}>Jumlah Laporan</th><th style={{
  15. backgroundColor: '#80b1ff',
  16. color: "black",
  17. textAlign: "center",
  18. }}>1. Penjadwalan Evaluasi</th>
  19. <th style={{
  20. backgroundColor: '#de8383',
  21. color: "black",
  22. textAlign: "center",
  23. }}>2. Pemeriksaan</th>
  24. <th style={{
  25. backgroundColor: '#fdda80',
  26. color: "black",
  27. textAlign: "center",
  28. }}>3. Sanksi</th>
  29. <th style={{
  30. backgroundColor: '#cfab80',
  31. color: "black",
  32. textAlign: "center",
  33. }}>4. Keberatan</th>
  34. <th style={{
  35. backgroundColor: '#ef90df',
  36. color: "black",
  37. textAlign: "center",
  38. }}>5. Banding</th>
  39. <th style={{
  40. backgroundColor: '#80df89',
  41. color: "black",
  42. textAlign: "center",
  43. }}>6. Pemantauan perbaikan</th>
  44. <th style={{
  45. backgroundColor: '#a3d4d1',
  46. color: "black",
  47. textAlign: "center",
  48. }}>7. Pencabutan Sanksi</th>
  49. <th style={{
  50. backgroundColor: '#e8f2f1',
  51. color: "black",
  52. textAlign: "center",
  53. }}>Lihat Laporan</th>
  54. </tr>
  55. </thead>
  56. {listData.map((data) => {
  57. return (
  58. <tr key={data.id}>
  59. <td>{data.pembina.name}</td>
  60. <Link
  61. href={{
  62. pathname: all_Laporan,
  63. query: { id: data.pembina.id },
  64. }}
  65. >
  66. <td style={{
  67. color: "black",
  68. textAlign: "center",
  69. cursor: "pointer",
  70. }}>{data.laporan.length}</td>
  71. </Link>
  72. <Link
  73. href={{
  74. pathname: jadwal,
  75. query: { id: data.pembina.id },
  76. }}
  77. >
  78. <td style={{
  79. backgroundColor: '#80b1ff',
  80. color: "black",
  81. textAlign: "center",
  82. cursor: "pointer"
  83. }}>{data.jumlah_jadwal_evaluasi}</td>
  84. </Link>
  85. <Link
  86. href={{
  87. pathname: pemeriksaan,
  88. query: { id: data.pembina.id },
  89. }}
  90. >
  91. <td style={{
  92. backgroundColor: '#de8383',
  93. color: "black",
  94. textAlign: "center",
  95. cursor: "pointer",
  96. }}>{data.jumlah_pemeriksaan}</td>
  97. </Link>
  98. <Link
  99. href={{
  100. pathname: sanksi,
  101. query: { id: data.pembina.id },
  102. }}
  103. >
  104. <td style={{
  105. backgroundColor: '#fdda80',
  106. color: "black",
  107. textAlign: "center",
  108. cursor: "pointer",
  109. }}>{data.jumlah_sanksi}</td>
  110. </Link>
  111. <Link
  112. href={{
  113. pathname: keberatan,
  114. query: { id: data.pembina.id },
  115. }}
  116. >
  117. <td style={{
  118. backgroundColor: '#cfab80',
  119. color: "black",
  120. textAlign: "center",
  121. cursor: "pointer",
  122. }}>{data.jumlah_keberatan}</td>
  123. </Link>
  124. <Link
  125. href={{
  126. pathname: banding,
  127. query: { id: data.pembina.id },
  128. }}
  129. >
  130. <td style={{
  131. backgroundColor: '#ef90df',
  132. color: "black",
  133. textAlign: "center",
  134. cursor: "pointer",
  135. }}>{data.jumlah_banding}</td>
  136. </Link>
  137. <Link
  138. href={{
  139. pathname: perbaikan,
  140. query: { id: data.pembina.id },
  141. }}
  142. >
  143. <td style={{
  144. backgroundColor: '#80df89',
  145. color: "black",
  146. textAlign: "center",
  147. cursor: "pointer",
  148. }}>{data.jumlah_pemantauan_perbaikan}</td>
  149. </Link>
  150. <Link
  151. href={{
  152. pathname: cabutSanksi,
  153. query: { id: data.pembina.id },
  154. }}
  155. >
  156. <td style={{
  157. backgroundColor: '#a3d4d1',
  158. color: "black",
  159. textAlign: "center",
  160. cursor: "pointer",
  161. }}>{data.jumlah_pencabutan_sanksi}</td>
  162. </Link>
  163. <td>
  164. <div className="ml-auto" style={{
  165. textAlign: "center",
  166. marginLeft: "auto",
  167. marginRight: "auto",
  168. }}>
  169. <Link
  170. href={{
  171. pathname: to,
  172. query: { id: data.pembina.id },
  173. }}
  174. >
  175. <Button className="btn-login" color >
  176. <span className="font-color-white">
  177. {linkName}
  178. </span>
  179. </Button>
  180. </Link>
  181. </div>
  182. </td>
  183. </tr>)
  184. })}
  185. </Table>
  186. </CardBody>
  187. </Card>
  188. )
  189. }
  190. export default TableRadar