Commit 7c972419 authored by faisalhamdi's avatar faisalhamdi

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

parents 0adff05b 4de9dcb5
...@@ -248,9 +248,12 @@ const create = (type = "") => { ...@@ -248,9 +248,12 @@ const create = (type = "") => {
const getRollingOutlookReport = (body) => api.post('transaction/rolling_outlook/get_all_report', body) 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 getRollingOutlookLastUpdate = (body) => api.post('transaction/rolling_outlook/get_latest_update', body)
const getRollingOutlookRevision = (body) => api.post('transaction/rolling_outlook/get_revision', 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 uploadAttachmentRO = (body) => api.post('transaction/rolling_outlook/upload_attachment', body)
const deleteAttachmentRO = (id) => api.post(`transaction/rolling_outlook/delete_attachment/${id}`) 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 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) const checkImportRollingOutlookBS = (body) => api.post('transaction/balance_sheet/rolling_outlook/check_import', body)
...@@ -770,7 +773,10 @@ const create = (type = "") => { ...@@ -770,7 +773,10 @@ const create = (type = "") => {
uploadRollingOutlookOI, uploadRollingOutlookOI,
submitRollingOutlook, submitRollingOutlook,
getRollingOutlookCompanySubmitted, getRollingOutlookCompanySubmitted,
createPeriodeRevisionOLPA createPeriodeRevisionOLPA,
approvalRolling,
createPeriodeRevisionRO,
historyApprovalRO
} }
} }
......
...@@ -629,7 +629,55 @@ export default class SubHolding extends Component { ...@@ -629,7 +629,55 @@ export default class SubHolding extends Component {
item.balance_sheet.monthly_last_year_september, item.balance_sheet.monthly_last_year_september,
item.balance_sheet.monthly_last_year_october, item.balance_sheet.monthly_last_year_october,
item.balance_sheet.monthly_last_year_november, 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 !== null) {
...@@ -690,7 +738,55 @@ export default class SubHolding extends Component { ...@@ -690,7 +738,55 @@ export default class SubHolding extends Component {
item.balance_sheet.monthly_last_year_september, item.balance_sheet.monthly_last_year_september,
item.balance_sheet.monthly_last_year_october, item.balance_sheet.monthly_last_year_october,
item.balance_sheet.monthly_last_year_november, 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 !== null) {
if (item.children.length > 0) { if (item.children.length > 0) {
...@@ -715,9 +811,11 @@ export default class SubHolding extends Component { ...@@ -715,9 +811,11 @@ export default class SubHolding extends Component {
} }
}) })
} }
} else { } else {
this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false }) this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
} }
console.log(dataTable);
}) })
} else if (this.state.report.value === 3) { } else if (this.state.report.value === 3) {
let PLID = null 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 { ...@@ -382,7 +382,7 @@ export default class OutlookPA extends Component {
"is_approver": this.state.isApprover "is_approver": this.state.isApprover
} }
api.create().getOutlookPAID(payload).then(response => { api.create().getOutlookPAID(payload).then(response => {
// console.log(response) console.log(response)
if (response) { if (response) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.setState({ this.setState({
......
...@@ -124,6 +124,7 @@ export default class RollingOutlook extends Component { ...@@ -124,6 +124,7 @@ export default class RollingOutlook extends Component {
} }
checkApprover() { checkApprover() {
// console.log('tot')
let listStatus1 = [ let listStatus1 = [
{ name: 'Open', value: 'not-yet' }, { name: 'Open', value: 'not-yet' },
{ name: 'Submitted', value: 'approval_review' }, { name: 'Submitted', value: 'approval_review' },
...@@ -138,6 +139,7 @@ export default class RollingOutlook extends Component { ...@@ -138,6 +139,7 @@ export default class RollingOutlook extends Component {
] ]
api.create().getRollingOutlookIsApprover().then(response => { api.create().getRollingOutlookIsApprover().then(response => {
// console.log('yuuuu')
console.log(response); console.log(response);
if (response.data.data.is_approver === true) { if (response.data.data.is_approver === true) {
this.setState({ isApprover: true, checkApprover: true, listStatus: listStatus1, selectedStatus: listStatus1 }, () => this.setState({ isApprover: true, checkApprover: true, listStatus: listStatus1, selectedStatus: listStatus1 }, () =>
...@@ -533,15 +535,15 @@ export default class RollingOutlook extends Component { ...@@ -533,15 +535,15 @@ export default class RollingOutlook extends Component {
console.log(this.state.lastStatus); console.log(this.state.lastStatus);
this.historyApproval() this.historyApproval()
this.getLatestPeriodSubmit() this.getLatestPeriodSubmit()
api.create().checkApprover().then(response => { // api.create().checkApprover().then(response => {
// console.log(response); // console.log(response);
if (response.data.data.is_approver === true) { if (this.state.isApprover) {
this.setState({ isApprover: true, checkApprover: true }) this.setState({ isApprover: true, checkApprover: true })
} else { } else {
this.setState({ isApprover: this.state.lastStatus === "SUBMITTED" ? true : false, checkApprover: false }) this.setState({ isApprover: this.state.lastStatus === "SUBMITTED" ? true : false, checkApprover: false })
} }
}) // })
}) })
} else { } else {
this.setState({ rollingOutlookID: null, loading: false }) this.setState({ rollingOutlookID: null, loading: false })
...@@ -553,9 +555,10 @@ export default class RollingOutlook extends Component { ...@@ -553,9 +555,10 @@ export default class RollingOutlook extends Component {
historyApproval() { historyApproval() {
let body = { let body = {
"company_id": this.state.company.company_id, "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); console.log(response);
if (response.data.data.length > 0) { if (response.data.data.length > 0) {
let dataTableHistory = response.data.data.map(item => { let dataTableHistory = response.data.data.map(item => {
...@@ -567,7 +570,7 @@ export default class RollingOutlook extends Component { ...@@ -567,7 +570,7 @@ export default class RollingOutlook extends Component {
item.history_approval_date item.history_approval_date
] ]
}) })
this.setState({ dataTableHistory, visibleTableHistory: false }) this.setState({ dataTableHistory, visibleTableHistory: true })
} }
}) })
} }
...@@ -578,21 +581,24 @@ export default class RollingOutlook extends Component { ...@@ -578,21 +581,24 @@ export default class RollingOutlook extends Component {
let body = { let body = {
"approval_id": this.props.location.state == undefined ? this.state.approverID : this.state.rawData.approval_id, "approval_id": this.props.location.state == undefined ? this.state.approverID : this.state.rawData.approval_id,
"status": type, "status": type,
"detail": this.state.detailRevisiCheck "detail": this.state.detailRevisiCheck,
"quartal": this.state.quarter.value
} }
let payload = { let payload = {
"company_id": this.state.company.company_id, "company_id": this.state.company.company_id,
"min_periode": moment(this.state.minDateRevision).format('YYYY-MM-DD'), "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) console.log(payload)
api.create().approvalSubmission(body).then((res) => { api.create().approvalRolling(body).then((res) => {
console.log(res) console.log(res)
this.setState({ loading: false }, () => { this.setState({ loading: false }, () => {
this.getRollingOutlookID() this.getRollingOutlookID()
}) })
if (type == 'revision') { 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 { ...@@ -783,7 +789,7 @@ export default class RollingOutlook extends Component {
api.create().submitRollingOutlook(body).then(response => { api.create().submitRollingOutlook(body).then(response => {
console.log(response); console.log(response);
if (response.data) { if (response.data) {
if (response.data.status === "Success") { if (response.data.status === "success") {
this.getRollingOutlookID() this.getRollingOutlookID()
} }
} }
......
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