TableRadar.js 7.8 KB

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