Commit ebf07473 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'didam' into 'master'

apdet

See merge request !934
parents ffb15871 d6a16624
...@@ -224,7 +224,7 @@ export default class Parameter extends Component { ...@@ -224,7 +224,7 @@ export default class Parameter extends Component {
downloadFile = async () => { downloadFile = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=ParameterTemplate&&fileType=xlsx" `${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=ParameterTemplate&&fileType=xlsx`
) )
res = await res.blob() res = await res.blob()
// console.log(res) // console.log(res)
...@@ -239,7 +239,7 @@ export default class Parameter extends Component { ...@@ -239,7 +239,7 @@ export default class Parameter extends Component {
downloadDataTable = async () => { downloadDataTable = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/setting/export_setting" `${process.env.REACT_APP_URL_MAIN_BE}/public/setting/export_setting`
) )
res = await res.blob() res = await res.blob()
// console.log(res) // console.log(res)
......
...@@ -468,7 +468,7 @@ export default class Perusahaan extends Component { ...@@ -468,7 +468,7 @@ export default class Perusahaan extends Component {
downloadFile = async () => { downloadFile = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=CompanyTemplate&&fileType=xlsx" `${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=CompanyTemplate&&fileType=xlsx`
) )
res = await res.blob() res = await res.blob()
console.log(res) console.log(res)
...@@ -483,7 +483,7 @@ export default class Perusahaan extends Component { ...@@ -483,7 +483,7 @@ export default class Perusahaan extends Component {
downloadDataTable = async () => { downloadDataTable = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/company/export_company" `${process.env.REACT_APP_URL_MAIN_BE}/public/company/export_company`
) )
res = await res.blob() res = await res.blob()
console.log(res) console.log(res)
......
...@@ -752,7 +752,7 @@ export default class ReportItems extends Component { ...@@ -752,7 +752,7 @@ export default class ReportItems extends Component {
downloadFile = async () => { downloadFile = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=ItemReportTemplate&&fileType=xlsx" `${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=ItemReportTemplate&&fileType=xlsx`
) )
res = await res.blob() res = await res.blob()
// console.log(res) // console.log(res)
...@@ -767,7 +767,7 @@ export default class ReportItems extends Component { ...@@ -767,7 +767,7 @@ export default class ReportItems extends Component {
downloadDataTable = async () => { downloadDataTable = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/item_report/export_item_report" `${process.env.REACT_APP_URL_MAIN_BE}/public/item_report/export_item_report`
) )
res = await res.blob() res = await res.blob()
// console.log(res) // console.log(res)
......
...@@ -418,7 +418,7 @@ export default class UnitBisnis extends Component { ...@@ -418,7 +418,7 @@ export default class UnitBisnis extends Component {
downloadFile = async () => { downloadFile = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=BusinessUnitTemplate&&fileType=xlsx" `${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=BusinessUnitTemplate&&fileType=xlsx`
) )
res = await res.blob() res = await res.blob()
console.log(res) console.log(res)
...@@ -433,7 +433,7 @@ export default class UnitBisnis extends Component { ...@@ -433,7 +433,7 @@ export default class UnitBisnis extends Component {
downloadDataTable = async () => { downloadDataTable = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/business_unit/export_business_unit" `${process.env.REACT_APP_URL_MAIN_BE}/public/business_unit/export_business_unit`
) )
res = await res.blob() res = await res.blob()
console.log(res) console.log(res)
......
...@@ -352,7 +352,8 @@ export default class BalanceSheetMR extends Component { ...@@ -352,7 +352,8 @@ export default class BalanceSheetMR extends Component {
periode: this.props.periode, periode: this.props.periode,
report_id: this.props.report_id, report_id: this.props.report_id,
balance_sheet: payload, balance_sheet: payload,
months: this.props.month.month_id months: this.props.month.month_id,
status: 'submitted'
} }
console.log(body) console.log(body)
this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[0][0] }) this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[0][0] })
...@@ -456,13 +457,15 @@ export default class BalanceSheetMR extends Component { ...@@ -456,13 +457,15 @@ export default class BalanceSheetMR extends Component {
"balance_sheet": data "balance_sheet": data
} }
console.log(body); console.log(body);
// console.log(JSON.stringify(body)); console.log(JSON.stringify(body));
console.log(body) console.log(body)
api.create('UPLOAD').uploadMonthlyReportBS(body).then(response => { api.create('UPLOAD').uploadMonthlyReportBS(body).then(response => {
console.log(response); console.log(response);
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.props.onClickClose() // this.props.onClickClose()
this.props.saveToMonthlyReport()
this.setState({loading: false, handleTekTekTek: 0})
// this.props.getReport() // this.props.getReport()
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleTekTekTek: 0 }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleTekTekTek: 0 }, () => {
......
...@@ -431,7 +431,7 @@ export default class UserRole extends Component { ...@@ -431,7 +431,7 @@ export default class UserRole extends Component {
downloadFile = async () => { downloadFile = async () => {
let res = await fetch( let res = await fetch(
"${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=UserTemplate&&fileType=xlsx" `${process.env.REACT_APP_URL_MAIN_BE}/public/attachment/download_file?fileName=UserTemplate&&fileType=xlsx`
) )
res = await res.blob() res = await res.blob()
// console.log(res) // console.log(res)
...@@ -445,7 +445,7 @@ export default class UserRole extends Component { ...@@ -445,7 +445,7 @@ export default class UserRole extends Component {
} }
downloadDataTables = async () => { downloadDataTables = async () => {
let res = await fetch("${process.env.REACT_APP_URL_MAIN_BE}/public/user/export_user") let res = await fetch(`${process.env.REACT_APP_URL_MAIN_BE}/public/user/export_user`)
res = await res.blob() res = await res.blob()
// console.log(res) // console.log(res)
if (res.size > 0) { if (res.size > 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment