Commit d5e4ba43 authored by EKSAD's avatar EKSAD

matiin console log

parent cd5fe3ce
This diff is collapsed.
......@@ -58,7 +58,7 @@ export default class OperatingIndicator extends Component {
menu: "operating indicator"
}
api.create().getPermission(payload).then(response => {
console.log(response)
// console.log(response)
if (response.data) {
if (response.data.status === "success") {
this.setState({
......@@ -76,7 +76,7 @@ export default class OperatingIndicator extends Component {
getLastPeriod() {
api.create().getLastPeriodOI(this.state.company.company_id).then(response => {
console.log(response);
// console.log(response);
if (response.data.status === "success") {
this.setState({ lastPeriod: response.data.data.last_periode, latestPeriode: response.data.data.latest_periode }, () => {
this.getPeriode()
......@@ -97,7 +97,7 @@ export default class OperatingIndicator extends Component {
this.setState({ listAttachment: response.data.data })
}
}
// console.log(response);
// // console.log(response);
})
}
......@@ -108,7 +108,7 @@ export default class OperatingIndicator extends Component {
"report_type": "operating indicator",
}
api.create().getAllOperatingInd(payload).then(response => {
console.log(response);
// console.log(response);
if (response.data) {
if (response.data.status === "success") {
let dataTable = response.data.data.map((item, index) => {
......@@ -120,7 +120,7 @@ export default class OperatingIndicator extends Component {
item.is_can_upload
]
})
// console.log(dataTable);
// // console.log(dataTable);
this.setState({ dataTable, dataReport: response.data.data })
}
}
......@@ -220,17 +220,17 @@ export default class OperatingIndicator extends Component {
if (item >= 2000 && item <= (Number(currentYear) + 1)) {
data.push(item)
}
console.log('bibim')
// console.log('bibim')
} else {
if ((item >= 2000) && (item == this.state.lastPeriod || item < this.state.lastPeriod)) {
data.push(item)
}
console.log('bubum')
// console.log('bubum')
}
})
console.log(this.state.lastPeriod)
console.log(this.state.lastPeriod)
console.log(this.state.isApprover)
// console.log(this.state.lastPeriod)
// console.log(this.state.lastPeriod)
// console.log(this.state.isApprover)
let periodeData = data.map((item) => {
return {
periode: item,
......@@ -240,7 +240,7 @@ export default class OperatingIndicator extends Component {
options: periodeData,
getOptionLabel: (option) => option.periode,
};
console.log(defaultProps)
// console.log(defaultProps)
let periode = (this.state.lastPeriod == "" ? String(Number(currentYear) + 1) : this.state.lastPeriod)
let index = data.sort((a, b) => a - b).findIndex((val) => val === periode)
this.setState({ listPeriode: defaultProps, periode: index == -1 ? periodeData[0] : periodeData[index] }, () => {
......@@ -257,7 +257,7 @@ export default class OperatingIndicator extends Component {
"periode": this.state.periode.periode
}
api.create().getRevision(payload).then(response => {
console.log(response);
// console.log(response);
if (response.data) {
if (response.data.status === "success") {
let data = response.data.data
......@@ -286,7 +286,7 @@ export default class OperatingIndicator extends Component {
}
api.create().getOpetratingIndID(payload).then(response => {
if (response) {
console.log(response.data.data)
// console.log(response.data.data)
this.getLatestPeriodSubmit()
if (response.data.data) {
this.setState({ operatingIndID: response.data.data.operating_indicator_id })
......@@ -303,7 +303,7 @@ export default class OperatingIndicator extends Component {
"periode": this.state.periode.periode
}
api.create().getSubmitOI(body).then(response => {
console.log(response);
// console.log(response);
if (response.data) {
if (response.data.status === "success") {
this.setState({ isSubmit: response.data.data.is_can_submit }, () => {
......@@ -335,9 +335,9 @@ export default class OperatingIndicator extends Component {
fileHandler = (event) => {
let fileObj = event
ExcelRenderer(fileObj, (err, resp) => {
// console.log(resp)
// // console.log(resp)
if (err) {
console.log(err);
// console.log(err);
}
else {
const formData = new FormData();
......@@ -360,7 +360,7 @@ export default class OperatingIndicator extends Component {
})
}
}
// console.log(response)
// // console.log(response)
})
}
......@@ -390,7 +390,7 @@ export default class OperatingIndicator extends Component {
// <Select
// value={val}
// onChange={event => {
// // console.log(event.target)
// // // console.log(event.target)
// updateValue(event.target.value)
// this.handleChange(event.target.value, tableMeta)
// }}
......
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