Commit 6241810a authored by Faisal Hamdi's avatar Faisal Hamdi

Merge branch 'faisal' into 'master'

env download

See merge request !800
parents 743c2869 973bfe27
......@@ -526,7 +526,7 @@ export default class ApprovalMatrix extends Component {
downloadFile = async () => {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/attachment/download_file?fileName=ApprovalMatrixTemplate&&fileType=xlsx`
`${process.env.REACT_APP_URL_MAIN_FE}/public/attachment/download_file?fileName=ApprovalMatrixTemplate&&fileType=xlsx`
)
res = await res.blob()
// console.log(res)
......@@ -541,7 +541,7 @@ export default class ApprovalMatrix extends Component {
downloadDataTable = async () => {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/approval_matrix/export_approval_matrix`
`${process.env.REACT_APP_URL_MAIN_FE}/public/approval_matrix/export_approval_matrix`
)
res = await res.blob()
// console.log(res)
......
......@@ -762,10 +762,10 @@ export default class BudgetTahunan extends Component {
let length = name.split(".").length
let fileType = name.split(".")[length - 1]
// // console.log(fileType);
let url = `${process.env.REACT_APP_URL_MAIN}/public/transaction/master_budget/download_attachment?fileName=${fileurl}&&fileType=${fileType}`
let url = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/master_budget/download_attachment?fileName=${fileurl}&&fileType=${fileType}`
// // console.log(url);
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/master_budget/download_attachment?fileName=${fileurl}&&fileType=${fileType}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/master_budget/download_attachment?fileName=${fileurl}&&fileType=${fileType}`
)
res = await res.blob()
this.setState({ loading: false }, () => {
......
......@@ -270,7 +270,7 @@ export default class BalanceSheet extends Component {
downloadTemplate = async () => {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
)
res = await res.blob()
// console.log(res)
......@@ -448,10 +448,10 @@ export default class BalanceSheet extends Component {
}
async downloadAllData() {
let url = `${process.env.REACT_APP_URL_MAIN}/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_FE}/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);
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID === null ? "" : this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID === null ? "" : this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
)
res = await res.blob()
this.setState({ loading: false })
......
......@@ -285,10 +285,10 @@ export default class CashFlow extends Component {
}
async downloadAllData() {
// let url = `${process.env.REACT_APP_URL_MAIN}/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_FE}/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);
let resReal = `${process.env.REACT_APP_URL_MAIN}/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 resNull = `${process.env.REACT_APP_URL_MAIN}/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 resReal = `${process.env.REACT_APP_URL_MAIN_FE}/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 resNull = `${process.env.REACT_APP_URL_MAIN_FE}/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 res = await fetch(
this.props.submissionID == null ? resNull : resReal
)
......
......@@ -278,7 +278,7 @@ export default class CorporateAnnualTarget extends Component {
downloadTemplate = async () => {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
)
res = await res.blob()
// // // // console.log(res)
......@@ -295,8 +295,8 @@ export default class CorporateAnnualTarget extends Component {
// // // // console.log('masuk')
let bram = [this.props.submissionID, this.props.report_id, this.props.company.company_id, this.props.periode, this.props.revision]
// // // // console.log(bram)
let resReal = `${process.env.REACT_APP_URL_MAIN}/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 resNull = `${process.env.REACT_APP_URL_MAIN}/public/transaction/master_budget/export_master_budget?submission_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
let resReal = `${process.env.REACT_APP_URL_MAIN_FE}/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 resNull = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/master_budget/export_master_budget?submission_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
let res = await fetch(
this.props.submissionID == null ? resNull : resReal
)
......
......@@ -265,7 +265,7 @@ export default class FixedAssetsMovement extends Component {
downloadTemplate = async () => {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
)
res = await res.blob()
// // console.log(res)
......@@ -453,10 +453,10 @@ export default class FixedAssetsMovement extends Component {
}
async downloadAllData() {
// let url = `${process.env.REACT_APP_URL_MAIN}/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_FE}/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);
let resReal = `${process.env.REACT_APP_URL_MAIN}/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 resNull = `${process.env.REACT_APP_URL_MAIN}/public/transaction/master_budget/export_master_budget?submission_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
let resReal = `${process.env.REACT_APP_URL_MAIN_FE}/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 resNull = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/master_budget/export_master_budget?submission_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
let res = await fetch(
this.props.submissionID == null ? resNull : resReal
)
......
......@@ -278,7 +278,7 @@ export default class ProfitLoss extends Component {
downloadTemplate = async () => {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
)
res = await res.blob()
// console.log(res)
......@@ -453,8 +453,8 @@ export default class ProfitLoss extends Component {
}
async downloadAllData() {
let url = `${process.env.REACT_APP_URL_MAIN}/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 sub_null = `${process.env.REACT_APP_URL_MAIN}/public/transaction/master_budget/export_master_budget?submission_id=&&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_FE}/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 sub_null = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/master_budget/export_master_budget?submission_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
// console.log(url);
let res = await fetch(
this.props.submissionID == null ? sub_null : url
......
......@@ -739,7 +739,7 @@ export default class TaxPlanning extends Component {
downloadTemplate = async () => {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
)
res = await res.blob()
// console.log(res)
......@@ -753,8 +753,8 @@ export default class TaxPlanning extends Component {
}
async downloadAllData() {
let url = `${process.env.REACT_APP_URL_MAIN}/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 sub_null = `${process.env.REACT_APP_URL_MAIN}/public/transaction/master_budget/export_master_budget?submission_id=&&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_FE}/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 sub_null = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/master_budget/export_master_budget?submission_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
// console.log(url);
let res = await fetch(
this.props.submissionID == null ? sub_null : url
......
......@@ -123,7 +123,7 @@ export default class getAllDocument extends Component {
openPopUp = async (index, val, type) =>{
if (type === 'download') {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/document/download_document?documentName=`+this.state.docPath[val]+"&&fileType="+index[5]
`${process.env.REACT_APP_URL_MAIN_FE}/public/document/download_document?documentName=`+this.state.docPath[val]+"&&fileType="+index[5]
)
res = await res.blob()
// console.log(res)
......
......@@ -104,7 +104,7 @@ export default class AuditTahunan extends Component {
if (type === 'download') {
console.log(this.state.docPath[val])
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/document/download_document?documentName=`+this.state.docPath[val]+"&&fileType="+index[5]
`${process.env.REACT_APP_URL_MAIN_FE}/public/document/download_document?documentName=`+this.state.docPath[val]+"&&fileType="+index[5]
)
res = await res.blob()
// console.log(res)
......
......@@ -107,7 +107,7 @@ export default class BOD extends Component {
if (type === 'download') {
console.log(this.state.docPath[val])
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/document/download_document?documentName=`+this.state.docPath[val]+"&&fileType="+index[5]
`${process.env.REACT_APP_URL_MAIN_FE}/public/document/download_document?documentName=`+this.state.docPath[val]+"&&fileType="+index[5]
)
res = await res.blob()
// console.log(res)
......
......@@ -66,7 +66,7 @@ export default class ManualBookETMS extends Component {
if (type === 'download') {
console.log(this.state.docPath[val])
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/document/download_document?documentName=`+this.state.docPath[val]+"&&fileType="+index[5]
`${process.env.REACT_APP_URL_MAIN_FE}/public/document/download_document?documentName=`+this.state.docPath[val]+"&&fileType="+index[5]
)
res = await res.blob()
// console.log(res)
......
......@@ -105,7 +105,7 @@ export default class ManualBookTia extends Component {
openPopUp = async (index, val, type) =>{
if (type === 'download') {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/document/download_document?documentName=`+this.state.docPath[val]+"&&fileType="+index[5]
`${process.env.REACT_APP_URL_MAIN_FE}/public/document/download_document?documentName=`+this.state.docPath[val]+"&&fileType="+index[5]
)
res = await res.blob()
// console.log(res)
......
......@@ -103,7 +103,7 @@ export default class QReview extends Component {
openPopUp = async (index, val, type) =>{
if (type === 'download') {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/document/download_document?documentName=`+this.state.docPath[val]+"&&fileType="+index[5]
`${process.env.REACT_APP_URL_MAIN_FE}/public/document/download_document?documentName=`+this.state.docPath[val]+"&&fileType="+index[5]
)
res = await res.blob()
// console.log(res)
......
......@@ -606,7 +606,7 @@ export default class SubHolding extends Component {
async downloadAllData() {
if (this.state.report.value === 1) {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/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_FE}/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}`
)
res = await res.blob()
this.setState({ loading: false })
......@@ -619,7 +619,7 @@ export default class SubHolding extends Component {
}
} else if (this.state.report.value === 2) {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/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_FE}/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}`
)
res = await res.blob()
this.setState({ loading: false })
......@@ -632,7 +632,7 @@ export default class SubHolding extends Component {
}
} else if (this.state.report.value === 3) {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/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_FE}/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}`
)
res = await res.blob()
this.setState({ loading: false })
......@@ -644,10 +644,10 @@ export default class SubHolding extends Component {
a.click();
}
} else if (this.state.report.value === 4) {
let url = `${process.env.REACT_APP_URL_MAIN}/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_FE}/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}`
console.log(url);
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/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_FE}/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}`
)
res = await res.blob()
this.setState({ loading: false })
......
......@@ -224,7 +224,7 @@ export default class Parameter extends Component {
downloadFile = async () => {
let res = await fetch(
"${process.env.REACT_APP_URL_MAIN}/public/attachment/download_file?fileName=ParameterTemplate&&fileType=xlsx"
"${process.env.REACT_APP_URL_MAIN_FE}/public/attachment/download_file?fileName=ParameterTemplate&&fileType=xlsx"
)
res = await res.blob()
// console.log(res)
......@@ -239,7 +239,7 @@ export default class Parameter extends Component {
downloadDataTable = async () => {
let res = await fetch(
"${process.env.REACT_APP_URL_MAIN}/public/setting/export_setting"
"${process.env.REACT_APP_URL_MAIN_FE}/public/setting/export_setting"
)
res = await res.blob()
// console.log(res)
......
......@@ -468,7 +468,7 @@ export default class Perusahaan extends Component {
downloadFile = async () => {
let res = await fetch(
"${process.env.REACT_APP_URL_MAIN}/public/attachment/download_file?fileName=CompanyTemplate&&fileType=xlsx"
"${process.env.REACT_APP_URL_MAIN_FE}/public/attachment/download_file?fileName=CompanyTemplate&&fileType=xlsx"
)
res = await res.blob()
console.log(res)
......@@ -483,7 +483,7 @@ export default class Perusahaan extends Component {
downloadDataTable = async () => {
let res = await fetch(
"${process.env.REACT_APP_URL_MAIN}/public/company/export_company"
"${process.env.REACT_APP_URL_MAIN_FE}/public/company/export_company"
)
res = await res.blob()
console.log(res)
......
......@@ -752,7 +752,7 @@ export default class ReportItems extends Component {
downloadFile = async () => {
let res = await fetch(
"${process.env.REACT_APP_URL_MAIN}/public/attachment/download_file?fileName=ItemReportTemplate&&fileType=xlsx"
"${process.env.REACT_APP_URL_MAIN_FE}/public/attachment/download_file?fileName=ItemReportTemplate&&fileType=xlsx"
)
res = await res.blob()
// console.log(res)
......@@ -767,7 +767,7 @@ export default class ReportItems extends Component {
downloadDataTable = async () => {
let res = await fetch(
"${process.env.REACT_APP_URL_MAIN}/public/item_report/export_item_report"
"${process.env.REACT_APP_URL_MAIN_FE}/public/item_report/export_item_report"
)
res = await res.blob()
// console.log(res)
......
......@@ -418,7 +418,7 @@ export default class UnitBisnis extends Component {
downloadFile = async () => {
let res = await fetch(
"${process.env.REACT_APP_URL_MAIN}/public/attachment/download_file?fileName=BusinessUnitTemplate&&fileType=xlsx"
"${process.env.REACT_APP_URL_MAIN_FE}/public/attachment/download_file?fileName=BusinessUnitTemplate&&fileType=xlsx"
)
res = await res.blob()
console.log(res)
......@@ -433,7 +433,7 @@ export default class UnitBisnis extends Component {
downloadDataTable = async () => {
let res = await fetch(
"${process.env.REACT_APP_URL_MAIN}/public/business_unit/export_business_unit"
"${process.env.REACT_APP_URL_MAIN_FE}/public/business_unit/export_business_unit"
)
res = await res.blob()
console.log(res)
......
......@@ -695,10 +695,10 @@ export default class MonthlyReport extends Component {
let length = name.split(".").length
let fileType = name.split(".")[length - 1]
// // console.log(fileType);
let url = `${process.env.REACT_APP_URL_MAIN}/public/transaction/monthly_report/download_attachment?fileName=${fileurl}&&fileType=${fileType}`
let url = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report/download_attachment?fileName=${fileurl}&&fileType=${fileType}`
// // console.log(url);
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/monthly_report/download_attachment?fileName=${fileurl}&&fileType=${fileType}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report/download_attachment?fileName=${fileurl}&&fileType=${fileType}`
)
res = await res.blob()
this.setState({ loading: false }, () => {
......
......@@ -217,7 +217,7 @@ export default class BalanceSheetMR extends Component {
downloadTemplate = async () => {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/monthly_report_bs/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report_bs/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
)
res = await res.blob()
// console.log(res)
......@@ -231,10 +231,10 @@ export default class BalanceSheetMR extends Component {
}
async downloadAllData() {
let url = `${process.env.REACT_APP_URL_MAIN}/public/transaction/monthly_report_bs/export_monthly_report?monthly_report_id=${this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
let url = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report_bs/export_monthly_report?monthly_report_id=${this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
console.log(url);
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/monthly_report_bs/export_monthly_report?monthly_report_id=${this.props.monthlyReportId === null ? "" : this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report_bs/export_monthly_report?monthly_report_id=${this.props.monthlyReportId === null ? "" : this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
)
res = await res.blob()
this.setState({ loading: false })
......
......@@ -205,7 +205,7 @@ export default class CorporateAnnualTargetMR extends Component {
downloadTemplate = async () => {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/monthly_report/cat/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report/cat/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
)
res = await res.blob()
console.log(res);
......@@ -218,6 +218,23 @@ export default class CorporateAnnualTargetMR extends Component {
}
}
async downloadAllData() {
let url = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report/cat/export_monthly_report?monthly_report_id=${this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
console.log(url);
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report/cat/export_monthly_report?monthly_report_id=${this.props.monthlyReportId === null ? "" : this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
)
res = await res.blob()
this.setState({ loading: false })
if (res.size > 0) {
let url = window.URL.createObjectURL(res);
let a = document.createElement('a');
a.href = url;
a.download = 'Monthly Report Corporate Annual Target - Performance.xlsx';
a.click();
}
}
fileHandler = (event) => {
let fileObj = event
ExcelRenderer(fileObj, (err, resp) => {
......@@ -451,9 +468,9 @@ export default class CorporateAnnualTargetMR extends Component {
"item_report_id": i[1],
"weight": i[6],
"uom": i[7],
"jenis_kpi": i[8],
"max_ach": i[9],
"formula_ytd": i[10],
"jenis_kpi": i[8] == null ? "" : i[8].value,
"max_ach": i[9] == null ? "" : i[9].value,
"formula_ytd":i[10] == null ? "" : i[10].value,
"actual_monthly": i[11],
"target_monthly": i[12],
"achivement_monthly": i[13],
......
......@@ -184,7 +184,7 @@ export default class FixedAssetsMovementMR extends Component {
downloadTemplate = async () => {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/monthly_report/fam/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report/fam/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
)
res = await res.blob()
console.log(res);
......@@ -198,10 +198,10 @@ export default class FixedAssetsMovementMR extends Component {
}
async downloadAllData() {
let url = `${process.env.REACT_APP_URL_MAIN}/public/transaction/monthly_report/fam/export_monthly_report?monthly_report_id=${this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
let url = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report/fam/export_monthly_report?monthly_report_id=${this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
console.log(url);
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/monthly_report/fam/export_monthly_report?monthly_report_id=${this.props.monthlyReportId === null ? "" : this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report/fam/export_monthly_report?monthly_report_id=${this.props.monthlyReportId === null ? "" : this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
)
res = await res.blob()
this.setState({ loading: false })
......
......@@ -377,7 +377,7 @@ export default class ListOfCreditFacilities extends Component {
downloadTemplate = async () => {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/monthly_report_locf/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&months=${this.props.month.month_id}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report_locf/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&months=${this.props.month.month_id}`
)
res = await res.blob()
// console.log(this.props.report_id)
......@@ -394,8 +394,8 @@ export default class ListOfCreditFacilities extends Component {
}
async downloadAllData() {
let url = `${process.env.REACT_APP_URL_MAIN}/public/transaction/monthly_report_locf/export_monthly_report?monthly_report_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
let urls = `${process.env.REACT_APP_URL_MAIN}/public/transaction/monthly_report_locf/export_monthly_report?monthly_report_id=${this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
let url = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report_locf/export_monthly_report?monthly_report_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
let urls = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report_locf/export_monthly_report?monthly_report_id=${this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
// console.log(url);
// console.log(urls);
let res = await fetch(
......
......@@ -194,7 +194,7 @@ export default class OperatingIndicatorMR extends Component {
downloadTemplate = async () => {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/monthly_report_oi/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_FE}/public/transaction/monthly_report_oi/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()
// // console.log(res)
......@@ -208,10 +208,10 @@ export default class OperatingIndicatorMR extends Component {
}
async downloadAllData() {
let url = `${process.env.REACT_APP_URL_MAIN}/public/transaction/monthly_report_oi/export_monthly_report?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}&&months=${this.props.data.report_id === 22 ? 1 : 23 ? 2 : 24 ? 3 : 25 ? 4 : 27 ? 5 : 28 ? 6 : 29 ? 7 : 31 ? 8 : 32 ? 9 : 33 ? 10 : 35 ? 11 : 36 ? 12 : null}`
let url = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report_oi/export_monthly_report?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}&&months=${this.props.data.report_id === 22 ? 1 : 23 ? 2 : 24 ? 3 : 25 ? 4 : 27 ? 5 : 28 ? 6 : 29 ? 7 : 31 ? 8 : 32 ? 9 : 33 ? 10 : 35 ? 11 : 36 ? 12 : null}`
console.log(url);
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/monthly_report_oi/export_monthly_report?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}&&months=${this.props.data.report_id === 22 ? 1 : 23 ? 2 : 24 ? 3 : 25 ? 4 : 27 ? 5 : 28 ? 6 : 29 ? 7 : 31 ? 8 : 32 ? 9 : 33 ? 10 : 35 ? 11 : 36 ? 12 : null}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report_oi/export_monthly_report?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}&&months=${this.props.data.report_id === 22 ? 1 : 23 ? 2 : 24 ? 3 : 25 ? 4 : 27 ? 5 : 28 ? 6 : 29 ? 7 : 31 ? 8 : 32 ? 9 : 33 ? 10 : 35 ? 11 : 36 ? 12 : null}`
)
res = await res.blob()
this.setState({ loading: false })
......
......@@ -248,7 +248,7 @@ export default class ProfitLossMR extends Component {
downloadTemplate = async () => {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/monthly_report_pl/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report_pl/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
)
res = await res.blob()
// console.log(res)
......@@ -262,10 +262,10 @@ export default class ProfitLossMR extends Component {
}
async downloadAllData() {
let url = `${process.env.REACT_APP_URL_MAIN}/public/transaction/monthly_report_pl/export_monthly_report?monthly_report_id=${this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
let url = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report_pl/export_monthly_report?monthly_report_id=${this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
console.log(url);
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/monthly_report_pl/export_monthly_report?monthly_report_id=${this.props.monthlyReportId === null ? "" : this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report_pl/export_monthly_report?monthly_report_id=${this.props.monthlyReportId === null ? "" : this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
)
res = await res.blob()
this.setState({ loading: false })
......
......@@ -453,7 +453,7 @@ export default class TaxPlanningMR extends Component {
downloadTemplate = async () => {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/monthly_report_tp/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report_tp/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
)
res = await res.blob()
// console.log(res)
......@@ -467,8 +467,8 @@ export default class TaxPlanningMR extends Component {
}
async downloadAllData() {
let url = `${process.env.REACT_APP_URL_MAIN}/public/transaction/monthly_report_tp/export_monthly_report?monthly_report_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
let urls = `${process.env.REACT_APP_URL_MAIN}/public/transaction/monthly_report_tp/export_monthly_report?monthly_report_id=${this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
let url = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report_tp/export_monthly_report?monthly_report_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
let urls = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/monthly_report_tp/export_monthly_report?monthly_report_id=${this.props.monthlyReportId}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}&&months=${this.props.month.month_id}`
// console.log(url);
console.log(urls);
let res = await fetch(
......
......@@ -281,7 +281,7 @@ export default class BalanceSheet extends Component {
downloadTemplate = async () => {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/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_FE}/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}`
)
res = await res.blob()
// // console.log(res)
......@@ -299,7 +299,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]
// // console.log(bram)
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/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_FE}/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}`
)
res = await res.blob()
......
......@@ -431,7 +431,7 @@ export default class UserRole extends Component {
downloadFile = async () => {
let res = await fetch(
"${process.env.REACT_APP_URL_MAIN}/public/attachment/download_file?fileName=UserTemplate&&fileType=xlsx"
"${process.env.REACT_APP_URL_MAIN_FE}/public/attachment/download_file?fileName=UserTemplate&&fileType=xlsx"
)
res = await res.blob()
// console.log(res)
......@@ -445,7 +445,7 @@ export default class UserRole extends Component {
}
downloadDataTables = async () => {
let res = await fetch("${process.env.REACT_APP_URL_MAIN}/public/user/export_user")
let res = await fetch("${process.env.REACT_APP_URL_MAIN_FE}/public/user/export_user")
res = await res.blob()
// console.log(res)
if (res.size > 0) {
......
......@@ -579,10 +579,10 @@ export default class OutlookPA extends Component {
let length = name.split(".").length
let fileType = name.split(".")[length - 1]
// console.log(fileType);
let url = `${process.env.REACT_APP_URL_MAIN}/public/transaction/outlook_pa/download_attachment?fileName=${fileurl}&&fileType=${fileType}`
let url = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/outlook_pa/download_attachment?fileName=${fileurl}&&fileType=${fileType}`
// console.log(url);
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/outlook_pa/download_attachment?fileName=${fileurl}&&fileType=${fileType}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/outlook_pa/download_attachment?fileName=${fileurl}&&fileType=${fileType}`
)
res = await res.blob()
this.setState({ loading: false })
......
......@@ -207,7 +207,7 @@ export default class BalanceSheetOLPA extends Component {
downloadTemplate = async () => {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/outlook_pa/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/outlook_pa/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
)
res = await res.blob()
// console.log(res)
......@@ -364,10 +364,10 @@ export default class BalanceSheetOLPA extends Component {
}
async downloadAllData() {
let url = `${process.env.REACT_APP_URL_MAIN}/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=${this.props.outlook_pa_id}&&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_FE}/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=${this.props.outlook_pa_id}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
// console.log(url);
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=${this.props.outlook_pa_id === null ? "" : this.props.outlook_pa_id}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=${this.props.outlook_pa_id === null ? "" : this.props.outlook_pa_id}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
)
res = await res.blob()
this.setState({ loading: false })
......
......@@ -248,7 +248,7 @@ export default class ProfitLossOLPA extends Component {
downloadTemplate = async () => {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/outlook_pa/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/outlook_pa/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
)
res = await res.blob()
console.log(res)
......@@ -404,8 +404,8 @@ export default class ProfitLossOLPA extends Component {
}
async downloadAllData() {
let url = `${process.env.REACT_APP_URL_MAIN}/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=${this.props.outlook_pa_id}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
let sub_null = `${process.env.REACT_APP_URL_MAIN}/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=&&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_FE}/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=${this.props.outlook_pa_id}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
let sub_null = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
console.log(url);
let res = await fetch(
this.props.outlook_pa_id == null ? sub_null : url
......
......@@ -733,7 +733,7 @@ export default class TaxPlanningOLPA extends Component {
downloadTemplate = async () => {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/outlook_pa/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/outlook_pa/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
)
res = await res.blob()
// console.log(res)
......@@ -747,8 +747,8 @@ export default class TaxPlanningOLPA extends Component {
}
async downloadAllData() {
let url = `${process.env.REACT_APP_URL_MAIN}/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=${this.props.outlook_pa_id}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
let sub_null = `${process.env.REACT_APP_URL_MAIN}/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=&&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_FE}/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=${this.props.outlook_pa_id}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
let sub_null = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
// console.log(url);
let res = await fetch(
this.props.outlook_pa_id == null ? sub_null : url
......
......@@ -571,10 +571,10 @@ export default class RollingOutlook extends Component {
let length = name.split(".").length
let fileType = name.split(".")[length - 1]
console.log(fileType);
let url = `${process.env.REACT_APP_URL_MAIN}/public/transaction/master_budget/download_attachment?fileName=${fileurl}&&fileType=${fileType}`
let url = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/master_budget/download_attachment?fileName=${fileurl}&&fileType=${fileType}`
// console.log(url);
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/master_budget/download_attachment?fileName=${fileurl}&&fileType=${fileType}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/master_budget/download_attachment?fileName=${fileurl}&&fileType=${fileType}`
)
res = await res.blob()
this.setState({ loading: false })
......
......@@ -739,7 +739,7 @@ export default class TaxPlanning extends Component {
downloadTemplate = async () => {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
)
res = await res.blob()
// console.log(res)
......@@ -753,8 +753,8 @@ export default class TaxPlanning extends Component {
}
async downloadAllData() {
let url = `${process.env.REACT_APP_URL_MAIN}/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 sub_null = `${process.env.REACT_APP_URL_MAIN}/public/transaction/master_budget/export_master_budget?submission_id=&&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_FE}/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 sub_null = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/master_budget/export_master_budget?submission_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
// console.log(url);
let res = await fetch(
this.props.submissionID == null ? sub_null : url
......
......@@ -600,7 +600,7 @@ export default class Historical extends Component {
downloadTemplate = async () => {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
`${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
)
res = await res.blob()
// console.log(res)
......@@ -614,8 +614,8 @@ export default class Historical extends Component {
}
async downloadAllData() {
let url = `${process.env.REACT_APP_URL_MAIN}/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 sub_null = `${process.env.REACT_APP_URL_MAIN}/public/transaction/master_budget/export_master_budget?submission_id=&&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_FE}/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 sub_null = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/master_budget/export_master_budget?submission_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
// console.log(url);
let res = await fetch(
this.props.submissionID == null ? sub_null : url
......
......@@ -581,7 +581,7 @@ export default class SummaryOfTriputra extends Component {
if (this.state.report.value === 1) {
alert("Download MTD Report Coming Soon")
// let res = await fetch(
// `${process.env.REACT_APP_URL_MAIN}/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.lastRevision}`
// `${process.env.REACT_APP_URL_MAIN_FE}/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.lastRevision}`
// )
// res = await res.blob()
// this.setState({ loading: false })
......@@ -594,8 +594,8 @@ export default class SummaryOfTriputra extends Component {
// }
} else if (this.state.report.value === 2) {
alert("Download YTD Report Coming Soon")
// let url = `${process.env.REACT_APP_URL_MAIN}/public/transaction/db_report/export_master_budget?submission_id=${this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.lastRevision}`
// let sub_null = `${process.env.REACT_APP_URL_MAIN}/public/transaction/db_report/export_master_budget?submission_id=&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.lastRevision}`
// let url = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/db_report/export_master_budget?submission_id=${this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.lastRevision}`
// let sub_null = `${process.env.REACT_APP_URL_MAIN_FE}/public/transaction/db_report/export_master_budget?submission_id=&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.lastRevision}`
// // console.log(url);
// let res = await fetch(
// this.state.submissionID == null ? sub_null : url
......@@ -612,7 +612,7 @@ export default class SummaryOfTriputra extends Component {
} else if (this.state.report.value === 3) {
alert("Download CPSM Report Coming Soon")
// let res = await fetch(
// `${process.env.REACT_APP_URL_MAIN}/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.lastRevision}`
// `${process.env.REACT_APP_URL_MAIN_FE}/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.lastRevision}`
// )
// res = await res.blob()
// this.setState({ loading: false })
......@@ -626,7 +626,7 @@ export default class SummaryOfTriputra extends Component {
} else if (this.state.report.value === 4) {
alert("Download Historical Report Coming Soon")
// let res = await fetch(
// `${process.env.REACT_APP_URL_MAIN}/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.lastRevision}`
// `${process.env.REACT_APP_URL_MAIN_FE}/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.lastRevision}`
// )
// res = await res.blob()
// this.setState({ loading: false })
......
......@@ -3,7 +3,7 @@ const Constant = {
USER: 0,
EMAIL: 'TOKEN',
PASSWORD: 'PASSWORD',
URL_BE_DEV: '${process.env.REACT_APP_URL_MAIN}',
URL_BE_DEV: '${process.env.REACT_APP_URL_MAIN_FE}',
URL_BE_DEMO: 'https://tia.eksad.com/tia-reporting-demo',
URL_BE_PROD: 'https://dashboard.triputra-group.com/tia-reporting',
URL_FE_DEV: 'https://tia.eksad.com/tia-web-dev',
......
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