Commit 7697ba96 authored by Deni Rinaldi's avatar Deni Rinaldi

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

+++

See merge request !392
parents 5600f0c2 b08dccfa
......@@ -470,7 +470,7 @@ export default class BudgetTahunan extends Component {
let array = []
let canSubmit = true
this.state.dataTable.map(item => {
if (item[1] !== 'Cash Flow' && item[1] !== 'CAT' && item[1] !== 'Tax Planning') {
if (item[1] !== 'Cash Flow') {
if (item[3] !== "submitted") {
canSubmit = false
array.push(item[3])
......
......@@ -161,9 +161,9 @@ export default class BalanceSheet extends Component {
}
}
})
this.setState({ dataTable, loading: false, buttonError: true })
this.setState({ dataTable, loading: false, buttonError: true, editable: true })
} else {
this.setState({ dataTable, loading: false, buttonError: true })
this.setState({ dataTable, loading: false, buttonError: true, editable: true })
}
})
}
......@@ -445,7 +445,7 @@ export default class BalanceSheet extends Component {
api.create().validateSubmitReport(payload).then((response) => {
console.log(response)
if (response.data.data.result) {
this.setState({ loading: false, buttonError: false, editable: true })
this.setState({ loading: false, buttonError: false, editable: false })
} else {
this.setState({ loading: false, buttonError: true, editable: true })
}
......@@ -2121,18 +2121,18 @@ export default class BalanceSheet extends Component {
type="button"
style={{
backgroundColor: 'transparent',
cursor: this.state.editable === true ? 'pointer' : 'default',
cursor: this.state.editable !== true ? 'pointer' : 'default',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
onClick={() => this.state.editable === true ?
null :
this.setState({ loading: true }, () => {
setTimeout(() => {
this.backToMasterBudget('draft')
}, 100);
}) :
null}
})}
>
<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>
......
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