index.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import React, { Component } from "react";
  2. import ContentWrapper from "@/components/Layout/ContentWrapper";
  3. import { Row, Col } from "reactstrap";
  4. import CaseProgress from "@/components/Main/CaseProgress";
  5. import TableSanksi from "@/components/Banding/TableSanksi";
  6. import { getSanksi } from "@/actions/sanksi";
  7. import Loader from "@/components/Common/Loader";
  8. class Banding extends Component {
  9. constructor(props) {
  10. super(props);
  11. this.state = {
  12. sanksi: {},
  13. };
  14. }
  15. componentDidMount = async () => {
  16. const sanksi = await getSanksi({ banding: true });
  17. this.setState({ sanksi });
  18. };
  19. render() {
  20. const { sanksi } = this.state;
  21. return (
  22. <ContentWrapper>
  23. <div className="content-heading">Banding</div>
  24. <Row>
  25. <Col lg="4">
  26. <CaseProgress />
  27. </Col>
  28. <Col lg="8">{sanksi?.data ? <TableSanksi listData={sanksi.data} to="/app/banding/detail" linkName="Detail" /> : <Loader />}</Col>
  29. </Row>
  30. </ContentWrapper>
  31. );
  32. }
  33. }
  34. export default Banding;