Commit 24ac913b authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'riri' into 'master'

matiin console log

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