Commit 4cf12132 authored by Riri Novita's avatar Riri Novita

LOCF update

parent 7af543de
...@@ -767,26 +767,26 @@ export default class ListOfCreditFacilities extends Component { ...@@ -767,26 +767,26 @@ export default class ListOfCreditFacilities extends Component {
currency_id: this.state.defaultCurrencyUpload?.id currency_id: this.state.defaultCurrencyUpload?.id
} }
let dataDelete = [] let dataDelete = []
api.create().getIdDeleteFromExcelLOCF(payload).then((response) => { // api.create().getIdDeleteFromExcelLOCF(payload).then((response) => {
console.log(response) // console.log(response)
// if (response.data) { // // if (response.data) {
// // // // // // console.log(response.data) // // // // // // // console.log(response.data)
// let idDelete = response.data.data.item_report_id // // let idDelete = response.data.data.item_report_id
// if (idDelete.length > 0) { // // if (idDelete.length > 0) {
// idDelete.map((item, index) => { // // idDelete.map((item, index) => {
// dataDelete.push(item) // // dataDelete.push(item)
// }) // // })
// this.setState({ dataDelete }) // // this.setState({ dataDelete })
// } // // }
// } // // }
}) // })
api.create().checkUploadMonthlyReportLOCF(payload).then(response => { api.create().checkUploadMonthlyReportLOCF(payload).then(response => {
// console.log(JSON.stringify(this.state.payload)); // console.log(JSON.stringify(this.state.payload));
console.log(response) console.log(response)
if (response.data) { if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
this.setState({ visibleUpload: false, loading: true, visibleLOCFMR: false, totalOutStand: 0, diff: 0, visibleButtonUpload: true }) this.setState({ visibleUploadSimulasi: false, loading: true, visibleLOCFMR: false, totalOutStand: 0, diff: 0, visibleButtonUpload: true })
let dataTable = [] let dataTable = []
response.data.data.map((item, index) => { response.data.data.map((item, index) => {
if (index == response.data.data.length - 1) { if (index == response.data.data.length - 1) {
...@@ -4465,97 +4465,240 @@ export default class ListOfCreditFacilities extends Component { ...@@ -4465,97 +4465,240 @@ export default class ListOfCreditFacilities extends Component {
</div> </div>
</Paper> </Paper>
: :
<Paper style={{ paddingTop: 10, paddingBottom: 20 }}> this.state.visibleButtonUpload ?
<Snackbar open={this.state.snekbar} autoHideDuration={6000} onClose={handleClose}> <Paper style={{ paddingTop: 10, paddingBottom: 20 }}>
<Alert onClose={handleClose} severity="error"> <Snackbar open={this.state.snekbar} autoHideDuration={6000} onClose={handleClose}>
{this.state.snekbarMsg} <Alert onClose={handleClose} severity="error">
</Alert> {this.state.snekbarMsg}
</Snackbar> </Alert>
<div style={{ borderBottom: 'solid 1px #c4c4c4' }} > </Snackbar>
<Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Monthly Report - List Of Credit Facilities</Typography> <div style={{ borderBottom: 'solid 1px #c4c4c4' }} >
</div> <Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Monthly Report - List Of Credit Facilities</Typography>
<div style={{ padding: 20 }}>
<div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {String(this.props.month.month_value).toLocaleUpperCase()} {this.props.periode} (rev.{this.props.revision})</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div> </div>
<div style={{ padding: 20 }}>
<div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {String(this.props.month.month_value).toLocaleUpperCase()} {this.props.periode} (rev.{this.props.revision})</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div>
<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()}>
<MUIDataTable <MUIDataTable
data={dataTable2} data={dataTable2}
columns={columns} columns={columns}
options={options} options={options}
/> />
</MuiThemeProvider>} </MuiThemeProvider>}
</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' }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : </Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : </Typography>
<div style={{ marginLeft: 10, overflowY: 'scroll', height: this.state.updateBy.length < 2 ? 25 : 75, marginTop: 10 }}> <div style={{ marginLeft: 10, overflowY: 'scroll', height: this.state.updateBy.length < 2 ? 25 : 75, marginTop: 10 }}>
{ {
this.state.updateBy.length > 0 ? this.state.updateBy.reverse().map((item, index) => { this.state.updateBy.length > 0 ? this.state.updateBy.reverse().map((item, index) => {
return ( return (
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>{item.latest_update}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>{item.latest_update}</Typography>
) )
}) : }) :
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>-</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>-</Typography>
} }
</div>
</div>
</div>
<div style={{ display: 'flex', flexDirection: 'row' }}>
<div style={{ padding: 5 }}>
<Typography style={{ fontSize: '12px', 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: '14px', color: '#4b4b4b' }}><NumberFormat value={this.state.perBS} displayType={'text'} thousandSeparator={true} prefix={''} /></Typography>
</div> </div>
</div> </div>
</div> </div>
<div style={{ display: 'flex', flexDirection: 'row' }}> <div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '100%', paddingLeft: 5, paddingRight: 15 }}>
<div style={{ padding: 5 }}> <div>
<Typography style={{ fontSize: '12px', color: '#4b4b4b' }}>Total Outstanding Loan</Typography> <Typography style={{ fontSize: '12px', color: '#4b4b4b', marginTop: 10 }}>Notes : {this.state.notes}</Typography>
</div> </div>
<div style={{ border: '1px solid black', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end' }}> <div style={{ display: 'flex', flexDirection: 'row' }}>
<Typography style={{ fontSize: '14px', color: '#4b4b4b' }}><NumberFormat value={this.state.perBS} displayType={'text'} thousandSeparator={true} prefix={''} /></Typography> <div style={{ padding: 5 }}>
<Typography style={{ fontSize: '12px', 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: '14px', color: Number(this.state.diff) > 0 ? 'red' : '#4b4b4b' }}><NumberFormat value={this.state.diff} displayType={'text'} thousandSeparator={true} prefix={''} /></Typography>
</div>
</div> </div>
</div> </div>
</div>
<div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '100%', paddingLeft: 5, paddingRight: 15 }}> <div style={{ display: 'flex', maxWidth: '100%', paddingLeft: 5, paddingRight: 15 }}>
<div> <Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 5, fontWeight: 'bold', textDecorationLine: 'underline' }}>Keterangan:</Typography>
<Typography style={{ fontSize: '12px', color: '#4b4b4b', marginTop: 10 }}>Notes : {this.state.notes}</Typography>
</div> </div>
<div style={{ display: 'flex', flexDirection: 'row' }}> <div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '100%', paddingLeft: 5, paddingRight: 15 }}>
<div style={{ padding: 5 }}> <Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>1. Current ratio = Current Assets / Current Liabilities</Typography>
<Typography style={{ fontSize: '12px', color: '#4b4b4b' }}>Diff</Typography> </div>
</div> <div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '100%', paddingLeft: 5, paddingRight: 15 }}>
<div style={{ borderStyle: 'solid', borderWidth: '0px 1px 1px 1px', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end' }}> <Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>2. DER = Interest Bearing Debt / Total Equity (dimana Interest Bearing Debt = Short term loan + Current maturities of long term debt + Long term loan + Due to affiliated companies + Due to shareholder)</Typography>
<Typography style={{ fontSize: '14px', color: Number(this.state.diff) > 0 ? 'red' : '#4b4b4b' }}><NumberFormat value={this.state.diff} displayType={'text'} thousandSeparator={true} prefix={''} /></Typography> </div>
</div> <div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '100%', paddingLeft: 5, paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>3. Debt to EBITDA = Interest Bearing Debt / EBITDA (dimana Interest Bearing Debt = Short term loan + Current maturities of long term debt + Long term loan + Due to affiliated companies + Due to shareholder</Typography>
</div>
<div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '100%', paddingLeft: 5, paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginLeft: 10 }}>& EBITDA = Income from operations 2 (EBIT 2) + depreciation)</Typography>
</div>
<div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '100%', paddingLeft: 5, paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>4. EBITDA to Interest (ISCR) = EBITDA / Interest Expenses (dimana EBITDA = Income from operations 2 (EBIT 2) + depreciation)</Typography>
</div> </div>
</div>
<div style={{ display: 'flex', maxWidth: '100%', paddingLeft: 5, paddingRight: 15 }}> {/* <div style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingLeft: 15, paddingRight: 15, marginTop: 5}}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 5, fontWeight: 'bold', textDecorationLine: 'underline' }}>Keterangan:</Typography> <div style={{display: 'flex', flexDirection: 'row'}}>
</div> <div style={{padding: 5}}>
<div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '100%', paddingLeft: 5, paddingRight: 15 }}> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Total Outstanding Loan</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>1. Current ratio = Current Assets / Current Liabilities</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.totalOutStand)}</Typography>
</div>
</div> </div>
<div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '100%', paddingLeft: 5, paddingRight: 15 }}> </div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>2. DER = Interest Bearing Debt / Total Equity (dimana Interest Bearing Debt = Short term loan + Current maturities of long term debt + Long term loan + Due to affiliated companies + Due to shareholder)</Typography> <div style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingLeft: 15, paddingRight: 15}}>
<div style={{display: 'flex', flexDirection: 'row'}}>
<div style={{padding: 5}}>
<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: '#4b4b4b' }}>{(formatSeparator(this.state.diff))}</Typography>
</div>
</div> </div>
<div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '100%', paddingLeft: 5, paddingRight: 15 }}> </div> */}
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>3. Debt to EBITDA = Interest Bearing Debt / EBITDA (dimana Interest Bearing Debt = Short term loan + Current maturities of long term debt + Long term loan + Due to affiliated companies + Due to shareholder</Typography>
</div> </div>
<div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '100%', paddingLeft: 5, paddingRight: 15 }}> <div className="grid grid-2x" style={{ marginTop: 20 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginLeft: 10 }}>& EBITDA = Income from operations 2 (EBIT 2) + depreciation)</Typography> <div className="col-1">
</div>
{/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null :
(this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? */}
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button
type="button"
// disabled={this.state.buttonError}
onClick={() =>
this.setState({ handleDoubleClick: 1, loading: true }, () => {
this.uploadSimulasi('submitted')
})}
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
}}
>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save Data</Typography>
</div>
</button>
</div>
{/* : null } */}
</div> </div>
<div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '100%', paddingLeft: 5, paddingRight: 15 }}> </Paper>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>4. EBITDA to Interest (ISCR) = EBITDA / Interest Expenses (dimana EBITDA = Income from operations 2 (EBIT 2) + depreciation)</Typography> :
<Paper style={{ paddingTop: 10, paddingBottom: 20 }}>
<Snackbar open={this.state.snekbar} autoHideDuration={6000} onClose={handleClose}>
<Alert onClose={handleClose} severity="error">
{this.state.snekbarMsg}
</Alert>
</Snackbar>
<div style={{ borderBottom: 'solid 1px #c4c4c4' }} >
<Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Monthly Report - List Of Credit Facilities</Typography>
</div> </div>
<div style={{ padding: 20 }}>
<div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {String(this.props.month.month_value).toLocaleUpperCase()} {this.props.periode} (rev.{this.props.revision})</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div>
{/* <div style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingLeft: 15, paddingRight: 15, marginTop: 5}}> <div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
{this.state.loading && loadingComponent}
{this.state.dataLoaded && !this.state.loading && <MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable
data={dataTable2}
columns={columns}
options={options}
/>
</MuiThemeProvider>}
</div>
<div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '100%', paddingLeft: 5, paddingRight: 15, marginTop: 5 }}>
<div>
<div style={{ display: 'flex' }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : </Typography>
<div style={{ marginLeft: 10, overflowY: 'scroll', height: this.state.updateBy.length < 2 ? 25 : 75, marginTop: 10 }}>
{
this.state.updateBy.length > 0 ? this.state.updateBy.reverse().map((item, index) => {
return (
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>{item.latest_update}</Typography>
)
}) :
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>-</Typography>
}
</div>
</div>
</div>
<div style={{ display: 'flex', flexDirection: 'row' }}>
<div style={{ padding: 5 }}>
<Typography style={{ fontSize: '12px', 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: '14px', color: '#4b4b4b' }}><NumberFormat value={this.state.perBS} displayType={'text'} thousandSeparator={true} prefix={''} /></Typography>
</div>
</div>
</div>
<div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '100%', paddingLeft: 5, paddingRight: 15 }}>
<div>
<Typography style={{ fontSize: '12px', color: '#4b4b4b', marginTop: 10 }}>Notes : {this.state.notes}</Typography>
</div>
<div style={{ display: 'flex', flexDirection: 'row' }}>
<div style={{ padding: 5 }}>
<Typography style={{ fontSize: '12px', 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: '14px', color: Number(this.state.diff) > 0 ? 'red' : '#4b4b4b' }}><NumberFormat value={this.state.diff} displayType={'text'} thousandSeparator={true} prefix={''} /></Typography>
</div>
</div>
</div>
<div style={{ display: 'flex', maxWidth: '100%', paddingLeft: 5, paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 5, fontWeight: 'bold', textDecorationLine: 'underline' }}>Keterangan:</Typography>
</div>
<div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '100%', paddingLeft: 5, paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>1. Current ratio = Current Assets / Current Liabilities</Typography>
</div>
<div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '100%', paddingLeft: 5, paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>2. DER = Interest Bearing Debt / Total Equity (dimana Interest Bearing Debt = Short term loan + Current maturities of long term debt + Long term loan + Due to affiliated companies + Due to shareholder)</Typography>
</div>
<div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '100%', paddingLeft: 5, paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>3. Debt to EBITDA = Interest Bearing Debt / EBITDA (dimana Interest Bearing Debt = Short term loan + Current maturities of long term debt + Long term loan + Due to affiliated companies + Due to shareholder</Typography>
</div>
<div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '100%', paddingLeft: 5, paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginLeft: 10 }}>& EBITDA = Income from operations 2 (EBIT 2) + depreciation)</Typography>
</div>
<div style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '100%', paddingLeft: 5, paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>4. EBITDA to Interest (ISCR) = EBITDA / Interest Expenses (dimana EBITDA = Income from operations 2 (EBIT 2) + depreciation)</Typography>
</div>
{/* <div style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingLeft: 15, paddingRight: 15, marginTop: 5}}>
<div style={{display: 'flex', flexDirection: 'row'}}> <div style={{display: 'flex', flexDirection: 'row'}}>
<div style={{padding: 5}}> <div style={{padding: 5}}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Total Outstanding Loan</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Total Outstanding Loan</Typography>
...@@ -4575,105 +4718,105 @@ export default class ListOfCreditFacilities extends Component { ...@@ -4575,105 +4718,105 @@ export default class ListOfCreditFacilities extends Component {
</div> </div>
</div> </div>
</div> */} </div> */}
</div>
<div className="grid grid-2x" style={{ marginTop: 20 }}>
<div className="col-1">
<button
type="button"
onClick={() => {
this.getBankData()
this.getTypeOfCredit()
this.getSubmission()
}
}
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', marginLeft: 10 }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Back</Typography>
</div>
</button>
</div> </div>
{/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null : <div className="grid grid-2x" style={{ marginTop: 20 }}>
<div className="col-1">
<button
type="button"
onClick={() => {
this.getBankData()
this.getTypeOfCredit()
this.getSubmission()
}
}
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', marginLeft: 10 }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Back</Typography>
</div>
</button>
</div>
{/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null :
(this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? */} (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? */}
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}> <div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button <button
className="button" className="button"
type="button" type="button"
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: 'pointer', cursor: 'pointer',
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none', outline: 'none',
marginRight: 20 marginRight: 20
}} }}
onClick={() => this.setState({ totalOutStand: totalLoan, saveTambahan: false }, () => { onClick={() => this.setState({ totalOutStand: totalLoan, saveTambahan: false }, () => {
this.handleCalculate() this.handleCalculate()
})} })}
> >
<div style={{ backgroundColor: '#fff', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #354960' }}> <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> <Typography style={{ fontSize: '11px', color: '#354960', textAlign: 'center' }}>Calculate</Typography>
</div> </div>
</button> </button>
<button <button
className="button" className="button"
type="button" type="button"
onClick={() => onClick={() =>
this.state.saveDraft === true || this.state.saveTambahan ? this.state.saveDraft === true || this.state.saveTambahan ?
this.setState({ snekbar: true, snekbarMsg: 'Data Incomplete' }) this.setState({ snekbar: true, snekbarMsg: 'Data Incomplete' })
: :
this.state.handleDoubleClick == 1 ? null : this.state.handleDoubleClick == 1 ? null :
this.setState({ handleDoubleClick: 1, loading: true }, () => { this.setState({ handleDoubleClick: 1, loading: true }, () => {
setTimeout(() => { setTimeout(() => {
this.uploadLOCF('draft') this.uploadLOCF('draft')
}, 100); }, 100);
}) })
} }
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: 'pointer', cursor: 'pointer',
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none', outline: 'none',
marginRight: 20 marginRight: 20
}} }}
> >
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save as Draft</Typography>
</div> </div>
</button> </button>
<button <button
type="button" type="button"
// disabled={this.state.buttonError} // disabled={this.state.buttonError}
onClick={() => onClick={() =>
this.state.saveComp || this.state.saveTambahan ? this.state.saveComp || this.state.saveTambahan ?
this.setState({ snekbar: true, snekbarMsg: 'Data Incomplete / Diff must be 0' }) this.setState({ snekbar: true, snekbarMsg: 'Data Incomplete / Diff must be 0' })
: :
this.state.handleDoubleClick == 1 ? null : this.state.handleDoubleClick == 1 ? null :
this.setState({ handleDoubleClick: 1, loading: true }, () => { this.setState({ handleDoubleClick: 1, loading: true }, () => {
setTimeout(() => { setTimeout(() => {
this.uploadLOCF('submitted') this.uploadLOCF('submitted')
}, 100); }, 100);
}) })
} }
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: 'pointer', cursor: 'pointer',
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none' outline: 'none'
}} }}
> >
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', marginRight: 20 }}> <div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', marginRight: 20 }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
</div> </div>
</button> </button>
</div>
{/* : null } */}
</div> </div>
{/* : null } */} </Paper>}
</div>
</Paper>}
</div> </div>
{this.state.visibleUpload && ( {this.state.visibleUpload && (
...@@ -4753,7 +4896,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -4753,7 +4896,7 @@ export default class ListOfCreditFacilities extends Component {
}} }}
/> />
</div> </div>
{this.state.visibleButtonUpload && {/* {this.state.visibleButtonUpload &&
<div style={{ display: 'flex', justifyContent: 'flex-end', margin: '0px 32px 16px' }}> <div style={{ display: 'flex', justifyContent: 'flex-end', margin: '0px 32px 16px' }}>
<div> <div>
<button <button
...@@ -4777,7 +4920,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -4777,7 +4920,7 @@ export default class ListOfCreditFacilities extends Component {
</button> </button>
</div> </div>
</div> </div>
} } */}
{/* <div style={{ padding: '0px 30px 29px', fontSize: 17, color: 'red' }}><b>Warning:</b> Valid currency for uploading data is <b>{this.props.defaultCurrency.id == 1 ? "IDR" : "USD"}</b></div> */} {/* <div style={{ padding: '0px 30px 29px', fontSize: 17, color: 'red' }}><b>Warning:</b> Valid currency for uploading data is <b>{this.props.defaultCurrency.id == 1 ? "IDR" : "USD"}</b></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