Commit 10a30efc authored by r.kurnia's avatar r.kurnia

ketinggalan push tp olpa

parent 88bcedf7
...@@ -66,6 +66,8 @@ export default class TaxPlanningOLPA extends Component { ...@@ -66,6 +66,8 @@ export default class TaxPlanningOLPA extends Component {
this.getSettingControl() this.getSettingControl()
this.lastUpdate() this.lastUpdate()
this.handleViewOnly() this.handleViewOnly()
console.log(this.props)
console.log(this.state.viewOnly)
} }
handleViewOnly() { handleViewOnly() {
...@@ -98,7 +100,7 @@ export default class TaxPlanningOLPA extends Component { ...@@ -98,7 +100,7 @@ export default class TaxPlanningOLPA extends Component {
checkStatus = false checkStatus = false
} }
// this.setState({viewOnly: !checkApprover && checkLastStatus && checkStatus && checkPrevRev}) this.setState({viewOnly: !checkApprover && checkLastStatus && checkStatus && checkPrevRev})
} }
handleGetFor(type) { handleGetFor(type) {
...@@ -3047,13 +3049,12 @@ export default class TaxPlanningOLPA extends Component { ...@@ -3047,13 +3049,12 @@ export default class TaxPlanningOLPA extends Component {
</div> </div>
</button> </button>
</div> </div>
{this.props.isApprover === true || this.state.dataTable.length == 0 ? null : {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') ? <div className="col-2">
// {this.props.isApprover === true ? </div> :
// <div className="col-2">
// </div> :
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}> <div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}>
{this.state.get_for == 'view' && this.state.viewOnly && <button {this.state.get_for == 'view' && this.state.viewOnly &&
<button
className="button" className="button"
type="button" type="button"
style={{ style={{
...@@ -3072,7 +3073,8 @@ export default class TaxPlanningOLPA extends Component { ...@@ -3072,7 +3073,8 @@ export default class TaxPlanningOLPA extends Component {
<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' }}>Edit</Typography> <Typography style={{ fontSize: '11px', color: '#354960', textAlign: 'center' }}>Edit</Typography>
</div> </div>
</button>} </button>
}
{this.state.get_for == 'edit' && {this.state.get_for == 'edit' &&
<button <button
className="button" className="button"
...@@ -3150,7 +3152,7 @@ export default class TaxPlanningOLPA extends Component { ...@@ -3150,7 +3152,7 @@ export default class TaxPlanningOLPA extends Component {
<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> </div>
</Paper> </Paper>
......
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