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

Merge branch 'didam' into 'master'

Didam

See merge request !1026
parents 76876868 b79730be
...@@ -244,9 +244,10 @@ const create = (type = "") => { ...@@ -244,9 +244,10 @@ const create = (type = "") => {
const getReportTPMR = (body) => api.post('/transaction/db_tax_planning/monthly_report/get_report_hierarki', body) const getReportTPMR = (body) => api.post('/transaction/db_tax_planning/monthly_report/get_report_hierarki', body)
const getReportOIMB = (body) => api.post('/transaction/db_operating_indicator/master_budget/get_report_hierarki', body) const getReportOIMB = (body) => api.post('/transaction/db_operating_indicator/master_budget/get_report_hierarki', body)
const getReportOIMR = (body) => api.post('/transaction/db_operating_indicator/monthly_report/get_report_hierarki', body) const getReportOIMR = (body) => api.post('/transaction/db_operating_indicator/monthly_report/get_report_hierarki', body)
const getReportCFSumaMB = (body) => api.post('/transaction/db_cash_flow/master_budget/get_report_hierarki', body) const getReportCFSumaMB = (body) => api.post('/transaction/summary_cash_flow/master_budget/get_report_hierarki', body)
const getReportCFSumaMR = (body) => api.post('/transaction/db_cash_flow/monthly_report/get_report_hierarki', body) const getReportCFSumaMR = (body) => api.post('/transaction/summary_cash_flow/monthly_report/get_report_hierarki', body)
const getReportCFSuma = (body) => api.post('/transaction/summary_cash_flow/summary/get_report_hierarki', body)
//CASH FLOW //CASH FLOW
const getDetailReportCF = (body) => api.post('/transaction/cash_flow/master_budget/get_report_hierarki', body) const getDetailReportCF = (body) => api.post('/transaction/cash_flow/master_budget/get_report_hierarki', body)
const createReportCF = (body) => api.post('transaction/cash_flow/master_budget/create_submission_report', body) const createReportCF = (body) => api.post('transaction/cash_flow/master_budget/create_submission_report', body)
...@@ -600,7 +601,8 @@ const create = (type = "") => { ...@@ -600,7 +601,8 @@ const create = (type = "") => {
getReportOIMR, getReportOIMR,
getReportCFSumaMB, getReportCFSumaMB,
getReportCFSumaMR, getReportCFSumaMR,
createReportCF createReportCF,
getReportCFSuma
} }
} }
......
...@@ -278,11 +278,18 @@ export default class BudgetTahunan extends Component { ...@@ -278,11 +278,18 @@ export default class BudgetTahunan extends Component {
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
let dataTable = response.data.data.map((item, index) => { let dataTable = response.data.data.map((item, index) => {
let indexC = String(item.current_status).toLocaleUpperCase().indexOf('C')
let status_approv = ''
if (String(item.current_status).toLocaleUpperCase().includes('CC')) {
status_approv = `${String(item.current_status).substr(0,indexC)}${String(item.current_status).substr(indexC+1,String(item.current_status).length)}`
} else {
status_approv = String(item.current_status)
}
return [ return [
item.number, item.number,
item.report_name === 'CAT' ? 'Corporate Annual Target' : item.report_name, item.report_name === 'CAT' ? 'Corporate Annual Target' : item.report_name,
item.revision, item.revision,
this.state.lastStatus === 'APPROVED' ? 'CLOSED' : this.state.isSubmit === false ? "CLOSED" : item.current_status, this.state.lastStatus === 'APPROVED' ? 'CLOSED' : this.state.isSubmit === false ? "CLOSED" : status_approv,
item.report_id, item.report_id,
Number(item.revision) > 0 ? (item.current_status == "not-yet" ? false : item.is_can_upload) : item.is_can_upload, Number(item.revision) > 0 ? (item.current_status == "not-yet" ? false : item.is_can_upload) : item.is_can_upload,
item.revision item.revision
...@@ -1039,15 +1046,15 @@ export default class BudgetTahunan extends Component { ...@@ -1039,15 +1046,15 @@ export default class BudgetTahunan extends Component {
// console.log(listCF) // console.log(listCF)
this.setState({dbCF: listCF} , () => { this.setState({dbCF: listCF} , () => {
if (this.state.company.company_id == '13467') { if (this.state.submissionID != null) {
this.createCashFlow() this.createCashFlow()
} }
if (type != undefined) { // if (type != undefined) {
if (type == 'BS' || type == 'FAM' || type == 'PL') { // if (type == 'BS' || type == 'FAM' || type == 'PL') {
console.log('tarik sis') // console.log('tarik sis')
this.createCashFlow() // this.createCashFlow()
} // }
} // }
}) })
} }
...@@ -1090,9 +1097,16 @@ export default class BudgetTahunan extends Component { ...@@ -1090,9 +1097,16 @@ export default class BudgetTahunan extends Component {
// // // 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 => {
let indexC = String(item.status_approval).toLocaleUpperCase().indexOf('C')
let status_approv = ''
if (String(item.status_approval).toLocaleUpperCase().includes('CC')) {
status_approv = `${String(item.status_approval).substr(0,indexC)}${String(item.status_approval).substr(indexC+1,String(item.status_approval).length)}`
} else {
status_approv = String(item.status_approval)
}
return [ return [
item.pic, item.pic,
item.status_approval, status_approv,
item.remarks, item.remarks,
item.item_revision, item.item_revision,
item.history_approval_date item.history_approval_date
......
This diff is collapsed.
This diff is collapsed.
...@@ -217,11 +217,18 @@ export default class MonthlyReport extends Component { ...@@ -217,11 +217,18 @@ export default class MonthlyReport extends Component {
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
let dataTable = response.data.data.map((item, index) => { let dataTable = response.data.data.map((item, index) => {
let indexC = String(item.current_status).toLocaleUpperCase().indexOf('C')
let status_approv = ''
if (String(item.current_status).toLocaleUpperCase().includes('CC')) {
status_approv = `${String(item.current_status).substr(0,indexC)}${String(item.current_status).substr(indexC+1,String(item.current_status).length)}`
} else {
status_approv = String(item.current_status)
}
return [ return [
item.number, item.number,
item.report_name == "CAT"? "Corporate Annual Target" : item.report_name, item.report_name == "CAT"? "Corporate Annual Target" : item.report_name,
item.revision, item.revision,
this.state.isApprovedMB ? (this.state.lastStatus === 'APPROVED' ? 'CLOSED' : this.state.isSubmit === false ? "CLOSED" : item.current_status) : "CLOSED", this.state.isApprovedMB ? (this.state.lastStatus === 'APPROVED' ? 'CLOSED' : this.state.isSubmit === false ? "CLOSED" : status_approv) : "CLOSED",
item.report_id, item.report_id,
item.is_can_upload, item.is_can_upload,
item.revision item.revision
...@@ -661,9 +668,16 @@ export default class MonthlyReport extends Component { ...@@ -661,9 +668,16 @@ export default class MonthlyReport extends Component {
if (response.data.data) { if (response.data.data) {
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 => {
let indexC = String(item.status_approval).toLocaleUpperCase().indexOf('C')
let status_approv = ''
if (String(item.status_approval).toLocaleUpperCase().includes('CC')) {
status_approv = `${String(item.status_approval).substr(0,indexC)}${String(item.status_approval).substr(indexC+1,String(item.status_approval).length)}`
} else {
status_approv = String(item.status_approval)
}
return [ return [
item.pic, item.pic,
item.status_approval, status_approv,
item.remarks, item.remarks,
item.item_revision, item.item_revision,
item.history_approval_date item.history_approval_date
......
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