Commit 1aa4afec authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'didam' into 'master'

apdet

See merge request !328
parents 2aad00c5 e520cc27
......@@ -194,10 +194,10 @@ const create = (type = "") => {
const checkUploadMB = (body) => api.post('transaction/master_budget/check_import', body)
const uploadMasterBudget = (body) => api.post('transaction/master_budget/import_master_budget', body)
const getAllOperatingInd = (body) => api.post('/transaction/get_all_operating_indicator_report', body)
const getOperatingIndDetail = (body) => api.post('/transaction/operating_indicator/get_operating_indicator_report_hierarki', body)
const createOpetaingInd = (body) => api.post('/transaction/operating_indicator/create_submission_report', body)
const getOpetratingIndID = (body) => api.post('transaction/get_operating_indicator_id', body)
const getAllOperatingInd = (body) => api.post('transaction/get_all_operating_indicator_report', body)
const getOperatingIndDetail = (body) => api.post('transaction/operating_indicator/get_operating_indicator_report_hierarki', body)
const createOpetaingInd = (body) => api.post('transaction/operating_indicator/create_submission_report', body)
//Template
const downloadTemplate = (fileName, fileType) => api.get(`attachment/download_file?fileName=${fileName}&&fileType=${fileType}`)
......@@ -333,7 +333,8 @@ const create = (type = "") => {
getOperatingIndDetail,
createOpetaingInd,
uploadMasterBudget,
getAllSettingByType
getAllSettingByType,
getOpetratingIndID
}
}
......
......@@ -26,7 +26,7 @@ export default class OperatingIndicator extends Component {
report_id: null,
listAttachment: [],
visibleUpload: false,
submissionID: null
operatingIndID: null
}
this.fileHandler = this.fileHandler.bind(this);
}
......@@ -161,12 +161,13 @@ export default class OperatingIndicator extends Component {
"company_id": this.state.company.company_id,
"periode": this.state.periode.periode
}
api.create().getSubmission(payload).then(response => {
api.create().getOpetratingIndID(payload).then(response => {
if (response) {
console.log(response.data.data)
if (response.data.data) {
this.setState({ submissionID: response.data.data.submission_id })
this.setState({ operatingIndID: response.data.data.operating_indicator_id })
} else {
this.setState({ submissionID: null })
this.setState({ operatingIndID: null })
}
}
})
......@@ -176,7 +177,7 @@ export default class OperatingIndicator extends Component {
let index = this.state.dataReport.findIndex((val) => val.report_name == item[1])
if (index !== -1) {
this.setState({
dataDetail: {...this.state.dataReport[index], periode: this.state.periode.periode, submissionID: this.state.submissionID, company: this.state.company},
dataDetail: {...this.state.dataReport[index], periode: this.state.periode.periode, operatingIndID: this.state.operatingIndID, company: this.state.company},
visibleOperatingIndicator: false,
visibleDetailOpt: true,
})
......
......@@ -59,9 +59,8 @@ export default class BalanceSheet extends Component {
getDataDetail() {
this.setState({ loading: true })
let payload = {
"submission_id": this.props.data.submissionID,
"operating_indicator_id": this.props.data.operatingIndID,
"report_id": this.props.data.report_id,
"revision": Number(this.props.data.revision),
"company_id": this.props.data.company.company_id,
"periode": this.props.data.periode
}
......
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