Commit 2f2005bf authored by r.kurnia's avatar r.kurnia

complete

parent f5eef496
...@@ -47,12 +47,12 @@ export default class TaxPlanningMR extends Component { ...@@ -47,12 +47,12 @@ export default class TaxPlanningMR extends Component {
visibleTP: true, visibleTP: true,
disabledSave: true, disabledSave: true,
editable: false, editable: false,
buttonError: false,
judulColumn: null, judulColumn: null,
updateBy: '-', updateBy: '-',
buttonDraft: true, buttonDraft: true,
handleTekTekTek: 0, handleTekTekTek: 0,
saveDraft: true saveDraft: true,
buttonError: true
} }
this.fileHandler = this.fileHandler.bind(this); this.fileHandler = this.fileHandler.bind(this);
...@@ -181,7 +181,7 @@ export default class TaxPlanningMR extends Component { ...@@ -181,7 +181,7 @@ export default class TaxPlanningMR extends Component {
} }
} }
}) })
this.setState({ dataTable, loading: false, buttonError: true, editable: true }) this.setState({ dataTable, loading: false, editable: true })
} else { } else {
this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ loading: false, alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) { if (response.data.message.includes("Someone Logged In")) {
...@@ -193,7 +193,7 @@ export default class TaxPlanningMR extends Component { ...@@ -193,7 +193,7 @@ export default class TaxPlanningMR extends Component {
}) })
} }
} else { } else {
this.setState({ dataTable, loading: false, buttonError: true, editable: true }) this.setState({ dataTable, loading: false, editable: true })
} }
console.log(this.state.dataTable) console.log(this.state.dataTable)
}) })
...@@ -425,7 +425,7 @@ export default class TaxPlanningMR extends Component { ...@@ -425,7 +425,7 @@ export default class TaxPlanningMR extends Component {
// this.setState({ loading: false, buttonError: false, editable: false, saveDraft: false }) // this.setState({ loading: false, buttonError: false, editable: false, saveDraft: false })
// // alert("Type Input Can't be Empty") // // alert("Type Input Can't be Empty")
// } else { // } else {
this.setState({ loading: false, buttonError: true, editable: true, saveDraft: false }) this.setState({ loading: false, editable: true, saveDraft: false, buttonError: false })
// } // }
// }) // })
} }
...@@ -1563,9 +1563,8 @@ export default class TaxPlanningMR extends Component { ...@@ -1563,9 +1563,8 @@ export default class TaxPlanningMR extends Component {
className="button" className="button"
type="button" type="button"
onClick={() => onClick={() =>
// null this.state.saveDraft === true ?
// this.state.saveDraft === true ? null :
// null :
this.state.handleTekTekTek == 1 ? null : this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1, loading: true }, () => { this.setState({ handleTekTekTek: 1, loading: true }, () => {
setTimeout(() => { setTimeout(() => {
...@@ -1589,9 +1588,9 @@ export default class TaxPlanningMR extends Component { ...@@ -1589,9 +1588,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(() => {
...@@ -1601,7 +1600,7 @@ export default class TaxPlanningMR extends Component { ...@@ -1601,7 +1600,7 @@ export default class TaxPlanningMR extends Component {
} }
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: this.state.saveDraft === true ? 'default' : 'pointer', cursor: this.state.buttonError === 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