Commit 430b6820 authored by d.arizona's avatar d.arizona

update

parent a673f6d2
...@@ -441,6 +441,10 @@ const create = (type = "") => { ...@@ -441,6 +441,10 @@ const create = (type = "") => {
const getHierarkiCronJobMRCF = () => api.get('/transaction/report/get_hierarki_monthly_report/cash_flow') const getHierarkiCronJobMRCF = () => api.get('/transaction/report/get_hierarki_monthly_report/cash_flow')
const getHierarkiCronJobMRRatio = () => api.get('/transaction/report/get_hierarki_monthly_report/ratio') const getHierarkiCronJobMRRatio = () => api.get('/transaction/report/get_hierarki_monthly_report/ratio')
// Ratio X LOCF
const getRatioLOCF = (body) => api.get(`/transaction/cronjob/create_monthly_report/${body.report}/${body.monthlyReportId}/${body.companyId}/${body.months}/${body.periode}`)
const triggerRatioFromLOCF = (body) => api.get(`/transaction/cronjob/create_monthly_report_locf/${body.report}/${body.monthlyReportId}/${body.companyId}/${body.months}/${body.periode}`)
// MonthlyPL // MonthlyPL
// const getHierarkiMontlyReportPL = (body) => api.post('transaction/monthly_report_pl/get_report_hierarki', body) // const getHierarkiMontlyReportPL = (body) => api.post('transaction/monthly_report_pl/get_report_hierarki', body)
// const createMonthlyReportPL = (body) => api.post('transaction/monthly_report_pl/create_monthly_report', body) // const createMonthlyReportPL = (body) => api.post('transaction/monthly_report_pl/create_monthly_report', body)
...@@ -807,7 +811,9 @@ const create = (type = "") => { ...@@ -807,7 +811,9 @@ const create = (type = "") => {
getHierarkiDBPLRO, getHierarkiDBPLRO,
createDBPLRO, createDBPLRO,
getDetailReportOLPACAT, getDetailReportOLPACAT,
createCATOLPA createCATOLPA,
getRatioLOCF,
triggerRatioFromLOCF
} }
} }
......
This diff is collapsed.
...@@ -173,6 +173,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -173,6 +173,7 @@ export default class ListOfCreditFacilities extends Component {
} }
this.setState({viewOnly: !checkApprover && checkLastStatus && checkStatus && checkPrevRev}) this.setState({viewOnly: !checkApprover && checkLastStatus && checkStatus && checkPrevRev})
// this.setState({viewOnly: true})
} }
getItemHierarki() { getItemHierarki() {
...@@ -757,7 +758,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -757,7 +758,7 @@ export default class ListOfCreditFacilities extends Component {
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.props.saveToMonthlyReport() this.props.saveToMonthlyReport('LOCF')
// this.props.onClickClose() // this.props.onClickClose()
// this.props.getReport() // this.props.getReport()
} else { } else {
...@@ -961,13 +962,13 @@ export default class ListOfCreditFacilities extends Component { ...@@ -961,13 +962,13 @@ export default class ListOfCreditFacilities extends Component {
getDataRatio() { getDataRatio() {
let payload = { let payload = {
"report_id": this.props.report_id, "report": 'ratio',
"revision": this.props.revision, "monthlyReportId": this.props.monthlyReportId,
"periode": 2021, "periode": this.props.periode,
"company_id": this.props.company.company_id, "companyId": this.props.company.company_id,
"submission_id": this.state.submissionID "months": this.props.month.month_id
} }
api.create().getReportHierarkiFRMR(payload).then(response => { api.create().getRatioLOCF(payload).then(response => {
console.log(payload); console.log(payload);
console.log(response); console.log(response);
let dataTable = [] let dataTable = []
...@@ -1153,7 +1154,7 @@ export default class ListOfCreditFacilities extends Component { ...@@ -1153,7 +1154,7 @@ export default class ListOfCreditFacilities extends Component {
console.log(response); console.log(response);
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.props.saveToMonthlyReport() this.props.saveToMonthlyReport('LOCF')
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false}, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false}, () => {
document.body.style.overflow = 'unset'; document.body.style.overflow = 'unset';
......
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