import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import ClipLoader from 'react-spinners/ClipLoader'; import {ExportCSV} from '../ExportCSV'; export default class ReportCompound extends Component { constructor(props) { super(props); this.state = { current_id: this.props.current_id, dataReport: [], loading: true, }; } componentDidMount(){ fetch('/api/report/compound/list/null/null').then(response => { response.json().then(res => { this.setState({ dataReport: res.data, loading: false }); const script = document.createElement("script"); script.src = "/js/dashboard/datatable.js"; script.async = true; document.body.appendChild(script); }) }) } render() { return (
Laporan Pengeluaran Kompaun Mengikut Kesalahan
{/* {!this.state.loading ? : ""} */}
{!this.state.loading ? this.state.dataReport.map((item,i) => ) : }
# Kesalahan Jumlah Kompaun Keluar Amaun Kompaun (Rm) Jumlah Bayar Amaun Bayar (RM) Jumlah Kompaun Belum Bayar Amount Tungakkan (RM) Kompaun Batal Amaun Batal (RM) Kompaun Kurang Amaun Kurang (RM)
{item.index} {item.kesalahan} {item.jumlahK} {item.amaunK} {item.jumlahB} {item.amaunB} {item.belumB} {item.amaunT} {item.kBatal} {item.amaunBatal} {item.kompaunKurang} {item.amaunKurang}
# Kesalahan Jumlah Kompaun Keluar Amaun Kompaun (Rm) Jumlah Bayar Amaun Bayar (RM) Jumlah Kompaun Belum Bayar Amount Tungakkan (RM) Kompaun Batal Amaun Batal (RM) Kompaun Kurang Amaun Kurang (RM)
); } } if (document.getElementById('reportcompound')) { const component = document.getElementById('reportcompound'); const props = Object.assign({}, component.dataset) ReactDOM.render(, component); }