Commit 88cfe06c authored by Riri Novita's avatar Riri Novita

Merge branch 'ENV-DEV' into 'ENV-DEPLOYMENT'

interest

See merge request !2235
parents 46ba9b0c b6d0ecdf
......@@ -232,7 +232,7 @@ export default class LOV extends Component {
item.lov.remarks === null || item.lov.remarks === "" ? "" : item.lov.remarks,
item.lov.placement_date == null || item.lov.placement_date == "" ? null : (item.lov.placement_date !== "null" ? String(tgl[2]).length > 2 ? tgl[2] + '-' + tgl[1] + '-' + tgl[0] : String(item.lov.placement_date) : null),
item.lov.tenor === null || item.lov.tenor === "" ? "" : item.lov.tenor,
item.lov.expected_return === null || item.lov.expected_return === "" ? "0.00" : item.lov.expected_return,
item.lov.expected_return === null || item.lov.expected_return === "" || item.lov.expected_return === "0.0" ? "0.00" : item.lov.expected_return,
item.lov.currency === null ? null : item.lov.currency === "" ? null : { value: item.lov.currency },
item.lov.investment_amount_ori === null ? "0.0" : item.lov.investment_amount_ori === "" ? "0.0" : item.lov.investment_amount_ori,
item.lov.investment_amount_cur === null ? "0.0" : item.lov.investment_amount_cur === "" ? "0.0" : item.lov.investment_amount_cur,
......@@ -288,8 +288,8 @@ export default class LOV extends Component {
console.log(lastArray);
this.setState({ dataTable, diff: lastArray[16], loanTotal: lastArray[17], perBS: lastArray[18], loading: false, visibleLOVMR: true }, () => {
this.props.sendToParent(dataTable, lastArray, 'LOV')
})
}
})
......@@ -477,7 +477,7 @@ export default class LOV extends Component {
})
console.log(dataTable)
let lastArray = dataTable[dataTable.length - 1]
this.setState({ dataTable, diff: lastArray[16], loanTotal: lastArray[17], perBS: lastArray[18], dataLoaded: true, loading: false, buttonError: false, dataDelete: [] }, () => {
this.setState({ dataTable, diff: lastArray[16], loanTotal: lastArray[17], perBS: lastArray[18], dataLoaded: true, loading: false, buttonError: false, dataDelete: [] }, () => {
this.props.sendToParent(dataTable, lastArray, 'LOV', 'upload', this.state.visibleLOVMR)
})
console.log(this.state.visibleLOVMR);
......@@ -1392,21 +1392,41 @@ export default class LOV extends Component {
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.props.get_for == 'view' ? "black" : "#5198ea", fontSize: 12, textAlign: 'center', paddingBottom: 18, borderColor: 'transparent', margin: 0, width: 96, height: 30, backgroundColor: (tableMeta.rowData[11] == '0.00' || tableMeta.rowData[11] == '') && this.props.get_for == 'edit' ? '#ffac99' : 'transparent' }}
style={{ color: this.props.get_for == 'view' ? "black" : "#5198ea", fontSize: 13, textAlign: 'center', paddingBottom: 18, borderColor: 'transparent', margin: 0, width: 96, height: 30, backgroundColor: (tableMeta.rowData[11] == '0.00' || tableMeta.rowData[11] == '') && this.props.get_for == 'edit' ? '#ffac99' : 'transparent' }}
type="text"
placeholder=""
value={this.props.get_for == 'view' ? fixNumber(Number(value), 2) : this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value) == 0 ? "0.00" : Number(value)}
disabled={this.props.get_for == 'view'}
// disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
disabled={this.props.get_for == 'view'}
value={fixNumber(Number(tableMeta.rowData[11]), 2) == "0.0" ? "0.00" : fixNumber(Number(tableMeta.rowData[11]), 2)}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, tableMeta.columnIndex)
// // // // console.log(tableMeta.rowData[0])
handleChange(event.target.value, tableMeta, 11)
}}
/>
}
/>
// <FormControlLabel
// style={{ margin: 0 }}
// // value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ color: this.props.get_for == 'view' ? "black" : "#5198ea", fontSize: 12, textAlign: 'center', paddingBottom: 18, borderColor: 'transparent', margin: 0, width: 96, height: 30, backgroundColor: (tableMeta.rowData[11] == '0.00' || tableMeta.rowData[11] == '') && this.props.get_for == 'edit' ? '#ffac99' : 'transparent' }}
// type="text"
// placeholder=""
// // value={this.props.get_for == 'view' ? fixNumber(Number(value), 2) : this.props.defaultCurrency.id == 1 ? fixNumber(Number(value), 2) : Number(value) == 0 || Number(value) == "0.0" ? "0.00" : Number(value)}
// value={value}
// disabled={this.props.get_for == 'view'}
// // disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)}
// // decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
// onBlur={(event) => {
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta, tableMeta.columnIndex)
// // // // // console.log(tableMeta.rowData[0])
// }}
// />
// }
// />
}
</div>
)
......@@ -1773,7 +1793,7 @@ export default class LOV extends Component {
<Typography style={{ fontSize: '12px', color: '#4b4b4b' }}>Diff</Typography>
</div>
<div style={{ borderStyle: 'solid', borderWidth: '0px 1px 1px 1px', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end' }}>
<Typography style={{ fontSize: '14px', color: Number(this.state.diff) > '0.0' || Number(this.state.diff) < '0.0' ? 'red' : '#4b4b4b' }}><NumberFormat value={this.state.diff == 0 ? "0.0" : this.state.diff} displayType={'text'} thousandSeparator={true} prefix={''} /></Typography>
<Typography style={{ fontSize: '14px', color: Number(this.state.diff) > '0.0' || Number(this.state.diff) < '0.0' ? 'red' : '#4b4b4b' }}><NumberFormat value={this.state.diff == 0 ? "0.0" : this.state.diff} displayType={'text'} thousandSeparator={true} prefix={''} /></Typography>
</div>
</div>
</div>
......@@ -1876,7 +1896,7 @@ export default class LOV extends Component {
<Typography style={{ fontSize: '12px', color: '#4b4b4b' }}>Diff</Typography>
</div>
<div style={{ borderStyle: 'solid', borderWidth: '0px 1px 1px 1px', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end' }}>
<Typography style={{ fontSize: '14px', color: Number(this.state.diff) > '0.0' || Number(this.state.diff) < '0.0' ? 'red' : '#4b4b4b' }}><NumberFormat value={this.state.diff} displayType={'text'} thousandSeparator={true} prefix={''} /></Typography>
<Typography style={{ fontSize: '14px', color: Number(this.state.diff) > '0.0' || Number(this.state.diff) < '0.0' ? 'red' : '#4b4b4b' }}><NumberFormat value={this.state.diff} displayType={'text'} thousandSeparator={true} prefix={''} /></Typography>
</div>
</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