Commit 9ba71bfb authored by Deni Rinaldi's avatar Deni Rinaldi

budgetTahun

parent e14b3aca
...@@ -288,6 +288,11 @@ export default class BudgetTahunan extends Component { ...@@ -288,6 +288,11 @@ export default class BudgetTahunan extends Component {
this.setState({ alert: false }) this.setState({ alert: false })
} }
getDataBalanceSheet(data){
console.log(data)
}
render() { render() {
const columns = ["#", "Jenis Laporan", const columns = ["#", "Jenis Laporan",
{ {
...@@ -594,6 +599,7 @@ export default class BudgetTahunan extends Component { ...@@ -594,6 +599,7 @@ export default class BudgetTahunan extends Component {
company={this.state.company} company={this.state.company}
revision={this.state.revisionTable} revision={this.state.revisionTable}
periode={this.state.periode.periode} periode={this.state.periode.periode}
getDataBalanceSheet={this.getDataBalanceSheet.bind(this)}
onClickClose={() => this.setState({ visibleBS: false, visibleBudgetTahunan: true })} onClickClose={() => this.setState({ visibleBS: false, visibleBudgetTahunan: true })}
/> />
)} )}
......
...@@ -708,6 +708,17 @@ export default class BalanceSheet extends Component { ...@@ -708,6 +708,17 @@ export default class BalanceSheet extends Component {
// }, () => console.log(this.state.dataTable)) // }, () => console.log(this.state.dataTable))
} }
backToMasterBudget(){
let data = this.state.dataTable.map(i => {
return [
i[1], i[4], i[6], i[7], i[8], i[9], i[10], i[11], i[12], i[13], i[14], i[15], i[16], i[17], i[18], i[19], i[20], i[21]
]
})
// console.log(data);
this.props.getDataBalanceSheet(data)
this.props.onClickClose()
}
render() { render() {
let dataTable2 = this.state.dataTable let dataTable2 = this.state.dataTable
const handleChange = (value, tableMeta) => { const handleChange = (value, tableMeta) => {
...@@ -771,7 +782,7 @@ export default class BalanceSheet extends Component { ...@@ -771,7 +782,7 @@ export default class BalanceSheet extends Component {
setCellProps: () => ({ style }), setCellProps: () => ({ style }),
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
return ( return (
<div style={{ width: 300}}> <div style={{ width: 300 }}>
{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>
: :
...@@ -1957,7 +1968,7 @@ export default class BalanceSheet extends Component { ...@@ -1957,7 +1968,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>
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) , height: this.props.height - 400 }}> <div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150), height: this.props.height - 400 }}>
<MuiThemeProvider theme={getMuiTheme()}> <MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable <MUIDataTable
data={dataTable2} data={dataTable2}
...@@ -1967,7 +1978,7 @@ export default class BalanceSheet extends Component { ...@@ -1967,7 +1978,7 @@ export default class BalanceSheet extends Component {
</MuiThemeProvider> </MuiThemeProvider>
</div> </div>
</div> </div>
<div className="grid grid-2x" style={{ marginTop: 20}}> <div className="grid grid-2x" style={{ marginTop: 20 }}>
<div className="col-1"> <div className="col-1">
<button <button
className="button" className="button"
...@@ -1988,9 +1999,19 @@ export default class BalanceSheet extends Component { ...@@ -1988,9 +1999,19 @@ export default class BalanceSheet extends Component {
<div style={{ backgroundColor: '#fff', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #354960', marginRight: 20 }}> <div style={{ backgroundColor: '#fff', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #354960', marginRight: 20 }}>
<Typography style={{ fontSize: '11px', color: '#354960', textAlign: 'center' }}>Cancel</Typography> <Typography style={{ fontSize: '11px', color: '#354960', textAlign: 'center' }}>Cancel</Typography>
</div> </div>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', marginRight: 20 }}> <button
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save</Typography> type="button"
</div> onClick={() => this.backToMasterBudget()}
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
}}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', marginRight: 20 }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save</Typography>
</div>
</button>
<button <button
className="button" className="button"
type="button" type="button"
......
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