DetailJawaban.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import { FormGroup, Button } from "reactstrap";
  2. import Scrollable from "@/components/Common/Scrollable";
  3. import Link from "next/link";
  4. function DetailJawaban({ data }) {
  5. const { jawaban } = data.sanksi.banding;
  6. return (
  7. <>
  8. <p className="lead bb">Jawaban Permohonan Banding</p>
  9. <form className="form-horizontal">
  10. <FormGroup>
  11. <label md="4">Jawaban:</label>
  12. <div md="8">
  13. <h3>{jawaban.status}</h3>
  14. </div>
  15. </FormGroup>
  16. <FormGroup>
  17. <label md="4">Dokumen Jawaban:</label>
  18. <div md="8">
  19. <Scrollable height="120px" className="list-group">
  20. <table className="table table-bordered bg-transparent">
  21. <tbody>
  22. {jawaban.files.map((e) => (
  23. <tr>
  24. <td>
  25. <em className="fa-lg far fa-file-code"></em>
  26. </td>
  27. <td>
  28. <a className="text-muted" href={`data:${e.type};base64, ${Buffer.from(e.data).toString("base64")}`} download={e.name}>
  29. {e.name}
  30. </a>
  31. </td>
  32. </tr>
  33. ))}
  34. </tbody>
  35. </table>
  36. </Scrollable>
  37. </div>
  38. </FormGroup>
  39. </form>
  40. {jawaban.status === "Ditolak" && (
  41. <Link
  42. href={{
  43. pathname: "/app/pt/dokumen-perbaikan/detail",
  44. query: { noSanksi: sanksi.data[0].sanksi.no_sanksi },
  45. }}
  46. >
  47. <Button color="primary">Perbaiki Dokumen</Button>
  48. </Link>
  49. )}
  50. </>
  51. );
  52. }
  53. export default DetailJawaban;