Commit 2e295d04 authored by Deni Rinaldi's avatar Deni Rinaldi

pagiku cerah~

parent caa2c6ee
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Typography, Paper, createMuiTheme, MuiThemeProvider, TableCell, FormControlLabel, TextField, Input, Snackbar } from '@material-ui/core'; import { Typography, Paper, createMuiTheme, MuiThemeProvider, TableCell, FormControlLabel, TextField, Input, Snackbar, withStyles, Tooltip } from '@material-ui/core';
import MUIDataTable from 'mui-datatables'; import MUIDataTable from 'mui-datatables';
import NumberFormat from 'react-number-format'; import NumberFormat from 'react-number-format';
import api from '../../api'; import api from '../../api';
...@@ -28,6 +28,15 @@ const style2 = { ...@@ -28,6 +28,15 @@ const style2 = {
zIndex: 100 zIndex: 100
}; };
const LightTooltip = withStyles((theme) => ({
tooltip: {
backgroundColor: theme.palette.common.white,
color: 'rgba(0, 0, 0, 0.87)',
boxShadow: theme.shadows[1],
fontSize: 11,
},
}))(Tooltip);
export default class BalanceSheet extends Component { export default class BalanceSheet extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
...@@ -89,7 +98,7 @@ export default class BalanceSheet extends Component { ...@@ -89,7 +98,7 @@ export default class BalanceSheet extends Component {
} }
// console.log(payload) // console.log(payload)
api.create().getOperatingIndDetail(payload).then(response => { api.create().getOperatingIndDetail(payload).then(response => {
// console.log(response) console.log(response)
let dataTable = [] let dataTable = []
let res = response.data.data let res = response.data.data
// // console.log(res) // // console.log(res)
...@@ -357,7 +366,7 @@ export default class BalanceSheet extends Component { ...@@ -357,7 +366,7 @@ export default class BalanceSheet extends Component {
api.create().checkUploadOperatingInd(this.state.payload).then(response => { api.create().checkUploadOperatingInd(this.state.payload).then(response => {
// // console.log(JSON.stringify(this.state.payload)); // // console.log(JSON.stringify(this.state.payload));
// console.log('===============') // console.log('===============')
// console.log(response) console.log(response)
if (response.data) { if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
this.setState({ visibleUpload: false, visibleOI: false, loading: true }) this.setState({ visibleUpload: false, visibleOI: false, loading: true })
...@@ -429,7 +438,7 @@ export default class BalanceSheet extends Component { ...@@ -429,7 +438,7 @@ export default class BalanceSheet extends Component {
// console.log(JSON.stringify(body)) // console.log(JSON.stringify(body))
api.create('UPLOAD').uploadOperatingInd(body).then(response => { api.create('UPLOAD').uploadOperatingInd(body).then(response => {
// console.log(response); // console.log(response);
this.setState({loading: false}) this.setState({ loading: false })
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.props.onClickClose() this.props.onClickClose()
...@@ -578,35 +587,22 @@ export default class BalanceSheet extends Component { ...@@ -578,35 +587,22 @@ export default class BalanceSheet extends Component {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
return ( return (
<div style={{ width: 300 }}> <div style={{ width: 300 }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === null ?
null tableMeta.rowData[1] !== null ?
:
tableMeta.rowData[22] ?
tableMeta.rowData[22].length > 0 ?
tableMeta.rowData[22][0].field === 'item' ?
tableMeta.rowData[4] == 0 ?
<a data-tip={tableMeta.rowData[22][0].message} data-for="account">
<span style={{ fontSize: 12, fontWeight: 'bold', color: 'red' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
</a>
:
<div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
<a data-tip={tableMeta.rowData[22][0].message} data-for="account">
<span style={{ fontSize: 12, color: 'red' }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
</a>
</div>
:
tableMeta.rowData[4] == 0 ? tableMeta.rowData[4] == 0 ?
<span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span> <span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
: :
<div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}> <div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
<span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span> <span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
</div> </div> :
:
tableMeta.rowData[4] == 0 ? tableMeta.rowData[4] == 0 ?
<span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span> <LightTooltip title={"Report Items Not Registered"} arrow>
: <span style={{ fontSize: 12, fontWeight: 'bold', color: 'red' }}>{String(val).toUpperCase()}</span>
</LightTooltip> :
<div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}> <div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
<span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span> <LightTooltip title={"Report Items Not Registered"} arrow>
<span style={{ fontSize: 12, color: 'red' }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
</LightTooltip>
</div> </div>
: :
tableMeta.rowData[4] == 0 ? tableMeta.rowData[4] == 0 ?
...@@ -615,8 +611,46 @@ export default class BalanceSheet extends Component { ...@@ -615,8 +611,46 @@ export default class BalanceSheet extends Component {
<div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}> <div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
<span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span> <span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
</div> </div>
}
<ReactTooltip border={true} id="account" place="bottom" type="light" effect="solid" /> // tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === null ?
// null
// :
// tableMeta.rowData[22] ?
// tableMeta.rowData[22].length > 0 ?
// tableMeta.rowData[22][0].field === 'item' ?
// tableMeta.rowData[4] == 0 ?
// <a data-tip={tableMeta.rowData[22][0].message} data-for="account">
// <span style={{ fontSize: 12, fontWeight: 'bold', color: 'red' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
// </a>
// :
// <div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
// <a data-tip={tableMeta.rowData[22][0].message} data-for="account">
// <span style={{ fontSize: 12, color: 'red' }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
// </a>
// </div>
// :
// tableMeta.rowData[4] == 0 ?
// <span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
// :
// <div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
// <span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
// </div>
// :
// tableMeta.rowData[4] == 0 ?
// <span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
// :
// <div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
// <span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
// </div>
// :
// tableMeta.rowData[4] == 0 ?
// <span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
// :
// <div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
// <span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
// </div>
}
{/* <ReactTooltip border={true} id="account" place="bottom" type="light" effect="solid" /> */}
</div> </div>
) )
} }
...@@ -633,7 +667,7 @@ export default class BalanceSheet extends Component { ...@@ -633,7 +667,7 @@ export default class BalanceSheet extends Component {
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === null ?
null null
: :
<FormControlLabel <FormControlLabel
...@@ -674,7 +708,7 @@ export default class BalanceSheet extends Component { ...@@ -674,7 +708,7 @@ export default class BalanceSheet extends Component {
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === null ?
null null
: :
<NumberFormat <NumberFormat
...@@ -702,10 +736,10 @@ export default class BalanceSheet extends Component { ...@@ -702,10 +736,10 @@ export default class BalanceSheet extends Component {
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === null ?
null null
: :
tableMeta.rowData[0] == 2? tableMeta.rowData[0] == 2 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -724,7 +758,7 @@ export default class BalanceSheet extends Component { ...@@ -724,7 +758,7 @@ export default class BalanceSheet extends Component {
/> />
</div> </div>
: :
(tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6? (tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -788,10 +822,10 @@ export default class BalanceSheet extends Component { ...@@ -788,10 +822,10 @@ export default class BalanceSheet extends Component {
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === null ?
null null
: :
tableMeta.rowData[0] == 2? tableMeta.rowData[0] == 2 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -810,7 +844,7 @@ export default class BalanceSheet extends Component { ...@@ -810,7 +844,7 @@ export default class BalanceSheet extends Component {
/> />
</div> </div>
: :
(tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6? (tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -873,10 +907,10 @@ export default class BalanceSheet extends Component { ...@@ -873,10 +907,10 @@ export default class BalanceSheet extends Component {
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === null ?
null null
: :
tableMeta.rowData[0] == 2? tableMeta.rowData[0] == 2 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -895,7 +929,7 @@ export default class BalanceSheet extends Component { ...@@ -895,7 +929,7 @@ export default class BalanceSheet extends Component {
/> />
</div> </div>
: :
(tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6? (tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -958,10 +992,10 @@ export default class BalanceSheet extends Component { ...@@ -958,10 +992,10 @@ export default class BalanceSheet extends Component {
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === null ?
null null
: :
tableMeta.rowData[0] == 2? tableMeta.rowData[0] == 2 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -980,7 +1014,7 @@ export default class BalanceSheet extends Component { ...@@ -980,7 +1014,7 @@ export default class BalanceSheet extends Component {
/> />
</div> </div>
: :
(tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6? (tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1043,10 +1077,10 @@ export default class BalanceSheet extends Component { ...@@ -1043,10 +1077,10 @@ export default class BalanceSheet extends Component {
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === null ?
null null
: :
tableMeta.rowData[0] == 2? tableMeta.rowData[0] == 2 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1065,7 +1099,7 @@ export default class BalanceSheet extends Component { ...@@ -1065,7 +1099,7 @@ export default class BalanceSheet extends Component {
/> />
</div> </div>
: :
(tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6? (tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1128,10 +1162,10 @@ export default class BalanceSheet extends Component { ...@@ -1128,10 +1162,10 @@ export default class BalanceSheet extends Component {
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === null ?
null null
: :
tableMeta.rowData[0] == 2? tableMeta.rowData[0] == 2 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1150,7 +1184,7 @@ export default class BalanceSheet extends Component { ...@@ -1150,7 +1184,7 @@ export default class BalanceSheet extends Component {
/> />
</div> </div>
: :
(tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6? (tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1213,10 +1247,10 @@ export default class BalanceSheet extends Component { ...@@ -1213,10 +1247,10 @@ export default class BalanceSheet extends Component {
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === null ?
null null
: :
tableMeta.rowData[0] == 2? tableMeta.rowData[0] == 2 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1235,7 +1269,7 @@ export default class BalanceSheet extends Component { ...@@ -1235,7 +1269,7 @@ export default class BalanceSheet extends Component {
/> />
</div> </div>
: :
(tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6? (tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1298,10 +1332,10 @@ export default class BalanceSheet extends Component { ...@@ -1298,10 +1332,10 @@ export default class BalanceSheet extends Component {
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === null ?
null null
: :
tableMeta.rowData[0] == 2? tableMeta.rowData[0] == 2 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1320,7 +1354,7 @@ export default class BalanceSheet extends Component { ...@@ -1320,7 +1354,7 @@ export default class BalanceSheet extends Component {
/> />
</div> </div>
: :
(tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6? (tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1383,10 +1417,10 @@ export default class BalanceSheet extends Component { ...@@ -1383,10 +1417,10 @@ export default class BalanceSheet extends Component {
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === null ?
null null
: :
tableMeta.rowData[0] == 2? tableMeta.rowData[0] == 2 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1405,7 +1439,7 @@ export default class BalanceSheet extends Component { ...@@ -1405,7 +1439,7 @@ export default class BalanceSheet extends Component {
/> />
</div> </div>
: :
(tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6? (tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1468,10 +1502,10 @@ export default class BalanceSheet extends Component { ...@@ -1468,10 +1502,10 @@ export default class BalanceSheet extends Component {
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === null ?
null null
: :
tableMeta.rowData[0] == 2? tableMeta.rowData[0] == 2 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1490,7 +1524,7 @@ export default class BalanceSheet extends Component { ...@@ -1490,7 +1524,7 @@ export default class BalanceSheet extends Component {
/> />
</div> </div>
: :
(tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6? (tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1553,10 +1587,10 @@ export default class BalanceSheet extends Component { ...@@ -1553,10 +1587,10 @@ export default class BalanceSheet extends Component {
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === null ?
null null
: :
tableMeta.rowData[0] == 2? tableMeta.rowData[0] == 2 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1575,7 +1609,7 @@ export default class BalanceSheet extends Component { ...@@ -1575,7 +1609,7 @@ export default class BalanceSheet extends Component {
/> />
</div> </div>
: :
(tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6? (tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1638,10 +1672,10 @@ export default class BalanceSheet extends Component { ...@@ -1638,10 +1672,10 @@ export default class BalanceSheet extends Component {
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === null ?
null null
: :
tableMeta.rowData[0] == 2? tableMeta.rowData[0] == 2 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1660,7 +1694,7 @@ export default class BalanceSheet extends Component { ...@@ -1660,7 +1694,7 @@ export default class BalanceSheet extends Component {
/> />
</div> </div>
: :
(tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6? (tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1723,10 +1757,10 @@ export default class BalanceSheet extends Component { ...@@ -1723,10 +1757,10 @@ export default class BalanceSheet extends Component {
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === null ?
null null
: :
tableMeta.rowData[0] == 2? tableMeta.rowData[0] == 2 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1745,7 +1779,7 @@ export default class BalanceSheet extends Component { ...@@ -1745,7 +1779,7 @@ export default class BalanceSheet extends Component {
/> />
</div> </div>
: :
(tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6? (tableMeta.rowData[0] == 5 || tableMeta.rowData[0] == 6 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1989,7 +2023,7 @@ export default class BalanceSheet extends Component { ...@@ -1989,7 +2023,7 @@ export default class BalanceSheet extends Component {
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div> </div>
{this.state.dataLoaded && ( {this.state.dataLoaded && (
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150)}}> <div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
{this.state.loading && loadingComponent} {this.state.loading && loadingComponent}
<MuiThemeProvider theme={getMuiTheme()}> <MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable <MUIDataTable
......
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