Commit fb38ed45 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'faisal' into 'master'

Faisal

See merge request !1031
parents 2026af0f a09b2183
...@@ -127,7 +127,7 @@ export default class SummaryFR extends Component { ...@@ -127,7 +127,7 @@ export default class SummaryFR extends Component {
} }
} }
},{ },{
name: `${Number(this.props.periode) - 1}`, name: "2020",
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 }} >
...@@ -149,6 +149,7 @@ export default class SummaryFR extends Component { ...@@ -149,6 +149,7 @@ export default class SummaryFR extends Component {
), ),
setCellProps: () => ({ style2 }), setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
{ console.log(tableMeta); }
return ( return (
<div> <div>
<div className="grid grid-3x content-center"> <div className="grid grid-3x content-center">
...@@ -168,7 +169,7 @@ export default class SummaryFR extends Component { ...@@ -168,7 +169,7 @@ export default class SummaryFR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[1]).toFixed(1)} value={Number(tableMeta.rowData[3]).toFixed(1)}
/> />
} }
/> />
...@@ -191,7 +192,7 @@ export default class SummaryFR extends Component { ...@@ -191,7 +192,7 @@ export default class SummaryFR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[2]).toFixed(1)} value={Number(tableMeta.rowData[4]).toFixed(1)}
/> />
} }
/> />
...@@ -214,7 +215,7 @@ export default class SummaryFR extends Component { ...@@ -214,7 +215,7 @@ export default class SummaryFR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[3]).toFixed(1)} value={Number(tableMeta.rowData[5]).toFixed(1)}
/> />
} }
/> />
...@@ -292,7 +293,7 @@ export default class SummaryFR extends Component { ...@@ -292,7 +293,7 @@ export default class SummaryFR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[1]).toFixed(1)} value={Number(tableMeta.rowData[6]).toFixed(1)}
/> />
} }
/> />
...@@ -315,7 +316,7 @@ export default class SummaryFR extends Component { ...@@ -315,7 +316,7 @@ export default class SummaryFR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[2]).toFixed(1)} value={Number(tableMeta.rowData[7]).toFixed(1)}
/> />
} }
/> />
...@@ -338,7 +339,7 @@ export default class SummaryFR extends Component { ...@@ -338,7 +339,7 @@ export default class SummaryFR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[3]).toFixed(1)} value={Number(tableMeta.rowData[8]).toFixed(1)}
/> />
} }
/> />
...@@ -361,7 +362,7 @@ export default class SummaryFR extends Component { ...@@ -361,7 +362,7 @@ export default class SummaryFR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[3]).toFixed(1)} value={Number(tableMeta.rowData[9]).toFixed(1)}
/> />
} }
/> />
...@@ -384,7 +385,7 @@ export default class SummaryFR extends Component { ...@@ -384,7 +385,7 @@ export default class SummaryFR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[3]).toFixed(1)} value={Number(tableMeta.rowData[10]).toFixed(1)}
/> />
} }
/> />
...@@ -409,7 +410,7 @@ export default class SummaryFR extends Component { ...@@ -409,7 +410,7 @@ export default class SummaryFR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[1]).toFixed(1)} value={Number(tableMeta.rowData[11]).toFixed(1)}
/> />
} }
/> />
...@@ -432,7 +433,7 @@ export default class SummaryFR extends Component { ...@@ -432,7 +433,7 @@ export default class SummaryFR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[2]).toFixed(1)} value={Number(tableMeta.rowData[12]).toFixed(1)}
/> />
} }
/> />
...@@ -455,7 +456,7 @@ export default class SummaryFR extends Component { ...@@ -455,7 +456,7 @@ export default class SummaryFR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[3]).toFixed(1)} value={Number(tableMeta.rowData[13]).toFixed(1)}
/> />
} }
/> />
...@@ -478,7 +479,7 @@ export default class SummaryFR extends Component { ...@@ -478,7 +479,7 @@ export default class SummaryFR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[3]).toFixed(1)} value={Number(tableMeta.rowData[14]).toFixed(1)}
/> />
} }
/> />
...@@ -501,7 +502,7 @@ export default class SummaryFR extends Component { ...@@ -501,7 +502,7 @@ export default class SummaryFR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[3]).toFixed(1)} value={Number(tableMeta.rowData[15]).toFixed(1)}
/> />
} }
/> />
...@@ -541,7 +542,7 @@ export default class SummaryFR extends Component { ...@@ -541,7 +542,7 @@ export default class SummaryFR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[14]).toFixed(1)} value={Number(tableMeta.rowData[16]).toFixed(1)}
/> />
} }
/> />
...@@ -578,7 +579,7 @@ export default class SummaryFR extends Component { ...@@ -578,7 +579,7 @@ export default class SummaryFR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[15]).toFixed(1)} value={Number(tableMeta.rowData[17]).toFixed(1)}
/> />
} }
/> />
...@@ -615,7 +616,7 @@ export default class SummaryFR extends Component { ...@@ -615,7 +616,7 @@ export default class SummaryFR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(tableMeta.rowData[16]).toFixed(1)} value={Number(tableMeta.rowData[18]).toFixed(1)}
/> />
} }
/> />
...@@ -629,9 +630,10 @@ export default class SummaryFR extends Component { ...@@ -629,9 +630,10 @@ export default class SummaryFR extends Component {
] ]
let datas = [ let datas = [
["ABCD", "%", "Rp Bio", { a: "0", b: "0", c: "0", d: "0" }, { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }], ["ABCD", "%", "Rp Bio", "3", "4", "5", "6", "7", "8", "9", "10", "11", { a: "0", b: "0", c: "0", d: "0" }, { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }],
// ["Total Assets", "unit try", { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }] // ["Total Assets", "unit try", { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }]
] ]
console.log(datas);
const loadingComponent = ( const loadingComponent = (
<div style={{ position: 'absolute', zIndex: 110, top: 0, left: 0, width: '100%', height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.8)' }}> <div style={{ position: 'absolute', zIndex: 110, top: 0, left: 0, width: '100%', height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.8)' }}>
<PropagateLoader <PropagateLoader
......
...@@ -1180,95 +1180,83 @@ export default class SubHolding extends Component { ...@@ -1180,95 +1180,83 @@ export default class SubHolding extends Component {
} }
}) })
} else if (this.state.report.value === 7) { } else if (this.state.report.value === 7) {
api.create().getReportBSMB(payload).then(response => { let payload = {
"report_id": this.state.report.value,
"company_id": this.state.company.company_id,
"periode": this.state.periode.periode,
"months": "1"
}
api.create().getReportBSSuma(payload).then(response => {
console.log(payload); console.log(payload);
console.log(response); console.log(response);
// let dataTable = [] let dataTable = []
// if (response.data) { if (response.data) {
// let res = response.data.data let res = response.data.data
// const handlePushChild = (item) => { const handlePushChild = (item) => {
// let indexIDzz = dataTable.findIndex((val) => val[1] === item.id) let indexIDzz = dataTable.findIndex((val) => val[1] === item.id)
// if (indexIDzz === -1) { if (indexIDzz === -1) {
// dataTable.push([ dataTable.push([
// item.type_report_id, item.type_report_id,
// item.id, item.id,
// item.parent, item.parent,
// item.formula, item.formula,
// item.level, item.level,
// item.description, item.description,
// item.balance_sheet.total_actual_before === null ? "0.0" : item.balance_sheet.total_actual_before === "" ? "0.0" : item.balance_sheet.total_actual_before, item.balance_sheet.last_month,
// Number(item.balance_sheet.january).toFixed(1), item.balance_sheet.actual,
// Number(item.balance_sheet.february).toFixed(1), item.balance_sheet.mb,
// Number(item.balance_sheet.march).toFixed(1), item.balance_sheet.percent_of_mb,
// Number(item.balance_sheet.april).toFixed(1), item.balance_sheet.ol,
// Number(item.balance_sheet.may).toFixed(1), item.balance_sheet.percent_of_ol,
// Number(item.balance_sheet.june).toFixed(1), item.balance_sheet.last_year,
// Number(item.balance_sheet.july).toFixed(1), item.balance_sheet.forecast_next_year,
// Number(item.balance_sheet.august).toFixed(1), item.balance_sheet.forecast_next_two_year,
// Number(item.balance_sheet.september).toFixed(1), item.order
// Number(item.balance_sheet.october).toFixed(1), ])
// Number(item.balance_sheet.november).toFixed(1), }
// Number(item.balance_sheet.december).toFixed(1), if (item.children !== null) {
// Number(item.balance_sheet.total_current_year).toFixed(1), if (item.children.length > 0) {
// Number(item.balance_sheet.total_next_year).toFixed(1), item.children.map((items, indexs) => {
// Number(item.balance_sheet.total_more_year).toFixed(1), handlePushChild(items)
// item.order, })
// item.condition_it_should_be, }
// item.condition_if_wrong }
// ]) }
// } res.map((item, index) => {
// if (item.children !== null) { dataTable.push([
// if (item.children.length > 0) { item.type_report_id,
// item.children.map((items, indexs) => { item.id,
// handlePushChild(items) item.parent,
// }) item.formula,
// } item.level,
// } item.description,
// } item.balance_sheet.last_month,
// res.map((item, index) => { item.balance_sheet.actual,
// dataTable.push([ item.balance_sheet.mb,
// item.type_report_id, item.balance_sheet.percent_of_mb,
// item.id, item.balance_sheet.ol,
// item.parent, item.balance_sheet.percent_of_ol,
// item.formula, item.balance_sheet.last_year,
// item.level, item.balance_sheet.forecast_next_year,
// item.description, item.balance_sheet.forecast_next_two_year,
// item.balance_sheet.total_actual_before === null ? "0.0" : item.balance_sheet.total_actual_before === "" ? "0.0" : item.balance_sheet.total_actual_before, item.order
// Number(item.balance_sheet.january).toFixed(1), ])
// Number(item.balance_sheet.february).toFixed(1), if (item.children !== null) {
// Number(item.balance_sheet.march).toFixed(1), if (item.children.length > 0) {
// Number(item.balance_sheet.april).toFixed(1), item.children.map((items, indexs) => {
// Number(item.balance_sheet.may).toFixed(1), handlePushChild(items)
// Number(item.balance_sheet.june).toFixed(1), })
// Number(item.balance_sheet.july).toFixed(1), }
// Number(item.balance_sheet.august).toFixed(1), }
// Number(item.balance_sheet.september).toFixed(1), })
// Number(item.balance_sheet.october).toFixed(1), // this.setState({ dataTable, previewTable: true, loading: false, previewDownload: true })
// Number(item.balance_sheet.november).toFixed(1), this.setState({ dataTable }, () => {
// Number(item.balance_sheet.december).toFixed(1), console.log(this.state.dataTable)
// Number(item.balance_sheet.total_current_year).toFixed(1), // this.getBalanceSheetMR(payload)
// Number(item.balance_sheet.total_next_year).toFixed(1), })
// Number(item.balance_sheet.total_more_year).toFixed(1), } else {
// item.order, this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
// item.condition_it_should_be, }
// item.condition_if_wrong
// ])
// if (item.children !== null) {
// if (item.children.length > 0) {
// item.children.map((items, indexs) => {
// handlePushChild(items)
// })
// }
// }
// })
// // this.setState({ dataTable, previewTable: true, loading: false, previewDownload: true })
// this.setState({ dataTable }, () => {
// console.log(this.state.dataTable)
// this.getBalanceSheetMR(payload)
// })
// } else {
// this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
// }
this.setState({ previewTable: true, loading: false, previewDownload: false }) this.setState({ previewTable: true, loading: false, previewDownload: false })
}) })
......
...@@ -14919,6 +14919,31 @@ export default class TableSubHolding extends Component { ...@@ -14919,6 +14919,31 @@ export default class TableSubHolding extends Component {
const columnSummaryBS = [ const columnSummaryBS = [
{ {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
},{
name: "Account", name: "Account",
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
...@@ -14982,7 +15007,7 @@ export default class TableSubHolding extends Component { ...@@ -14982,7 +15007,7 @@ export default class TableSubHolding extends Component {
), ),
setCellProps: () => ({ style2 }), setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
console.log(tableMeta) // console.log(tableMeta)
return ( return (
<div> <div>
<div className="grid grid-2x content-center"> <div className="grid grid-2x content-center">
...@@ -14999,11 +15024,11 @@ export default class TableSubHolding extends Component { ...@@ -14999,11 +15024,11 @@ export default class TableSubHolding extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 70, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(1).toFixed(1)} value={Number(tableMeta.rowData[6]).toFixed(1)}
/> />
} }
/> />
...@@ -15022,11 +15047,11 @@ export default class TableSubHolding extends Component { ...@@ -15022,11 +15047,11 @@ export default class TableSubHolding extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 70, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(2).toFixed(1)} value={Number(tableMeta.rowData[7]).toFixed(1)}
/> />
} }
/> />
...@@ -15045,11 +15070,11 @@ export default class TableSubHolding extends Component { ...@@ -15045,11 +15070,11 @@ export default class TableSubHolding extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 70, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(3).toFixed(1)} value={Number(tableMeta.rowData[8]).toFixed(1)}
/> />
} }
/> />
...@@ -15068,11 +15093,11 @@ export default class TableSubHolding extends Component { ...@@ -15068,11 +15093,11 @@ export default class TableSubHolding extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 70, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(4).toFixed(1)} value={Number(tableMeta.rowData[9]).toFixed(1)}
/> />
} }
/> />
...@@ -15097,7 +15122,7 @@ export default class TableSubHolding extends Component { ...@@ -15097,7 +15122,7 @@ export default class TableSubHolding extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(5).toFixed(1)} value={Number(tableMeta.rowData[10]).toFixed(1)}
/> />
} }
/> />
...@@ -15120,7 +15145,7 @@ export default class TableSubHolding extends Component { ...@@ -15120,7 +15145,7 @@ export default class TableSubHolding extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(6).toFixed(1)} value={Number(tableMeta.rowData[11]).toFixed(1)}
/> />
} }
/> />
...@@ -15143,7 +15168,7 @@ export default class TableSubHolding extends Component { ...@@ -15143,7 +15168,7 @@ export default class TableSubHolding extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(7).toFixed(1)} value={Number(tableMeta.rowData[12]).toFixed(1)}
/> />
} }
/> />
...@@ -15166,7 +15191,7 @@ export default class TableSubHolding extends Component { ...@@ -15166,7 +15191,7 @@ export default class TableSubHolding extends Component {
</TableCell> */} </TableCell> */}
<div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div> <div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div className="grid grid-1x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}> <div className="grid grid-1x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, backgroundColor: '#1c71b8', width: 96 }}> <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, backgroundColor: '#1c71b8' }}>
<span>{"ForeCast"}</span> <span>{"ForeCast"}</span>
</div> </div>
</div> </div>
...@@ -15176,7 +15201,27 @@ export default class TableSubHolding extends Component { ...@@ -15176,7 +15201,27 @@ export default class TableSubHolding extends Component {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
return ( return (
<div style={{textAlign: 'right' }}> <div style={{textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[12]).toFixed(1)}
/>
}
/>
</div>
}
</div> </div>
) )
} }
...@@ -15191,7 +15236,7 @@ export default class TableSubHolding extends Component { ...@@ -15191,7 +15236,7 @@ export default class TableSubHolding extends Component {
</TableCell> */} </TableCell> */}
<div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div> <div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5 }}>{columnMeta.name}</div>
<div className="grid grid-1x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}> <div className="grid grid-1x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, backgroundColor: '#1c71b8', width: 96 }}> <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, backgroundColor: '#1c71b8' }}>
<span>{"ForeCast"}</span> <span>{"ForeCast"}</span>
</div> </div>
</div> </div>
...@@ -15201,11 +15246,66 @@ export default class TableSubHolding extends Component { ...@@ -15201,11 +15246,66 @@ export default class TableSubHolding extends Component {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
return ( return (
<div style={{textAlign: 'right' }}> <div style={{textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 ?
null
: tableMeta.rowData[0] === 1 ?
null :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(tableMeta.rowData[12]).toFixed(1)}
/>
}
/>
</div>
}
</div> </div>
) )
} }
} }
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
} }
] ]
...@@ -16048,7 +16148,7 @@ export default class TableSubHolding extends Component { ...@@ -16048,7 +16148,7 @@ export default class TableSubHolding extends Component {
<div style={{ padding: '0px 20px 20px 20px', width: this.props.width - (this.props.open === true ? 350 : 100) }}> <div style={{ padding: '0px 20px 20px 20px', width: this.props.width - (this.props.open === true ? 350 : 100) }}>
<MuiThemeProvider theme={getMuiTheme()}> <MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable <MUIDataTable
data={this.props.type === 7 ? dataSummaryBS : this.props.type === 8 ? dataSummaryPL : this.props.type === 9 ? dataSummaryFR : dataTable2} data={this.props.type === 8 ? dataSummaryPL : this.props.type === 9 ? dataSummaryFR : dataTable2}
columns={this.props.type === 2 ? columnDBBS : this.props.type === 1 ? columnDBPLDetail : this.props.type === 3 ? columnDBPL : this.props.type === 4 ? columnDBFR : this.props.type === 5 ? columnDBTP : this.props.type === 7 ? columnSummaryBS : this.props.type === 21 ? columnDBOI : this.props.type === 6? columnDBCF : this.props.type === 8 ? columnSummaryPL : this.props.type === 9 ? columnSummaryFR : columns} columns={this.props.type === 2 ? columnDBBS : this.props.type === 1 ? columnDBPLDetail : this.props.type === 3 ? columnDBPL : this.props.type === 4 ? columnDBFR : this.props.type === 5 ? columnDBTP : this.props.type === 7 ? columnSummaryBS : this.props.type === 21 ? columnDBOI : this.props.type === 6? columnDBCF : this.props.type === 8 ? columnSummaryPL : this.props.type === 9 ? columnSummaryFR : columns}
options={options} options={options}
/> />
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