DetailJawaban.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import { FormGroup, Button } from "reactstrap";
  2. import Scrollable from "@/components/Common/Scrollable";
  3. import Link from "next/link";
  4. import { API_URL } from "@/env";
  5. function DetailJawaban({ data }) {
  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>{data.status}</h3>
  14. </div>
  15. </FormGroup>
  16. {data.dokumen.length ? (
  17. <FormGroup>
  18. <label md="4">Dokumen Jawaban:</label>
  19. <div md="8">
  20. <Scrollable height="120px" className="list-group">
  21. <table className="table table-bordered bg-transparent">
  22. <tbody>
  23. {data.dokumen.map((e) => (
  24. <tr>
  25. <td>
  26. <em className="fa-lg far fa-file-code"></em>
  27. </td>
  28. <td>
  29. <a className="text-muted" href={e.path} target="_blank" download={e.judul}>
  30. {e.judul}
  31. </a>
  32. </td>
  33. </tr>
  34. ))}
  35. </tbody>
  36. </table>
  37. </Scrollable>
  38. </div>
  39. </FormGroup>
  40. ) : (
  41. ""
  42. )}
  43. </form>
  44. {data.status === "Ditolak" && (
  45. <Link
  46. href={{
  47. pathname: "/pt/dokumen-perbaikan/detail",
  48. query: { id: data._id },
  49. }}
  50. >
  51. <Button color="primary">Perbaiki Dokumen</Button>
  52. </Link>
  53. )}
  54. </>
  55. );
  56. }
  57. export default DetailJawaban;