Commit 3e6690e3 authored by qorri_di's avatar qorri_di

Merge branch 'ENV-DEPLOYMENT' into 'ENV-DEV'

# Conflicts:
#   src/library/Utils.js
parents f6d9257f 0336cf03
...@@ -133,24 +133,28 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -133,24 +133,28 @@ export default class CorporateAnnualTargetMR extends Component {
} }
getParameterGroup() { getParameterGroup() {
api.create().getParameterByGroupName({ this.setState({ loading: true }, () => {
"group_name": 'ACHIEVEMENT_KPI' api.create().getParameterByGroupName({
}).then((response) => { "group_name": 'ACHIEVEMENT_KPI'
console.log(response.data) }).then((response) => {
if (response.data) { console.log(response.data)
this.setState({ parameterScore: response.data.data }) if (response.data) {
} this.setState({ parameterScore: response.data.data, loading: false })
}
})
}) })
} }
getParameterGroupPerfom() { getParameterGroupPerfom() {
api.create().getParameterByGroupName({ this.setState({ loading: true }, () => {
"group_name": "PERFORMANCE_KPI" api.create().getParameterByGroupName({
}).then((response) => { "group_name": "PERFORMANCE_KPI"
console.log(response.data) }).then((response) => {
if (response.data) { console.log(response.data)
this.setState({ parameterPerfom: response.data.data }) if (response.data) {
} this.setState({ parameterPerfom: response.data.data, loading: false })
}
})
}) })
} }
...@@ -582,7 +586,9 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -582,7 +586,9 @@ export default class CorporateAnnualTargetMR extends Component {
getOptionLabel: (option) => titleCase(option.value), getOptionLabel: (option) => titleCase(option.value),
}; };
// setTimeout(() => { // setTimeout(() => {
this.setState({ maxAchList: defaultProps }) this.setState({ maxAchList: defaultProps }, () => {
this.getItemHierarki()
})
// }, 300); // }, 300);
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => { this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
...@@ -601,7 +607,7 @@ export default class CorporateAnnualTargetMR extends Component { ...@@ -601,7 +607,7 @@ export default class CorporateAnnualTargetMR extends Component {
} else { } else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' }) this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
} }
this.getItemHierarki()
}) })
} }
......
...@@ -826,14 +826,14 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -826,14 +826,14 @@ export default class CorporateAnnualTargetRO extends Component {
} else { } else {
let convertID = -1 let convertID = -1
if (tableMeta.rowData[11].value == 'FORMULA') { if (tableMeta.rowData[10].value == 'FORMULA') {
let indexIDReport = dataTable2.findIndex((val) => val[1] == item) let indexIDReport = dataTable2.findIndex((val) => val[1] == item)
convertID = dataTable2[indexIDReport][31] convertID = dataTable2[indexIDReport][26]
} }
let indexID = dataTable2.findIndex((val) => val[31] == (convertID == -1 ? item : convertID)) let indexID = dataTable2.findIndex((val) => val[26] == (convertID == -1 ? item : convertID))
if (indexID !== -1) { if (indexID !== -1) {
let valuezz = dataTable2[indexID][tableMeta.columnIndex].value == undefined ? dataTable2[indexID][tableMeta.columnIndex] : dataTable2[indexID][tableMeta.columnIndex].value let valuezz = dataTable2[indexID][tableMeta.columnIndex].value == undefined ? dataTable2[indexID][tableMeta.columnIndex] : dataTable2[indexID][tableMeta.columnIndex].value
if (item == dataTable2[tableMeta.rowIndex][31]) { if (item == dataTable2[tableMeta.rowIndex][26]) {
anjay.push(0) anjay.push(0)
} else { } else {
anjay.push(valuezz == "" ? "0" : valuezz) anjay.push(valuezz == "" ? "0" : valuezz)
...@@ -847,8 +847,8 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -847,8 +847,8 @@ export default class CorporateAnnualTargetRO extends Component {
} }
}) })
// if (tableMeta.rowData[11].value == 'FORMULA') { // if (tableMeta.rowData[11].value == 'FORMULA') {
// console.log(anjay) // console.log(anjay)
// console.log(column) // console.log(column)
// } // }
...@@ -1445,7 +1445,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1445,7 +1445,7 @@ export default class CorporateAnnualTargetRO extends Component {
{ {
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ? tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null : null :
this.state.get_for == "view" ? this.state.get_for == "view" || this.props.quartal == "q2" || this.props.quartal == "q3" ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
...@@ -1545,7 +1545,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1545,7 +1545,7 @@ export default class CorporateAnnualTargetRO extends Component {
{ {
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ? tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null : null :
this.state.get_for == "view" ? this.state.get_for == "view" || this.props.quartal == "q2" || this.props.quartal == "q3" ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
...@@ -1645,7 +1645,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1645,7 +1645,7 @@ export default class CorporateAnnualTargetRO extends Component {
{ {
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ? tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null : null :
this.state.get_for == "view" ? this.state.get_for == "view" || this.props.quartal == "q2" || this.props.quartal == "q3" ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
...@@ -1745,7 +1745,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1745,7 +1745,7 @@ export default class CorporateAnnualTargetRO extends Component {
{ {
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ? tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null : null :
this.state.get_for == "view" ? this.state.get_for == "view" || this.props.quartal == "q3" ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
...@@ -1845,7 +1845,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1845,7 +1845,7 @@ export default class CorporateAnnualTargetRO extends Component {
{ {
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ? tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null : null :
this.state.get_for == "view" ? this.state.get_for == "view" || this.props.quartal == "q3" ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
...@@ -1945,7 +1945,7 @@ export default class CorporateAnnualTargetRO extends Component { ...@@ -1945,7 +1945,7 @@ export default class CorporateAnnualTargetRO extends Component {
{ {
tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ? tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 || tableMeta.rowData[0] === 4 ?
null : null :
this.state.get_for == "view" ? this.state.get_for == "view" || this.props.quartal == "q3" ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
......
...@@ -9,7 +9,7 @@ export function titleCase(text) { ...@@ -9,7 +9,7 @@ export function titleCase(text) {
export function roundMath(number, decimalPlaces) { export function roundMath(number, decimalPlaces) {
const factorOfTen = Math.pow(10, decimalPlaces) const factorOfTen = Math.pow(10, decimalPlaces)
return Math.round(number * factorOfTen) / factorOfTen return Math.round(number * factorOfTen) / factorOfTen
} }
export function fixNumber(num, decimalCount = 2) { export function fixNumber(num, decimalCount = 2) {
......
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