Commit 3a7aef76 authored by Riri Novita's avatar Riri Novita

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

parents 833c9a31 cf98c4e1
......@@ -252,7 +252,8 @@ const create = (type = "") => {
// Monthly
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
const downloadTemplate = (fileName, fileType) => api.get(`attachment/download_file?fileName=${fileName}&&fileType=${fileType}`)
......@@ -435,7 +436,8 @@ const create = (type = "") => {
getSubmitOI,
getLastPeriodOI,
getDashboardUser,
getHierarkiMontlyReport,
getHierarkiMontlyReportBS,
getHierarkiMontlyReportOI,
getDetailReportCF,
getReportHierarkiPL,
getMonthlyReportID,
......
......@@ -580,7 +580,7 @@ export default class SubHolding extends Component {
async downloadAllData() {
if (this.state.report.value === 1) {
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()
this.setState({ loading: false })
......@@ -592,11 +592,8 @@ export default class SubHolding extends Component {
a.click();
}
} 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(
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()
this.setState({ loading: false })
......@@ -609,7 +606,7 @@ export default class SubHolding extends Component {
}
} else if (this.state.report.value === 3) {
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()
this.setState({ loading: false })
......@@ -621,10 +618,10 @@ export default class SubHolding extends Component {
a.click();
}
} 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);
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()
this.setState({ loading: false })
......
......@@ -18,6 +18,7 @@ import ListOfCreditFacilities from './MonthlyReport/ListOfCreditFacilities'
import { PropagateLoader } from 'react-spinners';
import MuiAlert from '@material-ui/lab/Alert';
import Constant from '../library/Constant';
import OperatingIndicatorMR from './MonthlyReport/OperatingIndicatorMR';
var ct = require("../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable());
......@@ -44,6 +45,7 @@ export default class MonthlyReport extends Component {
visiblePL: false,
visibleFAM: false,
visibleCAT: false,
visibleOI: false,
listAttachment: [],
visibleUpload: false,
lastRevision: 0,
......@@ -325,6 +327,7 @@ export default class MonthlyReport extends Component {
visibleFAM: false,
visibleTP: false,
visibleLOCF: false,
visibleOI: false,
})
} else if (item === 'Profit Loss') {
this.setState({
......@@ -335,6 +338,7 @@ export default class MonthlyReport extends Component {
visibleFAM: false,
visibleTP: false,
visibleLOCF: false,
visibleOI: false,
})
} else if (item === 'Tax Planning') {
this.setState({
......@@ -345,6 +349,7 @@ export default class MonthlyReport extends Component {
visibleFAM: false,
visibleTP: true,
visibleLOCF: false,
visibleOI: false,
})
} else if (item === 'Fixed Assets Movement') {
this.setState({
......@@ -355,6 +360,7 @@ export default class MonthlyReport extends Component {
visibleFAM: true,
visibleTP: false,
visibleLOCF: false,
visibleOI: false,
})
} else if (item === 'CAT') {
this.setState({
......@@ -365,6 +371,7 @@ export default class MonthlyReport extends Component {
visibleFAM: false,
visibleTP: false,
visibleLOCF: false,
visibleOI: false,
})
} else if (item === 'List of Credit Facilities') {
this.setState({
......@@ -375,6 +382,18 @@ export default class MonthlyReport extends Component {
visibleFAM: false,
visibleTP: false,
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 {
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 >
);
}
......
......@@ -54,7 +54,7 @@ export default class BalanceSheetMR extends Component {
"monthly_report_id": this.props.monthlyReportId,
"month": this.props.month.month_id
}
api.create().getHierarkiMontlyReport(payload).then(response => {
api.create().getHierarkiMontlyReportBS(payload).then(response => {
console.log(response);
let dataTable = []
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