Commit 80c7dec5 authored by Riri Novita's avatar Riri Novita

latest update

parent dc904c50
......@@ -72,13 +72,13 @@ export default class OperatingIndicatorMR extends Component {
componentDidMount() {
// this.getItemHierarki()
this.getSettingControl()
this.getLatestUpdate()
// this.getLatestUpdate()
}
handleGetFor(type) {
this.setState({get_for: type}, () => {
this.getSettingControl()
this.getLatestUpdate()
// this.getLatestUpdate()
})
}
......@@ -90,8 +90,9 @@ export default class OperatingIndicatorMR extends Component {
"periode": this.props.data.periode,
"months": this.props.data.report_id === 22 ? 1 : 23 ? 2 : 24 ? 3 : 25 ? 4 : 27 ? 5 : 28 ? 6 : 29 ? 7 : 31 ? 8 : 32 ? 9 : 33 ? 10 : 35 ? 11 : 36 ? 12 : null
}
// console.log(payload);
api.create().getLastestUpdateMROI(payload).then(response => {
console.log(response.data)
// console.log(response.data)
if (response.data) {
if (response.data.status === "success") {
this.setState({
......@@ -122,7 +123,7 @@ export default class OperatingIndicatorMR extends Component {
}
api.create().getAllSettingByType(body).then(response => {
console.log(response);
// console.log(response);
if (response.data) {
if (response.data.status === 'success') {
this.setState({
......@@ -155,15 +156,17 @@ export default class OperatingIndicatorMR extends Component {
"months": this.props.data.report_id === 22 ? 1 : 23 ? 2 : 24 ? 3 : 25 ? 4 : 27 ? 5 : 28 ? 6 : 29 ? 7 : 31 ? 8 : 32 ? 9 : 33 ? 10 : 35 ? 11 : 36 ? 12 : null
}
api.create().getMonthlyOI(payload).then(response => {
console.log(response);
// console.log(response);
if (response) {
if (response.data.data) {
this.setState({ operatingIndIDMonthly: response.data.data.operating_indicator_id } , () => {
this.getItemHierarki()
this.getLatestUpdate()
})
} else {
this.setState({ operatingIndIDMonthly: null }, () => {
this.getItemHierarki()
this.getLatestUpdate()
})
}
}
......@@ -180,13 +183,13 @@ export default class OperatingIndicatorMR extends Component {
"months": this.props.data.report_id === 22 ? 1 : 23 ? 2 : 24 ? 3 : 25 ? 4 : 27 ? 5 : 28 ? 6 : 29 ? 7 : 31 ? 8 : 32 ? 9 : 33 ? 10 : 35 ? 11 : 36 ? 12 : null,
"get_for": this.state.get_for
}
console.log(payload);
// console.log(payload);
api.create().getHierarkiMontlyReportOI(payload).then(response => {
console.log(response);
// console.log(response);
let dataTable = []
if (response.data) {
let res = response.data.data
console.log(res);
// console.log(res);
const handlePushChild = (item) => {
let indexIDzz = dataTable.findIndex((val) => val[1] === item.id)
if (indexIDzz === -1) {
......@@ -254,7 +257,7 @@ export default class OperatingIndicatorMR extends Component {
}
})
}
console.log(dataTable);
// console.log(dataTable);
})
}
......
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