Commit 9e7bc980 authored by EKSAD's avatar EKSAD

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into riri

parents 6774492b 0c5acf71
...@@ -1345,7 +1345,7 @@ export default class BudgetTahunan extends Component { ...@@ -1345,7 +1345,7 @@ export default class BudgetTahunan extends Component {
periode={this.state.periode.periode} periode={this.state.periode.periode}
submissionID={this.state.submissionID} submissionID={this.state.submissionID}
saveToMasterBudget={this.saveToMasterBudget.bind(this)} saveToMasterBudget={this.saveToMasterBudget.bind(this)}
onClickClose={() => this.setState({ visibleCAT: false, visibleBudgetTahunan: true })} onClickClose={() => this.setState({ visibleCF: false, visibleBudgetTahunan: true })}
getReport={this.getSubmission.bind(this)} getReport={this.getSubmission.bind(this)}
isApprover={this.state.isApprover} isApprover={this.state.isApprover}
status={this.state.status} status={this.state.status}
......
...@@ -42,7 +42,7 @@ export default class CashFlow extends Component { ...@@ -42,7 +42,7 @@ export default class CashFlow extends Component {
} }
componentDidMount() { componentDidMount() {
this.setState({loading: true}) this.setState({ loading: true })
this.getItemHierarki() this.getItemHierarki()
} }
...@@ -87,7 +87,7 @@ export default class CashFlow extends Component { ...@@ -87,7 +87,7 @@ export default class CashFlow extends Component {
item.order, item.order,
item.condition_it_should_be, item.condition_it_should_be,
item.condition_if_wrong, item.condition_if_wrong,
item.cash_flow.forecast_formula == null? [] : item.cash_flow.forecast_formula item.cash_flow.forecast_formula == null ? [] : item.cash_flow.forecast_formula
]) ])
if (item.children !== null) { if (item.children !== null) {
...@@ -125,7 +125,7 @@ export default class CashFlow extends Component { ...@@ -125,7 +125,7 @@ export default class CashFlow extends Component {
item.order, item.order,
item.condition_it_should_be, item.condition_it_should_be,
item.condition_if_wrong, item.condition_if_wrong,
item.cash_flow.forecast_formula == null? [] : item.cash_flow.forecast_formula item.cash_flow.forecast_formula == null ? [] : item.cash_flow.forecast_formula
]) ])
if (item.children !== null) { if (item.children !== null) {
if (item.children.length > 0) { if (item.children.length > 0) {
...@@ -154,9 +154,9 @@ export default class CashFlow extends Component { ...@@ -154,9 +154,9 @@ export default class CashFlow extends Component {
a.href = url; a.href = url;
a.download = 'Master Budget Cash Flow.xlsx'; a.download = 'Master Budget Cash Flow.xlsx';
a.click(); a.click();
this.setState({loading: false}) this.setState({ loading: false })
} else { } else {
this.setState({loading: false}) this.setState({ loading: false })
} }
} }
...@@ -188,13 +188,13 @@ export default class CashFlow extends Component { ...@@ -188,13 +188,13 @@ export default class CashFlow extends Component {
}) })
baru.map((item, index) => { baru.map((item, index) => {
if (item == '-' || item == '+' || item == '/' || item == '*'|| item == '(' || item == ')') { if (item == '-' || item == '+' || item == '/' || item == '*' || item == '(' || item == ')') {
anjay.push(item) anjay.push(item)
} else { } else {
if (String(item).includes('#')) { if (String(item).includes('#')) {
if (forecast !== undefined) { if (forecast !== undefined) {
let forecastt = 0 let forecastt = 0
forecast.map((items,index) => { forecast.map((items, index) => {
if (items.periode == periode) { if (items.periode == periode) {
forecastt += Number(items.value) forecastt += Number(items.value)
} }
...@@ -243,7 +243,7 @@ export default class CashFlow extends Component { ...@@ -243,7 +243,7 @@ export default class CashFlow extends Component {
let anjay2 = [] let anjay2 = []
let kurung = false let kurung = false
let item1 = [] let item1 = []
anjay.map((item,index) => { anjay.map((item, index) => {
if (item == "(") { if (item == "(") {
kurung = true kurung = true
} else if (item == ")") { } else if (item == ")") {
...@@ -295,7 +295,7 @@ export default class CashFlow extends Component { ...@@ -295,7 +295,7 @@ export default class CashFlow extends Component {
} }
}) })
if (index == anjay2.length -1) { if (index == anjay2.length - 1) {
if (opt == "tambah") { if (opt == "tambah") {
total = Number(total) + Number(totalPrio) total = Number(total) + Number(totalPrio)
} else if (opt == "kurang") { } else if (opt == "kurang") {
...@@ -381,7 +381,7 @@ export default class CashFlow extends Component { ...@@ -381,7 +381,7 @@ export default class CashFlow extends Component {
const handleForecast = (tableMeta, periode, column) => { const handleForecast = (tableMeta, periode, column) => {
let total = 0 let total = 0
// console.log(column) // console.log(tableMeta.rowData)
// console.log(tableMeta.rowIndex) // console.log(tableMeta.rowIndex)
// console.log(total) // console.log(total)
...@@ -460,7 +460,7 @@ export default class CashFlow extends Component { ...@@ -460,7 +460,7 @@ export default class CashFlow extends Component {
name: `MB 2021`, name: `MB 2021`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<th style={{ ...style2, color: '#fff', backgroundColor: '#07a7d0', top: 0, zIndex: 102 , fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} > <th style={{ ...style2, color: '#fff', backgroundColor: '#07a7d0', top: 0, zIndex: 102, fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
{/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> {/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography> <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> */} </TableCell> */}
...@@ -2206,6 +2206,28 @@ export default class CashFlow extends Component { ...@@ -2206,6 +2206,28 @@ export default class CashFlow extends Component {
/> />
</MuiThemeProvider> </MuiThemeProvider>
</div> </div>
<div className="grid grid-2x" style={{ marginTop: 20 }}>
<div className="col-1">
<button
type="button"
onClick={() => this.setState({ loading: true }, () => {
setTimeout(() => {
this.props.onClickClose()
}, 100);
})}
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none'
}}
>
<div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Cancel</Typography>
</div>
</button>
</div>
</div>
</div> </div>
</Paper> </Paper>
</div> </div>
......
...@@ -489,7 +489,7 @@ export default class SubHolding extends Component { ...@@ -489,7 +489,7 @@ export default class SubHolding extends Component {
let url = window.URL.createObjectURL(res); let url = window.URL.createObjectURL(res);
let a = document.createElement('a'); let a = document.createElement('a');
a.href = url; a.href = url;
a.download = 'Report DB Profit $ Loss.xlsx'; a.download = 'Report DB Profit & Loss.xlsx';
a.click(); a.click();
} }
} else { } else {
......
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