Commit ca756d49 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'didam' into 'master'

apdet

See merge request !480
parents 42312799 980926ba
......@@ -207,17 +207,18 @@ const create = (type = "") => {
const getLastPeriod = (idCompany) => api.get(`transaction/master_budget/get_last_periode/${idCompany}`)
const getSubmitMasterBudget = (body) => api.post('transaction/master_budget/get_latest_periode_submit', body)
const createPeriodeRevision = (body) => api.post('transaction/master_budget/create_periode_revision', body)
const getIdDeleteFromExcel = (body) => api.post('transaction/master_budget/delete_from_excel', 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)
const getDashboard = (body) => api.get('transaction/get_dashboard')
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 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)
const checkUploadOperatingInd = (body) => api.post('transaction/operating_indicator/check_import', body)
const uploadOperatingInd = (body) => api.post('transaction/operating_indicator/import_operating_indicator', body)
const getLastestUpdateOI = (body) => api.post('transaction/operating_indicator/get_latest_update', body)
const getDashboard = (body) => api.get('transaction/get_dashboard')
const historyApproval = (body) => api.post('transaction/master_budget/history_approval', body)
const getLastPeriodeOI = (idCompany) => api.post(`transaction/master_budget/get_last_periode/${idCompany}`)
//OUTLOOK PA
const getOutlookPAID = (body) => api.post('transaction/outlook_pa/get_outlook_pa_id', body)
......@@ -415,7 +416,8 @@ const create = (type = "") => {
deleteAttOLPA,
getReportOLPA,
approvalSubmissionOLPA,
checkApproverOLPA
checkApproverOLPA,
getLastPeriodeOI
}
}
......
......@@ -878,6 +878,19 @@ export default class BudgetTahunan extends Component {
pagination: false,
search: false
}
const optionsHistory = {
filter: false,
sort: false,
responsive: "scroll",
print: false,
download: false,
selectableRows: false,
viewColumns: false,
pagination: true,
search: false,
rowsPerPage: 5
}
const optionsRevision = {
filter: false,
sort: false,
......@@ -1087,7 +1100,7 @@ export default class BudgetTahunan extends Component {
<MUIDataTable
data={this.state.dataTableHistory}
columns={columnsHistory}
options={options}
options={optionsHistory}
/>
</MuiThemeProvider>
</div>
......
......@@ -209,6 +209,7 @@ export default class OperatingIndicator extends Component {
api.create().getOpetratingIndID(payload).then(response => {
if (response) {
console.log(response.data.data)
this.getLatestPeriodSubmit()
if (response.data.data) {
this.setState({ operatingIndID: response.data.data.operating_indicator_id })
} else {
......@@ -218,6 +219,24 @@ export default class OperatingIndicator extends Component {
})
}
getLatestPeriodSubmit() {
let body = {
"company_id": this.state.company.company_id,
"periode": this.state.periode.periode
}
api.create().getSubmitMasterBudget(body).then(response => {
console.log(response);
if (response.data) {
if (response.data.status === "success") {
this.setState({ isSubmit: response.data.data.is_can_submit }, () => {
// this.getReport()
// this.getOperatingID()
})
}
}
})
}
clickDetail(item, id) {
let index = this.state.dataReport.findIndex((val) => val.report_name == item[1])
if (index !== -1) {
......@@ -269,6 +288,7 @@ export default class OperatingIndicator extends Component {
saveOperatingInd(payload) {
api.create().createOpetaingInd(payload).then((response) => {
this.getReport()
this.getOperatingID()
})
}
......@@ -475,7 +495,10 @@ export default class OperatingIndicator extends Component {
data={this.state.dataDetail}
height={this.props.height}
width={this.props.width}
onClickClose={() => this.setState({ visibleDetailOpt: false, visibleOperatingIndicator: true }, this.forceUpdate())}
onClickClose={() => this.setState({ visibleDetailOpt: false, visibleOperatingIndicator: true }, () => {
this.getOperatingID()
this.forceUpdate()
})}
getReport={() => this.getReport()}
saveOperatingInd={this.saveOperatingInd.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