Commit 25d658a8 authored by Riri Novita's avatar Riri Novita

Merge branch 'dev-riri' into 'ENV-DEV'

update locf

See merge request !2254
parents 3b90cb71 c39ad4ed
......@@ -350,6 +350,8 @@ export default class LOCF extends Component {
}
})
console.log(dataTable)
// let sortingTable = dataTable.sort((a, b) => a[6].value - b[6].value)
// console.log(sortingTable);
let lastArray = dataTable[res.length - 1]
this.setState({ dataTable, diff: lastArray[47], loanTotal: lastArray[48], perBS: lastArray[49], loading: false, visibleLOCFMR: true }, () => {
this.props.sendToParent(dataTable, lastArray, 'LOCF')
......@@ -1522,7 +1524,7 @@ export default class LOCF extends Component {
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.props.get_for == 'view' ? "black" : "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, height: 34, 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: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, height: 34, backgroundColor: (this.props.get_for == 'edit' && tableMeta.rowData[11] == 0.00) || (this.props.get_for == 'edit' && tableMeta.rowData[11] == '') ? '#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)}
......
......@@ -1344,7 +1344,7 @@ export default class LOV extends Component {
{tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9 ?
null :
<div style={{ padding: 0, margin: 0 }}>
<textarea disabled={this.props.get_for == 'view'} style={{ fontSize: 12, borderColor: 'white', width: 96, textAlign: 'center', justifyContent: 'center', padding: 0, margin: 0, color: this.props.get_for == 'view' ? "black" : "#5198ea", backgroundColor: tableMeta.rowData[10] == '' && this.props.get_for == 'edit' ? '#ffac99' : 'white' }} type="text" defaultValue={tableMeta.rowData[10]}
<textarea disabled={this.props.get_for == 'view'} style={{ fontSize: 12, borderColor: 'white', width: 96, textAlign: 'center', justifyContent: 'center', padding: 0, margin: 0, color: this.props.get_for == 'view' ? "black" : "#5198ea", backgroundColor: tableMeta.rowData[10] == '' || tableMeta.rowData[10] == '0.0' && this.props.get_for == 'edit' ? '#ffac99' : 'white' }} type="text" defaultValue={tableMeta.rowData[10]}
onBlur={(event) => handleChange(event.target.value, tableMeta, tableMeta.columnIndex)} />
</div>
// <Input
......@@ -1409,7 +1409,7 @@ export default class LOV extends Component {
control={
<NumberFormat
thousandSeparator={true}
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' }}
style={{ color: this.props.get_for == 'view' ? "black" : "#5198ea", fontSize: 13, textAlign: 'center', paddingBottom: 18, borderColor: 'transparent', margin: 0, width: 96, backgroundColor: (this.props.get_for == 'edit' && tableMeta.rowData[11] == 0.00)|| (this.props.get_for == 'edit' && tableMeta.rowData[11] == '') ? '#ffac99' : 'transparent' }}
type="text"
placeholder=""
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
......
......@@ -415,7 +415,7 @@ export default class ListOfCreditFacilities extends Component {
console.log(body);
console.log(error);
if (error && type == 'submitted') {
this.setState({ handleDoubleClick: 0, saveDraft: false, saveComp: true, loading: false, snekbar: true, snekbarMsg: 'Data Incomplete', handleDoubleClick: 0 })
this.setState({ handleDoubleClick: 0, saveDraft: false, saveComp: true, loadingChild: false, snekbar: true, snekbarMsg: 'Data Incomplete', handleDoubleClick: 0 })
} else {
api.create('UPLOAD').createMonthlyReportLOCF(body).then(response => {
console.log(response);
......@@ -535,7 +535,7 @@ export default class ListOfCreditFacilities extends Component {
console.log(body);
console.log(error);
if (error && type == 'submitted') {
this.setState({ handleDoubleClick: 0, saveDraft: false, saveComp: true, loading: false, snekbar: true, snekbarMsg: 'Data Incomplete', handleDoubleClick: 0 })
this.setState({ handleDoubleClick: 0, saveDraft: false, saveComp: true, loadingChild: false, snekbar: true, snekbarMsg: 'Data Incomplete', handleDoubleClick: 0 })
} else {
api.create('UPLOAD').createMonthlyReportLOV(body).then(response => {
console.log(response);
......@@ -1221,7 +1221,7 @@ export default class ListOfCreditFacilities extends Component {
}
console.log(body);
if (error && type == 'submitted') {
this.setState({ handleDoubleClick: 0, saveDraft: false, saveComp: true, loading: false, snekbar: true, snekbarMsg: 'Data Incomplete', handleDoubleClick: 0 })
this.setState({ handleDoubleClick: 0, saveDraft: false, saveComp: true, loadingChild: false, snekbar: true, snekbarMsg: 'Data Incomplete', handleDoubleClick: 0 })
} else {
api.create('UPLOAD').uploadMonthlyReportLOCF(body).then(response => {
console.log(response);
......@@ -1353,7 +1353,7 @@ export default class ListOfCreditFacilities extends Component {
}
console.log(body);
if (error && type == 'submitted') {
this.setState({ handleDoubleClick: 0, saveDraft: false, saveComp: true, loading: false, snekbar: true, snekbarMsg: 'Data Incomplete', handleDoubleClick: 0 })
this.setState({ handleDoubleClick: 0, saveDraft: false, saveComp: true, loadingChild: false, snekbar: true, snekbarMsg: 'Data Incomplete', handleDoubleClick: 0 })
} else {
api.create('UPLOAD').createMonthlyReportLOV(body).then(response => {
console.log(response);
......
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