Commit dc904c50 authored by Riri Novita's avatar Riri Novita

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into riri

parents 494ffd82 af5a51a0
This diff is collapsed.
...@@ -1198,7 +1198,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1198,7 +1198,7 @@ export default class ListOfCreditFacilities extends Component {
// console.log(totalLoan); // console.log(totalLoan);
// dataTable: newData, totalOutStand: newData[newData.length-1][22] // dataTable: newData, totalOutStand: newData[newData.length-1][22]
if (bankNameEmpty) { if (bankNameEmpty) {
this.setState({ loading: false, dataTable: this.state.dataTable, totalOutStand: 0, diff: Number(0 - this.state.perBS), saveDraft: false }) this.setState({ loading: false, dataTable: this.state.dataTable, totalOutStand: 0, diff: Number(0 - this.state.perBS), saveDraft: true, saveComp: true})
} else { } else {
this.setState({ loading: false, dataTable: newData, totalOutStand: totalLoan, diff: Number(totalLoan - this.state.perBS), saveDraft: false, saveComp: Number(totalLoan - this.state.perBS) == 0? false : true }) this.setState({ loading: false, dataTable: newData, totalOutStand: totalLoan, diff: Number(totalLoan - this.state.perBS), saveDraft: false, saveComp: Number(totalLoan - this.state.perBS) == 0? false : true })
} }
...@@ -3490,7 +3490,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3490,7 +3490,7 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ flex: 1, padding: 20, width: '100%' }}> <div style={{ flex: 1, padding: 20, width: '100%' }}>
{this.state.visibleLOCFMR ? {this.state.visibleLOCFMR ?
<Paper style={{ paddingTop: 10, paddingBottom: 20 }}> <Paper style={{ paddingTop: 10, paddingBottom: 20 }}>
<Snackbar open={this.state.snekbar} autoHideDuration={6000} onClose={handleClose}> <Snackbar open={this.state.snekbar} autoHideDuration={3000} onClose={handleClose}>
<Alert onClose={handleClose} severity="error"> <Alert onClose={handleClose} severity="error">
{this.state.snekbarMsg} {this.state.snekbarMsg}
</Alert> </Alert>
...@@ -3507,7 +3507,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3507,7 +3507,7 @@ export default class ListOfCreditFacilities extends Component {
</div> </div>
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}> <div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
{(this.state.get_for == 'edit' && (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.state.get_for == 'edit' &&
<div> <div>
<a data-tip={'Download Template'} data-for="template"> <a data-tip={'Download Template'} data-for="template">
<button <button
...@@ -3525,7 +3525,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3525,7 +3525,7 @@ export default class ListOfCreditFacilities extends Component {
<ReactTooltip border={true} id="template" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="template" place="bottom" type="light" effect="solid" />
</div> </div>
)} )}
{(this.state.get_for == 'edit' && (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.state.get_for == 'edit' &&
<div> <div>
<a data-tip={'Upload'} data-for="upload"> <a data-tip={'Upload'} data-for="upload">
<button <button
...@@ -3670,7 +3670,8 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3670,7 +3670,8 @@ export default class ListOfCreditFacilities extends Component {
type="button" type="button"
onClick={() => onClick={() =>
this.state.saveDraft === true ? this.state.saveDraft === true ?
null : this.setState({snekbar: true, snekbarMsg: 'Data Incomplete !'})
:
this.state.handleTekTekTek == 1 ? null : this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1, loading: true }, () => { this.setState({ handleTekTekTek: 1, loading: true }, () => {
setTimeout(() => { setTimeout(() => {
...@@ -3680,7 +3681,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3680,7 +3681,7 @@ export default class ListOfCreditFacilities extends Component {
} }
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: this.state.saveDraft !== true ? 'pointer' : 'default', cursor: 'pointer',
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none', outline: 'none',
marginRight: 20 marginRight: 20
...@@ -3699,7 +3700,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3699,7 +3700,7 @@ export default class ListOfCreditFacilities extends Component {
// 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({snekbar: true, snekbarMsg: 'Data Incomplete !'})
: :
this.state.handleTekTekTek == 1 ? null : this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1, loading: true }, () => { this.setState({ handleTekTekTek: 1, loading: true }, () => {
...@@ -3710,7 +3711,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3710,7 +3711,7 @@ export default class ListOfCreditFacilities extends Component {
} }
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: this.state.saveComp === true ? 'default' : 'pointer', cursor: 'pointer',
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none' outline: 'none'
}} }}
...@@ -3824,7 +3825,8 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3824,7 +3825,8 @@ export default class ListOfCreditFacilities extends Component {
type="button" type="button"
onClick={() => onClick={() =>
this.state.saveDraft === true ? this.state.saveDraft === true ?
null : this.setState({snekbar: true, snekbarMsg: 'Data Incomplete !'})
:
this.state.handleTekTekTek == 1 ? null : this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1, loading: true }, () => { this.setState({ handleTekTekTek: 1, loading: true }, () => {
setTimeout(() => { setTimeout(() => {
...@@ -3834,7 +3836,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3834,7 +3836,7 @@ export default class ListOfCreditFacilities extends Component {
} }
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: this.state.saveDraft !== true ? 'pointer' : 'default', cursor: 'pointer',
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none', outline: 'none',
marginRight: 20 marginRight: 20
...@@ -3855,7 +3857,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3855,7 +3857,7 @@ export default class ListOfCreditFacilities extends Component {
// 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({snekbar: true, snekbarMsg: 'Data Incomplete !'})
: :
this.state.handleTekTekTek == 1 ? null : this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1, loading: true }, () => { this.setState({ handleTekTekTek: 1, loading: true }, () => {
...@@ -3866,7 +3868,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -3866,7 +3868,7 @@ export default class ListOfCreditFacilities extends Component {
} }
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: this.state.saveComp === true ? 'default' : 'pointer', cursor: 'pointer',
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none' outline: 'none'
}} }}
......
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