Commit 8b272063 authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'riri' into 'master'

cpsm

See merge request !646
parents d109e747 3a7aef76
...@@ -4,7 +4,7 @@ import Constant from '../../library/Constant' ...@@ -4,7 +4,7 @@ import Constant from '../../library/Constant'
import api from '../../api' import api from '../../api'
import { titleCase } from '../../library/Utils' import { titleCase } from '../../library/Utils'
import { Autocomplete } from '@material-ui/lab' import { Autocomplete } from '@material-ui/lab'
// import TableSubHolding from './TableSubHolding' import TableSummaryTriputra from './TableSummaryTriputra'
import { PropagateLoader } from 'react-spinners' import { PropagateLoader } from 'react-spinners'
import ReactTooltip from 'react-tooltip' import ReactTooltip from 'react-tooltip'
import Images from '../../assets/Images' import Images from '../../assets/Images'
...@@ -162,6 +162,42 @@ export default class SummaryOfTriputra extends Component { ...@@ -162,6 +162,42 @@ export default class SummaryOfTriputra extends Component {
}) })
} }
getReportType() {
let payload = {
"company_id": this.state.company.company_id,
"periode": this.state.periode.periode,
"report_type": "Master Budget",
}
api.create().getReportTypeBody(payload).then(response => {
console.log(response);
if (response.data) {
if (response.data.status === "success") {
if (this.state.report.value === 1) {
response.data.data.map((item, index) => {
if (item.report_name === 'MTD Report') {
this.setState({ revisionType: item.revision }, ()=> {
this.getSubmission()
})
}
})
} else if (this.state.report.value === 1) {
response.data.data.map((item, index) => {
if (item.report_name === 'YTD Report') {
this.setState({ revisionType: item.revision }, ()=> {
this.getSubmission()
})
}
})
} else {
this.setState({ revisionType: 0 }, ()=> {
this.getSubmission()
})
}
}
}
})
}
getSubmission() { getSubmission() {
this.setState({ loading: true }) this.setState({ loading: true })
let payload = { let payload = {
...@@ -709,8 +745,8 @@ export default class SummaryOfTriputra extends Component { ...@@ -709,8 +745,8 @@ export default class SummaryOfTriputra extends Component {
)} )}
</div> </div>
{this.state.loading && loadingComponent} {this.state.loading && loadingComponent}
{/* {this.state.previewTable && ( {this.state.previewTable && (
<TableSubHolding <TableSummaryTriputra
width={this.props.width} width={this.props.width}
height={this.props.height} height={this.props.height}
open={this.props.open} open={this.props.open}
...@@ -718,7 +754,7 @@ export default class SummaryOfTriputra extends Component { ...@@ -718,7 +754,7 @@ export default class SummaryOfTriputra extends Component {
dataTable={this.state.dataTable} dataTable={this.state.dataTable}
periode={this.state.periode ? this.state.periode.periode : null} periode={this.state.periode ? this.state.periode.periode : null}
/> />
)} */} )}
</div> </div>
</Paper> </Paper>
</div> </div>
......
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