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