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

apdet

parent ffb15871
......@@ -224,7 +224,7 @@ export default class Parameter extends Component {
downloadFile = async () => {
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()
// 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_BE}/public/setting/export_setting"
`${process.env.REACT_APP_URL_MAIN_BE}/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_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()
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_BE}/public/company/export_company"
`${process.env.REACT_APP_URL_MAIN_BE}/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_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()
// 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_BE}/public/item_report/export_item_report"
`${process.env.REACT_APP_URL_MAIN_BE}/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_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()
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_BE}/public/business_unit/export_business_unit"
`${process.env.REACT_APP_URL_MAIN_BE}/public/business_unit/export_business_unit`
)
res = await res.blob()
console.log(res)
......
......@@ -352,7 +352,8 @@ export default class BalanceSheetMR extends Component {
periode: this.props.periode,
report_id: this.props.report_id,
balance_sheet: payload,
months: this.props.month.month_id
months: this.props.month.month_id,
status: 'submitted'
}
console.log(body)
this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[0][0] })
......@@ -456,13 +457,15 @@ export default class BalanceSheetMR extends Component {
"balance_sheet": data
}
console.log(body);
// console.log(JSON.stringify(body));
console.log(JSON.stringify(body));
console.log(body)
api.create('UPLOAD').uploadMonthlyReportBS(body).then(response => {
console.log(response);
if (response.data) {
if (response.data.status === "success") {
this.props.onClickClose()
// this.props.onClickClose()
this.props.saveToMonthlyReport()
this.setState({loading: false, handleTekTekTek: 0})
// this.props.getReport()
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleTekTekTek: 0 }, () => {
......
......@@ -431,7 +431,7 @@ export default class UserRole extends Component {
downloadFile = async () => {
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()
// 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_BE}/public/user/export_user")
let res = await fetch(`${process.env.REACT_APP_URL_MAIN_BE}/public/user/export_user`)
res = await res.blob()
// console.log(res)
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