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