Commit 755b2adf authored by d.arizona's avatar d.arizona

apdet giat bgt

parent 1126c62a
...@@ -395,7 +395,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -395,7 +395,7 @@ export default class FixedAssetsMovement extends Component {
async downloadAllData() { async downloadAllData() {
// let url = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}` // let url = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
console.log(url); // console.log(url);
let resReal = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}` let resReal = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
let resNull = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}` let resNull = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
let res = await fetch( let res = await fetch(
......
...@@ -6,6 +6,7 @@ import DonutChart from 'react-d3-donut'; ...@@ -6,6 +6,7 @@ import DonutChart from 'react-d3-donut';
import Constant from '../library/Constant'; import Constant from '../library/Constant';
import api from '../api'; import api from '../api';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { PropagateLoader } from 'react-spinners';
var ct = require("../library/CustomTable"); var ct = require("../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable()); const getMuiTheme = () => createMuiTheme(ct.customTable());
...@@ -53,6 +54,7 @@ class HomePage extends Component { ...@@ -53,6 +54,7 @@ class HomePage extends Component {
this.getApprMat() this.getApprMat()
this.getListUserSubco() this.getListUserSubco()
this.getDashboardMB() this.getDashboardMB()
this.getDashboard()
} }
componentDidUpdate() { componentDidUpdate() {
...@@ -97,6 +99,7 @@ class HomePage extends Component { ...@@ -97,6 +99,7 @@ class HomePage extends Component {
} }
getApprMat() { getApprMat() {
this.setState({loading: true})
api.create().getAM().then((response) => { api.create().getAM().then((response) => {
console.log(response); console.log(response);
let actAM = response.data.data.map((item, index) => { let actAM = response.data.data.map((item, index) => {
...@@ -111,6 +114,7 @@ class HomePage extends Component { ...@@ -111,6 +114,7 @@ class HomePage extends Component {
this.setState({ isApprover: false }) this.setState({ isApprover: false })
} }
console.log(actAM) console.log(actAM)
this.setState({loading: false})
}) })
} }
...@@ -132,7 +136,7 @@ class HomePage extends Component { ...@@ -132,7 +136,7 @@ class HomePage extends Component {
} }
render() { render() {
const columns = ["#", "ID", "Nama Perusahaan", "Jenis Report", "Revisi", "Status", { const columns = ["#", "ID", "Company", "Report Type", "Revision", "Status", {
name: "Action", name: "Action",
options: { options: {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
...@@ -211,8 +215,19 @@ class HomePage extends Component { ...@@ -211,8 +215,19 @@ class HomePage extends Component {
color: '#f65a4c', color: '#f65a4c',
name: 'name', name: 'name',
}] }]
const loadingComponent = (
<div style={{ position: 'absolute', zIndex: 110, top: 0, left: 0, width: '100%', height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.8)' }}>
<PropagateLoader
// css={override}
size={20}
color={"#274B80"}
loading={this.state.loading}
/>
</div>
);
return ( return (
<div style={{ flex: 1, backgroundColor: '#f8f8f8' }}> <div style={{ flex: 1, backgroundColor: '#f8f8f8' }}>
{this.state.loading && loadingComponent}
{this.state.isApprover === true ? {this.state.isApprover === true ?
<div> <div>
<div className={"main-color"} style={{ height: 78, flex: 1, display: 'flex', alignItems: 'center', paddingLeft: 20 }}> <div className={"main-color"} style={{ height: 78, flex: 1, display: 'flex', alignItems: 'center', paddingLeft: 20 }}>
......
...@@ -479,11 +479,12 @@ export default class BalanceSheet extends Component { ...@@ -479,11 +479,12 @@ export default class BalanceSheet extends Component {
const handleParent = (tableMeta) => { const handleParent = (tableMeta) => {
// console.log(tableMeta) // console.log(tableMeta)
let total = Number(tableMeta.columnIndex == ""? 0 : tableMeta.columnIndex) let total = 0
dataTable2.map((item, index) => { dataTable2.map((item, index) => {
if (item[2] == tableMeta.rowData[1]) { if (item[2] == tableMeta.rowData[1]) {
// console.log('masuk') // console.log(total)
// console.log(item[tableMeta.columnIndex])
total += Number(item[tableMeta.columnIndex]) total += Number(item[tableMeta.columnIndex])
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment