Commit f90b2a09 authored by Riri Novita's avatar Riri Novita

Merge branch 'riri' into 'master'

notes

See merge request !1064
parents 87ff1323 29418ea4
......@@ -37,7 +37,7 @@ export default class SubHolding extends Component {
{ value: 6, label: 'Cash Flow - Summary' },
{ value: 7, label: 'Balance Sheet - Summary' },
{ value: 8, label: 'Profit Loss - Summary' },
{ value: 9, label: 'financial Ratio - Summary' },
{ value: 9, label: 'Financial Ratio - Summary' },
],
report: null,
loading: false,
......@@ -622,7 +622,7 @@ export default class SubHolding extends Component {
})
} else if (this.state.report.value === 3) {
api.create().getReportPLMB(payload).then(response => {
// console.log(response);
console.log(response);
if (response.data) {
let dataTable = []
console.log(response)
......@@ -1484,7 +1484,8 @@ export default class SubHolding extends Component {
isNaN(persenFyLY) || persenFyLY == 'Infinity' || persenFyLY == '-Infinity'? (item.profit_loss.fy_last_year == '' || item.profit_loss.fy_last_year == 0? -0 : 0) : (item.profit_loss.fy_last_year == '' || item.profit_loss.fy_last_year == 0? persenFyLY * -100 : persenFyLY * 100),
isNaN(persenFyOLMB) || persenFyOLMB == 'Infinity' || persenFyOLMB == '-Infinity'? (item.profit_loss.fy_percent_ach_ol_to_mb == '' || item.profit_loss.fy_percent_ach_ol_to_mb == 0? -0 : 0) : (item.profit_loss.fy_percent_ach_ol_to_mb == '' || item.profit_loss.fy_percent_ach_ol_to_mb == 0? persenFyOLMB * -100 : persenFyOLMB * 100),
item.profit_loss.forecast_next_year,
item.profit_loss.forecast_more_year
item.profit_loss.forecast_more_year,
item.profit_loss.notes,
])
}
if (item.children !== null) {
......
......@@ -153,7 +153,7 @@ export default class TableSubHolding extends Component {
return a
}
const handleNotesPLDetail = (value, tableMeta) => {
const handleNotes = (value, tableMeta) => {
// console.log(value)
let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = value
// console.log(dataTable2[tableMeta.rowIndex]);
......@@ -2506,10 +2506,10 @@ export default class TableSubHolding extends Component {
options: {
customHeadRender: (columnMeta) => (
dataTable2.length > 0 ?
<TableCell style={{ ...stylenotes, top: 0, zIndex: 102, backgroundColor: '#1c71b8', width: 96 }}>
<TableCell style={{ ...stylenotes, top: 0, zIndex: 103, backgroundColor: '#1c71b8', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> :
<TableCell style={{ ...styleNotesEmpty, top: 0, zIndex: 102, backgroundColor: '#1c71b8', width: 96 }}>
<TableCell style={{ ...styleNotesEmpty, top: 0, zIndex: 103, backgroundColor: '#1c71b8', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
......@@ -2526,41 +2526,26 @@ export default class TableSubHolding extends Component {
<div style={{ textAlign: 'right' }}>
<div style={{ flex: 1 }}>
{tableMeta.rowData[0] === 4 ? null : tableMeta.rowData[4] === 0 ? null : tableMeta.rowData[4] === 1 ? null :
// <FormControlLabel
// style={{ margin: 0 }}
// // value={tableMeta.rowData[6]}
// control={
// <Input
// disableUnderline={true}
// style={{ fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// // value={tableMeta.rowData[6]}
// defaultValue={tableMeta.rowData[6]}
// inputProps={{
// style: {
// color: "#5198ea"
// }
// }}
// onBlur={(event) => {
// // updateValue(event.target.value)
// handleText(event.target.value, tableMeta, 0)
// // console.log(dataTable2)
// }}
// />
// }
// />
<FormControlLabel
style={{ margin: 0 }}
value={value}
// value={tableMeta.rowData[47]}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
<Input
disableUnderline={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[47])}
// value={tableMeta.rowData[47]}
defaultValue={tableMeta.rowData[47]}
inputProps={{
style: {
color: "#5198ea"
}
}}
// onBlur={(event) => {
// handleNotes(event.target.value, tableMeta, 0)
// }}
/>
}
/>
......@@ -15458,6 +15443,60 @@ export default class TableSubHolding extends Component {
)
}
}
}, {
name: "Notes",
options: {
customHeadRender: (columnMeta) => (
dataTable2.length > 0 ?
<TableCell style={{ ...stylenotes, top: 0, zIndex: 102, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> :
<TableCell style={{ ...styleNotesEmpty, top: 0, zIndex: 102, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell>
),
setCellProps: () => ({
style: {
position: "sticky",
background: "white",
zIndex: 101,
left: 350
}
}),
customBodyRender: (value, tableMeta, updateValue) => {
return (
<div style={{ textAlign: 'right' }}>
<div style={{ flex: 1 }}>
{tableMeta.rowData[0] === 4 ? null : tableMeta.rowData[4] === 0 ? null : tableMeta.rowData[4] === 1 ? null :
<FormControlLabel
style={{ margin: 0 }}
// value={tableMeta.rowData[30]}
control={
<Input
disableUnderline={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
// value={tableMeta.rowData[30]}
defaultValue={tableMeta.rowData[30]}
inputProps={{
style: {
color: "#5198ea"
}
}}
// onBlur={(event) => {
// handleNotes(event.target.value, tableMeta, 0)
// }}
/>
}
/>
}
</div>
</div>
)
}
}
}, {
name: `MTD ${this.props.periode}`,
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