Commit f6d03117 authored by Riri Novita's avatar Riri Novita

Merge branch 'ENV-PROD' into 'ENV-DEPLOYMENT-PROD'

fix(handleCalculate) : undefined value

See merge request !2336
parents 6c89b23a e3327301
......@@ -356,7 +356,7 @@ export default class LOV extends Component {
isi.map((i, index) => {
if (i.length > 0) {
let tgl = String(i[6]).split('-')
console.log(tgl);
// console.log(tgl);
payload.push({
"item_report_id": i[1],
"company_name": this.props.company.company_name,
......
......@@ -721,6 +721,8 @@ export default class ListOfCreditFacilities extends Component {
console.log(response);
let dataTablelocf = []
if (response.data) {
if (response.data.status == 'success') {
let res = response.data.data
const handlePushChild = (item) => {
let indexIDzz = dataTablelocf.findIndex((val) => val[1] === item.id)
......@@ -874,6 +876,7 @@ export default class ListOfCreditFacilities extends Component {
this.handleCalculateLOV()
})
}
}
})
}
......@@ -946,7 +949,7 @@ export default class ListOfCreditFacilities extends Component {
error = true
}
if ((i[7].value == 'Government bonds' && i[8] == '') || (i[7].value == 'Stocks' && i[8] == '') || (i[7].value == 'Mutual funds' && i[8] == '') || (i[7].value == 'Investment in associate' && i[8] == '') || (i[7].value == 'Investment in joint venture' && i[8] == '') || (i[7].value == 'Investment in subsidiary' && i[8] == '') || (i[7].value == 'Corporate bonds' && i[8] == '') || (i[7].value == 'Others' && i[8] == '')) {
if ((i[7]?.value == 'Government bonds' && i[8] == '') || (i[7]?.value == 'Stocks' && i[8] == '') || (i[7]?.value == 'Mutual funds' && i[8] == '') || (i[7]?.value == 'Investment in associate' && i[8] == '') || (i[7]?.value == 'Investment in joint venture' && i[8] == '') || (i[7]?.value == 'Investment in subsidiary' && i[8] == '') || (i[7]?.value == 'Corporate bonds' && i[8] == '') || (i[7]?.value == 'Others' && i[8] == '')) {
error = true
} else {
error = false
......@@ -962,7 +965,7 @@ export default class ListOfCreditFacilities extends Component {
"item_report_id": i[1],
"company_name": i[5],
"institution_name": i[6],
"type_of_investment": i[7] == null ? i[7] : i[7].value,
"type_of_investment": i[7] == null ? i[7] : i[7]?.value,
"remarks": i[8],
"placement_date": i[9] == undefined || i[9] == "null" || i[9] == null ? "" : (String(tgl[2]).length <= 2 ? tgl[2] + '-' + tgl[1] + '-' + tgl[0] : String(i[9])),
"tenor": i[10],
......@@ -978,7 +981,7 @@ export default class ListOfCreditFacilities extends Component {
"item_report_id": i[1],
"company_name": i[5],
"institution_name": i[6],
"type_of_investment": i[7] == null ? i[7] : i[7].value,
"type_of_investment": i[7] == null ? i[7] : i[7]?.value,
"remarks": i[8],
"placement_date": i[9] == undefined || i[9] == "null" || i[9] == null ? "" : (String(tgl[2]).length <= 2 ? tgl[2] + '-' + tgl[1] + '-' + tgl[0] : String(i[9])),
"tenor": i[10],
......
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