Commit 0e6848c6 authored by Riri Novita's avatar Riri Novita

oi++

parent 79c67efb
...@@ -698,7 +698,7 @@ export default class ProfitLossMR extends Component { ...@@ -698,7 +698,7 @@ export default class ProfitLossMR extends Component {
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
value={tableMeta.rowData[9]} value={tableMeta.rowData[7]}
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
......
...@@ -255,34 +255,6 @@ export default class OperatingIndicator extends Component { ...@@ -255,34 +255,6 @@ export default class OperatingIndicator extends Component {
}) })
} }
getRevision() {
let payload = {
"company_id": this.state.company.company_id,
"periode": this.state.periode.periode
}
api.create().getRevision(payload).then(response => {
// console.log(response);
if (response.data) {
if (response.data.status === "success") {
let data = response.data.data
let revisionData = data.map((item) => {
return {
revision: item,
}
})
let defaultProps = {
options: revisionData,
getOptionLabel: (option) => option.revision,
};
this.setState({ listRevision: defaultProps, revision: revisionData[0] }, () => {
this.getReport()
this.getReportAttachment()
})
}
}
})
}
getOperatingID() { getOperatingID() {
let payload = { let payload = {
"company_id": this.state.company.company_id, "company_id": this.state.company.company_id,
...@@ -410,6 +382,13 @@ export default class OperatingIndicator extends Component { ...@@ -410,6 +382,13 @@ export default class OperatingIndicator extends Component {
}) })
} }
saveMonthlyOI(payload) {
api.create().createMonthlyReportOI(payload).then((response) => {
this.getReport()
this.getOperatingID()
})
}
render() { render() {
const columns = ["#", "Report Type", const columns = ["#", "Report Type",
// { // {
...@@ -639,7 +618,7 @@ export default class OperatingIndicator extends Component { ...@@ -639,7 +618,7 @@ export default class OperatingIndicator extends Component {
this.forceUpdate() this.forceUpdate()
})} })}
getReport={() => this.getOperatingID()} getReport={() => this.getOperatingID()}
saveOperatingInd={this.saveOperatingInd.bind(this)} saveMonthlyOI={this.saveMonthlyOI.bind(this)}
isSubmit={this.state.statusDetail == 'closed'? false : this.state.isSubmit} isSubmit={this.state.statusDetail == 'closed'? false : this.state.isSubmit}
permission={{ create: this.state.buttonCreate, edit: this.state.buttonEdit, delete: this.state.buttonDelete }} permission={{ create: this.state.buttonCreate, edit: this.state.buttonEdit, delete: this.state.buttonDelete }}
/> />
......
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