Commit 7a2d368b authored by Riri Novita's avatar Riri Novita

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

update

See merge request !2187
parents ce3d495e ef19eb71
...@@ -555,8 +555,8 @@ export default class LOCF extends Component { ...@@ -555,8 +555,8 @@ export default class LOCF extends Component {
let lastArray = dataTable[dataTable.length - 1] let lastArray = dataTable[dataTable.length - 1]
this.setState({ dataTable, diff: lastArray[46], perBS: lastArray[47], dataLoaded: true, loading: false, buttonError: false, dataDelete: [] }, () => { this.setState({ dataTable, diff: lastArray[46], perBS: lastArray[47], dataLoaded: true, loading: false, buttonError: false, dataDelete: [] }, () => {
console.log(lastArray); console.log(this.state.visibleLOCFMR);
this.props.sendToParent(dataTable, lastArray , 'LOCF', 'upload') this.props.sendToParent(dataTable, lastArray , 'LOCF', 'upload', this.state.visibleLOCFMR)
}) })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, typeAlert: 'warning', loading: false }, () => { this.setState({ alert: true, messageAlert: response.data.message, typeAlert: 'warning', loading: false }, () => {
...@@ -3592,7 +3592,7 @@ export default class LOCF extends Component { ...@@ -3592,7 +3592,7 @@ export default class LOCF extends Component {
<Typography style={{ fontSize: '12px', color: '#4b4b4b' }}>Diff</Typography> <Typography style={{ fontSize: '12px', color: '#4b4b4b' }}>Diff</Typography>
</div> </div>
<div style={{ borderStyle: 'solid', borderWidth: '0px 1px 1px 1px', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end' }}> <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 ? '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> </div>
</div> </div>
......
...@@ -475,9 +475,8 @@ export default class LOV extends Component { ...@@ -475,9 +475,8 @@ export default class LOV extends Component {
}) })
console.log(dataTable) console.log(dataTable)
let lastArray = dataTable[dataTable.length - 1] let lastArray = dataTable[dataTable.length - 1]
console.log(lastArray); this.setState({ dataTable, diff: lastArray[16], perBS: lastArray[18], dataLoaded: true, loading: false, buttonError: false, dataDelete: [] }, () => {
this.setState({ dataTable, diff: lastArray[16], perBS: lastArray[18], loading: false, visibleLOVMR: true }, () => { this.props.sendToParent(dataTable, lastArray, 'LOV', 'upload', this.state.visibleLOVMR)
this.props.sendToParent(dataTable, lastArray, 'LOV', 'upload')
}) })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, typeAlert: 'warning', loading: false }, () => { this.setState({ alert: true, messageAlert: response.data.message, typeAlert: 'warning', loading: false }, () => {
...@@ -660,7 +659,7 @@ export default class LOV extends Component { ...@@ -660,7 +659,7 @@ export default class LOV extends Component {
// } // }
getListCurrency() { getListCurrency() {
this.setState({ dataLoaded: false }) // this.setState({ dataLoaded: false })
api.create().getDataCurrency().then(response => { api.create().getDataCurrency().then(response => {
console.log(response) console.log(response)
if (response.data) { if (response.data) {
...@@ -995,18 +994,17 @@ export default class LOV extends Component { ...@@ -995,18 +994,17 @@ export default class LOV extends Component {
let prevData = dataTable2[index - 1] == undefined ? null : dataTable2[index - 1][6] let prevData = dataTable2[index - 1] == undefined ? null : dataTable2[index - 1][6]
let currentData = dataTable2[index][6] let currentData = dataTable2[index][6]
let nextData = dataTable2[index + 1] == undefined ? null : dataTable2[index + 1][6] let nextData = dataTable2[index + 1] == undefined ? null : dataTable2[index + 1][6]
console.log(nextData);
if (nextData == null) { if (nextData == null) {
dataTable2.splice(index, 1) dataTable2.splice(index, 1)
} else if (nextData.value.includes('Total')) { } else if (nextData.includes('Total')) {
if (prevData !== null && currentData == null) { if (prevData !== null && currentData == null) {
dataTable2.splice(index, 1) dataTable2.splice(index, 1)
} else if (prevData !== null && prevData.value == currentData.value) { } else if (prevData !== null && prevData == currentData) {
dataTable2.splice(index, 1) dataTable2.splice(index, 1)
} else if (dataTable2.length > 3) { } else if (dataTable2.length > 3) {
if (prevData == null) { if (prevData == null) {
if (nextData.value.includes('Grand')) { if (nextData.includes('Grand')) {
dataTable2.splice(index, 1) dataTable2.splice(index, 1)
} else { } else {
dataTable2.splice(index, 2) dataTable2.splice(index, 2)
...@@ -1016,7 +1014,7 @@ export default class LOV extends Component { ...@@ -1016,7 +1014,7 @@ export default class LOV extends Component {
} }
} else if (dataTable2.length == 3) { } else if (dataTable2.length == 3) {
if (prevData == null) { if (prevData == null) {
if (nextData.value.includes('Grand')) { if (nextData.includes('Grand')) {
dataTable2.splice(index, 1) dataTable2.splice(index, 1)
} else { } else {
dataTable2.splice(index, 3) dataTable2.splice(index, 3)
...@@ -1832,6 +1830,7 @@ export default class LOV extends Component { ...@@ -1832,6 +1830,7 @@ export default class LOV extends Component {
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}> <div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
{this.state.loading && loadingComponent} {this.state.loading && loadingComponent}
{this.state.dataLoaded && !this.state.loading && <MuiThemeProvider theme={getMuiTheme()}> {this.state.dataLoaded && !this.state.loading && <MuiThemeProvider theme={getMuiTheme()}>
<div>cuuuk</div>
<MUIDataTable <MUIDataTable
data={dataTable2} data={dataTable2}
columns={columns} columns={columns}
...@@ -1840,54 +1839,6 @@ export default class LOV extends Component { ...@@ -1840,54 +1839,6 @@ export default class LOV extends Component {
</MuiThemeProvider>} </MuiThemeProvider>}
</div> </div>
<div className="grid grid-2x" style={{ marginTop: 20 }}>
<div className="col-1" style={{ paddingLeft: 0 }}>
<button
type="button"
onClick={() => this.setState({ loading: true, visiblePLMR: true }, () => {
setTimeout(() => {
this.getItemHierarkiLOV()
}, 100);
})}
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none'
}}
>
<div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Back</Typography>
</div>
</button>
</div>
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingRight: 5 }}>
<button
className="button"
type="button"
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
onClick={() => {
this.setState({ loading: true }, () => {
setTimeout(() => {
// this.setState({ loading: false })
this.handleValidate()
}, 100);
})
}}
>
<div style={{ backgroundColor: '#fff', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #354960' }}>
<Typography style={{ fontSize: '11px', color: '#354960', textAlign: 'center' }}>Calculate</Typography>
</div>
</button>
</div>
</div>
<div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '100%', paddingLeft: 5, paddingRight: 15, marginTop: 5 }}> <div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '100%', paddingLeft: 5, paddingRight: 15, marginTop: 5 }}>
<div> <div>
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
...@@ -1953,7 +1904,7 @@ export default class LOV extends Component { ...@@ -1953,7 +1904,7 @@ export default class LOV extends Component {
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Total Outstanding Loan</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Total Outstanding Loan</Typography>
</div> </div>
<div style={{border: '1px solid black', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end'}}> <div style={{border: '1px solid black', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end'}}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{formatSeparator(this.state.totalOutStand)}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{formatSeparator(this.state.perBS)}</Typography>
</div> </div>
</div> </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