Commit e4556ea5 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'didam' into 'master'

apdet

See merge request !834
parents a5d3bc56 a1fada05
...@@ -1226,8 +1226,14 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1226,8 +1226,14 @@ export default class ListOfCreditFacilities extends Component {
this.setState({loading: true}, () => { this.setState({loading: true}, () => {
this.setState({loading: false}) this.setState({loading: false})
}) })
console.log(dataTable2)
} else { } else {
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 ) {
value = String(value).split(",").join("")
value = Number(value).toFixed(2)
} else {
value = String(value).split(",").join("")
}
dataTable2[tableMeta.rowIndex][column] = value
if (value.value !== undefined) { if (value.value !== undefined) {
if (value.value == 'Investment Loan') { if (value.value == 'Investment Loan') {
dataTable2[tableMeta.rowIndex][16] = 0 dataTable2[tableMeta.rowIndex][16] = 0
...@@ -1248,8 +1254,6 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1248,8 +1254,6 @@ export default class ListOfCreditFacilities extends Component {
dataTable2[tableMeta.rowIndex][17] = 0 dataTable2[tableMeta.rowIndex][17] = 0
} }
} }
dataTable2[tableMeta.rowIndex][column] = value
console.log(dataTable2)
} }
} }
...@@ -1678,7 +1682,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1678,7 +1682,7 @@ export default class ListOfCreditFacilities extends Component {
} }
} }
}, { }, {
name: "Interest", name: "Interest (%)",
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96, borderRight: '1px #fff solid' }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96, borderRight: '1px #fff solid' }}>
...@@ -1686,31 +1690,32 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1686,31 +1690,32 @@ export default class ListOfCreditFacilities extends Component {
</TableCell> </TableCell>
), ),
setCellProps: () => ({ style2 }), setCellProps: () => ({ style2 }),
customBodyRender: (val, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] == 8 || tableMeta.rowData[0] == 9? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] == 8 || tableMeta.rowData[0] == 9?
null : null :
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
value={val} value={value}
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
suffix="%" style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} type="text"
type="text" placeholder=""
placeholder="" value={Number(value).toFixed(2)}
value={Number(val).toFixed(2)} // disabled={this.props.isApprover ? true : ((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') ? false : true)}
// disabled={this.props.isApprover ? true : ((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') ? false : true)} decimalScale={2}
maxLength={4} onBlur={(event) => {
onBlur={(event) => { // updateValue(event.target.value)
// updateValue(some) handleChange(event.target.value, tableMeta, tableMeta.columnIndex)
handleChange(event.target.value, tableMeta, tableMeta.columnIndex) // // // // console.log(tableMeta.rowData[0])
}} }}
/> />
} }
/>} />
}
</div> </div>
) )
} }
...@@ -1813,7 +1818,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1813,7 +1818,7 @@ export default class ListOfCreditFacilities extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={false} disabled={false}
value={Number(tableMeta.rowData[12]).toFixed(1) == 0.0 ? "-" : Number(tableMeta.rowData[12]).toFixed(1)} value={Number(tableMeta.rowData[12]).toFixed(1) == 0.0 ? "0.0" : Number(tableMeta.rowData[12]).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta, 12) handleChange(event.target.value, tableMeta, 12)
}} }}
...@@ -1850,7 +1855,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1850,7 +1855,7 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
value={val} // value={val}
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -1930,7 +1935,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1930,7 +1935,7 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
value={val} // value={val}
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -2770,10 +2775,10 @@ export default class ListOfCreditFacilities extends Component { ...@@ -2770,10 +2775,10 @@ export default class ListOfCreditFacilities extends Component {
<th style={{ ...style2, color: '#fff', backgroundColor: '#1c71b8', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} > <th style={{ ...style2, color: '#fff', backgroundColor: '#1c71b8', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
<div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', justifyContent: 'center', display: 'flex', alignItems: 'center', height: 43, fontSize: 12, fontWeight: 'bold', padding: 5, textAlign: 'center' }}>{columnMeta.name}</div> <div style={{ borderBottom: "1px #fff solid", backgroundColor: '#1c71b8', justifyContent: 'center', display: 'flex', alignItems: 'center', height: 43, fontSize: 12, fontWeight: 'bold', padding: 5, textAlign: 'center' }}>{columnMeta.name}</div>
<div className="grid grid-2x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}> <div className="grid grid-2x" style={{ ...style2, color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky" }}>
<div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', borderRight: "1px #fff solid", backgroundColor: '#07a7d0', padding: dataTable2.length == 0 ? 13 : 5, paddingBottom: dataTable2.length == 0 ? 14 : 6 }}> <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', borderRight: "1px #fff solid", height: 45, display: 'grid', alignItems: 'center', backgroundColor: '#07a7d0', padding: dataTable2.length == 0 ? 13 : 5, paddingBottom: dataTable2.length == 0 ? 14 : 6 }}>
<span>{"Financial Covenant"}</span> <span>{"Financial Covenant"}</span>
</div> </div>
<div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', backgroundColor: '#07a7d0', height: '100%', display: 'grid', alignItems: 'center', padding: dataTable2.length == 0 ? 13 : 5, paddingBottom: dataTable2.length == 0 ? 14 : 6 }}> <div className="column-2" style={{ placeSelf: 'center', textAlign: 'center', backgroundColor: '#07a7d0', height: 45, display: 'grid', alignItems: 'center', padding: dataTable2.length == 0 ? 13 : 5, paddingBottom: dataTable2.length == 0 ? 14 : 6 }}>
<span>{"Current Testing"}</span> <span>{"Current Testing"}</span>
</div> </div>
</div> </div>
...@@ -3472,7 +3477,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3472,7 +3477,7 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ display: 'flex', justifyContent: 'space-between' }}> <div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div> <div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {String(this.props.month.month_value).toLocaleUpperCase()} {this.props.periode} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div> </div>
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
...@@ -3556,7 +3561,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3556,7 +3561,7 @@ export default class ListOfCreditFacilities extends Component {
<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>
</div> </div>
<div style={{border: '1px solid black', padding: 5, minWidth: 200}}> <div style={{border: '1px solid black', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end'}}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.state.totalOutStand}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.state.totalOutStand}</Typography>
</div> </div>
</div> </div>
...@@ -3566,105 +3571,104 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3566,105 +3571,104 @@ export default class ListOfCreditFacilities extends Component {
<div style={{padding: 5}}> <div style={{padding: 5}}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Diff</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Diff</Typography>
</div> </div>
<div style={{borderStyle: 'solid', borderWidth: '0px 1px 1px 1px', padding: 5, minWidth: 200}}> <div style={{borderStyle: 'solid', borderWidth: '0px 1px 1px 1px', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end'}}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.state.diff}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.state.diff}</Typography>
</div> </div>
</div> </div>
</div> </div>
</div>
<div className="grid grid-2x" style={{ marginTop: 20 }}> <div className="grid grid-2x" style={{ marginTop: 20 }}>
<div className="col-1"> <div className="col-1">
<button <button
type="button" type="button"
onClick={() => this.setState({ loading: true }, () => { onClick={() => this.setState({ loading: true }, () => {
setTimeout(() => { setTimeout(() => {
this.props.onClickClose() this.props.onClickClose()
}, 100); }, 100);
})} })}
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: 'pointer', cursor: 'pointer',
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none' outline: 'none'
}} }}
> >
<div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', marginLeft: 20 }}> <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> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Back</Typography>
</div> </div>
</button> </button>
</div> </div>
{/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null : {/* {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.handleCalculate()} onClick={() => 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.saveDraft === true ?
null : null :
this.state.handleTekTekTek == 1 ? null : this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1, loading: true }, () => { this.setState({ handleTekTekTek: 1, loading: true }, () => {
setTimeout(() => { setTimeout(() => {
this.backToMonthlyReport('draft') this.backToMonthlyReport('draft')
}, 100); }, 100);
}) })
} }
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: this.state.saveDraft !== true ? 'pointer' : 'default', cursor: this.state.saveDraft !== true ? 'pointer' : 'default',
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.saveComp ?
this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' }) this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' })
: :
this.state.handleTekTekTek == 1 ? null : this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1, loading: true }, () => { this.setState({ handleTekTekTek: 1, loading: true }, () => {
setTimeout(() => { setTimeout(() => {
this.backToMonthlyReport('submitted') this.backToMonthlyReport('submitted')
}, 100); }, 100);
}) })
} }
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: this.state.saveComp === true ? 'default' : 'pointer', cursor: this.state.saveComp === true ? 'default' : '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 } */}
</div> </div>
</Paper> </Paper>
: :
...@@ -3680,7 +3684,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3680,7 +3684,7 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ padding: 20 }}> <div style={{ padding: 20 }}>
<div> <div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {String(this.props.month.month_value).toLocaleUpperCase()} {this.props.periode} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div> </div>
...@@ -3700,7 +3704,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3700,7 +3704,7 @@ export default class ListOfCreditFacilities extends Component {
<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>
</div> </div>
<div style={{border: '1px solid black', padding: 5}}> <div style={{border: '1px solid black', padding: 5, display: 'flex', justifyContent: 'flex-end'}}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.state.totalOutStand}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.state.totalOutStand}</Typography>
</div> </div>
</div> </div>
...@@ -3710,106 +3714,105 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3710,106 +3714,105 @@ export default class ListOfCreditFacilities extends Component {
<div style={{padding: 5}}> <div style={{padding: 5}}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Diff</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Diff</Typography>
</div> </div>
<div style={{borderStyle: 'solid', borderWidth: '0px 1px 1px 1px', padding: 5}}> <div style={{borderStyle: 'solid', borderWidth: '0px 1px 1px 1px', padding: 5, display: 'flex', justifyContent: 'flex-end'}}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.state.diff}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.state.diff}</Typography>
</div> </div>
</div> </div>
</div> </div>
</div>
<div className="grid grid-2x" style={{ marginTop: 20 }}> <div className="grid grid-2x" style={{ marginTop: 20 }}>
<div className="col-1"> <div className="col-1">
<button <button
type="button" type="button"
onClick={() => { onClick={() => {
this.getBankData() this.getBankData()
this.getTypeOfCredit() this.getTypeOfCredit()
this.getSubmission() 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: 20 }}>
<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') ? */}
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
<button
className="button"
type="button"
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
onClick={() => this.handleCalculate()}
>
<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>
<button
className="button"
type="button"
onClick={() =>
this.state.saveDraft === true ?
null :
this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1, loading: true }, () => {
setTimeout(() => {
this.uploadProfitLossMR('draft')
}, 100);
})
}
style={{
backgroundColor: 'transparent',
cursor: this.state.saveDraft !== true ? 'pointer' : 'default',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
>
<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>
</div>
</button>
<button
type="button"
// disabled={this.state.buttonError}
onClick={() =>
this.state.saveComp ?
this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' })
:
this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1, loading: true }, () => {
setTimeout(() => {
this.uploadProfitLossMR('submitted')
}, 100);
})
} }
style={{ }
backgroundColor: 'transparent', style={{
cursor: this.state.saveComp === true ? 'default' : 'pointer', backgroundColor: 'transparent',
borderColor: 'transparent', cursor: 'pointer',
outline: 'none' borderColor: 'transparent',
}} outline: 'none'
> }}
<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> <div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
</div> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Back</Typography>
</button> </div>
</div> </button>
{/* : null } */} </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
className="button"
type="button"
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
onClick={() => this.handleCalculate()}
>
<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>
<button
className="button"
type="button"
onClick={() =>
this.state.saveDraft === true ?
null :
this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1, loading: true }, () => {
setTimeout(() => {
this.uploadProfitLossMR('draft')
}, 100);
})
}
style={{
backgroundColor: 'transparent',
cursor: this.state.saveDraft !== true ? 'pointer' : 'default',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
>
<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>
</div>
</button>
<button
type="button"
// disabled={this.state.buttonError}
onClick={() =>
this.state.saveComp ?
this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' })
:
this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1, loading: true }, () => {
setTimeout(() => {
this.uploadProfitLossMR('submitted')
}, 100);
})
}
style={{
backgroundColor: 'transparent',
cursor: this.state.saveComp === true ? 'default' : 'pointer',
borderColor: 'transparent',
outline: 'none'
}}
>
<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>
</div>
</button>
</div> </div>
{/* : null } */}
</div> </div>
</Paper>} </Paper>}
</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