Commit 6e35d539 authored by r.kurnia's avatar r.kurnia

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into rifka

parents d07f1945 34530b9d
......@@ -248,9 +248,12 @@ const create = (type = "") => {
const getRollingOutlookReport = (body) => api.post('transaction/rolling_outlook/get_all_report', body)
const getRollingOutlookLastUpdate = (body) => api.post('transaction/rolling_outlook/get_latest_update', body)
const getRollingOutlookRevision = (body) => api.post('transaction/rolling_outlook/get_revision', body)
const getRollingOutlookIsApprover = (body) => api.get('transaction/rolling_outlook/is_approver')
const getRollingOutlookIsApprover = (body) => api.get('transaction/rolling_outlook/is_approver', body)
const uploadAttachmentRO = (body) => api.post('transaction/rolling_outlook/upload_attachment', body)
const deleteAttachmentRO = (id) => api.post(`transaction/rolling_outlook/delete_attachment/${id}`)
const approvalRolling = (body) => api.post('transaction/rolling_outlook/approval_rolling', body)
const createPeriodeRevisionRO = (body) => api.post('transaction/rolling_outlook/create_periode_revision', body)
const historyApprovalRO = (body) => api.post('transaction/rolling_outlook/history_approval', body)
const getRollingOutlookBS = (body) => api.post('transaction/balance_sheet/rolling_outlook/get_report_hierarki', body)
const checkImportRollingOutlookBS = (body) => api.post('transaction/balance_sheet/rolling_outlook/check_import', body)
......@@ -770,7 +773,10 @@ const create = (type = "") => {
uploadRollingOutlookOI,
submitRollingOutlook,
getRollingOutlookCompanySubmitted,
createPeriodeRevisionOLPA
createPeriodeRevisionOLPA,
approvalRolling,
createPeriodeRevisionRO,
historyApprovalRO
}
}
......
......@@ -629,7 +629,55 @@ export default class SubHolding extends Component {
item.balance_sheet.monthly_last_year_september,
item.balance_sheet.monthly_last_year_october,
item.balance_sheet.monthly_last_year_november,
item.balance_sheet.monthly_last_year_december
item.balance_sheet.monthly_last_year_december,
item.balance_sheet.ro_january,
item.balance_sheet.ro_february,
item.balance_sheet.ro_march,
item.balance_sheet.ro_april,
item.balance_sheet.ro_may,
item.balance_sheet.ro_june,
item.balance_sheet.ro_july,
item.balance_sheet.ro_august,
item.balance_sheet.ro_september,
item.balance_sheet.ro_october,
item.balance_sheet.ro_november,
item.balance_sheet.ro_december,
item.balance_sheet.ro_q1_january,
item.balance_sheet.ro_q1_february,
item.balance_sheet.ro_q1_march,
item.balance_sheet.ro_q1_april,
item.balance_sheet.ro_q1_may,
item.balance_sheet.ro_q1_june,
item.balance_sheet.ro_q1_july,
item.balance_sheet.ro_q1_august,
item.balance_sheet.ro_q1_september,
item.balance_sheet.ro_q1_october,
item.balance_sheet.ro_q1_november,
item.balance_sheet.ro_q1_december,
item.balance_sheet.ro_q2_january,
item.balance_sheet.ro_q2_february,
item.balance_sheet.ro_q2_march,
item.balance_sheet.ro_q2_april,
item.balance_sheet.ro_q2_may,
item.balance_sheet.ro_q2_june,
item.balance_sheet.ro_q2_july,
item.balance_sheet.ro_q2_august,
item.balance_sheet.ro_q2_september,
item.balance_sheet.ro_q2_october,
item.balance_sheet.ro_q2_november,
item.balance_sheet.ro_q2_december,
item.balance_sheet.ro_q3_january,
item.balance_sheet.ro_q3_february,
item.balance_sheet.ro_q3_march,
item.balance_sheet.ro_q3_april,
item.balance_sheet.ro_q3_may,
item.balance_sheet.ro_q3_june,
item.balance_sheet.ro_q3_july,
item.balance_sheet.ro_q3_august,
item.balance_sheet.ro_q3_september,
item.balance_sheet.ro_q3_october,
item.balance_sheet.ro_q3_november,
item.balance_sheet.ro_q3_december,
])
}
if (item.children !== null) {
......@@ -690,7 +738,55 @@ export default class SubHolding extends Component {
item.balance_sheet.monthly_last_year_september,
item.balance_sheet.monthly_last_year_october,
item.balance_sheet.monthly_last_year_november,
item.balance_sheet.monthly_last_year_december
item.balance_sheet.monthly_last_year_december,
item.balance_sheet.ro_january,
item.balance_sheet.ro_february,
item.balance_sheet.ro_march,
item.balance_sheet.ro_april,
item.balance_sheet.ro_may,
item.balance_sheet.ro_june,
item.balance_sheet.ro_july,
item.balance_sheet.ro_august,
item.balance_sheet.ro_september,
item.balance_sheet.ro_october,
item.balance_sheet.ro_november,
item.balance_sheet.ro_december,
item.balance_sheet.ro_q1_january,
item.balance_sheet.ro_q1_february,
item.balance_sheet.ro_q1_march,
item.balance_sheet.ro_q1_april,
item.balance_sheet.ro_q1_may,
item.balance_sheet.ro_q1_june,
item.balance_sheet.ro_q1_july,
item.balance_sheet.ro_q1_august,
item.balance_sheet.ro_q1_september,
item.balance_sheet.ro_q1_october,
item.balance_sheet.ro_q1_november,
item.balance_sheet.ro_q1_december,
item.balance_sheet.ro_q2_january,
item.balance_sheet.ro_q2_february,
item.balance_sheet.ro_q2_march,
item.balance_sheet.ro_q2_april,
item.balance_sheet.ro_q2_may,
item.balance_sheet.ro_q2_june,
item.balance_sheet.ro_q2_july,
item.balance_sheet.ro_q2_august,
item.balance_sheet.ro_q2_september,
item.balance_sheet.ro_q2_october,
item.balance_sheet.ro_q2_november,
item.balance_sheet.ro_q2_december,
item.balance_sheet.ro_q3_january,
item.balance_sheet.ro_q3_february,
item.balance_sheet.ro_q3_march,
item.balance_sheet.ro_q3_april,
item.balance_sheet.ro_q3_may,
item.balance_sheet.ro_q3_june,
item.balance_sheet.ro_q3_july,
item.balance_sheet.ro_q3_august,
item.balance_sheet.ro_q3_september,
item.balance_sheet.ro_q3_october,
item.balance_sheet.ro_q3_november,
item.balance_sheet.ro_q3_december,
])
if (item.children !== null) {
if (item.children.length > 0) {
......@@ -715,9 +811,11 @@ export default class SubHolding extends Component {
}
})
}
} else {
this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
}
console.log(dataTable);
})
} else if (this.state.report.value === 3) {
let PLID = null
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -382,7 +382,7 @@ export default class OutlookPA extends Component {
"is_approver": this.state.isApprover
}
api.create().getOutlookPAID(payload).then(response => {
// console.log(response)
console.log(response)
if (response) {
if (response.data.status === "success") {
this.setState({
......
......@@ -124,6 +124,7 @@ export default class RollingOutlook extends Component {
}
checkApprover() {
// console.log('tot')
let listStatus1 = [
{ name: 'Open', value: 'not-yet' },
{ name: 'Submitted', value: 'approval_review' },
......@@ -138,6 +139,7 @@ export default class RollingOutlook extends Component {
]
api.create().getRollingOutlookIsApprover().then(response => {
// console.log('yuuuu')
console.log(response);
if (response.data.data.is_approver === true) {
this.setState({ isApprover: true, checkApprover: true, listStatus: listStatus1, selectedStatus: listStatus1 }, () =>
......@@ -533,15 +535,15 @@ export default class RollingOutlook extends Component {
console.log(this.state.lastStatus);
this.historyApproval()
this.getLatestPeriodSubmit()
api.create().checkApprover().then(response => {
// api.create().checkApprover().then(response => {
// console.log(response);
if (response.data.data.is_approver === true) {
if (this.state.isApprover) {
this.setState({ isApprover: true, checkApprover: true })
} else {
this.setState({ isApprover: this.state.lastStatus === "SUBMITTED" ? true : false, checkApprover: false })
}
})
// })
})
} else {
this.setState({ rollingOutlookID: null, loading: false })
......@@ -553,9 +555,10 @@ export default class RollingOutlook extends Component {
historyApproval() {
let body = {
"company_id": this.state.company.company_id,
"periode": this.state.periode.periode
"periode": this.state.periode.periode,
"quartal": this.state.quarter.value
}
api.create().historyApproval(body).then(response => {
api.create().historyApprovalRO(body).then(response => {
console.log(response);
if (response.data.data.length > 0) {
let dataTableHistory = response.data.data.map(item => {
......@@ -567,7 +570,7 @@ export default class RollingOutlook extends Component {
item.history_approval_date
]
})
this.setState({ dataTableHistory, visibleTableHistory: false })
this.setState({ dataTableHistory, visibleTableHistory: true })
}
})
}
......@@ -578,21 +581,24 @@ export default class RollingOutlook extends Component {
let body = {
"approval_id": this.props.location.state == undefined ? this.state.approverID : this.state.rawData.approval_id,
"status": type,
"detail": this.state.detailRevisiCheck
"detail": this.state.detailRevisiCheck,
"quartal": this.state.quarter.value
}
let payload = {
"company_id": this.state.company.company_id,
"min_periode": moment(this.state.minDateRevision).format('YYYY-MM-DD'),
"max_periode": moment(this.state.maxDateRevision).format('YYYY-MM-DD')
"periode": this.state.periode.periode,
"max_periode": moment(this.state.maxDateRevision).format('YYYY-MM-DD'),
"quartal": this.state.quarter.value
}
console.log(payload)
api.create().approvalSubmission(body).then((res) => {
api.create().approvalRolling(body).then((res) => {
console.log(res)
this.setState({ loading: false }, () => {
this.getRollingOutlookID()
})
if (type == 'revision') {
api.create().createPeriodeRevision(payload).then((res) => console.log(res))
api.create().createPeriodeRevisionRO(payload).then((res) => console.log(res))
}
})
}
......@@ -783,7 +789,7 @@ export default class RollingOutlook extends Component {
api.create().submitRollingOutlook(body).then(response => {
console.log(response);
if (response.data) {
if (response.data.status === "Success") {
if (response.data.status === "success") {
this.getRollingOutlookID()
}
}
......@@ -1468,6 +1474,8 @@ export default class RollingOutlook extends Component {
quarter={this.state.quarter.value}
isApprover={this.state.isApprover}
prevRevision={this.state.isSubmit ? this.state.prevRevision : true}
status={this.state.status}
lastStatus={this.state.lastStatus}
/>
)}
......
This diff is collapsed.
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