Commit eece511f authored by r.kurnia's avatar r.kurnia

complete save tp mr

parent f7140d0e
...@@ -60,10 +60,29 @@ export default class TaxPlanningMR extends Component { ...@@ -60,10 +60,29 @@ export default class TaxPlanningMR extends Component {
} }
componentDidMount() { componentDidMount() {
this.getItemHierarki() this.getSettingControl()
// this.getItemHierarki()
// this.getLatestUpdate() // this.getLatestUpdate()
} }
getSettingControl() {
let body = {
group: 'THRESHOLD_CONTROL',
company_id: this.props.company.company_id,
type: 'TAX_PLANNING'
}
api.create().getAllSettingByType(body).then(response => {
// console.log(response);
this.setState({
minValue: response.data.data[0] ? response.data.data[0].min_value : null,
maxValue: response.data.data[0] ? response.data.data[0].max_value : null,
}, () => {
this.getItemHierarki()
})
})
}
getLatestUpdate() { getLatestUpdate() {
let payload = { let payload = {
"report_id": 5, "report_id": 5,
...@@ -1584,9 +1603,9 @@ export default class TaxPlanningMR extends Component { ...@@ -1584,9 +1603,9 @@ export default class TaxPlanningMR extends Component {
type="button" type="button"
// disabled={this.state.buttonError} // disabled={this.state.buttonError}
onClick={() => onClick={() =>
this.state.buttonError ? // this.state.buttonError ?
this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' }) // this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' })
: // :
this.state.handleTekTekTek == 1 ? null : this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1, loading: true }, () => { this.setState({ handleTekTekTek: 1, loading: true }, () => {
setTimeout(() => { setTimeout(() => {
...@@ -1596,7 +1615,7 @@ export default class TaxPlanningMR extends Component { ...@@ -1596,7 +1615,7 @@ export default class TaxPlanningMR extends Component {
} }
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: this.state.buttonError === true ? 'default' : 'pointer', cursor: this.state.saveDraft === true ? 'default' : '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