Commit 7dd40ff3 authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'deni-dev(pc)' into 'master'

handletek

See merge request !395
parents 2a57fbd4 fccb1241
...@@ -45,7 +45,8 @@ export default class BalanceSheet extends Component { ...@@ -45,7 +45,8 @@ export default class BalanceSheet extends Component {
editable: false, editable: false,
buttonError: false, buttonError: false,
judulColumn: null, judulColumn: null,
updateBy: '-' updateBy: '-',
handleTekTekTek: 0
} }
this.handleValue = this.handleValue.bind(this) this.handleValue = this.handleValue.bind(this)
this.fileHandler = this.fileHandler.bind(this); this.fileHandler = this.fileHandler.bind(this);
...@@ -2126,13 +2127,14 @@ export default class BalanceSheet extends Component { ...@@ -2126,13 +2127,14 @@ export default class BalanceSheet extends Component {
outline: 'none', outline: 'none',
marginRight: 20 marginRight: 20
}} }}
onClick={() => this.state.editable === true ? onClick={() =>
null : this.state.editable === true ?
this.setState({ loading: true }, () => { null :
setTimeout(() => { this.state.handleTekTekTek == 1 ? null :
this.backToMasterBudget('draft') this.setState({ handleTekTekTek: 1 }, () => {
}, 100); this.backToMasterBudget('draft')
})} })
}
> >
<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>
...@@ -2141,17 +2143,14 @@ export default class BalanceSheet extends Component { ...@@ -2141,17 +2143,14 @@ export default class BalanceSheet extends Component {
<button <button
type="button" type="button"
disabled={this.state.buttonError} disabled={this.state.buttonError}
onClick={() => { onClick={() =>
this.state.buttonError ? this.state.buttonError ?
this.setState({ loading: true }, () => { this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' })
setTimeout(() => { :
this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning', loading: false }) this.state.handleTekTekTek == 1 ? null :
}, 100); this.setState({ handleTekTekTek: 1 }, () => {
}) this.backToMasterBudget('submitted')
: this.setState({ loading: true }, () => { })}
this.backToMasterBudget('submitted')
})
}}
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: this.state.buttonError === true ? 'default' : 'pointer', cursor: this.state.buttonError === true ? 'default' : 'pointer',
...@@ -2233,11 +2232,14 @@ export default class BalanceSheet extends Component { ...@@ -2233,11 +2232,14 @@ export default class BalanceSheet extends Component {
<button <button
type="button" type="button"
disabled={this.state.buttonError} disabled={this.state.buttonError}
onClick={() => this.setState({ loading: true }, () => { onClick={() => this.setState({ loading: true }, () =>
setTimeout(() => { this.state.handleTekTekTek == 1 ? null :
this.uploadBalanceSheet('draft') this.setState({ handleTekTekTek: 1 }, () => {
}, 100); setTimeout(() => {
})} this.uploadBalanceSheet('draft')
}, 100);
})
)}
style={{ marginRight: 20 }} style={{ 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' }}>
...@@ -2247,11 +2249,14 @@ export default class BalanceSheet extends Component { ...@@ -2247,11 +2249,14 @@ export default class BalanceSheet extends Component {
<button <button
type="button" type="button"
disabled={this.state.buttonError} disabled={this.state.buttonError}
onClick={() => this.setState({ loading: true }, () => { onClick={() => this.setState({ loading: true }, () =>
setTimeout(() => { this.state.handleTekTekTek == 1 ? null :
this.uploadBalanceSheet('submitted') this.setState({ handleTekTekTek: 1 }, () => {
}, 100); setTimeout(() => {
})} this.uploadBalanceSheet('submitted')
}, 100);
})
)}
> >
<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 & Complete</Typography> <Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Save & Complete</Typography>
......
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