Commit cf700928 authored by d.arizona's avatar d.arizona

update

parent d6a16624
......@@ -323,7 +323,8 @@ export default class BalanceSheet extends Component {
company_id: this.props.company.company_id,
periode: this.props.periode,
report_id: this.props.report_id,
balance_sheet: payload
balance_sheet: payload,
status: 'submitted'
}
// console.log(body)
this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[2] })
......
......@@ -425,7 +425,8 @@ export default class CorporateAnnualTarget extends Component {
periode: this.props.periode,
report_id: this.props.report_id,
status: '',
cat: payload
cat: payload,
status: 'submitted'
}
// // // // console.log(body)
this.setState({ payload: body, judul: resp.rows[1][0] })
......
......@@ -318,7 +318,8 @@ export default class FixedAssetsMovement extends Component {
company_id: this.props.company.company_id,
periode: this.props.periode,
report_id: this.props.report_id,
fixed_asset_movement: payload
fixed_asset_movement: payload,
status: 'submitted'
}
// // console.log(body)
this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[2] })
......
......@@ -332,7 +332,8 @@ export default class ProfitLoss extends Component {
company_id: this.props.company.company_id,
periode: this.props.periode,
report_id: this.props.report_id,
profit_loss: payload
profit_loss: payload,
status: 'submitted'
}
// console.log(isi)
this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[2] })
......
......@@ -454,7 +454,8 @@ export default class TaxPlanning extends Component {
company_id: this.props.company.company_id,
periode: this.props.periode,
report_id: this.props.report_id,
tax_planning: payload
tax_planning: payload,
status: 'submitted'
}
this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[2] })
}
......
......@@ -801,6 +801,8 @@ export default class MonthlyReport extends Component {
<span>COMPLETED</span> :
val === "draft" ?
<span>DRAFT</span> :
val === "incomplete" ?
<span>INCOMPLETE</span> :
val === "revision" ?
<span>REVISION</span> :
val === "approval_proccess" ?
......
......@@ -281,7 +281,8 @@ export default class FixedAssetsMovementMR extends Component {
periode: this.props.periode,
report_id: this.props.report_id,
months: this.props.month.month_id,
fixed_asset_movement: payload
fixed_asset_movement: payload,
status: 'submitted'
}
// console.log(body)
this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[0][0] })
......@@ -293,7 +294,7 @@ export default class FixedAssetsMovementMR extends Component {
api.create().checkUploadMonthlyReportFAM(this.state.payload).then(response => {
// console.log(JSON.stringify(this.state.payload));
// console.log(this.state.payload)
// console.log(response)
console.log(response)
if (response.data) {
if (response.data.status === 'success') {
this.setState({ visibleUpload: false, loading: true, visibleFAMMR: false })
......@@ -323,7 +324,7 @@ export default class FixedAssetsMovementMR extends Component {
// console.log(dataTable)
this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => {
this.state.dataTable.map(item => {
if (item[18].length > 0) {
if (item[15].length > 0) {
console.log('masuk')
this.setState({ buttonError: true, errorPreview: true, editable: true })
}
......@@ -367,7 +368,8 @@ export default class FixedAssetsMovementMR extends Component {
// console.log(response);
if (response.data) {
if (response.data.status === "success") {
this.props.onClickClose()
// this.props.onClickClose()
this.props.saveToMonthlyReport()
// this.props.getReport()
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
......@@ -701,6 +703,8 @@ export default class FixedAssetsMovementMR extends Component {
// console.log(tableMeta.rowData[7]);
// console.log(total)
}
// console.log(dex)
// console.log(Number(tableMeta.columnIndex) + Number(type))
return total
}
......@@ -728,6 +732,8 @@ export default class FixedAssetsMovementMR extends Component {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = Number(total).toFixed(1)
// console.log(total);
}
// console.log(dex)
// console.log(Number(tableMeta.columnIndex) + Number(type))
return total * 100
}
......@@ -1073,7 +1079,8 @@ export default class FixedAssetsMovementMR extends Component {
placeholder=""
disabled={true}
suffix={'%'}
value={Number(handleVariancePercent(tableMeta, 2, 5)).toFixed(1)}
// value={0}
value={Number(handleVariancePercent(tableMeta, 2, 3)).toFixed(1)}
/>
}
/>
......@@ -1157,7 +1164,8 @@ export default class FixedAssetsMovementMR extends Component {
placeholder=""
disabled={true}
suffix={'%'}
value={Number(handleVariancePercent(tableMeta, 3, 7)).toFixed(1)}
// value={0}
value={Number(handleVariancePercent(tableMeta, 3, 5)).toFixed(1)}
/>
}
/>
......
......@@ -372,7 +372,7 @@ export default class ListOfCreditFacilities extends Component {
// console.log(dataTable);
if (dataTable.length == 0 && this.state.get_for == 'edit') {
dataTable.push(
[3, "", "", "", "", this.props.company.company_name, null, null, "", this.state.currentDate, "0.00", "", "", "0", "", "0", "", "0", "", "", "0", "0", "0", "0", "0", "", "0", "", "0", "", "0", "", "0", "", "", "", "", "", "", "", "", "", "", "", "", "", 0 ],
[3, "", "", "", "", this.props.company.company_name, null, null, "", null, "0.00", "", "", "0", "", "0", "", "0", "", "", "0", "0", "0", "0", "0", "", "0", "", "0", "", "0", "", "0", "", "", "", "", "", "", "", "", "", "", "", "", "", 0 ],
[9, "", "", "", "", "", {value: "Grand Total"}, null, "", "", "", "0", "", "0", "", "0", "", "0", "", "", "0", "0", "0", "0", "0", "", "0", "", "0", "", "0", "", "0", "", "", "", "", "", "", "", "", "", "", "", "", "notes", 999999 ],
)
}
......@@ -434,13 +434,14 @@ export default class ListOfCreditFacilities extends Component {
let reg = /^[-+]?(?:[0-9]+,)*[0-9]+(?:\.[0-9]+)?$/;
isi.map((i, index) => {
if (i.length > 0) {
let tgl = String(i[5]).split('-')
payload.push({
"item_report_id": i[1],
"borrower_comp_name": this.props.company.company_name,
"bank_name": i[2],
"type_of_credit": i[3],
"remarks": i[4],
"loan_maturity_date": i[5],
"loan_maturity_date": tgl[2] + '-' + tgl[1] + '-' + tgl[0],
"interest": i[6],
"currency": i[7],
"loan_plafond_amount_ori": i[8],
......@@ -494,6 +495,16 @@ export default class ListOfCreditFacilities extends Component {
});
}
deleteReport() {
let payload = { "item_report_id": this.state.dataDelete, "periode": this.props.periode, "months": this.props.month.month_id}
if (this.state.dataDelete.length > 0) {
api.create().deleteAllItemReportLOCF(payload).then((response) => {
console.log(response)
})
}
}
checkUpload() {
let dataDelete = []
api.create().getIdDeleteFromExcelLOCF(this.state.payload).then((response) => {
......@@ -532,7 +543,7 @@ export default class ListOfCreditFacilities extends Component {
item.loan_maturity_date === null || item.loan_maturity_date === "" ? null : item.loan_maturity_date,
item.interest === null || item.interest === "" ? "0.00" : item.interest,
item.currency === null || item.currency === "" ? "" : item.currency,
item.loan_plafond_amount_ori,
item.loan_plafond_amount_ori == null? "" : item.loan_plafond_amount_ori,
item.loan_plafond_amount_idr === null ? "0.0" : item.loan_plafond_amount_idr === "" ? "0.0" : item.loan_plafond_amount_idr,
item.type_of_credit == "Investment Loan"? item.out_loan_ki_amount_ori : "0.0",
item.type_of_credit == "Investment Loan"? (item.out_loan_ki_amount_idr === null ? "0.0" : item.out_loan_ki_amount_idr === "" ? "0.0" : item.out_loan_ki_amount_idr) : "0.0",
......@@ -545,24 +556,24 @@ export default class ListOfCreditFacilities extends Component {
item.total_out_loan_idr === null ? "0.0" : item.total_out_loan_idr === "" ? "0.0" : item.total_out_loan_idr,
item.remaining_plafond_ori === null ? "0.0" : item.remaining_plafond_ori === "" ? "0.0" : item.remaining_plafond_ori,
item.remaining_plafond_idr === null ? "0.0" : item.remaining_plafond_idr === "" ? "0.0" : item.remaining_plafond_idr,
item.current_ratio_financial,
item.current_ratio_financial == null? "" : item.current_ratio_financial,
item.current_ratio_current === null ? "0.0" : item.current_ratio_current === "" ? "0.0" : item.current_ratio_current,
item.der_financial,
item.der_financial == null? "" : item.der_financial,
item.der_current === null ? "0.0" : item.der_current === "" ? "0.0" : item.der_current,
item.debt_to_ebitda_financial,
item.debt_to_ebitda_financial == null? "" : item.debt_to_ebitda_financial,
item.debt_to_ebitda_current === null ? "0.0" : item.debt_to_ebitda_current === "" ? "0.0" : item.debt_to_ebitda_current,
item.ebitda_to_interest_financial,
item.ebitda_to_interest_financial == null? "" : item.ebitda_to_interest_financial,
item.ebitda_to_interest_current === null ? "0.0" : item.ebitda_to_interest_current === "" ? "0.0" : item.ebitda_to_interest_current,
item.other_ratio1_ratio_name,
item.other_ratio1_ratio_name == null? "" : item.other_ratio1_ratio_name,
item.other_ratio1_financial === null ? "0.0" : item.other_ratio1_financial === "" ? "0.0" : item.other_ratio1_financial,
item.other_ratio1_current === null ? "0.0" : item.other_ratio1_current === "" ? "0.0" : item.other_ratio1_current,
item.other_ratio2_ratio_name,
item.other_ratio2_ratio_name == null? "" : item.other_ratio2_ratio_name,
item.other_ratio2_financial === null ? "0.0" : item.other_ratio2_financial === "" ? "0.0" : item.other_ratio2_financial,
item.other_ratio2_current === null ? "0.0" : item.other_ratio2_current === "" ? "0.0" : item.other_ratio2_current,
item.other_ratio3_ratio_name,
item.other_ratio3_ratio_name == null? "" : item.other_ratio3_ratio_name,
item.other_ratio3_financial === null ? "0.0" : item.other_ratio3_financial === "" ? "0.0" : item.other_ratio3_financial,
item.other_ratio3_current === null ? "0.0" : item.other_ratio3_current === "" ? "0.0" : item.other_ratio3_current,
item.other_ratio4_ratio_name,
item.other_ratio4_ratio_name == null? "" : item.other_ratio4_ratio_name,
item.other_ratio4_financial === null ? "0.0" : item.other_ratio4_financial === "" ? "0.0" : item.other_ratio4_financial,
item.other_ratio4_current === null ? "0.0" : item.other_ratio4_current === "" ? "0.0" : item.other_ratio4_current,
item.notes,
......@@ -583,7 +594,7 @@ export default class ListOfCreditFacilities extends Component {
item.loan_maturity_date === null || item.loan_maturity_date === "" ? null : item.loan_maturity_date,
item.interest === null || item.interest === "" ? "0.00" : item.interest,
item.currency === null || item.currency === "" ? "" : item.currency,
item.loan_plafond_amount_ori,
item.loan_plafond_amount_ori == null? "" : item.loan_plafond_amount_ori,
item.loan_plafond_amount_idr === null ? "0.0" : item.loan_plafond_amount_idr === "" ? "0.0" : item.loan_plafond_amount_idr,
item.type_of_credit == "Investment Loan"? item.out_loan_ki_amount_ori : "0.0",
item.type_of_credit == "Investment Loan"? (item.out_loan_ki_amount_idr === null ? "0.0" : item.out_loan_ki_amount_idr === "" ? "0.0" : item.out_loan_ki_amount_idr) : "0.0",
......@@ -596,24 +607,24 @@ export default class ListOfCreditFacilities extends Component {
item.total_out_loan_idr === null ? "0.0" : item.total_out_loan_idr === "" ? "0.0" : item.total_out_loan_idr,
item.remaining_plafond_ori === null ? "0.0" : item.remaining_plafond_ori === "" ? "0.0" : item.remaining_plafond_ori,
item.remaining_plafond_idr === null ? "0.0" : item.remaining_plafond_idr === "" ? "0.0" : item.remaining_plafond_idr,
item.current_ratio_financial,
item.current_ratio_financial == null? "" : item.current_ratio_financial,
item.current_ratio_current === null ? "0.0" : item.current_ratio_current === "" ? "0.0" : item.current_ratio_current,
item.der_financial,
item.der_financial == null? "" : item.der_financial,
item.der_current === null ? "0.0" : item.der_current === "" ? "0.0" : item.der_current,
item.debt_to_ebitda_financial,
item.debt_to_ebitda_financial == null? "" : item.debt_to_ebitda_financial,
item.debt_to_ebitda_current === null ? "0.0" : item.debt_to_ebitda_current === "" ? "0.0" : item.debt_to_ebitda_current,
item.ebitda_to_interest_financial,
item.ebitda_to_interest_financial == null? "" : item.ebitda_to_interest_financial,
item.ebitda_to_interest_current === null ? "0.0" : item.ebitda_to_interest_current === "" ? "0.0" : item.ebitda_to_interest_current,
item.other_ratio1_ratio_name,
item.other_ratio1_ratio_name == null? "" : item.other_ratio1_ratio_name,
item.other_ratio1_financial === null ? "0.0" : item.other_ratio1_financial === "" ? "0.0" : item.other_ratio1_financial,
item.other_ratio1_current === null ? "0.0" : item.other_ratio1_current === "" ? "0.0" : item.other_ratio1_current,
item.other_ratio2_ratio_name,
item.other_ratio2_ratio_name == null? "" : item.other_ratio2_ratio_name,
item.other_ratio2_financial === null ? "0.0" : item.other_ratio2_financial === "" ? "0.0" : item.other_ratio2_financial,
item.other_ratio2_current === null ? "0.0" : item.other_ratio2_current === "" ? "0.0" : item.other_ratio2_current,
item.other_ratio3_ratio_name,
item.other_ratio3_ratio_name == null? "" : item.other_ratio3_ratio_name,
item.other_ratio3_financial === null ? "0.0" : item.other_ratio3_financial === "" ? "0.0" : item.other_ratio3_financial,
item.other_ratio3_current === null ? "0.0" : item.other_ratio3_current === "" ? "0.0" : item.other_ratio3_current,
item.other_ratio4_ratio_name,
item.other_ratio4_ratio_name == null? "" : item.other_ratio4_ratio_name,
item.other_ratio4_financial === null ? "0.0" : item.other_ratio4_financial === "" ? "0.0" : item.other_ratio4_financial,
item.other_ratio4_current === null ? "0.0" : item.other_ratio4_current === "" ? "0.0" : item.other_ratio4_current,
item.notes,
......@@ -631,7 +642,7 @@ export default class ListOfCreditFacilities extends Component {
// console.log(dataTable);
if (dataTable.length == 0) {
dataTable.push(
[3, "", "", "", "", this.props.company.company_name, null, null, "", this.state.currentDate, "0.00", "", "", "0", "", "0", "", "0", "", "", "0", "0", "0", "0", "0", "", "0", "", "0", "", "0", "", "0", "", "", "", "", "", "", "", "", "", "", "", "", "", 0 ],
[3, "", "", "", "", this.props.company.company_name, null, null, "", null, "0.00", "", "", "0", "", "0", "", "0", "", "", "0", "0", "0", "0", "0", "", "0", "", "0", "", "0", "", "0", "", "", "", "", "", "", "", "", "", "", "", "", "", 0 ],
[9, "", "", "", "", "", {value: "Grand Total"}, null, "", "", "", "0", "", "0", "", "0", "", "0", "", "", "0", "0", "0", "0", "0", "", "0", "", "0", "", "0", "", "0", "", "", "", "", "", "", "", "", "", "", "", "", "notes", 999999 ],
)
}
......@@ -655,6 +666,7 @@ export default class ListOfCreditFacilities extends Component {
uploadLOCF(type) {
let data = []
let error = false
this.deleteReport()
this.state.dataTable.map(i => {
if (i[0] == 3) {
if (i[6] == null || i[7] == null || i[8] == "" || i[9] == "" || i[10] == "" || i[11] == "") {
......@@ -664,14 +676,15 @@ export default class ListOfCreditFacilities extends Component {
if (i[7].value == 'Others' && i[18] == '') {
error = true
}
let tgl = String(i[9]).split('-')
data.push({
"item_report_id": i[1],
"borrower_comp_name": i[5],
"bank_name": i[6] == null? [6] : i[6].value,
"type_of_credit": i[7] == null? i[7] : i[7].value,
"remarks": i[8],
"loan_maturity_date": i[9],
// "loan_maturity_date": i[9],
"loan_maturity_date": tgl[2] + '-' + tgl[1] + '-' + tgl[0],
"interest": i[10] == ""? "0.00" : i[10],
"currency": i[11],
"loan_plafond_amount_ori": i[12] == ""? "0.0" : i[12],
......@@ -681,7 +694,7 @@ export default class ListOfCreditFacilities extends Component {
"out_loan_kmk_amount_ori": i[16] == ""? "0.0" : i[16],
"out_loan_kmk_amount_idr": i[17] == ""? "0.0" : i[17],
// "mtd_vs_previous_month": i[18],
"out_loan_other_type": i[18] == ""? "0.0" : i[18],
"out_loan_other_type": i[18],
"out_loan_other_amount_ori": i[19] == ""? "0.0" : i[19],
"out_loan_other_amount_idr": i[20] == ""? "0.0" : i[20],
"total_out_loan_ori": i[21] == ""? "0.0" : i[21],
......@@ -753,6 +766,7 @@ export default class ListOfCreditFacilities extends Component {
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false, handleTekTekTek: 0 })
}
this.setState({handleTekTekTek: 0})
})
}
}
......@@ -1040,6 +1054,7 @@ export default class ListOfCreditFacilities extends Component {
// this.setState({ loading: true })
let data = []
let error = false
this.deleteReport()
this.state.dataTable.map(i => {
if (i[0] == 3) {
if (i[6] == null || i[7] == null || i[8] == "" || i[9] == "" || i[10] == "" || i[11] == "") {
......@@ -1048,13 +1063,15 @@ export default class ListOfCreditFacilities extends Component {
if (i[7].value == 'Others' && i[18] == '') {
error = true
}
let tgl = String(i[9]).split('-')
data.push({
"item_report_id": i[1],
"borrower_comp_name": i[5],
"bank_name": i[6] == null? [6] : i[6].value,
"type_of_credit": i[7] == null? i[7] : i[7].value,
"remarks": i[8],
"loan_maturity_date": i[9],
"loan_maturity_date": tgl[2] + '-' + tgl[1] + '-' + tgl[0],
// "loan_maturity_date": i[9],
"interest": i[10] == ""? "0.00" : i[10],
"currency": i[11],
"loan_plafond_amount_ori": i[12] == ""? "0.0" : i[12],
......@@ -1064,7 +1081,7 @@ export default class ListOfCreditFacilities extends Component {
"out_loan_kmk_amount_ori": i[16] == ""? "0.0" : i[16],
"out_loan_kmk_amount_idr": i[17] == ""? "0.0" : i[17],
// "mtd_vs_previous_month": i[18],
"out_loan_other_type": i[18] == ""? "0.0" : i[18],
"out_loan_other_type": i[18],
"out_loan_other_amount_ori": i[19] == ""? "0.0" : i[19],
"out_loan_other_amount_idr": i[20] == ""? "0.0" : i[20],
"total_out_loan_ori": i[21] == ""? "0.0" : i[21],
......@@ -1128,6 +1145,7 @@ export default class ListOfCreditFacilities extends Component {
document.body.style.overflow = 'unset';
})
}
this.setState({handleTekTekTek: 0})
})
}
}
......@@ -1207,7 +1225,7 @@ export default class ListOfCreditFacilities extends Component {
{value: 'Total ' + nameTotal[nameTotal.length - 1]},
null,
"",
this.state.currentDate,
null,
"0.00",
"",
"",
......@@ -1269,7 +1287,7 @@ export default class ListOfCreditFacilities extends Component {
{value: 'Total ' + nameTotal[nameTotal.length - 1]},
null,
"",
this.state.currentDate,
null,
"0.00",
"",
"",
......@@ -1510,7 +1528,7 @@ export default class ListOfCreditFacilities extends Component {
item[6],
null,
"",
this.state.currentDate,
null,
"0.00",
"",
"",
......@@ -1600,7 +1618,7 @@ export default class ListOfCreditFacilities extends Component {
} else {
dataTable2.splice(index,3)
dataTable2.push(
[3, "", "", "", "", this.props.company.company_name, null, null, "", this.state.currentDate, "0.00", "", "", "0", "", "0", "", "0", "", "", "0", "0", "0", "0", "0", "", "0", "", "0", "", "0", "", "0", "", "", "", "", "", "", "", "", "", "", "", "", "", 0 ],
[3, "", "", "", "", this.props.company.company_name, null, null, "", null, "0.00", "", "", "0", "", "0", "", "0", "", "", "0", "0", "0", "0", "0", "", "0", "", "0", "", "0", "", "0", "", "", "", "", "", "", "", "", "", "", "", "", "", 0 ],
[9, "", "", "", "", "", {value: "Grand Total"}, null, "", "", "", "0", "", "0", "", "0", "", "0", "", "", "0", "0", "0", "0", "0", "", "0", "", "0", "", "0", "", "0", "", "", "", "", "", "", "", "", "", "", "", "", "notes", 999999 ],
)
}
......@@ -1799,7 +1817,7 @@ export default class ListOfCreditFacilities extends Component {
setCellProps: () => ({ style2 }),
customBodyRender: (val, tableMeta, updateValue) => {
return (
<div style={{ textAlign: 'right', width: 90 }}>
<div style={{ textAlign: 'left', width: 90 }}>
{ tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ padding: 0, margin: 0 }}>
......@@ -1953,22 +1971,26 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ display: 'flex'}}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] == 8 || tableMeta.rowData[0] == 9?
null :
<ThemeProvider theme={this.state.get_for == 'view'? theme3 : theme2}>
<Input
disableUnderline={true}
style={{ width: 96, color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent', backgroundColor: tableMeta.rowData[11] == '' && this.state.get_for == 'edit'? '#ffac99' : 'white' }}
type="text"
placeholder=""
disabled={this.state.get_for == 'view'}
defaultValue={tableMeta.rowData[11]}
onBlur={(event) => {
// // // console.log(event.target.value)
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, tableMeta.columnIndex)
// // // console.log(dataTable2)
}}
/>
</ThemeProvider>
<div style={{ padding: 0, margin: 0 }}>
<textarea disabled={this.state.get_for == 'view'} style={{ borderColor: 'white', width: 96, textAlign: 'center', justifyContent:'center', padding: 0, margin: 0, color: this.state.get_for == 'view'? "black" : "#5198ea", backgroundColor: tableMeta.rowData[8] == '' && this.state.get_for == 'edit'? '#ffac99' : 'white' }} type="text" defaultValue={tableMeta.rowData[11]}
onBlur={(event) => handleChange(event.target.value, tableMeta, tableMeta.columnIndex)} />
</div>
// <ThemeProvider theme={this.state.get_for == 'view'? theme3 : theme2}>
// <Input
// disableUnderline={true}
// style={{ width: 96, color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent', backgroundColor: tableMeta.rowData[11] == '' && this.state.get_for == 'edit'? '#ffac99' : 'white' }}
// type="text"
// placeholder=""
// disabled={this.state.get_for == 'view'}
// defaultValue={tableMeta.rowData[11]}
// onBlur={(event) => {
// // // // console.log(event.target.value)
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta, tableMeta.columnIndex)
// // // // console.log(dataTable2)
// }}
// />
// </ThemeProvider>
}
</div>
)
......@@ -3114,23 +3136,27 @@ export default class ListOfCreditFacilities extends Component {
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
// <div style={{ flex: 1 }}>
<ThemeProvider theme={this.state.get_for == 'view'? theme3 : theme}>
<Input
disableUnderline={true}
style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={this.state.get_for == 'view'}
defaultValue={tableMeta.rowData[33]}
multiline={true}
onBlur={(event) => {
// // // console.log(event.target.value)
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 33)
// // // console.log(dataTable2)
}}
/>
</ThemeProvider>
<div style={{ padding: 0, margin: 0 }}>
<textarea disabled={this.state.get_for == 'view'} style={{ borderColor: 'white', width: 96, textAlign: 'center', justifyContent:'center', padding: 0, margin: 0, color: this.state.get_for == 'view'? "black" : "#5198ea", backgroundColor: 'transparent' }} type="text" defaultValue={tableMeta.rowData[33]}
onBlur={(event) => handleChange(event.target.value, tableMeta, 33)} />
</div>
// <ThemeProvider theme={this.state.get_for == 'view'? theme3 : theme}>
// <Input
// disableUnderline={true}
// style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={this.state.get_for == 'view'}
// defaultValue={tableMeta.rowData[33]}
// multiline={true}
// onBlur={(event) => {
// // // // console.log(event.target.value)
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta, 33)
// // // // console.log(dataTable2)
// }}
// />
// </ThemeProvider>
// </div>
}
</div>
......@@ -3230,24 +3256,28 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'left', width: 90 }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ padding: 0, margin: 0 }}>
<textarea disabled={this.state.get_for == 'view'} style={{ borderColor: 'white', width: 96, textAlign: 'center', justifyContent:'center', padding: 0, margin: 0, color: this.state.get_for == 'view'? "black" : "#5198ea", backgroundColor: 'transparent' }} type="text" defaultValue={tableMeta.rowData[36]}
onBlur={(event) => handleChange(event.target.value, tableMeta, 36)} />
</div>
// <div style={{ flex: 1 }}>
<ThemeProvider theme={this.state.get_for == 'view'? theme3 : theme}>
<Input
disableUnderline={true}
style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={this.state.get_for == 'view'}
defaultValue={tableMeta.rowData[36]}
multiline={true}
onBlur={(event) => {
// // // console.log(event.target.value)
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 36)
// // // console.log(dataTable2)
}}
/>
</ThemeProvider>
// <ThemeProvider theme={this.state.get_for == 'view'? theme3 : theme}>
// <Input
// disableUnderline={true}
// style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={this.state.get_for == 'view'}
// defaultValue={tableMeta.rowData[36]}
// multiline={true}
// onBlur={(event) => {
// // // // console.log(event.target.value)
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta, 36)
// // // // console.log(dataTable2)
// }}
// />
// </ThemeProvider>
// </div>
}
</div>
......@@ -3347,24 +3377,28 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'left', width: 90 }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ padding: 0, margin: 0 }}>
<textarea disabled={this.state.get_for == 'view'} style={{ borderColor: 'white', width: 96, textAlign: 'center', justifyContent:'center', padding: 0, margin: 0, color: this.state.get_for == 'view'? "black" : "#5198ea", backgroundColor: 'transparent' }} type="text" defaultValue={tableMeta.rowData[39]}
onBlur={(event) => handleChange(event.target.value, tableMeta, 39)} />
</div>
// <div style={{ flex: 1 }}>
<ThemeProvider theme={this.state.get_for == 'view'? theme3 : theme}>
<Input
disableUnderline={true}
style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={this.state.get_for == 'view'}
multiline={true}
defaultValue={tableMeta.rowData[39]}
onBlur={(event) => {
// // // console.log(event.target.value)
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 39)
// // // console.log(dataTable2)
}}
/>
</ThemeProvider>
// <ThemeProvider theme={this.state.get_for == 'view'? theme3 : theme}>
// <Input
// disableUnderline={true}
// style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={this.state.get_for == 'view'}
// multiline={true}
// defaultValue={tableMeta.rowData[39]}
// onBlur={(event) => {
// // // // console.log(event.target.value)
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta, 39)
// // // // console.log(dataTable2)
// }}
// />
// </ThemeProvider>
// </div>
}
</div>
......@@ -3464,24 +3498,28 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'left', width: 90 }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<div style={{ padding: 0, margin: 0 }}>
<textarea disabled={this.state.get_for == 'view'} style={{ borderColor: 'white', width: 96, textAlign: 'center', justifyContent:'center', padding: 0, margin: 0, color: this.state.get_for == 'view'? "black" : "#5198ea", backgroundColor: 'transparent' }} type="text" defaultValue={tableMeta.rowData[42]}
onBlur={(event) => handleChange(event.target.value, tableMeta, 42)} />
</div>
// <div style={{ flex: 1 }}>
<ThemeProvider theme={this.state.get_for == 'view'? theme3 : theme}>
<Input
disableUnderline={true}
style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={this.state.get_for == 'view'}
multiline={true}
defaultValue={tableMeta.rowData[42]}
onBlur={(event) => {
// // // console.log(event.target.value)
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 42)
// // // console.log(dataTable2)
}}
/>
</ThemeProvider>
// <ThemeProvider theme={this.state.get_for == 'view'? theme3 : theme}>
// <Input
// disableUnderline={true}
// style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={this.state.get_for == 'view'}
// multiline={true}
// defaultValue={tableMeta.rowData[42]}
// onBlur={(event) => {
// // // // console.log(event.target.value)
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta, 42)
// // // // console.log(dataTable2)
// }}
// />
// </ThemeProvider>
// </div>
}
</div>
......@@ -3561,25 +3599,29 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'left', width: 90 }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
<FormControlLabel
style={{ margin: 0 }}
control={
<ThemeProvider theme={theme}>
<Input
disableUnderline={true}
style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 75, backgroundColor: 'transparent' }}
type="text"
placeholder=""
multiline={true}
defaultValue={tableMeta.rowData[45]}
disabled={this.state.get_for == 'view'}
onBlur={(event) => {
handleChange(event.target.value, tableMeta, 45)
}}
/>
</ThemeProvider>
}
/>
<div style={{ padding: 0, margin: 0 }}>
<textarea disabled={this.state.get_for == 'view'} style={{ borderColor: 'white', width: 96, textAlign: 'center', justifyContent:'center', padding: 0, margin: 0, color: this.state.get_for == 'view'? "black" : "#5198ea", backgroundColor: 'transparent' }} type="text" defaultValue={tableMeta.rowData[45]}
onBlur={(event) => handleChange(event.target.value, tableMeta, 45)} />
</div>
// <FormControlLabel
// style={{ margin: 0 }}
// control={
// <ThemeProvider theme={theme}>
// <Input
// disableUnderline={true}
// style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 75, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// multiline={true}
// defaultValue={tableMeta.rowData[45]}
// disabled={this.state.get_for == 'view'}
// onBlur={(event) => {
// handleChange(event.target.value, tableMeta, 45)
// }}
// />
// </ThemeProvider>
// }
// />
}
</div>
)
......@@ -4016,7 +4058,7 @@ export default class ListOfCreditFacilities extends Component {
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Total Outstanding Loan</Typography>
</div>
<div style={{border: '1px solid black', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end'}}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{formatSeparator(this.state.perBS)}</Typography>
<Typography style={{ fontSize: '14px', color: '#4b4b4b' }}>{formatSeparator(this.state.perBS)}</Typography>
</div>
</div>
</div>
......@@ -4029,7 +4071,7 @@ export default class ListOfCreditFacilities extends Component {
<Typography style={{ fontSize: '11px', 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: '11px', color: Number(this.state.diff) > 0? 'red' :'#4b4b4b' }}>{formatSeparator(this.state.diff)}</Typography>
<Typography style={{ fontSize: '14px', color: Number(this.state.diff) > 0? 'red' :'#4b4b4b' }}>{formatSeparator(this.state.diff)}</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