Commit d7f22e87 authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'deni-dev(pc)' into 'master'

last

See merge request !503
parents 5bc900c9 b288fc9b
......@@ -212,6 +212,8 @@ const create = (type = "") => {
const historyApproval = (body) => api.post('transaction/master_budget/history_approval', body)
const getOpetratingIndID = (body) => api.post('transaction/operating_indicator/get_operating_indicator_id', body)
const getSubmitOI = (body) => api.post('transaction/operating_indicator/get_latest_periode_submit', body)
const getLastPeriodOI = (idCompany) => api.get(`transaction/operating_indicator/get_last_periode/${idCompany}`)
const getAllOperatingInd = (body) => api.post('transaction/operating_indicator/get_all_report', body)
const getOperatingIndDetail = (body) => api.post('transaction/operating_indicator/get_report_hierarki', body)
const createOpetaingInd = (body) => api.post('transaction/operating_indicator/create_operating_indicator_report', body)
......@@ -417,7 +419,9 @@ const create = (type = "") => {
getReportOLPA,
approvalSubmissionOLPA,
checkApproverOLPA,
getLastPeriodeOI
getLastPeriodeOI,
getSubmitOI,
getLastPeriodOI
}
}
......
......@@ -46,7 +46,8 @@ export default class BalanceSheet extends Component {
buttonError: false,
judulColumn: null,
updateBy: '-',
handleTekTekTek: 0
handleTekTekTek: 0,
saveDraft: true
}
this.handleValue = this.handleValue.bind(this)
this.fileHandler = this.fileHandler.bind(this);
......@@ -331,15 +332,15 @@ export default class BalanceSheet extends Component {
item.total_next_year,
item.total_more_year,
item.orders,
item.condition_it_should_be ? item.condition_it_should_be : '0',
item.condition_if_wrong ? item.condition_if_wrong : "STOPPER",
item.condition_it_should_be,
item.condition_if_wrong,
item.error
]
})
this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => {
this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true, errorPreview: false }, () => {
this.state.dataTable.map(item => {
if (item[25].length > 0) {
console.log('masuk')
console.log('error')
this.setState({ buttonError: true, errorPreview: true, editable: true })
}
})
......@@ -451,9 +452,9 @@ export default class BalanceSheet extends Component {
api.create().validateSubmitReport(payload).then((response) => {
console.log(response)
if (response.data.data.result) {
this.setState({ loading: false, buttonError: false, editable: false })
this.setState({ loading: false, buttonError: false, editable: false, saveDraft: false })
} else {
this.setState({ loading: false, buttonError: true, editable: true })
this.setState({ loading: false, buttonError: true, editable: true, saveDraft: false })
}
})
}
......@@ -3022,13 +3023,13 @@ export default class BalanceSheet extends Component {
type="button"
style={{
backgroundColor: 'transparent',
cursor: this.state.editable !== true ? 'pointer' : 'default',
cursor: this.state.saveDraft !== true ? 'pointer' : 'default',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
onClick={() =>
this.state.editable === true ?
this.state.saveDraft === true ?
null :
this.state.handleTekTekTek == 1 ? null :
this.setState({ handleTekTekTek: 1 }, () => {
......@@ -3132,13 +3133,13 @@ export default class BalanceSheet extends Component {
type="button"
style={{
backgroundColor: 'transparent',
cursor: this.state.editable !== true ? 'pointer' : 'default',
cursor: this.state.errorPreview !== true ? 'pointer' : 'default',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
}}
onClick={() =>
this.state.editable === true ?
this.state.errorPreview === true ?
null :
this.setState({ loading: true }, () =>
this.state.handleTekTekTek == 1 ? null :
......
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