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

Merge branch 'GGMAC' into 'master'

update

See merge request !1323
parents 0a55af29 ca45675b
...@@ -347,8 +347,9 @@ const create = (type = "") => { ...@@ -347,8 +347,9 @@ const create = (type = "") => {
const uploadAttOLPA = (body) => api.post('transaction/outlook_pa/upload_attachment', body) const uploadAttOLPA = (body) => api.post('transaction/outlook_pa/upload_attachment', body)
const deleteAttOLPA = (id) => api.post(`transaction/outlook_pa/delete_attachment/${id}`) const deleteAttOLPA = (id) => api.post(`transaction/outlook_pa/delete_attachment/${id}`)
const getReportOLPA = (body) => api.post('transaction/outlook_pa/get_all_report', body) const getReportOLPA = (body) => api.post('transaction/outlook_pa/get_all_report', body)
const approvalSubmissionOLPA = (body) => api.post('transaction/outlook_pa/approval_submission', body) const approvalSubmissionOLPA = (body) => api.post('transaction/outlook_pa/approval_outlook', body)
const checkApproverOLPA = () => api.get('transaction/outlook_pa/is_approver') const checkApproverOLPA = () => api.get('transaction/outlook_pa/is_approver')
const createPeriodeRevisionOLPA = (body) => api.post('transaction/outlook_pa/create_periode_revision', body)
// Monthly // Monthly
const getMonthlyReport = (body) => api.post('transaction/monthly_report/get_all_report', body) const getMonthlyReport = (body) => api.post('transaction/monthly_report/get_all_report', body)
...@@ -764,7 +765,8 @@ const create = (type = "") => { ...@@ -764,7 +765,8 @@ const create = (type = "") => {
checkUploadRollingOutlookOI, checkUploadRollingOutlookOI,
uploadRollingOutlookOI, uploadRollingOutlookOI,
submitRollingOutlook, submitRollingOutlook,
getRollingOutlookCompanySubmitted getRollingOutlookCompanySubmitted,
createPeriodeRevisionOLPA
} }
} }
......
...@@ -311,7 +311,7 @@ export default class OutlookPA extends Component { ...@@ -311,7 +311,7 @@ export default class OutlookPA extends Component {
let data = [] let data = []
response.data.data.map((item) => { response.data.data.map((item) => {
if (this.state.isApprover) { if (this.state.isApprover) {
if (item >= 2000 && item <= (Number(currentYear))) { if (item >= 2000 && item <= (Number(currentYear) + 1)) {
data.push(item) data.push(item)
} }
} else { } else {
...@@ -329,7 +329,7 @@ export default class OutlookPA extends Component { ...@@ -329,7 +329,7 @@ export default class OutlookPA extends Component {
options: periodeData, options: periodeData,
getOptionLabel: (option) => option.periode, getOptionLabel: (option) => option.periode,
}; };
let periode = (this.state.lastPeriod == "" ? String(Number(currentYear)) : Number(this.state.lastPeriod)) let periode = (this.state.lastPeriod == "" ? String(Number(currentYear) + 1) : Number(this.state.lastPeriod))
let index = data.sort((a, b) => a - b).findIndex((val) => val == periode) let index = data.sort((a, b) => a - b).findIndex((val) => val == periode)
// console.log(data) // console.log(data)
// console.log(this.state.lastPeriod) // console.log(this.state.lastPeriod)
...@@ -450,13 +450,13 @@ export default class OutlookPA extends Component { ...@@ -450,13 +450,13 @@ export default class OutlookPA extends Component {
"max_periode": moment(this.state.maxDateRevision).format('YYYY-MM-DD') "max_periode": moment(this.state.maxDateRevision).format('YYYY-MM-DD')
} }
// console.log(payload) // console.log(payload)
api.create().approvalSubmission(body).then((res) => { api.create().approvalSubmissionOLPA(body).then((res) => {
// console.log(res) console.log(res)
this.setState({ loading: false }, () => { this.setState({ loading: false }, () => {
this.getSubmission() this.getOutlookPAID()
}) })
if (type == 'revision') { if (type == 'revision') {
api.create().createPeriodeRevision(payload).then((res) => console.log(res)) api.create().createPeriodeRevisionOLPA(payload).then((res) => console.log(res))
} }
}) })
} }
......
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