Commit 601b72ac authored by rifkaki's avatar rifkaki

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into rifka

parents 0d1f7686 db7865a6
......@@ -111,6 +111,7 @@ export default class OperatingIndicator extends Component {
"periode": this.state.periode.periode,
"report_type": "operating indicator",
}
console.log(payload);
api.create().getAllOperatingInd(payload).then(response => {
console.log(response);
if (response.data) {
......@@ -312,6 +313,18 @@ export default class OperatingIndicator extends Component {
})
} else if (String(item[1]).toLocaleLowerCase().includes("monthly report")) {
console.log(item);
let month = String(item[1]).toLocaleLowerCase().includes('jan') ? 1 :
String(item[1]).toLocaleLowerCase().includes('feb') ? 2 :
String(item[1]).toLocaleLowerCase().includes('mar') ? 3 :
String(item[1]).toLocaleLowerCase().includes('apr') ? 4 :
String(item[1]).toLocaleLowerCase().includes('may') ? 5 :
String(item[1]).toLocaleLowerCase().includes('jun') ? 6 :
String(item[1]).toLocaleLowerCase().includes('jul') ? 7 :
String(item[1]).toLocaleLowerCase().includes('aug') ? 8 :
String(item[1]).toLocaleLowerCase().includes('sep') ? 9 :
String(item[1]).toLocaleLowerCase().includes('oct') ? 10 :
String(item[1]).toLocaleLowerCase().includes('nov') ? 11 :
String(item[1]).toLocaleLowerCase().includes('dec') ? 12 : null
this.setState({
statusDetail: String(item[2]).toLocaleLowerCase(),
dataDetail: { ...this.state.dataReport[index], periode: this.state.periode.periode, operatingIndID: this.state.operatingIndID, company: this.state.company },
......@@ -319,7 +332,7 @@ export default class OperatingIndicator extends Component {
visibleDetailOpt: false,
visibleDetailMonthly: true,
visibleDetailRolling: false,
months: 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 : 0
months: month
})
......
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