Commit b6f220af authored by Riri Novita's avatar Riri Novita

Merge branch 'ENV-DEV' into 'ENV-STAGING'

Fixing Duplicate CAT MB

See merge request !1967
parents 82a303cb 15f0302f
......@@ -23,8 +23,10 @@ const create = (type = "") => {
Accept: 'application/json',
'Content-Type': 'application/json',
},
// 60 second timeout...
timeout: 180000
// 3 mins timeout...
// timeout: 180000
// 5 mins timeout...
timeout: 300000
})
break;
case 'UPLOAD':
......@@ -541,6 +543,10 @@ const create = (type = "") => {
const uploadSimulasiMROI = (body) => api.post('transaction/operating_indicator/monthly_report/import_monthly_report/other_currency_existing', body)
const uploadSimulasiROOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/import_rolling_outlook/other_currency_existing', body)
// Delete Duplicate CAT
const deleteDuplicateSubmitCAT = (body) => api.post('transaction/master_budget/delete_duplicate_submit_item_report', body)
const deleteDuplicateImportCAT = (body) => api.post('transaction/master_budget/delete_duplicate_import_item_report', body)
// Superadmin Approve
const getListApprover = (report, monthlyReportId) => api.get(`transaction/${report}/get_approver/${monthlyReportId}`)
const getIdToken = (userId) => api.get(`transaction/get_token/${userId}`)
......@@ -935,7 +941,9 @@ const create = (type = "") => {
createSimulasiOLPACF,
uploadSimulasiOperatingInd,
uploadSimulasiMROI,
uploadSimulasiROOI
uploadSimulasiROOI,
deleteDuplicateSubmitCAT,
deleteDuplicateImportCAT
}
}
......
......@@ -2346,18 +2346,29 @@ export default class BudgetTahunan extends Component {
if (response.data.status === 'success') {
if (type === "PL" || type === "DraftPL") {
this.setState({ visiblePL: false, visibleBudgetTahunan: true, loading: false })
this.getSubmission(type)
} else if (type === "TP" || type === "DraftTP") {
this.setState({ visibleTP: false, visibleBudgetTahunan: true, loading: false })
this.getSubmission(type)
} else if (type === "BS" || type === "DraftBS") {
this.setState({ visibleBS: false, visibleBudgetTahunan: true, loading: false })
this.getSubmission(type)
} else if (type === "FAM" || type === "DraftFAM") {
this.setState({ visibleFAM: false, visibleBudgetTahunan: true, loading: false })
this.getSubmission(type)
} else if (type === "CAT" || type === "DraftCAT") {
this.setState({ visibleCAT: false, visibleBudgetTahunan: true, loading: false })
api.create().deleteDuplicateSubmitCAT(data).then((res) => {
console.log(res)
if (res.data.status === "success") {
this.setState({ loading: false, visibleCF: false, visibleBudgetTahunan: true })
this.getSubmission(type)
}
})
} else {
this.setState({ visibleBudgetTahunan: true, visiblePL: false, visibleTP: false, visibleBS: false, visibleFAM: false, visibleCAT: false, loading: false })
this.getSubmission(type)
}
this.getSubmission(type)
// this.getSubmission(type)
} else {
console.log(response.data);
if (response.data.message == "Please Set Up Rate Currency First") {
......
......@@ -662,13 +662,18 @@ export default class CorporateAnnualTarget extends Component {
if (response.data) {
if (response.ok) {
if (response.data.status === "success") {
if (type == 'submitted') {
this.props.getReport(body, 'CAT')
} else {
this.props.getReport(body, 'DraftCAT')
}
this.setState({ loading: false })
this.props.onClickClose()
api.create().deleteDuplicateImportCAT(body).then((res) => {
console.log(res)
if (response.data.status === "success") {
if (type == 'submitted') {
this.props.getReport(body, 'CAT')
} else {
this.props.getReport(body, 'DraftCAT')
}
this.setState({ loading: false })
this.props.onClickClose()
}
})
// this.props.getReport()
} else {
if (response.data?.message == "Please Set Up Rate Currency First") {
......@@ -904,7 +909,7 @@ export default class CorporateAnnualTarget extends Component {
if (this.state.dataDelete.length > 0) {
api.create().deleteAllItemReport(payload).then((response) => {
// // // // console.log(response)
console.log(response)
// api.create().validateSubmitReport(payloadBro).then((response) => {
// // // // // console.log(response)
......@@ -912,8 +917,10 @@ export default class CorporateAnnualTarget extends Component {
if (response.data.status === "success") {
if (type == 'submitted') {
this.props.saveToMasterBudget(payloadBro, 'CAT')
// this.props.onClickClose()
} else {
this.props.saveToMasterBudget(payloadBro, 'DraftCAT')
// this.props.onClickClose()
}
} else {
if (response.data?.message == "Please Set Up Rate Currency First") {
......@@ -938,11 +945,12 @@ export default class CorporateAnnualTarget extends Component {
// })
})
} else {
console.log("kesini bukan?");
// // // // // console.log('sini jing')
// api.create().validateSubmitReport(payloadBro).then((response) => {
// // // // // console.log(response)
// if (response.data.data.result) {
this.props.saveToMasterBudget(payloadBro)
this.props.saveToMasterBudget(payloadBro, 'CAT')
this.props.onClickClose()
// } else {
......
......@@ -1332,8 +1332,12 @@ export default class TaxPlanning extends Component {
}
}
}
// if (tableMeta.rowData[8] == "Corporate Income Tax" && tableMeta.columnIndex == 9 && dex == 3) {
// console.log(total);
// console.log(Number(total).toFixed(1));
// }
return Number(total).toFixed(1)
return total
}
const handleForecast = (tableMeta, periode, dex) => {
......
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