Commit d4cfa24a authored by Deni Rinaldi's avatar Deni Rinaldi

minor nih

parent 40b77e74
...@@ -272,8 +272,9 @@ export default class BudgetTahunan extends Component { ...@@ -272,8 +272,9 @@ export default class BudgetTahunan extends Component {
lastStatus: response.data.data.last_status === null ? 'SUBMIT' : response.data.data.last_status lastStatus: response.data.data.last_status === null ? 'SUBMIT' : response.data.data.last_status
}, () => { }, () => {
this.setState({ loading: false }) this.setState({ loading: false })
this.checkIsSubmit()
this.historyApproval() this.historyApproval()
this.getReport()
this.getReportAttachment()
}) })
} else { } else {
this.setState({ submissionID: null }) this.setState({ submissionID: null })
...@@ -304,20 +305,6 @@ export default class BudgetTahunan extends Component { ...@@ -304,20 +305,6 @@ export default class BudgetTahunan extends Component {
}) })
} }
checkIsSubmit() {
// let body = {
// "submission_id": this.state.submissionID
// }
// api.create().checkIsSubmit(body).then(response => {
// console.log(response.data.data.result);
// if (response.data) {
// if (response.data.status === "Success") {
// this.setState({ isSubmit: response.data.data.result })
// }
// }
// })
}
approvalSubmission(type) { approvalSubmission(type) {
this.setState({ loading: true }) this.setState({ loading: true })
let body = { let body = {
...@@ -463,20 +450,14 @@ export default class BudgetTahunan extends Component { ...@@ -463,20 +450,14 @@ export default class BudgetTahunan extends Component {
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.getSubmission() this.getSubmission()
this.getReport()
this.getReportAttachment()
} else { } else {
this.setState({ loading: false }, () => { this.setState({ loading: false }, () => {
this.getSubmission() this.getSubmission()
this.getReport()
this.getReportAttachment()
}) })
} }
} else { } else {
this.setState({ loading: false }, ()=> { this.setState({ loading: false }, ()=> {
this.getSubmission() this.getSubmission()
this.getReport()
this.getReportAttachment()
}) })
} }
}) })
...@@ -763,8 +744,6 @@ export default class BudgetTahunan extends Component { ...@@ -763,8 +744,6 @@ export default class BudgetTahunan extends Component {
onChange={(event, newInputValue) => this.setState({ periode: newInputValue }, () => { onChange={(event, newInputValue) => this.setState({ periode: newInputValue }, () => {
this.setState({ visibleTableHistory: false, loading: true }) this.setState({ visibleTableHistory: false, loading: true })
this.getRevision() this.getRevision()
this.getReport()
this.getReportAttachment()
this.getSubmission() this.getSubmission()
})} })}
disabled={this.state.intent === 'Home' ? true : false} disabled={this.state.intent === 'Home' ? true : false}
...@@ -784,8 +763,6 @@ export default class BudgetTahunan extends Component { ...@@ -784,8 +763,6 @@ export default class BudgetTahunan extends Component {
onChange={(event, newInputValue) => this.setState({ company: newInputValue }, () => { onChange={(event, newInputValue) => this.setState({ company: newInputValue }, () => {
this.setState({ visibleTableHistory: false, loading: true }) this.setState({ visibleTableHistory: false, loading: true })
this.getRevision() this.getRevision()
this.getReport()
this.getReportAttachment()
this.getSubmission() this.getSubmission()
})} })}
disableClearable disableClearable
...@@ -1045,7 +1022,7 @@ export default class BudgetTahunan extends Component { ...@@ -1045,7 +1022,7 @@ export default class BudgetTahunan extends Component {
submissionID={this.state.submissionID} submissionID={this.state.submissionID}
saveToMasterBudget={this.saveToMasterBudget.bind(this)} saveToMasterBudget={this.saveToMasterBudget.bind(this)}
onClickClose={() => this.setState({ visibleBS: false, visibleBudgetTahunan: true })} onClickClose={() => this.setState({ visibleBS: false, visibleBudgetTahunan: true })}
getReport={this.getCompanyActive.bind(this)} getReport={this.getSubmission.bind(this)}
isApprover={this.state.isApprover} isApprover={this.state.isApprover}
/> />
)} )}
...@@ -1061,7 +1038,7 @@ export default class BudgetTahunan extends Component { ...@@ -1061,7 +1038,7 @@ export default class BudgetTahunan extends Component {
submissionID={this.state.submissionID} submissionID={this.state.submissionID}
saveToMasterBudget={this.saveToMasterBudget.bind(this)} saveToMasterBudget={this.saveToMasterBudget.bind(this)}
onClickClose={() => this.setState({ visiblePL: false, visibleBudgetTahunan: true })} onClickClose={() => this.setState({ visiblePL: false, visibleBudgetTahunan: true })}
getReport={this.getReport.bind(this)} getReport={this.getSubmission.bind(this)}
status={this.state.status} status={this.state.status}
isApprover={this.state.isApprover} isApprover={this.state.isApprover}
/> />
...@@ -1079,7 +1056,7 @@ export default class BudgetTahunan extends Component { ...@@ -1079,7 +1056,7 @@ export default class BudgetTahunan extends Component {
submissionID={this.state.submissionID} submissionID={this.state.submissionID}
saveToMasterBudget={this.saveToMasterBudget.bind(this)} saveToMasterBudget={this.saveToMasterBudget.bind(this)}
onClickClose={() => this.setState({ visibleTP: false, visibleBudgetTahunan: true })} onClickClose={() => this.setState({ visibleTP: false, visibleBudgetTahunan: true })}
getReport={this.getCompanyActive.bind(this)} getReport={this.getSubmission.bind(this)}
status={this.state.status} status={this.state.status}
isApprover={this.state.isApprover} isApprover={this.state.isApprover}
/> />
...@@ -1096,7 +1073,7 @@ export default class BudgetTahunan extends Component { ...@@ -1096,7 +1073,7 @@ export default class BudgetTahunan extends Component {
submissionID={this.state.submissionID} submissionID={this.state.submissionID}
saveToMasterBudget={this.saveToMasterBudget.bind(this)} saveToMasterBudget={this.saveToMasterBudget.bind(this)}
onClickClose={() => this.setState({ visibleFAM: false, visibleBudgetTahunan: true })} onClickClose={() => this.setState({ visibleFAM: false, visibleBudgetTahunan: true })}
getReport={this.getCompanyActive.bind(this)} getReport={this.getSubmission.bind(this)}
status={this.state.status} status={this.state.status}
isApprover={this.state.isApprover} isApprover={this.state.isApprover}
/> />
...@@ -1113,7 +1090,7 @@ export default class BudgetTahunan extends Component { ...@@ -1113,7 +1090,7 @@ export default class BudgetTahunan extends Component {
submissionID={this.state.submissionID} submissionID={this.state.submissionID}
saveToMasterBudget={this.saveToMasterBudget.bind(this)} saveToMasterBudget={this.saveToMasterBudget.bind(this)}
onClickClose={() => this.setState({ visibleCAT: false, visibleBudgetTahunan: true })} onClickClose={() => this.setState({ visibleCAT: false, visibleBudgetTahunan: true })}
getReport={this.getCompanyActive.bind(this)} getReport={this.getSubmission.bind(this)}
isApprover={this.state.isApprover} isApprover={this.state.isApprover}
/> />
)} )}
...@@ -1129,7 +1106,7 @@ export default class BudgetTahunan extends Component { ...@@ -1129,7 +1106,7 @@ export default class BudgetTahunan extends Component {
submissionID={this.state.submissionID} submissionID={this.state.submissionID}
saveToMasterBudget={this.saveToMasterBudget.bind(this)} saveToMasterBudget={this.saveToMasterBudget.bind(this)}
onClickClose={() => this.setState({ visibleCF: false, visibleBudgetTahunan: true })} onClickClose={() => this.setState({ visibleCF: false, visibleBudgetTahunan: true })}
getReport={this.getCompanyActive.bind(this)} getReport={this.getSubmission.bind(this)}
/> />
)} )}
......
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