Commit 54614688 authored by Hardiansyah's avatar Hardiansyah

tambah kondisi button budget tahunan

parent 81645f4a
...@@ -221,11 +221,11 @@ export default class BudgetTahunan extends Component { ...@@ -221,11 +221,11 @@ export default class BudgetTahunan extends Component {
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
if (response.data.data.is_approver === true) { if (response.data.data.is_approver === true) {
this.setState({ truelyApprover: true, isApprover: true, permissionhandle: true, checkApprover: true }, () => { this.setState({ truelyApprover: true, isApprover: true, isApproverFinance: response.data.data.is_finance, isApproverCAT: response.data.data.is_cat, permissionhandle: true, checkApprover: true }, () => {
this.getPeriode() this.getPeriode()
}) })
} else { } else {
this.setState({ truelyApprover: false, isApprover: false, permissionhandle: false, checkApprover: false }, () => this.setState({ truelyApprover: false, isApprover: false, isApproverFinance: false, isApproverCAT: false, permissionhandle: false, checkApprover: false }, () =>
this.getDetailUser()) this.getDetailUser())
} }
} else { } else {
...@@ -3526,8 +3526,7 @@ export default class BudgetTahunan extends Component { ...@@ -3526,8 +3526,7 @@ export default class BudgetTahunan extends Component {
</div> </div>
)} )}
</div> </div>
{/* {this.state.checkApprover && this.state.isApproverFinance && this.renderBtnSubmit(mstIdFinance)} */} {((this.state.checkApprover && this.state.isApproverFinance) || this.state.submitter) && this.renderBtnSubmit(mstIdFinance)}
{this.renderBtnSubmit(mstIdFinance)}
<div style={{ padding: '0 20px 20px' }}> <div style={{ padding: '0 20px 20px' }}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}> <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<Typography style={{ fontSize: '16px', color: '#4b4b4b', fontWeight: 'bold' }}>Report CAT</Typography> <Typography style={{ fontSize: '16px', color: '#4b4b4b', fontWeight: 'bold' }}>Report CAT</Typography>
...@@ -3569,8 +3568,7 @@ export default class BudgetTahunan extends Component { ...@@ -3569,8 +3568,7 @@ export default class BudgetTahunan extends Component {
</div> </div>
)} )}
</div> </div>
{/* {this.state.checkApprover && this.state.isApproverCAT && this.renderBtnSubmit(mstIdCAT)} */} {((this.state.checkApprover && this.state.isApproverCAT) || this.state.submitterCAT) && this.renderBtnSubmit(mstIdCAT)}
{this.renderBtnSubmit(mstIdCAT)}
</Paper> </Paper>
</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