Commit 3141ce34 authored by rifkaki's avatar rifkaki

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

parents 4030eb99 fa202cc2
...@@ -223,17 +223,17 @@ const create = (type = "") => { ...@@ -223,17 +223,17 @@ const create = (type = "") => {
const getSubmitOI = (body) => api.post('transaction/operating_indicator/get_latest_periode_submit', body) const getSubmitOI = (body) => api.post('transaction/operating_indicator/get_latest_periode_submit', body)
const getLastPeriodOI = (idCompany) => api.get(`transaction/operating_indicator/get_last_periode/${idCompany}`) const getLastPeriodOI = (idCompany) => api.get(`transaction/operating_indicator/get_last_periode/${idCompany}`)
const getAllOperatingInd = (body) => api.post('transaction/operating_indicator/get_all_report', body) const getAllOperatingInd = (body) => api.post('transaction/operating_indicator/get_all_report', body)
const getOperatingIndDetail = (body) => api.post('transaction/operating_indicator/get_report_hierarki', body) const getOperatingIndDetail = (body) => api.post('transaction/operating_indicator/master_budget/get_report_hierarki', body)
const createOpetaingInd = (body) => api.post('transaction/operating_indicator/create_operating_indicator_report', body) const createOpetaingInd = (body) => api.post('transaction/operating_indicator/master_budget/create_submission_report', body)
const checkUploadOperatingInd = (body) => api.post('transaction/operating_indicator/check_import', body) const checkUploadOperatingInd = (body) => api.post('transaction/operating_indicator/master_budget/check_import', body)
const uploadOperatingInd = (body) => api.post('transaction/operating_indicator/import_operating_indicator', body) const uploadOperatingInd = (body) => api.post('transaction/operating_indicator/master_budget/import_master_budget', body)
const getLastestUpdateOI = (body) => api.post('transaction/operating_indicator/get_latest_update', body) const getLastestUpdateOI = (body) => api.post('transaction/operating_indicator/get_latest_update', body)
const getLastPeriodeOI = (idCompany) => api.post(`transaction/master_budget/get_last_periode/${idCompany}`) const getLastPeriodeOI = (idCompany) => api.post(`transaction/master_budget/get_last_periode/${idCompany}`)
const getReportHierarkiPL = (body) => api.post('transaction/db_report_detail/get_report_hierarki', body) const getReportHierarkiPL = (body) => api.post('transaction/db_profit_loss_detail/get_report_hierarki', body)
const getLastestUpdateMROI = (body) => api.post('transaction/monthly_report_oi/get_latest_update', body) const getLastestUpdateMROI = (body) => api.post('transaction/operating_indicator/monthly_report/get_latest_update', body)
//CASH FLOW //CASH FLOW
const getDetailReportCF = (body) => api.post('/transaction/cash_flow/get_report_hierarki', body) const getDetailReportCF = (body) => api.post('/transaction/cash_flow/master_budget/get_report_hierarki', body)
//OUTLOOK PA //OUTLOOK PA
const getOutlookPAID = (body) => api.post('transaction/outlook_pa/get_outlook_pa_id', body) const getOutlookPAID = (body) => api.post('transaction/outlook_pa/get_outlook_pa_id', body)
...@@ -258,11 +258,11 @@ const create = (type = "") => { ...@@ -258,11 +258,11 @@ const create = (type = "") => {
// Monthly // Monthly
const getMonthlyReport = (body) => api.post('transaction/monthly_report/get_all_report', body) const getMonthlyReport = (body) => api.post('transaction/monthly_report/get_all_report', body)
const getMonthlyOI = (body) => api.post('transaction/monthly_report_oi/get_operating_indicator_id', body) const getMonthlyOI = (body) => api.post('transaction/operating_indicator/monthly_report/get_operating_indicator_id', body)
const getMonthlyReportID = (body) => api.post('transaction/monthly_report/get_monthly_report_id', body) const getMonthlyReportID = (body) => api.post('transaction/monthly_report/get_monthly_report_id', body)
// const getHierarkiMontlyReportBS = (body) => api.post('transaction/monthly_report_bs/get_report_hierarki', body) // const getHierarkiMontlyReportBS = (body) => api.post('transaction/monthly_report_bs/get_report_hierarki', body)
const getHierarkiMontlyReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/get_report_hierarki', body) const getHierarkiMontlyReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/get_report_hierarki', body)
const getHierarkiMontlyReportOI = (body) => api.post('transaction/monthly_report_oi/get_report_hierarki', body) const getHierarkiMontlyReportOI = (body) => api.post('transaction/operating_indicator/monthly_report/get_report_hierarki', body)
const getLastestUpdateMR = (body) => api.post('/transaction/monthly_report/get_latest_update', body) const getLastestUpdateMR = (body) => api.post('/transaction/monthly_report/get_latest_update', body)
// const getHierarkiMontlyReportTP = (body) => api.post('transaction/monthly_report_tp/get_report_hierarki', body) // const getHierarkiMontlyReportTP = (body) => api.post('transaction/monthly_report_tp/get_report_hierarki', body)
const getHierarkiMontlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/get_report_hierarki', body) const getHierarkiMontlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/get_report_hierarki', body)
...@@ -283,21 +283,21 @@ const create = (type = "") => { ...@@ -283,21 +283,21 @@ const create = (type = "") => {
// const createMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/create_monthly_report', body) // const createMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/create_monthly_report', body)
const createMonthlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/create_monthly_report', body) const createMonthlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/create_monthly_report', body)
const createMonthlyReportFAM = (body) => api.post('transaction/fam/monthly_report/create_monthly_report', body) const createMonthlyReportFAM = (body) => api.post('transaction/fam/monthly_report/create_monthly_report', body)
const createMonthlyReportOI = (body) => api.post('transaction/monthly_report_oi/create_monthly_report', body) const createMonthlyReportOI = (body) => api.post('transaction/operating_indicator/monthly_report/create_monthly_report', body)
const createMonthlyReportCAT = (body) => api.post('transaction/cat/monthly_report/create_monthly_report', body) const createMonthlyReportCAT = (body) => api.post('transaction/cat/monthly_report/create_monthly_report', body)
// const checkUploadMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/check_import', body) // const checkUploadMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/check_import', body)
const checkUploadMonthlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/check_import', body) const checkUploadMonthlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/check_import', body)
const checkUploadMonthlyReportFAM = (body) => api.post('transaction/fam/monthly_report/check_import', body) const checkUploadMonthlyReportFAM = (body) => api.post('transaction/fam/monthly_report/check_import', body)
// const checkUploadMonthlyReportBS = (body) => api.post('transaction/monthly_report_bs/check_import', body) // const checkUploadMonthlyReportBS = (body) => api.post('transaction/monthly_report_bs/check_import', body)
const checkUploadMonthlyReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/check_import', body) const checkUploadMonthlyReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/check_import', body)
const checkUploadMonthlyReportOI = (body) => api.post('transaction/monthly_report_oi/check_import', body) const checkUploadMonthlyReportOI = (body) => api.post('transaction/operating_indicator/monthly_report/check_import', body)
const checkUploadMonthlyReportCAT = (body) => api.post('transaction/cat/monthly_report/check_import', body) const checkUploadMonthlyReportCAT = (body) => api.post('transaction/cat/monthly_report/check_import', body)
// const uploadMonthlyReportBS = (body) => api.post('transaction/monthly_report_bs/import_monthly_report', body) // const uploadMonthlyReportBS = (body) => api.post('transaction/monthly_report_bs/import_monthly_report', body)
const uploadMonthlyReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/import_monthly_report', body) const uploadMonthlyReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/import_monthly_report', body)
const uploadMonthlyReportFAM = (body) => api.post('transaction/fam/monthly_report/import_monthly_report', body) const uploadMonthlyReportFAM = (body) => api.post('transaction/fam/monthly_report/import_monthly_report', body)
// const uploadMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/import_monthly_report', body) // const uploadMonthlyReportTP = (body) => api.post('transaction/monthly_report_tp/import_monthly_report', body)
const uploadMonthlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/import_monthly_report', body) const uploadMonthlyReportTP = (body) => api.post('transaction/tax_planning/monthly_report/import_monthly_report', body)
const uploadMonthlyReportOI = (body) => api.post('transaction/monthly_report_oi/import_monthly_report', body) const uploadMonthlyReportOI = (body) => api.post('transaction/operating_indicator/monthly_report/import_monthly_report', body)
const uploadMonthlyReportCAT = (body) => api.post('transaction/cat/monthly_report/import_monthly_report', body) const uploadMonthlyReportCAT = (body) => api.post('transaction/cat/monthly_report/import_monthly_report', body)
// const validateSubmitReportBS = (body) => api.post('transaction/monthly_report_bs/validate_save', body) // const validateSubmitReportBS = (body) => api.post('transaction/monthly_report_bs/validate_save', body)
const validateSubmitReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/validate_save', body) const validateSubmitReportBS = (body) => api.post('transaction/balance_sheet/monthly_report/validate_save', body)
...@@ -307,7 +307,7 @@ const create = (type = "") => { ...@@ -307,7 +307,7 @@ const create = (type = "") => {
const getPerBSiMontlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/get_per_bs', body) const getPerBSiMontlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/get_per_bs', body)
const checkUploadMonthlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/check_import', body) const checkUploadMonthlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/check_import', body)
const uploadMonthlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/import_monthly_report', body) const uploadMonthlyReportLOCF = (body) => api.post('transaction/locf/monthly_report/import_monthly_report', body)
const validateSubmitReportOI = (body) => api.post('transaction/monthly_report_oi/validate_save', body) const validateSubmitReportOI = (body) => api.post('transaction/operating_indicator/monthly_report/validate_save', body)
// 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)
......
...@@ -287,8 +287,8 @@ export default class CashFlow extends Component { ...@@ -287,8 +287,8 @@ export default class CashFlow extends Component {
async downloadAllData() { async downloadAllData() {
// let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}` // let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
// console.log(url); // console.log(url);
let resReal = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/export_master_budget?submission_id=${this.props.submissionID}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&report_id=${this.props.report_id}` let resReal = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&report_id=${this.props.report_id}`
let resNull = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/export_master_budget?submission_id=&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&report_id=${this.props.report_id}` let resNull = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cash_flow/master_budget/export_master_budget?submission_id=&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&report_id=${this.props.report_id}`
let res = await fetch( let res = await fetch(
this.props.submissionID == null ? resNull : resReal this.props.submissionID == null ? resNull : resReal
) )
......
This diff is collapsed.
...@@ -606,7 +606,7 @@ export default class SubHolding extends Component { ...@@ -606,7 +606,7 @@ export default class SubHolding extends Component {
async downloadAllData() { async downloadAllData() {
if (this.state.report.value === 1) { if (this.state.report.value === 1) {
let res = await fetch( let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_report/export_master_budget?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_report/export_report?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}`
) )
res = await res.blob() res = await res.blob()
this.setState({ loading: false }) this.setState({ loading: false })
...@@ -619,7 +619,7 @@ export default class SubHolding extends Component { ...@@ -619,7 +619,7 @@ export default class SubHolding extends Component {
} }
} else if (this.state.report.value === 2) { } else if (this.state.report.value === 2) {
let res = await fetch( let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_report/export_master_budget?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_report/export_report?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}`
) )
res = await res.blob() res = await res.blob()
this.setState({ loading: false }) this.setState({ loading: false })
...@@ -632,7 +632,7 @@ export default class SubHolding extends Component { ...@@ -632,7 +632,7 @@ export default class SubHolding extends Component {
} }
} else if (this.state.report.value === 3) { } else if (this.state.report.value === 3) {
let res = await fetch( let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_report_detail/export_master_budget?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_profit_loss_detail/export_master_budget?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}`
) )
res = await res.blob() res = await res.blob()
this.setState({ loading: false }) this.setState({ loading: false })
...@@ -644,10 +644,10 @@ export default class SubHolding extends Component { ...@@ -644,10 +644,10 @@ export default class SubHolding extends Component {
a.click(); a.click();
} }
} else if (this.state.report.value === 4) { } else if (this.state.report.value === 4) {
let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_ratio/export_master_budget?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}` let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_ratio/export_report?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}`
console.log(url); console.log(url);
let res = await fetch( let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_ratio/export_master_budget?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_ratio/export_report?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}`
) )
res = await res.blob() res = await res.blob()
this.setState({ loading: false }) this.setState({ loading: false })
......
...@@ -224,7 +224,7 @@ export default class Parameter extends Component { ...@@ -224,7 +224,7 @@ export default class Parameter extends Component {
downloadFile = async () => { downloadFile = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=ParameterTemplate&&fileType=xlsx" `${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=ParameterTemplate&&fileType=xlsx`
) )
res = await res.blob() res = await res.blob()
// console.log(res) // console.log(res)
...@@ -239,7 +239,7 @@ export default class Parameter extends Component { ...@@ -239,7 +239,7 @@ export default class Parameter extends Component {
downloadDataTable = async () => { downloadDataTable = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/setting/export_setting" `${process.env.REACT_APP_URL_MAIN_BE}/public/setting/export_setting`
) )
res = await res.blob() res = await res.blob()
// console.log(res) // console.log(res)
......
...@@ -468,7 +468,7 @@ export default class Perusahaan extends Component { ...@@ -468,7 +468,7 @@ export default class Perusahaan extends Component {
downloadFile = async () => { downloadFile = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=CompanyTemplate&&fileType=xlsx" `${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=CompanyTemplate&&fileType=xlsx`
) )
res = await res.blob() res = await res.blob()
console.log(res) console.log(res)
...@@ -483,7 +483,7 @@ export default class Perusahaan extends Component { ...@@ -483,7 +483,7 @@ export default class Perusahaan extends Component {
downloadDataTable = async () => { downloadDataTable = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/company/export_company" `${process.env.REACT_APP_URL_MAIN_BE}/public/company/export_company`
) )
res = await res.blob() res = await res.blob()
console.log(res) console.log(res)
......
...@@ -752,7 +752,7 @@ export default class ReportItems extends Component { ...@@ -752,7 +752,7 @@ export default class ReportItems extends Component {
downloadFile = async () => { downloadFile = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=ItemReportTemplate&&fileType=xlsx" `${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=ItemReportTemplate&&fileType=xlsx`
) )
res = await res.blob() res = await res.blob()
// console.log(res) // console.log(res)
...@@ -767,7 +767,7 @@ export default class ReportItems extends Component { ...@@ -767,7 +767,7 @@ export default class ReportItems extends Component {
downloadDataTable = async () => { downloadDataTable = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/item_report/export_item_report" `${process.env.REACT_APP_URL_MAIN_BE}/public/item_report/export_item_report`
) )
res = await res.blob() res = await res.blob()
// console.log(res) // console.log(res)
......
...@@ -418,7 +418,7 @@ export default class UnitBisnis extends Component { ...@@ -418,7 +418,7 @@ export default class UnitBisnis extends Component {
downloadFile = async () => { downloadFile = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=BusinessUnitTemplate&&fileType=xlsx" `${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=BusinessUnitTemplate&&fileType=xlsx`
) )
res = await res.blob() res = await res.blob()
console.log(res) console.log(res)
...@@ -433,7 +433,7 @@ export default class UnitBisnis extends Component { ...@@ -433,7 +433,7 @@ export default class UnitBisnis extends Component {
downloadDataTable = async () => { downloadDataTable = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/business_unit/export_business_unit" `${process.env.REACT_APP_URL_MAIN_BE}/public/business_unit/export_business_unit`
) )
res = await res.blob() res = await res.blob()
console.log(res) console.log(res)
......
...@@ -352,7 +352,8 @@ export default class BalanceSheetMR extends Component { ...@@ -352,7 +352,8 @@ export default class BalanceSheetMR extends Component {
periode: this.props.periode, periode: this.props.periode,
report_id: this.props.report_id, report_id: this.props.report_id,
balance_sheet: payload, balance_sheet: payload,
months: this.props.month.month_id months: this.props.month.month_id,
status: 'submitted'
} }
console.log(body) console.log(body)
this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[0][0] }) this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[0][0] })
...@@ -456,13 +457,15 @@ export default class BalanceSheetMR extends Component { ...@@ -456,13 +457,15 @@ export default class BalanceSheetMR extends Component {
"balance_sheet": data "balance_sheet": data
} }
console.log(body); console.log(body);
// console.log(JSON.stringify(body)); console.log(JSON.stringify(body));
console.log(body) console.log(body)
api.create('UPLOAD').uploadMonthlyReportBS(body).then(response => { api.create('UPLOAD').uploadMonthlyReportBS(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.props.onClickClose() // this.props.onClickClose()
this.props.saveToMonthlyReport()
this.setState({loading: false, handleTekTekTek: 0})
// this.props.getReport() // this.props.getReport()
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleTekTekTek: 0 }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleTekTekTek: 0 }, () => {
......
This diff is collapsed.
...@@ -262,6 +262,7 @@ export default class OperatingIndicator extends Component { ...@@ -262,6 +262,7 @@ export default class OperatingIndicator extends Component {
"periode": this.state.periode.periode "periode": this.state.periode.periode
} }
api.create().getOpetratingIndID(payload).then(response => { api.create().getOpetratingIndID(payload).then(response => {
console.log(response);
if (response) { if (response) {
// console.log(response.data.data) // console.log(response.data.data)
this.getLatestPeriodSubmit() this.getLatestPeriodSubmit()
...@@ -390,6 +391,7 @@ export default class OperatingIndicator extends Component { ...@@ -390,6 +391,7 @@ export default class OperatingIndicator extends Component {
saveOperatingInd(payload) { saveOperatingInd(payload) {
api.create().createOpetaingInd(payload).then((response) => { api.create().createOpetaingInd(payload).then((response) => {
console.log(response);
this.getReport() this.getReport()
this.getOperatingID() this.getOperatingID()
}) })
...@@ -397,6 +399,7 @@ export default class OperatingIndicator extends Component { ...@@ -397,6 +399,7 @@ export default class OperatingIndicator extends Component {
saveMonthlyOI(payload) { saveMonthlyOI(payload) {
api.create().createMonthlyReportOI(payload).then((response) => { api.create().createMonthlyReportOI(payload).then((response) => {
console.log(response);
this.getReport() this.getReport()
this.getOperatingID() this.getOperatingID()
}) })
......
...@@ -97,7 +97,7 @@ export default class BalanceSheet extends Component { ...@@ -97,7 +97,7 @@ export default class BalanceSheet extends Component {
"company_id": this.props.data.company.company_id, "company_id": this.props.data.company.company_id,
"periode": this.props.data.periode "periode": this.props.data.periode
} }
// // console.log(payload) console.log(payload)
api.create().getOperatingIndDetail(payload).then(response => { api.create().getOperatingIndDetail(payload).then(response => {
// console.log(response) // console.log(response)
let dataTable = [] let dataTable = []
...@@ -177,6 +177,7 @@ export default class BalanceSheet extends Component { ...@@ -177,6 +177,7 @@ export default class BalanceSheet extends Component {
this.setState({ emptyData: true }) this.setState({ emptyData: true })
} }
}) })
console.log(dataTable);
}) })
} }
...@@ -210,8 +211,9 @@ export default class BalanceSheet extends Component { ...@@ -210,8 +211,9 @@ export default class BalanceSheet extends Component {
"status": type, "status": type,
"master_budget": payloadMB "master_budget": payloadMB
} }
console.log(payload);
// // console.log('=========================') // // console.log('=========================')
// // console.log(JSON.stringify(payload)) // console.log(JSON.stringify(payload))
this.props.saveOperatingInd(payload) this.props.saveOperatingInd(payload)
this.props.onClickClose() this.props.onClickClose()
} }
...@@ -281,7 +283,7 @@ export default class BalanceSheet extends Component { ...@@ -281,7 +283,7 @@ export default class BalanceSheet extends Component {
downloadTemplate = async () => { downloadTemplate = async () => {
let res = await fetch( let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/operating_indicator/download_template?report_id=${this.props.data.report_id}&&company_id=${this.props.data.company.company_id}&&year=${this.props.data.periode}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/operating_indicator/master_budget/download_template?report_id=${this.props.data.report_id}&&company_id=${this.props.data.company.company_id}&&year=${this.props.data.periode}`
) )
res = await res.blob() res = await res.blob()
// // console.log(res) // // console.log(res)
...@@ -299,7 +301,7 @@ export default class BalanceSheet extends Component { ...@@ -299,7 +301,7 @@ export default class BalanceSheet extends Component {
let bram = [this.props.data.operatingIndID, this.props.report_id, this.props.data.company.company_id, this.props.data.periode] let bram = [this.props.data.operatingIndID, this.props.report_id, this.props.data.company.company_id, this.props.data.periode]
// // console.log(bram) // // console.log(bram)
let res = await fetch( let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/operating_indicator/export_operating_indicator?operating_indicator_id=${this.props.data.operatingIndID == null ? "" : this.props.data.operatingIndID}&&report_id=${this.props.data.report_id}&&company_id=${this.props.data.company.company_id}&&year=${this.props.data.periode}` `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/operating_indicator/master_budget/export_master_budget?operating_indicator_id=${this.props.data.operatingIndID == null ? "" : this.props.data.operatingIndID}&&report_id=${this.props.data.report_id}&&company_id=${this.props.data.company.company_id}&&year=${this.props.data.periode}`
) )
res = await res.blob() res = await res.blob()
...@@ -354,9 +356,10 @@ export default class BalanceSheet extends Component { ...@@ -354,9 +356,10 @@ export default class BalanceSheet extends Component {
company_id: this.props.data.company.company_id, company_id: this.props.data.company.company_id,
periode: this.props.data.periode, periode: this.props.data.periode,
report_id: this.props.data.report_id, report_id: this.props.data.report_id,
master_budget: payload master_budget: payload,
status: 'submitted'
} }
// // console.log(resp.rows[1][0]) console.log(body)
this.setState({ payload: body, buttonError: false, judul: resp.rows[1][0] }) this.setState({ payload: body, buttonError: false, judul: resp.rows[1][0] })
} }
}); });
...@@ -367,7 +370,7 @@ export default class BalanceSheet extends Component { ...@@ -367,7 +370,7 @@ export default class BalanceSheet extends Component {
api.create().checkUploadOperatingInd(this.state.payload).then(response => { api.create().checkUploadOperatingInd(this.state.payload).then(response => {
// // // console.log(JSON.stringify(this.state.payload)); // // // console.log(JSON.stringify(this.state.payload));
// // console.log('===============') // // console.log('===============')
// console.log(response) console.log(response)
if (response.data) { if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
this.setState({ visibleUpload: false, visibleOI: false, loading: true }) this.setState({ visibleUpload: false, visibleOI: false, loading: true })
......
...@@ -431,7 +431,7 @@ export default class UserRole extends Component { ...@@ -431,7 +431,7 @@ export default class UserRole extends Component {
downloadFile = async () => { downloadFile = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=UserTemplate&&fileType=xlsx" `${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=UserTemplate&&fileType=xlsx`
) )
res = await res.blob() res = await res.blob()
// console.log(res) // console.log(res)
...@@ -445,7 +445,7 @@ export default class UserRole extends Component { ...@@ -445,7 +445,7 @@ export default class UserRole extends Component {
} }
downloadDataTables = async () => { downloadDataTables = async () => {
let res = await fetch("${process.env.REACT_APP_URL_MAIN_BE}/public/user/export_user") let res = await fetch(`${process.env.REACT_APP_URL_MAIN_BE}/public/user/export_user`)
res = await res.blob() res = await res.blob()
// console.log(res) // console.log(res)
if (res.size > 0) { if (res.size > 0) {
......
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