Commit fe941fee authored by Riri Novita's avatar Riri Novita

update

parent 9c1525f9
......@@ -546,6 +546,9 @@ const create = (type = "") => {
const uploadSimulasiMROI = (body) => api.post('transaction/operating_indicator/monthly_report/import_monthly_report/other_currency_existing', body)
const uploadSimulasiROOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/import_rolling_outlook/other_currency_existing', body)
// Investment
const getTypeOfInvestment = () => api.get('setting_type/get_all_setting_type_by_investment')
// Superadmin Approve
const getListApprover = (report, monthlyReportId) => api.get(`transaction/${report}/get_approver/${monthlyReportId}`)
const getIdToken = (userId) => api.get(`transaction/get_token/${userId}`)
......@@ -944,6 +947,7 @@ const create = (type = "") => {
uploadSimulasiOperatingInd,
uploadSimulasiMROI,
uploadSimulasiROOI,
getTypeOfInvestment
}
}
......
......@@ -104,6 +104,7 @@ export default class ListOfCreditFacilities extends Component {
dataTableInvest: [],
bankNameList: [],
typeOfCreditList: [],
typeOfInvestmentList: [],
loading: false,
dataTableRatio: [],
currentDate: format(new Date(), 'yyyy-MM-dd'),
......@@ -134,6 +135,47 @@ export default class ListOfCreditFacilities extends Component {
this.getSubmission()
this.getLatestUpdate()
this.handleViewOnly()
this.getType()
}
getType() {
api.create().getTypeOfInvestment().then(response => {
console.log(response);
if (response.data) {
if (response.ok) {
if (response.data.status === 'success') {
let data = response.data.data
// // // console.log(data)
let inputTypeOfInvesment = []
data.investment.map((item) => {
inputTypeOfInvesment.push({
value: item.value
})
})
let defaultProps = {
options: inputTypeOfInvesment,
getOptionLabel: (option) => titleCase(option.value),
};
// // // console.log(defaultProps)
this.setState({ typeOfInvestmentList: defaultProps })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
}
})
}
handleGetFor(type) {
......@@ -1675,7 +1717,6 @@ export default class ListOfCreditFacilities extends Component {
if (column != 8 && column != 11 && column != 18 && column != 25 && column != 27 && column != 29 && column != 31 && column != 33 && column != 36 && column != 39 && column != 42 && column != 45) {
val = String(value).split(",").join("")
val = this.props.defaultCurrency.id == 1 ? fixNumber(Number(val), 2) : Number(val)
console.log(val);
} else {
val = String(value).split(",").join("")
......@@ -1719,6 +1760,7 @@ export default class ListOfCreditFacilities extends Component {
})
} else {
console.log(column, value);
dataTable2[tableMeta.rowIndex][column] = value
// if (column != 6 && column != 11 && column != 18 && column != 25 && column != 27 && column != 29 && column != 31 && column != 33 && column != 36 && column != 39 && column != 42 && column != 45) {
// val = String(value).split(",").join("")
// val = this.props.defaultCurrency.id == 1 ? fixNumber(Number(val), 2) : Number(val)
......@@ -1751,9 +1793,9 @@ export default class ListOfCreditFacilities extends Component {
// dataTable2[tableMeta.rowIndex][column] = val
// }
}
console.log(dataTable2[tableMeta.rowIndex][column]);
console.log(value)
console.log(String(value).split(",").join(""))
// console.log(dataTable2[tableMeta.rowIndex][column]);
// console.log(value)
// console.log(String(value).split(",").join(""))
}
const handleValueDropDown = (value, type, tableMeta) => {
......@@ -4291,7 +4333,6 @@ export default class ListOfCreditFacilities extends Component {
),
setCellProps: () => ({ style2 }),
customBodyRender: (val, tableMeta, updateValue) => {
console.log(tableMeta);
return (
<div style={{ display: 'flex' }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] == 8 || tableMeta.rowData[0] == 9 ?
......
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