Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Tia-dev
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dida Adams Arizona
Tia-dev
Commits
f2bb63cb
Commit
f2bb63cb
authored
Jan 14, 2021
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'didam' into 'master'
push dulu See merge request
!968
parents
b1233ae3
93601bb5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
665 additions
and
34 deletions
+665
-34
package-lock.json
package-lock.json
+443
-0
CorporateAnnualTargetMR.js
src/container/MonthlyReport/CorporateAnnualTargetMR.js
+222
-34
No files found.
package-lock.json
View file @
f2bb63cb
...
@@ -4,6 +4,11 @@
...
@@ -4,6 +4,11 @@
"lockfileVersion"
:
1
,
"lockfileVersion"
:
1
,
"requires"
:
true
,
"requires"
:
true
,
"dependencies"
:
{
"dependencies"
:
{
"@alloc/types"
:
{
"version"
:
"1.3.0"
,
"resolved"
:
"https://registry.npmjs.org/@alloc/types/-/types-1.3.0.tgz"
,
"integrity"
:
"sha512-mH7LiFiq9g6rX2tvt1LtwsclfG5hnsmtIfkZiauAGrm1AwXhoRS0sF2WrN9JGN7eV5vFXqNaB0eXZ3IvMsVi9g=="
},
"@babel/code-frame"
:
{
"@babel/code-frame"
:
{
"version"
:
"7.10.4"
,
"version"
:
"7.10.4"
,
"resolved"
:
"https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz"
,
"resolved"
:
"https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz"
,
...
@@ -1191,6 +1196,87 @@
...
@@ -1191,6 +1196,87 @@
}
}
}
}
},
},
"@devexpress/dx-chart-core"
:
{
"version"
:
"2.7.3"
,
"resolved"
:
"https://registry.npmjs.org/@devexpress/dx-chart-core/-/dx-chart-core-2.7.3.tgz"
,
"integrity"
:
"sha512-lR2ES0D5hLXJoruef2u5dW0OEo4tMwfIiaFXrFDZrnQ3oAycnzXJ6ULWsB3ody7vpeXYQ/2EekAF/A5+aRS7mw=="
,
"requires"
:
{
"d3-array"
:
"^2.4.0"
,
"d3-scale"
:
"^3.2.0"
,
"d3-shape"
:
"^1.3.7"
},
"dependencies"
:
{
"d3-array"
:
{
"version"
:
"2.9.1"
,
"resolved"
:
"https://registry.npmjs.org/d3-array/-/d3-array-2.9.1.tgz"
,
"integrity"
:
"sha512-Ob7RdOtkqsjx1NWyQHMFLtCSk6/aKTxDdC4ZIolX+O+mDD2RzrsYgAyc0WGAlfYFVELLSilS7w8BtE3PKM8bHg=="
},
"d3-scale"
:
{
"version"
:
"3.2.3"
,
"resolved"
:
"https://registry.npmjs.org/d3-scale/-/d3-scale-3.2.3.tgz"
,
"integrity"
:
"sha512-8E37oWEmEzj57bHcnjPVOBS3n4jqakOeuv1EDdQSiSrYnMCBdMd3nc4HtKk7uia8DUHcY/CGuJ42xxgtEYrX0g=="
,
"requires"
:
{
"d3-array"
:
"^2.3.0"
,
"d3-format"
:
"1 - 2"
,
"d3-interpolate"
:
"1.2.0 - 2"
,
"d3-time"
:
"1 - 2"
,
"d3-time-format"
:
"2 - 3"
}
}
}
},
"@devexpress/dx-core"
:
{
"version"
:
"2.7.3"
,
"resolved"
:
"https://registry.npmjs.org/@devexpress/dx-core/-/dx-core-2.7.3.tgz"
,
"integrity"
:
"sha512-FDky6X3+SuOylyMrtCjOyoku3LRN4VE2rIoxQ90G/tBkPLDjzR2dOYO1iR3pBpeP4Ib9Ifl0GaU9/YJeVGjnhQ=="
},
"@devexpress/dx-react-chart"
:
{
"version"
:
"2.7.3"
,
"resolved"
:
"https://registry.npmjs.org/@devexpress/dx-react-chart/-/dx-react-chart-2.7.3.tgz"
,
"integrity"
:
"sha512-6fJFefDN0IyQsv6Fd/f7BaadZNahrNWOVhc1IRdzkuSivbptyzGtIB08j8+RbXrGeoascjaOAGDF8z908f0/SQ=="
,
"requires"
:
{
"@devexpress/dx-chart-core"
:
"2.7.3"
,
"d3-scale"
:
"^3.2.0"
,
"d3-shape"
:
"^1.3.7"
},
"dependencies"
:
{
"d3-array"
:
{
"version"
:
"2.9.1"
,
"resolved"
:
"https://registry.npmjs.org/d3-array/-/d3-array-2.9.1.tgz"
,
"integrity"
:
"sha512-Ob7RdOtkqsjx1NWyQHMFLtCSk6/aKTxDdC4ZIolX+O+mDD2RzrsYgAyc0WGAlfYFVELLSilS7w8BtE3PKM8bHg=="
},
"d3-scale"
:
{
"version"
:
"3.2.3"
,
"resolved"
:
"https://registry.npmjs.org/d3-scale/-/d3-scale-3.2.3.tgz"
,
"integrity"
:
"sha512-8E37oWEmEzj57bHcnjPVOBS3n4jqakOeuv1EDdQSiSrYnMCBdMd3nc4HtKk7uia8DUHcY/CGuJ42xxgtEYrX0g=="
,
"requires"
:
{
"d3-array"
:
"^2.3.0"
,
"d3-format"
:
"1 - 2"
,
"d3-interpolate"
:
"1.2.0 - 2"
,
"d3-time"
:
"1 - 2"
,
"d3-time-format"
:
"2 - 3"
}
}
}
},
"@devexpress/dx-react-chart-material-ui"
:
{
"version"
:
"2.7.3"
,
"resolved"
:
"https://registry.npmjs.org/@devexpress/dx-react-chart-material-ui/-/dx-react-chart-material-ui-2.7.3.tgz"
,
"integrity"
:
"sha512-7Yc2I8u/n9Y7IlPx19Wmh7oeThSxp1yS2frE3n0z/Ebow5/yXB3TsFmcCfMfDG95GSgW1tCrmWULNvIf6LVrNQ=="
,
"requires"
:
{
"clsx"
:
"^1.0.4"
,
"prop-types"
:
"^15.7.2"
}
},
"@devexpress/dx-react-core"
:
{
"version"
:
"2.7.3"
,
"resolved"
:
"https://registry.npmjs.org/@devexpress/dx-react-core/-/dx-react-core-2.7.3.tgz"
,
"integrity"
:
"sha512-me8+ZhGxBjyTJq5STmnH7oAwsrhVrlb/vYaykB06BAerR04s9qwW4D7tzwCMFeeZN9I5DwBlV/pVU4PPT80TjA=="
,
"requires"
:
{
"@devexpress/dx-core"
:
"2.7.3"
,
"prop-types"
:
"^15.7.2"
}
},
"@emotion/cache"
:
{
"@emotion/cache"
:
{
"version"
:
"10.0.29"
,
"version"
:
"10.0.29"
,
"resolved"
:
"https://registry.npmjs.org/@emotion/cache/-/cache-10.0.29.tgz"
,
"resolved"
:
"https://registry.npmjs.org/@emotion/cache/-/cache-10.0.29.tgz"
,
...
@@ -1635,6 +1721,216 @@
...
@@ -1635,6 +1721,216 @@
"glob-to-regexp"
:
"^0.3.0"
"glob-to-regexp"
:
"^0.3.0"
}
}
},
},
"@nivo/annotations"
:
{
"version"
:
"0.67.0"
,
"resolved"
:
"https://registry.npmjs.org/@nivo/annotations/-/annotations-0.67.0.tgz"
,
"integrity"
:
"sha512-Qfracwd9we2nWBaNOAp0Lnt9uc86yRFDcQI3jsOdjFdzDA4lRwhkD85Lq477w1XrU7mtpjeRGsaKTCJtaorWEg=="
,
"requires"
:
{
"@nivo/colors"
:
"0.67.0"
,
"lodash"
:
"^4.17.11"
,
"react-spring"
:
"9.0.0-rc.3"
}
},
"@nivo/axes"
:
{
"version"
:
"0.67.0"
,
"resolved"
:
"https://registry.npmjs.org/@nivo/axes/-/axes-0.67.0.tgz"
,
"integrity"
:
"sha512-csqEgFoJQGoB5/TDSy7SXCy/2QSdrfSa51AMU/RhzpnZ35wNO/zHkEfP+ApvB8nuuwVuBNOShio80PNZOOD+Og=="
,
"requires"
:
{
"@nivo/scales"
:
"0.67.0"
,
"d3-format"
:
"^1.4.4"
,
"d3-time"
:
"^1.0.11"
,
"d3-time-format"
:
"^2.1.3"
,
"react-spring"
:
"9.0.0-rc.3"
}
},
"@nivo/bar"
:
{
"version"
:
"0.67.0"
,
"resolved"
:
"https://registry.npmjs.org/@nivo/bar/-/bar-0.67.0.tgz"
,
"integrity"
:
"sha512-Y8sIN3iW6r1nS/bWXkSOuWR1mekkVI0yF0uo0IHIXRA+cvhwSChYuH8nIKFbaSd4f4DM3SCogFoGj5ILooRneg=="
,
"requires"
:
{
"@nivo/annotations"
:
"0.67.0"
,
"@nivo/axes"
:
"0.67.0"
,
"@nivo/colors"
:
"0.67.0"
,
"@nivo/legends"
:
"0.67.0"
,
"@nivo/scales"
:
"0.67.0"
,
"@nivo/tooltip"
:
"0.67.0"
,
"d3-scale"
:
"^3.0.0"
,
"d3-shape"
:
"^1.2.2"
,
"lodash"
:
"^4.17.11"
,
"react-motion"
:
"^0.5.2"
,
"recompose"
:
"^0.30.0"
},
"dependencies"
:
{
"d3-array"
:
{
"version"
:
"2.9.1"
,
"resolved"
:
"https://registry.npmjs.org/d3-array/-/d3-array-2.9.1.tgz"
,
"integrity"
:
"sha512-Ob7RdOtkqsjx1NWyQHMFLtCSk6/aKTxDdC4ZIolX+O+mDD2RzrsYgAyc0WGAlfYFVELLSilS7w8BtE3PKM8bHg=="
},
"d3-scale"
:
{
"version"
:
"3.2.3"
,
"resolved"
:
"https://registry.npmjs.org/d3-scale/-/d3-scale-3.2.3.tgz"
,
"integrity"
:
"sha512-8E37oWEmEzj57bHcnjPVOBS3n4jqakOeuv1EDdQSiSrYnMCBdMd3nc4HtKk7uia8DUHcY/CGuJ42xxgtEYrX0g=="
,
"requires"
:
{
"d3-array"
:
"^2.3.0"
,
"d3-format"
:
"1 - 2"
,
"d3-interpolate"
:
"1.2.0 - 2"
,
"d3-time"
:
"1 - 2"
,
"d3-time-format"
:
"2 - 3"
}
}
}
},
"@nivo/colors"
:
{
"version"
:
"0.67.0"
,
"resolved"
:
"https://registry.npmjs.org/@nivo/colors/-/colors-0.67.0.tgz"
,
"integrity"
:
"sha512-y8x76SzQ4HYm6kkWYfBGQSE5fy/jtqGhCBjivlKsouU9Hv2G8g4a2JVMsfadJQHQIUjIsM/7Q0Y7zasFM9wkgA=="
,
"requires"
:
{
"d3-color"
:
"^2.0.0"
,
"d3-scale"
:
"^3.0.0"
,
"d3-scale-chromatic"
:
"^2.0.0"
,
"lodash"
:
"^4.17.11"
,
"react-motion"
:
"^0.5.2"
},
"dependencies"
:
{
"d3-array"
:
{
"version"
:
"2.9.1"
,
"resolved"
:
"https://registry.npmjs.org/d3-array/-/d3-array-2.9.1.tgz"
,
"integrity"
:
"sha512-Ob7RdOtkqsjx1NWyQHMFLtCSk6/aKTxDdC4ZIolX+O+mDD2RzrsYgAyc0WGAlfYFVELLSilS7w8BtE3PKM8bHg=="
},
"d3-color"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/d3-color/-/d3-color-2.0.0.tgz"
,
"integrity"
:
"sha512-SPXi0TSKPD4g9tw0NMZFnR95XVgUZiBH+uUTqQuDu1OsE2zomHU7ho0FISciaPvosimixwHFl3WHLGabv6dDgQ=="
},
"d3-scale"
:
{
"version"
:
"3.2.3"
,
"resolved"
:
"https://registry.npmjs.org/d3-scale/-/d3-scale-3.2.3.tgz"
,
"integrity"
:
"sha512-8E37oWEmEzj57bHcnjPVOBS3n4jqakOeuv1EDdQSiSrYnMCBdMd3nc4HtKk7uia8DUHcY/CGuJ42xxgtEYrX0g=="
,
"requires"
:
{
"d3-array"
:
"^2.3.0"
,
"d3-format"
:
"1 - 2"
,
"d3-interpolate"
:
"1.2.0 - 2"
,
"d3-time"
:
"1 - 2"
,
"d3-time-format"
:
"2 - 3"
}
},
"d3-scale-chromatic"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-2.0.0.tgz"
,
"integrity"
:
"sha512-LLqy7dJSL8yDy7NRmf6xSlsFZ6zYvJ4BcWFE4zBrOPnQERv9zj24ohnXKRbyi9YHnYV+HN1oEO3iFK971/gkzA=="
,
"requires"
:
{
"d3-color"
:
"1 - 2"
,
"d3-interpolate"
:
"1 - 2"
}
}
}
},
"@nivo/core"
:
{
"version"
:
"0.67.0"
,
"resolved"
:
"https://registry.npmjs.org/@nivo/core/-/core-0.67.0.tgz"
,
"integrity"
:
"sha512-F8amsf/MnIuZLoN6ikla8bKlUkUI3HVhy6R2qMF2jDS5xnYch3Sno9OPTTuR8RnYGCr57yClnvFuJzw251GE6g=="
,
"requires"
:
{
"d3-color"
:
"^2.0.0"
,
"d3-format"
:
"^1.4.4"
,
"d3-hierarchy"
:
"^1.1.8"
,
"d3-interpolate"
:
"^2.0.1"
,
"d3-scale"
:
"^3.0.0"
,
"d3-scale-chromatic"
:
"^2.0.0"
,
"d3-shape"
:
"^1.3.5"
,
"d3-time-format"
:
"^2.1.3"
,
"lodash"
:
"^4.17.11"
,
"react-spring"
:
"9.0.0-rc.3"
,
"recompose"
:
"^0.30.0"
,
"resize-observer-polyfill"
:
"^1.5.1"
},
"dependencies"
:
{
"d3-array"
:
{
"version"
:
"2.9.1"
,
"resolved"
:
"https://registry.npmjs.org/d3-array/-/d3-array-2.9.1.tgz"
,
"integrity"
:
"sha512-Ob7RdOtkqsjx1NWyQHMFLtCSk6/aKTxDdC4ZIolX+O+mDD2RzrsYgAyc0WGAlfYFVELLSilS7w8BtE3PKM8bHg=="
},
"d3-color"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/d3-color/-/d3-color-2.0.0.tgz"
,
"integrity"
:
"sha512-SPXi0TSKPD4g9tw0NMZFnR95XVgUZiBH+uUTqQuDu1OsE2zomHU7ho0FISciaPvosimixwHFl3WHLGabv6dDgQ=="
},
"d3-interpolate"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-2.0.1.tgz"
,
"integrity"
:
"sha512-c5UhwwTs/yybcmTpAVqwSFl6vrQ8JZJoT5F7xNFK9pymv5C0Ymcc9/LIJHtYIggg/yS9YHw8i8O8tgb9pupjeQ=="
,
"requires"
:
{
"d3-color"
:
"1 - 2"
}
},
"d3-scale"
:
{
"version"
:
"3.2.3"
,
"resolved"
:
"https://registry.npmjs.org/d3-scale/-/d3-scale-3.2.3.tgz"
,
"integrity"
:
"sha512-8E37oWEmEzj57bHcnjPVOBS3n4jqakOeuv1EDdQSiSrYnMCBdMd3nc4HtKk7uia8DUHcY/CGuJ42xxgtEYrX0g=="
,
"requires"
:
{
"d3-array"
:
"^2.3.0"
,
"d3-format"
:
"1 - 2"
,
"d3-interpolate"
:
"1.2.0 - 2"
,
"d3-time"
:
"1 - 2"
,
"d3-time-format"
:
"2 - 3"
}
},
"d3-scale-chromatic"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-2.0.0.tgz"
,
"integrity"
:
"sha512-LLqy7dJSL8yDy7NRmf6xSlsFZ6zYvJ4BcWFE4zBrOPnQERv9zj24ohnXKRbyi9YHnYV+HN1oEO3iFK971/gkzA=="
,
"requires"
:
{
"d3-color"
:
"1 - 2"
,
"d3-interpolate"
:
"1 - 2"
}
}
}
},
"@nivo/legends"
:
{
"version"
:
"0.67.0"
,
"resolved"
:
"https://registry.npmjs.org/@nivo/legends/-/legends-0.67.0.tgz"
,
"integrity"
:
"sha512-W6JWMSiiAPsDhuofwq7x3ERA2fFJ2J/aj+Y3lvrZh5OAsG6/PCljwhlhMklNgYoN6bT/+Jgtut3Agdl0Dlzspg=="
,
"requires"
:
{
"lodash"
:
"^4.17.11"
,
"recompose"
:
"^0.30.0"
}
},
"@nivo/scales"
:
{
"version"
:
"0.67.0"
,
"resolved"
:
"https://registry.npmjs.org/@nivo/scales/-/scales-0.67.0.tgz"
,
"integrity"
:
"sha512-hXDeh3GzjZA3CcvJp14vCp0/QeoYMxVC2dZl55rIJdW200M+ET/ZtJQA2W1mDOGQUxR9z1flFvGJA+EqXhThwQ=="
,
"requires"
:
{
"d3-scale"
:
"^3.0.0"
,
"d3-time-format"
:
"^2.1.3"
,
"lodash"
:
"^4.17.11"
},
"dependencies"
:
{
"d3-array"
:
{
"version"
:
"2.9.1"
,
"resolved"
:
"https://registry.npmjs.org/d3-array/-/d3-array-2.9.1.tgz"
,
"integrity"
:
"sha512-Ob7RdOtkqsjx1NWyQHMFLtCSk6/aKTxDdC4ZIolX+O+mDD2RzrsYgAyc0WGAlfYFVELLSilS7w8BtE3PKM8bHg=="
},
"d3-scale"
:
{
"version"
:
"3.2.3"
,
"resolved"
:
"https://registry.npmjs.org/d3-scale/-/d3-scale-3.2.3.tgz"
,
"integrity"
:
"sha512-8E37oWEmEzj57bHcnjPVOBS3n4jqakOeuv1EDdQSiSrYnMCBdMd3nc4HtKk7uia8DUHcY/CGuJ42xxgtEYrX0g=="
,
"requires"
:
{
"d3-array"
:
"^2.3.0"
,
"d3-format"
:
"1 - 2"
,
"d3-interpolate"
:
"1.2.0 - 2"
,
"d3-time"
:
"1 - 2"
,
"d3-time-format"
:
"2 - 3"
}
}
}
},
"@nivo/tooltip"
:
{
"version"
:
"0.67.0"
,
"resolved"
:
"https://registry.npmjs.org/@nivo/tooltip/-/tooltip-0.67.0.tgz"
,
"integrity"
:
"sha512-Z4h4Ks/fFd7Cl2uSG/trfSYLXaiQNyFX2wGJrE/UPzDSpf4XqaW8uEBaK3p46200WG2AgltG0fHrouGNyMJ+1g=="
,
"requires"
:
{
"react-spring"
:
"9.0.0-rc.3"
}
},
"@nodelib/fs.stat"
:
{
"@nodelib/fs.stat"
:
{
"version"
:
"1.1.3"
,
"version"
:
"1.1.3"
,
"resolved"
:
"https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz"
,
"resolved"
:
"https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz"
,
...
@@ -1660,6 +1956,94 @@
...
@@ -1660,6 +1956,94 @@
"resolved"
:
"https://registry.npmjs.org/@react-dnd/shallowequal/-/shallowequal-2.0.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/@react-dnd/shallowequal/-/shallowequal-2.0.0.tgz"
,
"integrity"
:
"sha512-Pc/AFTdwZwEKJxFJvlxrSmGe/di+aAOBn60sremrpLo6VI/6cmiUYNNwlI5KNYttg7uypzA3ILPMPgxB2GYZEg=="
"integrity"
:
"sha512-Pc/AFTdwZwEKJxFJvlxrSmGe/di+aAOBn60sremrpLo6VI/6cmiUYNNwlI5KNYttg7uypzA3ILPMPgxB2GYZEg=="
},
},
"@react-spring/animated"
:
{
"version"
:
"9.0.0-rc.3"
,
"resolved"
:
"https://registry.npmjs.org/@react-spring/animated/-/animated-9.0.0-rc.3.tgz"
,
"integrity"
:
"sha512-dAvgtKhkYpzzr+EkmZ4ZuJ5CujxCW0LaT109DvO/2MQNk3EWIxcgl+ik4tSulSbgau1GN8RlkRKyDp0wISdQ3Q=="
,
"requires"
:
{
"@babel/runtime"
:
"^7.3.1"
,
"@react-spring/shared"
:
"9.0.0-rc.3"
,
"react-layout-effect"
:
"^1.0.1"
}
},
"@react-spring/core"
:
{
"version"
:
"9.0.0-rc.3"
,
"resolved"
:
"https://registry.npmjs.org/@react-spring/core/-/core-9.0.0-rc.3.tgz"
,
"integrity"
:
"sha512-3OzsVFxpfMJNkkQj8TwAH3NhUAX76AXu6WkslQF4EgBeEoG5eY3m+VvM9RsAsGWDuBKpscZ/wBpFt5Ih6KdGHA=="
,
"requires"
:
{
"@babel/runtime"
:
"^7.3.1"
,
"@react-spring/animated"
:
"9.0.0-rc.3"
,
"@react-spring/shared"
:
"9.0.0-rc.3"
,
"react-layout-effect"
:
"^1.0.1"
,
"use-memo-one"
:
"^1.1.0"
}
},
"@react-spring/konva"
:
{
"version"
:
"9.0.0-rc.3"
,
"resolved"
:
"https://registry.npmjs.org/@react-spring/konva/-/konva-9.0.0-rc.3.tgz"
,
"integrity"
:
"sha512-uampLRgrHIqA3ilnheePUVEUE+fdeipXORI4XZJFsORP01CUJeJCxBwMagaxvsHJAtuNErMI/IebE1T2W8i5qA=="
,
"requires"
:
{
"@babel/runtime"
:
"^7.3.1"
,
"@react-spring/animated"
:
"9.0.0-rc.3"
,
"@react-spring/core"
:
"9.0.0-rc.3"
,
"@react-spring/shared"
:
"9.0.0-rc.3"
}
},
"@react-spring/native"
:
{
"version"
:
"9.0.0-rc.3"
,
"resolved"
:
"https://registry.npmjs.org/@react-spring/native/-/native-9.0.0-rc.3.tgz"
,
"integrity"
:
"sha512-7JSixJLfzg8V0IrgyGS3gGr2v8CGh4Kym15Htp3CJq74GFBJMyaQS0KaMjieXnw5alTpQoeGBESfA3v5dPlPYg=="
,
"requires"
:
{
"@babel/runtime"
:
"^7.3.1"
,
"@react-spring/animated"
:
"9.0.0-rc.3"
,
"@react-spring/core"
:
"9.0.0-rc.3"
,
"@react-spring/shared"
:
"9.0.0-rc.3"
}
},
"@react-spring/shared"
:
{
"version"
:
"9.0.0-rc.3"
,
"resolved"
:
"https://registry.npmjs.org/@react-spring/shared/-/shared-9.0.0-rc.3.tgz"
,
"integrity"
:
"sha512-dd50TxwwMWd+dSB0InjndUN9w17cbnMCPy+0sag6zRxxKIo7eOyWSliOtLKxvufgmdC8Prm4M3GT5dmB1yxKEQ=="
,
"requires"
:
{
"@alloc/types"
:
"^1.2.1"
,
"@babel/runtime"
:
"^7.3.1"
,
"fluids"
:
"^0.1.6"
,
"tslib"
:
"^1.11.1"
}
},
"@react-spring/three"
:
{
"version"
:
"9.0.0-rc.3"
,
"resolved"
:
"https://registry.npmjs.org/@react-spring/three/-/three-9.0.0-rc.3.tgz"
,
"integrity"
:
"sha512-H55T+Dnck+hsJ8WgE+tb89ngX1E1lDOpMBG4mGzNLGok6XgGqN0VBsHRN3QDl+aPfmJI1BPFPR6b6WbhwqRNbw=="
,
"requires"
:
{
"@babel/runtime"
:
"^7.3.1"
,
"@react-spring/animated"
:
"9.0.0-rc.3"
,
"@react-spring/core"
:
"9.0.0-rc.3"
,
"@react-spring/shared"
:
"9.0.0-rc.3"
}
},
"@react-spring/web"
:
{
"version"
:
"9.0.0-rc.3"
,
"resolved"
:
"https://registry.npmjs.org/@react-spring/web/-/web-9.0.0-rc.3.tgz"
,
"integrity"
:
"sha512-rEvipblmihiz8+Eo01zDp5dqWn6XfYk8q2rlN9c18YIOL4o6nuY/VplDoocUMHYfH4liurpO4o1QudKOO1nAiQ=="
,
"requires"
:
{
"@babel/runtime"
:
"^7.3.1"
,
"@react-spring/animated"
:
"9.0.0-rc.3"
,
"@react-spring/core"
:
"9.0.0-rc.3"
,
"@react-spring/shared"
:
"9.0.0-rc.3"
}
},
"@react-spring/zdog"
:
{
"version"
:
"9.0.0-rc.3"
,
"resolved"
:
"https://registry.npmjs.org/@react-spring/zdog/-/zdog-9.0.0-rc.3.tgz"
,
"integrity"
:
"sha512-fl2JI098sfOJ+BaS9xCrnz8NSimL8yPrVwO0lHSpXLn/q3o3MYmRAeJnZQv8yDtT6isTHua6Tfb9vWuZWEXSmA=="
,
"requires"
:
{
"@babel/runtime"
:
"^7.3.1"
,
"@react-spring/animated"
:
"9.0.0-rc.3"
,
"@react-spring/core"
:
"9.0.0-rc.3"
,
"@react-spring/shared"
:
"9.0.0-rc.3"
}
},
"@restart/context"
:
{
"@restart/context"
:
{
"version"
:
"2.1.4"
,
"version"
:
"2.1.4"
,
"resolved"
:
"https://registry.npmjs.org/@restart/context/-/context-2.1.4.tgz"
,
"resolved"
:
"https://registry.npmjs.org/@restart/context/-/context-2.1.4.tgz"
,
...
@@ -3881,6 +4265,11 @@
...
@@ -3881,6 +4265,11 @@
"supports-color"
:
"^5.3.0"
"supports-color"
:
"^5.3.0"
}
}
},
},
"change-emitter"
:
{
"version"
:
"0.1.6"
,
"resolved"
:
"https://registry.npmjs.org/change-emitter/-/change-emitter-0.1.6.tgz"
,
"integrity"
:
"sha1-6LL+PX8at9aaMhma/5HqaTFAlRU="
},
"chardet"
:
{
"chardet"
:
{
"version"
:
"0.7.0"
,
"version"
:
"0.7.0"
,
"resolved"
:
"https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz"
,
...
@@ -6772,6 +7161,11 @@
...
@@ -6772,6 +7161,11 @@
"resolved"
:
"https://registry.npmjs.org/flatten/-/flatten-1.0.3.tgz"
,
"resolved"
:
"https://registry.npmjs.org/flatten/-/flatten-1.0.3.tgz"
,
"integrity"
:
"sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg=="
"integrity"
:
"sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg=="
},
},
"fluids"
:
{
"version"
:
"0.1.10"
,
"resolved"
:
"https://registry.npmjs.org/fluids/-/fluids-0.1.10.tgz"
,
"integrity"
:
"sha512-66FLmUJOrkvEHIsRVeM+88MG0bjd2TOBuR0BkM0hzyCb68W9drzqeX/AHDNp3ouZALQN7JvBvmKdVhHI+PZsdg=="
},
"flush-write-stream"
:
{
"flush-write-stream"
:
{
"version"
:
"1.1.1"
,
"version"
:
"1.1.1"
,
"resolved"
:
"https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz"
,
...
@@ -15489,6 +15883,11 @@
...
@@ -15489,6 +15883,11 @@
"resolved"
:
"https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz"
,
"integrity"
:
"sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
"integrity"
:
"sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
},
},
"react-layout-effect"
:
{
"version"
:
"1.0.5"
,
"resolved"
:
"https://registry.npmjs.org/react-layout-effect/-/react-layout-effect-1.0.5.tgz"
,
"integrity"
:
"sha512-zdRXHuch+OBHU6bvjTelOGUCM+UDr/iCY+c0wXLEAc+G4/FlcJruD/hUOzlKH5XgO90Y/BUJPNhI/g9kl+VAsA=="
},
"react-lifecycles-compat"
:
{
"react-lifecycles-compat"
:
{
"version"
:
"3.0.4"
,
"version"
:
"3.0.4"
,
"resolved"
:
"https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz"
,
"resolved"
:
"https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz"
,
...
@@ -15776,6 +16175,20 @@
...
@@ -15776,6 +16175,20 @@
"@emotion/core"
:
"^10.0.15"
"@emotion/core"
:
"^10.0.15"
}
}
},
},
"react-spring"
:
{
"version"
:
"9.0.0-rc.3"
,
"resolved"
:
"https://registry.npmjs.org/react-spring/-/react-spring-9.0.0-rc.3.tgz"
,
"integrity"
:
"sha512-VX5Gi6svgRzjGvJ7qVRQBhFN+O2IuPvkSWepIg838LNIMqlc42xdIYtoGJYSqYjNO3IocSfkHlh49WVw6hHMUg=="
,
"requires"
:
{
"@babel/runtime"
:
"^7.3.1"
,
"@react-spring/core"
:
"9.0.0-rc.3"
,
"@react-spring/konva"
:
"9.0.0-rc.3"
,
"@react-spring/native"
:
"9.0.0-rc.3"
,
"@react-spring/three"
:
"9.0.0-rc.3"
,
"@react-spring/web"
:
"9.0.0-rc.3"
,
"@react-spring/zdog"
:
"9.0.0-rc.3"
}
},
"react-to-print"
:
{
"react-to-print"
:
{
"version"
:
"2.9.0"
,
"version"
:
"2.9.0"
,
"resolved"
:
"https://registry.npmjs.org/react-to-print/-/react-to-print-2.9.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/react-to-print/-/react-to-print-2.9.0.tgz"
,
...
@@ -15869,6 +16282,26 @@
...
@@ -15869,6 +16282,26 @@
"util.promisify"
:
"^1.0.0"
"util.promisify"
:
"^1.0.0"
}
}
},
},
"recompose"
:
{
"version"
:
"0.30.0"
,
"resolved"
:
"https://registry.npmjs.org/recompose/-/recompose-0.30.0.tgz"
,
"integrity"
:
"sha512-ZTrzzUDa9AqUIhRk4KmVFihH0rapdCSMFXjhHbNrjAWxBuUD/guYlyysMnuHjlZC/KRiOKRtB4jf96yYSkKE8w=="
,
"requires"
:
{
"@babel/runtime"
:
"^7.0.0"
,
"change-emitter"
:
"^0.1.2"
,
"fbjs"
:
"^0.8.1"
,
"hoist-non-react-statics"
:
"^2.3.1"
,
"react-lifecycles-compat"
:
"^3.0.2"
,
"symbol-observable"
:
"^1.0.4"
},
"dependencies"
:
{
"hoist-non-react-statics"
:
{
"version"
:
"2.5.5"
,
"resolved"
:
"https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz"
,
"integrity"
:
"sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw=="
}
}
},
"recursive-readdir"
:
{
"recursive-readdir"
:
{
"version"
:
"2.2.2"
,
"version"
:
"2.2.2"
,
"resolved"
:
"https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.2.tgz"
,
"resolved"
:
"https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.2.tgz"
,
...
@@ -16122,6 +16555,11 @@
...
@@ -16122,6 +16555,11 @@
"resolved"
:
"https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz"
,
"integrity"
:
"sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8="
"integrity"
:
"sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8="
},
},
"resize-observer-polyfill"
:
{
"version"
:
"1.5.1"
,
"resolved"
:
"https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz"
,
"integrity"
:
"sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
},
"resolve"
:
{
"resolve"
:
{
"version"
:
"1.15.0"
,
"version"
:
"1.15.0"
,
"resolved"
:
"https://registry.npmjs.org/resolve/-/resolve-1.15.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/resolve/-/resolve-1.15.0.tgz"
,
...
@@ -18068,6 +18506,11 @@
...
@@ -18068,6 +18506,11 @@
"resolved"
:
"https://registry.npmjs.org/use/-/use-3.1.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/use/-/use-3.1.1.tgz"
,
"integrity"
:
"sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ=="
"integrity"
:
"sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ=="
},
},
"use-memo-one"
:
{
"version"
:
"1.1.1"
,
"resolved"
:
"https://registry.npmjs.org/use-memo-one/-/use-memo-one-1.1.1.tgz"
,
"integrity"
:
"sha512-oFfsyun+bP7RX8X2AskHNTxu+R3QdE/RC5IefMbqptmACAA/gfol1KDD5KRzPsGMa62sWxGZw+Ui43u6x4ddoQ=="
},
"util"
:
{
"util"
:
{
"version"
:
"0.10.3"
,
"version"
:
"0.10.3"
,
"resolved"
:
"https://registry.npmjs.org/util/-/util-0.10.3.tgz"
,
"resolved"
:
"https://registry.npmjs.org/util/-/util-0.10.3.tgz"
,
...
...
src/container/MonthlyReport/CorporateAnnualTargetMR.js
View file @
f2bb63cb
...
@@ -73,7 +73,8 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -73,7 +73,8 @@ export default class CorporateAnnualTargetMR extends Component {
totalScore
:
0
,
totalScore
:
0
,
perfomanceScore
:
''
,
perfomanceScore
:
''
,
buttonError
:
true
,
buttonError
:
true
,
viewOnly
:
true
viewOnly
:
true
,
aa
:
0
}
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
}
...
@@ -188,7 +189,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -188,7 +189,7 @@ export default class CorporateAnnualTargetMR extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
let
res
=
response
.
data
.
data
let
res
=
response
.
data
.
data
const
handlePushChild
=
(
item
)
=>
{
const
handlePushChild
=
(
item
,
index
,
length
)
=>
{
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
if
(
indexIDzz
===
-
1
)
{
if
(
indexIDzz
===
-
1
)
{
let
parentTrue
=
item
.
parent_name
==
'INTERNAL BUSINESS PROCESS PERSPECTIVE'
||
item
.
parent_name
==
'CUSTOMER PERSPECTIVE'
let
parentTrue
=
item
.
parent_name
==
'INTERNAL BUSINESS PROCESS PERSPECTIVE'
||
item
.
parent_name
==
'CUSTOMER PERSPECTIVE'
...
@@ -218,11 +219,37 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -218,11 +219,37 @@ export default class CorporateAnnualTargetMR extends Component {
item
.
corporate_annual_target
.
actual_formula
===
null
?
[]
:
item
.
corporate_annual_target
.
actual_formula
,
item
.
corporate_annual_target
.
actual_formula
===
null
?
[]
:
item
.
corporate_annual_target
.
actual_formula
,
item
.
order
item
.
order
])
])
// let index = dataTable.findIndex((val) => val[5] == item.description)
console
.
log
(
index
,
length
-
1
)
if
(
index
==
length
-
1
&&
item
.
parent_name
==
"LEARNING & GROWTH PERSPECTIVE"
)
{
dataTable
.
push
([
4
,
0
,
null
,
""
,
0
,
""
,
0.0
,
""
,
null
,
null
,
""
,
""
,
0.0
,
""
,
""
,
""
,
""
,
[],
item
.
order
+
1
])
}
}
}
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
if
(
item
.
children
.
length
>
0
)
{
item
.
children
.
map
((
items
,
indexs
)
=>
{
item
.
children
.
map
((
items
,
indexs
)
=>
{
handlePushChild
(
items
)
// console.log(indexs, item.children.length)
handlePushChild
(
items
,
indexs
,
item
.
children
.
length
)
})
})
}
}
}
}
...
@@ -255,7 +282,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -255,7 +282,7 @@ export default class CorporateAnnualTargetMR extends Component {
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
if
(
item
.
children
.
length
>
0
)
{
item
.
children
.
map
((
items
,
indexs
)
=>
{
item
.
children
.
map
((
items
,
indexs
)
=>
{
handlePushChild
(
items
)
handlePushChild
(
items
,
indexs
,
item
.
children
.
length
)
})
})
}
}
}
}
...
@@ -603,16 +630,160 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -603,16 +630,160 @@ export default class CorporateAnnualTargetMR extends Component {
this
.
setState
({
alert
:
false
})
this
.
setState
({
alert
:
false
})
}
}
handleCalculate
(
datatable
)
{
handleCalculate
(
datatable
2
,
someXXX
)
{
this
.
setState
({
loading
:
fals
e
},
()
=>
{
this
.
setState
({
loading
:
tru
e
},
()
=>
{
let
total
=
0
let
total
=
0
let
perfomanceScore
=
''
let
perfomanceScore
=
''
console
.
log
(
datatable
)
// console.log(datatable2)
datatable
.
map
((
item
,
index
)
=>
{
// console.log(datatable2[datatable2.length-1][15])
let
value
=
String
(
item
[
15
])
==
'NaN'
||
String
(
item
[
15
])
==
''
?
0
:
Number
(
item
[
15
])
// console.log(datatable2[datatable2.length-6][11])
total
+=
value
// const handleAchiement = (kpi, actualData, targetData) => {
// // dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(total) * 100
// return Number(total) * 100
// }
// const handleScore = (kpi, maxAch, ach) => {
// let listParameter = this.state.parameterScore
// let parameterKpi = kpi
// let parameterAch = String(maxAch).includes('%') ? `MAX${String(maxAch).substr(0, String(maxAch).length - 1)}` : String(maxAch)
// let parameterMix = `${parameterKpi}_${parameterAch}`
// let listParameterFilter = listParameter.filter((val) => val.setting_type == String(parameterMix).toLocaleUpperCase())
// let listParameterFilterCompany = listParameterFilter.filter((val) => val.company_id == this.props.company.company_id)
// let totalScore = 0
// let achx100 = maxAch == '100%' ? Number(ach) / 100 > 1 ? 1 : Number(ach) / 100 : Number(ach) / 100
// if (listParameterFilterCompany.length == 0) {
// listParameterFilter.map((item, index) => {
// if (Number(achx100) >= Number(item.min_value) && Number(achx100) <= Number(item.max_value)) {
// totalScore = Number(item.value)
// }
// })
// } else {
// listParameterFilterCompany.map((item, index) => {
// if (Number(achx100) >= Number(item.min_value) && Number(achx100) <= Number(item.max_value)) {
// totalScore = Number(item.value)
// }
// })
// }
// // dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(totalScore).toFixed(0)
// return Number(totalScore).toFixed(0)
// }
// const handleTotal = (weight, target, score) => {
// let total = 0
// let handlePercent = ''
// // if (tableMeta.rowData[5] == 'Trading profit (NPBT buah luar & plasma)') {
// // console.log(dataTable2[tableMeta.rowIndex])
// // }
// if (String(weight).includes('%')) {
// // handlePercent = String(weight)
// handlePercent = String(weight).substr(0, String(weight).length - 1)
// } else {
// handlePercent = String(weight)
// }
// // console.log(handlePercent)
// if (target == '' || String(target) == '0' || String(target) == '0.0') {
// total = 0
// } else {
// total = Number(score) * Number(handlePercent) / 100
// // console.log(total)
// }
// // dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(total).toFixed(2)
// return total
// }
let
datatable3
=
datatable2
.
map
((
item
,
index
)
=>
{
//ach
let
totalAch
=
0
if
(
item
[
8
]
==
'HIB'
)
{
let
actual
=
item
[
11
]
==
""
?
0
:
Number
(
item
[
11
])
let
target
=
item
[
12
]
==
""
?
0
:
Number
(
item
[
12
])
totalAch
=
2
-
(
actual
/
target
)
}
else
{
let
actual
=
item
[
11
]
==
""
?
0
:
Number
(
item
[
11
])
let
target
=
item
[
12
]
==
""
?
0
:
Number
(
item
[
12
])
totalAch
=
actual
/
target
}
totalAch
=
String
(
totalAch
)
==
'NaN'
||
String
(
totalAch
)
==
'Infinity'
||
String
(
totalAch
)
==
'-Infinity'
?
0
:
totalAch
totalAch
=
Number
(
totalAch
)
*
100
// if (item[5] == "People Benchstrength") {
// console.log(totalAch)
// }
//score
let
listParameter
=
this
.
state
.
parameterScore
let
parameterKpi
=
item
[
8
]
let
parameterAch
=
String
(
item
[
9
]).
includes
(
'%'
)
?
`MAX
${
String
(
item
[
9
]).
substr
(
0
,
String
(
item
[
9
]).
length
-
1
)}
`
:
String
(
item
[
9
])
let
parameterMix
=
`
${
parameterKpi
}
_
${
parameterAch
}
`
let
listParameterFilter
=
listParameter
.
filter
((
val
)
=>
val
.
setting_type
==
String
(
parameterMix
).
toLocaleUpperCase
())
let
listParameterFilterCompany
=
listParameterFilter
.
filter
((
val
)
=>
val
.
company_id
==
this
.
props
.
company
.
company_id
)
let
totalScore
=
0
let
achx100
=
item
[
9
]
==
'100%'
?
Number
(
totalAch
)
/
100
>
1
?
1
:
Number
(
totalAch
)
/
100
:
Number
(
totalAch
)
/
100
if
(
listParameterFilterCompany
.
length
==
0
)
{
listParameterFilter
.
map
((
item
,
index
)
=>
{
if
(
Number
(
achx100
)
>=
Number
(
item
.
min_value
)
&&
Number
(
achx100
)
<=
Number
(
item
.
max_value
))
{
totalScore
=
Number
(
item
.
value
)
}
})
}
else
{
listParameterFilterCompany
.
map
((
item
,
index
)
=>
{
if
(
Number
(
achx100
)
>=
Number
(
item
.
min_value
)
&&
Number
(
achx100
)
<=
Number
(
item
.
max_value
))
{
totalScore
=
Number
(
item
.
value
)
}
})
}
totalScore
=
Number
(
totalScore
).
toFixed
(
0
)
//Score X Weight
let
totalSW
=
0
let
handlePercent
=
''
if
(
String
(
item
[
6
]).
includes
(
'%'
))
{
handlePercent
=
String
(
item
[
6
]).
substr
(
0
,
String
(
item
[
6
]).
length
-
1
)
}
else
{
handlePercent
=
String
(
item
[
6
])
}
if
(
item
[
12
]
==
''
||
String
(
item
[
12
])
==
'0'
||
String
(
item
[
12
])
==
'0.0'
)
{
totalSW
=
0
}
else
{
totalSW
=
Number
(
totalScore
)
*
Number
(
handlePercent
)
/
100
}
totalSW
=
Number
(
totalSW
).
toFixed
(
2
)
if
(
item
[
0
]
!==
1
&&
item
[
0
]
!==
4
)
{
total
+=
Number
(
totalSW
)
}
return
[
[
item
[
0
],
item
[
1
],
item
[
2
],
item
[
3
],
item
[
4
],
item
[
5
],
item
[
6
],
item
[
7
],
item
[
8
],
item
[
9
],
item
[
10
],
item
[
11
],
item
[
12
],
totalAch
,
totalScore
,
totalSW
,
item
[
16
],
item
[
17
],
item
[
18
],
item
[
19
],
]
]
})
})
console
.
log
(
total
);
console
.
log
(
total
)
console
.
log
(
datatable3
);
total
=
Number
(
total
).
toFixed
(
2
)
total
=
Number
(
total
).
toFixed
(
2
)
if
(
total
>=
1.00
&&
total
<=
2.00
)
{
if
(
total
>=
1.00
&&
total
<=
2.00
)
{
perfomanceScore
=
'K'
perfomanceScore
=
'K'
...
@@ -629,13 +800,10 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -629,13 +800,10 @@ export default class CorporateAnnualTargetMR extends Component {
}
else
if
(
total
>=
4.76
&&
total
<=
5.00
)
{
}
else
if
(
total
>=
4.76
&&
total
<=
5.00
)
{
perfomanceScore
=
'IST'
perfomanceScore
=
'IST'
}
}
this
.
setState
({
totalScore
:
total
,
perfomanceScore
},
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
console
.
log
(
total
)
this
.
setState
({
totalScore
:
total
,
perfomanceScore
,
loading
:
false
})
this
.
setState
({
totalScore
:
total
})
// console.log(total)
},
1000
);
},
500
);
})
})
})
}
}
...
@@ -1071,12 +1239,27 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -1071,12 +1239,27 @@ export default class CorporateAnnualTargetMR extends Component {
return
Number
(
totalScore
).
toFixed
(
0
)
return
Number
(
totalScore
).
toFixed
(
0
)
}
}
let
someXXX
=
this
.
state
.
aa
const
handleTotal
=
(
tableMeta
)
=>
{
const
handleTotal
=
(
tableMeta
)
=>
{
let
total
=
0
let
total
=
0
let
handlePercent
=
''
// if (tableMeta.rowData[5] == 'Trading profit (NPBT buah luar & plasma)') {
// if (tableMeta.rowData[5] == 'Trading profit (NPBT buah luar & plasma)') {
// console.log(dataTable2[tableMeta.rowIndex])
// console.log(dataTable2[tableMeta.rowIndex])
// }
// }
let
handlePercent
=
''
if
(
tableMeta
.
rowData
[
0
]
==
4
)
{
let
totalScore
=
0
dataTable2
.
map
((
item
,
index
)
=>
{
if
(
item
[
0
]
!==
4
&&
item
[
0
]
!==
1
)
{
totalScore
+=
Number
(
item
[
15
])
}
})
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
totalScore
).
toFixed
(
2
)
if
(
tableMeta
.
rowIndex
==
dataTable2
.
length
-
1
)
{
someXXX
=
Number
(
totalScore
).
toFixed
(
2
)
console
.
log
(
someXXX
)
}
return
null
}
else
{
if
(
String
(
dataTable2
[
tableMeta
.
rowIndex
][
6
]).
includes
(
'%'
))
{
if
(
String
(
dataTable2
[
tableMeta
.
rowIndex
][
6
]).
includes
(
'%'
))
{
// handlePercent = String(dataTable2[tableMeta.rowIndex][6])
// handlePercent = String(dataTable2[tableMeta.rowIndex][6])
handlePercent
=
String
(
dataTable2
[
tableMeta
.
rowIndex
][
6
]).
substr
(
0
,
String
(
dataTable2
[
tableMeta
.
rowIndex
][
6
]).
length
-
1
)
handlePercent
=
String
(
dataTable2
[
tableMeta
.
rowIndex
][
6
]).
substr
(
0
,
String
(
dataTable2
[
tableMeta
.
rowIndex
][
6
]).
length
-
1
)
...
@@ -1094,6 +1277,8 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -1094,6 +1277,8 @@ export default class CorporateAnnualTargetMR extends Component {
return
total
return
total
}
}
}
let
columns
=
[
let
columns
=
[
{
{
name
:
""
,
name
:
""
,
...
@@ -1501,8 +1686,11 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -1501,8 +1686,11 @@ export default class CorporateAnnualTargetMR extends Component {
customBodyRender
:
(
value
,
tableMeta
)
=>
{
customBodyRender
:
(
value
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
width
:
75
}}
>
<
div
style
=
{{
width
:
75
}}
>
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
?
null
:
null
:
tableMeta
.
rowData
[
0
]
===
4
?
handleTotal
(
tableMeta
)
:
this
.
state
.
get_for
==
'view'
?
this
.
state
.
get_for
==
'view'
?
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
...
@@ -1771,7 +1959,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -1771,7 +1959,7 @@ export default class CorporateAnnualTargetMR extends Component {
this
.
setState
({
loading
:
true
,
dataTable
:
dataTable2
,
saveDraft
:
false
,
buttonError
:
false
},
()
=>
{
this
.
setState
({
loading
:
true
,
dataTable
:
dataTable2
,
saveDraft
:
false
,
buttonError
:
false
},
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
// this.handleValidate()
// this.handleValidate()
this
.
handleCalculate
(
dataTable2
)
this
.
handleCalculate
(
dataTable2
,
someXXX
)
},
100
);
},
100
);
})
})
}}
}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment