TableRadar.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. import React, { Component } from 'react';
  2. import Link from "next/link";
  3. import { Row, Col, Card, CardHeader, CardBody, Table, Button } from 'reactstrap';
  4. import { Line } from 'react-chartjs-2';
  5. function TableRadar({ listData, to, linkName, jadwal, pemeriksaan, sanksi, keberatan, banding, perbaikan, cabutSanksi, all_Laporan, tuntasDitutup, tuntasCabutsanksi, delegasi }) {
  6. return (
  7. <Card className="card-default">
  8. <CardBody style={{
  9. outerWidth: "700"
  10. }}>
  11. <Table bordered responsive>
  12. <thead>
  13. <tr >
  14. <th rowspan="2"
  15. style={{
  16. verticalAlign: "middle",
  17. textAlign: "center",
  18. }}
  19. >Wilayah LLDikti\Menu</th>
  20. <th
  21. rowspan="2"
  22. style={{
  23. color: "black",
  24. verticalAlign: "middle",
  25. textAlign: "center",
  26. }}>Jumlah Laporan</th>
  27. <th
  28. colSpan="2"
  29. style={{
  30. backgroundColor: '#e8f2f1',
  31. color: "black",
  32. textAlign: "center",
  33. }}>Pelaporan Tuntas</th>
  34. <th
  35. rowspan="2"
  36. style={{
  37. backgroundColor: '#80b1ff',
  38. color: "black",
  39. textAlign: "center",
  40. verticalAlign: "middle",
  41. }}>1. Penjadwalan Evaluasi</th>
  42. <th
  43. rowspan="2"
  44. style={{
  45. backgroundColor: '#de8383',
  46. color: "black",
  47. textAlign: "center",
  48. verticalAlign: "middle",
  49. }}>2. Pemeriksaan</th>
  50. <th
  51. rowspan="2"
  52. style={{
  53. backgroundColor: '#fdda80',
  54. color: "black",
  55. textAlign: "center",
  56. verticalAlign: "middle",
  57. }}>3. Sanksi</th>
  58. <th
  59. rowspan="2"
  60. style={{
  61. backgroundColor: '#cfab80',
  62. color: "black",
  63. textAlign: "center",
  64. verticalAlign: "middle",
  65. }}>4. Keberatan</th>
  66. <th
  67. rowspan="2"
  68. style={{
  69. backgroundColor: '#ef90df',
  70. color: "black",
  71. textAlign: "center",
  72. verticalAlign: "middle",
  73. }}>5. Banding</th>
  74. <th
  75. rowspan="2"
  76. style={{
  77. backgroundColor: '#80df89',
  78. color: "black",
  79. textAlign: "center",
  80. verticalAlign: "middle",
  81. }}>6. Dokumen Perbaikan</th>
  82. <th
  83. rowspan="2"
  84. style={{
  85. backgroundColor: '#a3d4d1',
  86. color: "black",
  87. textAlign: "center",
  88. verticalAlign: "middle",
  89. }}>7. Permohonan Pencabutan Sanksi</th>
  90. <th
  91. rowspan="2"
  92. id='cabutSanksi'
  93. style={{
  94. // backgroundColor: '#e8f2f1',
  95. color: "black",
  96. textAlign: "center",
  97. verticalAlign: "middle",
  98. }}>Pelaporan Tuntas
  99. <hr style={{
  100. // backgroundColor: 'black',
  101. color: "black",
  102. }}></hr>
  103. Cabut Sanksi
  104. </th>
  105. <th
  106. rowspan="2"
  107. style={{
  108. backgroundColor: '#e8f2f1',
  109. color: "black",
  110. textAlign: "center",
  111. verticalAlign: "middle",
  112. }}>Lihat Laporan</th>
  113. </tr>
  114. <tr>
  115. <th
  116. style={{
  117. color: "black",
  118. textAlign: "center",
  119. verticalAlign: "middle",
  120. }}
  121. >Ditutup</th>
  122. <th>Delegasi LLDIKTI</th>
  123. </tr>
  124. </thead>
  125. {listData.map((data) => {
  126. return (
  127. <tr key={data.id}>
  128. <td>{data.pembina.name}</td>
  129. <Link
  130. href={{
  131. pathname: all_Laporan,
  132. query: { id: data.pembina.id },
  133. }}
  134. >
  135. <td style={{
  136. color: "black",
  137. textAlign: "center",
  138. cursor: "pointer",
  139. }}>{data.jumlah_laporan}</td>
  140. </Link>
  141. <Link
  142. href={{
  143. pathname: tuntasDitutup,
  144. query: { id: data.pembina.id },
  145. }}
  146. >
  147. <td style={{
  148. color: "black",
  149. textAlign: "center",
  150. cursor: "pointer",
  151. }}>{data.jumlah_ditutup}</td>
  152. </Link>
  153. <Link
  154. href={{
  155. pathname: delegasi,
  156. query: { id: data.pembina.id },
  157. }}
  158. >
  159. <td style={{
  160. color: "black",
  161. textAlign: "center",
  162. cursor: "pointer",
  163. }}>{data.jumlah_delegasi}</td>
  164. </Link>
  165. <Link
  166. href={{
  167. pathname: jadwal,
  168. query: { id: data.pembina.id },
  169. }}
  170. >
  171. <td style={{
  172. backgroundColor: '#80b1ff',
  173. color: "black",
  174. textAlign: "center",
  175. cursor: "pointer"
  176. }}>{data.jumlah_jadwal_evaluasi}</td>
  177. </Link>
  178. <Link
  179. href={{
  180. pathname: pemeriksaan,
  181. query: { id: data.pembina.id },
  182. }}
  183. >
  184. <td style={{
  185. backgroundColor: '#de8383',
  186. color: "black",
  187. textAlign: "center",
  188. cursor: "pointer",
  189. }}>{data.jumlah_pemeriksaan}</td>
  190. </Link>
  191. <Link
  192. href={{
  193. pathname: sanksi,
  194. query: { id: data.pembina.id },
  195. }}
  196. >
  197. <td style={{
  198. backgroundColor: '#fdda80',
  199. color: "black",
  200. textAlign: "center",
  201. cursor: "pointer",
  202. }}>{data.jumlah_sanksi}</td>
  203. </Link>
  204. <Link
  205. href={{
  206. pathname: keberatan,
  207. query: { id: data.pembina.id },
  208. }}
  209. >
  210. <td style={{
  211. backgroundColor: '#cfab80',
  212. color: "black",
  213. textAlign: "center",
  214. cursor: "pointer",
  215. }}>{data.jumlah_keberatan}</td>
  216. </Link>
  217. <Link
  218. href={{
  219. pathname: banding,
  220. query: { id: data.pembina.id },
  221. }}
  222. >
  223. <td style={{
  224. backgroundColor: '#ef90df',
  225. color: "black",
  226. textAlign: "center",
  227. cursor: "pointer",
  228. }}>{data.jumlah_banding}</td>
  229. </Link>
  230. <Link
  231. href={{
  232. pathname: perbaikan,
  233. query: { id: data.pembina.id },
  234. }}
  235. >
  236. <td style={{
  237. backgroundColor: '#80df89',
  238. color: "black",
  239. textAlign: "center",
  240. cursor: "pointer",
  241. }}>{data.jumlah_pemantauan_perbaikan}</td>
  242. </Link>
  243. <Link
  244. href={{
  245. pathname: cabutSanksi,
  246. query: { id: data.pembina.id },
  247. }}
  248. >
  249. <td style={{
  250. backgroundColor: '#a3d4d1',
  251. color: "black",
  252. textAlign: "center",
  253. cursor: "pointer",
  254. }}>{data.jumlah_pencabutan_sanksi}</td>
  255. </Link>
  256. <Link
  257. href={{
  258. pathname: tuntasCabutsanksi,
  259. query: { id: data.pembina.id },
  260. }}
  261. >
  262. <td style={{
  263. color: "black",
  264. textAlign: "center",
  265. cursor: "pointer",
  266. }}>{data.jumlah_diterima}</td>
  267. </Link>
  268. <td>
  269. <div className="ml-auto" style={{
  270. textAlign: "center",
  271. marginLeft: "auto",
  272. marginRight: "auto",
  273. }}>
  274. <Link
  275. href={{
  276. pathname: to,
  277. query: { id: data.pembina.id },
  278. }}
  279. >
  280. <Button className="btn-login" color >
  281. <span className="font-color-white">
  282. {linkName}
  283. </span>
  284. </Button>
  285. </Link>
  286. </div>
  287. </td>
  288. </tr>)
  289. })}
  290. </Table>
  291. </CardBody>
  292. </Card>
  293. )
  294. }
  295. export default TableRadar