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
80ac45e3
Commit
80ac45e3
authored
Jan 14, 2021
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
f2bb63cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
60 deletions
+1
-60
CorporateAnnualTargetMR.js
src/container/MonthlyReport/CorporateAnnualTargetMR.js
+1
-60
No files found.
src/container/MonthlyReport/CorporateAnnualTargetMR.js
View file @
80ac45e3
...
...
@@ -416,6 +416,7 @@ export default class CorporateAnnualTargetMR extends Component {
})
console
.
log
(
dataTable
)
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
editable
:
true
},
()
=>
{
this
.
handleCalculate
(
dataTable
)
this
.
state
.
dataTable
.
map
(
item
=>
{
if
(
item
[
16
].
length
>
0
)
{
console
.
log
(
'masuk'
)
...
...
@@ -634,66 +635,6 @@ export default class CorporateAnnualTargetMR extends Component {
this
.
setState
({
loading
:
true
},
()
=>
{
let
total
=
0
let
perfomanceScore
=
''
// console.log(datatable2)
// console.log(datatable2[datatable2.length-1][15])
// console.log(datatable2[datatable2.length-6][11])
// 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
)
=>
{
...
...
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