Commit d77a20aa authored by d.arizona's avatar d.arizona

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

parents cf700928 ad814fdb
...@@ -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 })
......
...@@ -130,7 +130,7 @@ export default class BalanceSheetMR extends Component { ...@@ -130,7 +130,7 @@ export default class BalanceSheetMR extends Component {
getSettingControl() { getSettingControl() {
let body = { let body = {
group: 'THRESHOLD_VARIANCE', group: 'THRESHOLD_CONTROL',
company_id: this.props.company.company_id, company_id: this.props.company.company_id,
type: 'BALANCE_SHEET' type: 'BALANCE_SHEET'
} }
......
...@@ -345,7 +345,8 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -345,7 +345,8 @@ export default class CorporateAnnualTargetMR extends Component {
periode: this.props.periode, periode: this.props.periode,
report_id: this.props.report_id, report_id: this.props.report_id,
months: this.props.month.month_id, months: this.props.month.month_id,
corporate_annual_target: payload corporate_annual_target: payload,
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] })
...@@ -356,7 +357,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -356,7 +357,7 @@ export default class CorporateAnnualTargetMR extends Component {
checkUpload() { checkUpload() {
this.setState({loading: true}) this.setState({loading: true})
api.create().checkUploadMonthlyReportCAT(this.state.payload).then(response => { api.create().checkUploadMonthlyReportCAT(this.state.payload).then(response => {
console.log(JSON.stringify(this.state.payload)); // console.log(JSON.stringify(this.state.payload));
console.log(this.state.payload) console.log(this.state.payload)
console.log(response) console.log(response)
if (response.data) { if (response.data) {
...@@ -428,7 +429,9 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -428,7 +429,9 @@ export default class CorporateAnnualTargetMR extends Component {
"report_id": this.props.report_id, "report_id": this.props.report_id,
"status": type, "status": type,
"months": this.props.month.month_id, "months": this.props.month.month_id,
"corporate_annual_target": data "corporate_annual_target": data,
"total_score": this.state.totalScore,
"performance": this.state.perfomanceScore
} }
console.log(JSON.stringify(body)); console.log(JSON.stringify(body));
api.create('UPLOAD').uploadMonthlyReportCAT(body).then(response => { api.create('UPLOAD').uploadMonthlyReportCAT(body).then(response => {
...@@ -555,8 +558,8 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -555,8 +558,8 @@ export default class CorporateAnnualTargetMR extends Component {
"jenis_kpi": i[8] == null ? "" : i[8], "jenis_kpi": i[8] == null ? "" : i[8],
"max_ach": i[9] == null ? "" : i[9], "max_ach": i[9] == null ? "" : i[9],
"formula_ytd":i[10] == null ? "" : i[10], "formula_ytd":i[10] == null ? "" : i[10],
"actual_monthly": i[11], "actual_monthly": i[11] == null || i[11] == "" ? 0.0 : i[11],
"target_monthly": i[12], "target_monthly": i[12] == null || i[12] == "" ? 0.0 : i[12],
"achivement_monthly": i[13], "achivement_monthly": i[13],
"score": i[14], "score": i[14],
"score_x_weight": i[15], "score_x_weight": i[15],
...@@ -570,9 +573,12 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -570,9 +573,12 @@ export default class CorporateAnnualTargetMR extends Component {
"report_id": this.props.report_id, "report_id": this.props.report_id,
"status": type, "status": type,
"months": this.props.month.month_id, "months": this.props.month.month_id,
"corporate_annual_target": data "corporate_annual_target": data,
"total_score": this.state.totalScore,
"performance": this.state.perfomanceScore
} }
console.log(JSON.stringify(payload)); // console.log(JSON.stringify(payload));
console.log(payload);
api.create('UPLOAD').createMonthlyReportCAT(payload).then(response => { api.create('UPLOAD').createMonthlyReportCAT(payload).then(response => {
console.log(response); console.log(response);
...@@ -1573,7 +1579,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -1573,7 +1579,7 @@ export default class CorporateAnnualTargetMR extends Component {
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
<Input <Input
disableUnderline={true} disableUnderline={true}
style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 75, backgroundColor: 'transparent' }} style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'left', borderColor: 'transparent', margin: 0, width: 150, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
multiline={true} multiline={true}
......
This diff is collapsed.
...@@ -359,7 +359,8 @@ export default class TaxPlanningMR extends Component { ...@@ -359,7 +359,8 @@ export default class TaxPlanningMR extends Component {
periode: this.props.periode, periode: this.props.periode,
report_id: this.props.report_id, report_id: this.props.report_id,
months: this.props.month.month_id, months: this.props.month.month_id,
tax_planning: payload tax_planning: payload,
status: "submitted"
} }
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] })
// console.log(this.state.judulColumn) // console.log(this.state.judulColumn)
......
...@@ -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 })
......
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