Commit effb3601 authored by EKSAD's avatar EKSAD

solve issue report item, nambah profit loss

parent 725586f9
......@@ -3,6 +3,7 @@ import { Typography, Paper, TextField, MenuItem } from '@material-ui/core';
import MUIDataTable from 'mui-datatables';
import Images from '../assets/Images';
import BalanceSheet from './BudgetTahunan/BalanceSheet';
import ProfitLoss from './BudgetTahunan/ProfitLoss';
export default class BudgetTahunan extends Component {
constructor(props) {
......@@ -12,7 +13,8 @@ export default class BudgetTahunan extends Component {
perusahaan: 'TAP Group',
revisi: '0',
visibleBudgetTahunan: true,
visibleBS: false
visibleBS: false,
visiblePL: false
}
}
......@@ -26,6 +28,15 @@ export default class BudgetTahunan extends Component {
visibleFAM: false,
visibleTP: false
})
} else if (item === 'Profit & Loss') {
this.setState({
visibleBudgetTahunan: false,
visibleBS: false,
visiblePL: true,
visibleCAT: false,
visibleFAM: false,
visibleTP: false
})
}
}
......@@ -217,6 +228,9 @@ export default class BudgetTahunan extends Component {
{this.state.visibleBS && (
<BalanceSheet />
)}
{this.state.visiblePL && (
<ProfitLoss />
)}
</div >
);
}
......
......@@ -34,10 +34,10 @@ export default class ProfitLoss extends Component {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ width: 388 }}>
{tableMeta.rowIndex == 0 || tableMeta.rowIndex == 1 ?
{tableMeta.rowIndex == 0 ?
<span style={{ fontSize: 12, fontWeight: 'bold' }}>{val}</span>
:
tableMeta.rowIndex == 2 || tableMeta.rowIndex == 6 || tableMeta.rowIndex == 7 || tableMeta.rowIndex == 8 ?
tableMeta.rowIndex == 1 || tableMeta.rowIndex == 4 || tableMeta.rowIndex == 7 ?
<span style={{ fontSize: 12, marginLeft: 10 }}>{val}</span> :
<span style={{ fontSize: 12, marginLeft: 20 }}>{val}</span>
}
......@@ -46,6 +46,23 @@ export default class ProfitLoss extends Component {
}
}
}, {
name: "Keterangan",
options: {
customHeadRender: (columnMeta) => (
<TableCell key={columnMeta.index} style={{ ...style2, top: 0, zIndex: 102, backgroundColor: '#354960', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
setCellProps: () => ({
style: {
position: "sticky",
left: 420,
background: "white",
zIndex: 101
}
})
}
},{
name: "31 Dec 2020 Actual",
options: {
customHeadRender: (columnMeta) => (
......@@ -74,7 +91,7 @@ export default class ProfitLoss extends Component {
return (
<div style={{ textAlign: 'right' }}>
{tableMeta.rowIndex === 3 || tableMeta.rowIndex === 4 || tableMeta.rowIndex === 9 ?
{tableMeta.rowIndex === 2 || tableMeta.rowIndex === 3 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -241,16 +258,16 @@ export default class ProfitLoss extends Component {
}
]
const dataTable = [
["TOTAL ASSETS", "11,247,249", "10,702,196"],
["TOTAL CURRENT ASSETS", "2,647,647", "2,058,898"],
["Cash & Cash Equivalent", "1,464,571", "729,743"],
["Cash & Bank Balance", "938,707", "265584"],
["Time & Call Deposit", "525,864", "464,159"],
["BI Deposit", "", ""],
["Marketable Securities", "150,250", "154,500"],
["Notes Receivable", "", ""],
["Accounts Receivable", "172,031", "97,112"],
["Trade Receivables - Third Party", "142,668", "77,480"],
["Ravenue", "", "11,247,249", "10,702,196"],
["Unit Bisnis/ Brand/ SubCo 1", "", "2,647,647", "2,058,898"],
["Sales Volume","Subco1", "1,464,571", "729,743"],
["Sales Price","Subco1", "1", "6"],
["Unit Bisnis/ Brand/ SubCo 2", "", "-", "-"],
["Sales Volume","Subco2", "-", "-"],
["Sales Price","Subco2", "-", "-"],
["Unit Bisnis/ Brand/ SubCo 3", "", "-", "-"],
["Sales Volume","Subco3", "-", "-"],
["Sales Price","Subco3", "-", "-"],
]
return (
<div style={{ height: this.props.height, backgroundColor: '#f8f8f8', marginBottom: 100, minHeight: 1000 }}>
......
This diff is collapsed.
......@@ -198,7 +198,7 @@ export default class VisualReportItems extends Component {
return (
<div>
<button type="button" onClick={() => this.collapse(item.id)}>{collapseIcon ? (this.state.arrayCollapse.includes(item.id) ? <AddIcon /> : <RemoveIcon />) : null}</button>
<label style={{ marginLeft: collapseIcon ? 10 : 0 }}>{item.report_name}</label>
<label style={{ marginLeft: collapseIcon ? 10 : 0 }}>{item.description}</label>
</div>
)
};
......
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