Commit cf98c4e1 authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'deni-' into 'master'

download report DB

See merge request !645
parents f914de1d 0b978f34
...@@ -252,7 +252,8 @@ const create = (type = "") => { ...@@ -252,7 +252,8 @@ const create = (type = "") => {
// Monthly // Monthly
const getMonthlyReportID = (body) => api.post('transaction/monthly_report_bs/get_monthly_report_id', body) const getMonthlyReportID = (body) => api.post('transaction/monthly_report_bs/get_monthly_report_id', body)
const getHierarkiMontlyReport = (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 getHierarkiMontlyReportOI = (body) => api.post('transaction/monthly_report_oi/get_report_hierarki', body)
//Template //Template
const downloadTemplate = (fileName, fileType) => api.get(`attachment/download_file?fileName=${fileName}&&fileType=${fileType}`) const downloadTemplate = (fileName, fileType) => api.get(`attachment/download_file?fileName=${fileName}&&fileType=${fileType}`)
...@@ -435,7 +436,8 @@ const create = (type = "") => { ...@@ -435,7 +436,8 @@ const create = (type = "") => {
getSubmitOI, getSubmitOI,
getLastPeriodOI, getLastPeriodOI,
getDashboardUser, getDashboardUser,
getHierarkiMontlyReport, getHierarkiMontlyReportBS,
getHierarkiMontlyReportOI,
getDetailReportCF, getDetailReportCF,
getReportHierarkiPL, getReportHierarkiPL,
getMonthlyReportID, getMonthlyReportID,
......
...@@ -580,7 +580,7 @@ export default class SubHolding extends Component { ...@@ -580,7 +580,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(
`https://tia.eksad.com/tia-reporting-dev/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}` `https://tia.eksad.com/tia-reporting-dev/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() res = await res.blob()
this.setState({ loading: false }) this.setState({ loading: false })
...@@ -592,11 +592,8 @@ export default class SubHolding extends Component { ...@@ -592,11 +592,8 @@ export default class SubHolding extends Component {
a.click(); a.click();
} }
} else if (this.state.report.value === 2) { } else if (this.state.report.value === 2) {
let url = `https://tia.eksad.com/tia-reporting-dev/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 = `https://tia.eksad.com/tia-reporting-dev/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( let res = await fetch(
this.state.submissionID == null ? sub_null : url `https://tia.eksad.com/tia-reporting-dev/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() res = await res.blob()
this.setState({ loading: false }) this.setState({ loading: false })
...@@ -609,7 +606,7 @@ export default class SubHolding extends Component { ...@@ -609,7 +606,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(
`https://tia.eksad.com/tia-reporting-dev/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}` `https://tia.eksad.com/tia-reporting-dev/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() res = await res.blob()
this.setState({ loading: false }) this.setState({ loading: false })
...@@ -621,10 +618,10 @@ export default class SubHolding extends Component { ...@@ -621,10 +618,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 = `https://tia.eksad.com/tia-reporting-dev/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.lastRevision}` let url = `https://tia.eksad.com/tia-reporting-dev/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); console.log(url);
let res = await fetch( let res = await fetch(
`https://tia.eksad.com/tia-reporting-dev/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.lastRevision}` `https://tia.eksad.com/tia-reporting-dev/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() res = await res.blob()
this.setState({ loading: false }) this.setState({ loading: false })
......
...@@ -18,6 +18,7 @@ import ListOfCreditFacilities from './MonthlyReport/ListOfCreditFacilities' ...@@ -18,6 +18,7 @@ import ListOfCreditFacilities from './MonthlyReport/ListOfCreditFacilities'
import { PropagateLoader } from 'react-spinners'; import { PropagateLoader } from 'react-spinners';
import MuiAlert from '@material-ui/lab/Alert'; import MuiAlert from '@material-ui/lab/Alert';
import Constant from '../library/Constant'; import Constant from '../library/Constant';
import OperatingIndicatorMR from './MonthlyReport/OperatingIndicatorMR';
var ct = require("../library/CustomTable"); var ct = require("../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable()); const getMuiTheme = () => createMuiTheme(ct.customTable());
...@@ -44,6 +45,7 @@ export default class MonthlyReport extends Component { ...@@ -44,6 +45,7 @@ export default class MonthlyReport extends Component {
visiblePL: false, visiblePL: false,
visibleFAM: false, visibleFAM: false,
visibleCAT: false, visibleCAT: false,
visibleOI: false,
listAttachment: [], listAttachment: [],
visibleUpload: false, visibleUpload: false,
lastRevision: 0, lastRevision: 0,
...@@ -325,6 +327,7 @@ export default class MonthlyReport extends Component { ...@@ -325,6 +327,7 @@ export default class MonthlyReport extends Component {
visibleFAM: false, visibleFAM: false,
visibleTP: false, visibleTP: false,
visibleLOCF: false, visibleLOCF: false,
visibleOI: false,
}) })
} else if (item === 'Profit Loss') { } else if (item === 'Profit Loss') {
this.setState({ this.setState({
...@@ -335,6 +338,7 @@ export default class MonthlyReport extends Component { ...@@ -335,6 +338,7 @@ export default class MonthlyReport extends Component {
visibleFAM: false, visibleFAM: false,
visibleTP: false, visibleTP: false,
visibleLOCF: false, visibleLOCF: false,
visibleOI: false,
}) })
} else if (item === 'Tax Planning') { } else if (item === 'Tax Planning') {
this.setState({ this.setState({
...@@ -345,6 +349,7 @@ export default class MonthlyReport extends Component { ...@@ -345,6 +349,7 @@ export default class MonthlyReport extends Component {
visibleFAM: false, visibleFAM: false,
visibleTP: true, visibleTP: true,
visibleLOCF: false, visibleLOCF: false,
visibleOI: false,
}) })
} else if (item === 'Fixed Assets Movement') { } else if (item === 'Fixed Assets Movement') {
this.setState({ this.setState({
...@@ -355,6 +360,7 @@ export default class MonthlyReport extends Component { ...@@ -355,6 +360,7 @@ export default class MonthlyReport extends Component {
visibleFAM: true, visibleFAM: true,
visibleTP: false, visibleTP: false,
visibleLOCF: false, visibleLOCF: false,
visibleOI: false,
}) })
} else if (item === 'CAT') { } else if (item === 'CAT') {
this.setState({ this.setState({
...@@ -365,6 +371,7 @@ export default class MonthlyReport extends Component { ...@@ -365,6 +371,7 @@ export default class MonthlyReport extends Component {
visibleFAM: false, visibleFAM: false,
visibleTP: false, visibleTP: false,
visibleLOCF: false, visibleLOCF: false,
visibleOI: false,
}) })
} else if (item === 'List of Credit Facilities') { } else if (item === 'List of Credit Facilities') {
this.setState({ this.setState({
...@@ -375,6 +382,18 @@ export default class MonthlyReport extends Component { ...@@ -375,6 +382,18 @@ export default class MonthlyReport extends Component {
visibleFAM: false, visibleFAM: false,
visibleTP: false, visibleTP: false,
visibleLOCF: true, visibleLOCF: true,
visibleOI: false,
})
} else if (item === 'Operating Indicator') {
this.setState({
visibleMonthlyReport: false,
visibleBS: false,
visiblePL: false,
visibleCAT: false,
visibleFAM: false,
visibleTP: false,
visibleLOCF: false,
visibleOI: true,
}) })
} }
}) })
...@@ -810,6 +829,20 @@ export default class MonthlyReport extends Component { ...@@ -810,6 +829,20 @@ export default class MonthlyReport extends Component {
isAprrover={false} isAprrover={false}
/> />
)} )}
{this.state.visibleOI && (
<OperatingIndicatorMR
open={this.props.open}
report_id={this.state.report_id}
height={this.props.height}
width={this.props.width}
company={this.state.company}
revision={this.state.revisionTable}
periode={this.state.periode.periode}
monthlyReportId={this.state.monthlyReportId}
month={this.state.month}
/>
)}
</div > </div >
); );
} }
......
...@@ -54,7 +54,7 @@ export default class BalanceSheetMR extends Component { ...@@ -54,7 +54,7 @@ export default class BalanceSheetMR extends Component {
"monthly_report_id": this.props.monthlyReportId, "monthly_report_id": this.props.monthlyReportId,
"month": this.props.month.month_id "month": this.props.month.month_id
} }
api.create().getHierarkiMontlyReport(payload).then(response => { api.create().getHierarkiMontlyReportBS(payload).then(response => {
console.log(response); console.log(response);
let dataTable = [] let dataTable = []
if (response.data) { if (response.data) {
......
This diff is collapsed.
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