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
726a7cf1
Commit
726a7cf1
authored
Apr 20, 2021
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'GGMAC' into 'master'
Ggmac See merge request
!1428
parents
7e67aa40
fd1c77a4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
CorporateAnnualTargetMR.js
src/container/MonthlyReport/CorporateAnnualTargetMR.js
+9
-6
No files found.
src/container/MonthlyReport/CorporateAnnualTargetMR.js
View file @
726a7cf1
...
...
@@ -238,7 +238,7 @@ export default class CorporateAnnualTargetMR extends Component {
item
.
order
])
// let index = dataTable.findIndex((val) => val[5] == item.description)
console
.
log
(
index
,
length
-
1
)
//
console.log(index, length - 1)
if
(
index
==
length
-
1
&&
item
.
parent_name
==
"LEARNING & GROWTH PERSPECTIVE"
)
{
dataTable
.
push
([
4
,
...
...
@@ -677,6 +677,7 @@ export default class CorporateAnnualTargetMR extends Component {
let
total
=
0
let
perfomanceScore
=
''
let
totalWeight
=
0
// console.log(datatable2)
let
datatable3
=
datatable2
.
map
((
item
,
index
)
=>
{
// console.log(item[6])
//total weight
...
...
@@ -746,7 +747,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
}
totalAch
=
String
(
totalAch
)
==
'NaN'
||
String
(
totalAch
)
==
'Infinity'
||
String
(
totalAch
)
==
'-Infinity'
?
0
:
totalAch
totalAch
=
Number
(
totalAch
)
*
100
totalAch
=
this
.
props
.
lastStatus
==
'APPROVED'
?
item
[
13
]
:
Number
(
totalAch
)
*
100
//score
let
listParameter
=
this
.
state
.
parameterScore
...
...
@@ -756,7 +757,7 @@ export default class CorporateAnnualTargetMR extends Component {
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%'
&&
(
item
[
8
]
==
'HIB'
||
item
[
8
]
==
'HIG'
)
?
Number
(
totalAch
)
/
100
>
1
?
1
:
Number
(
totalAch
)
/
100
:
Number
(
totalAch
)
/
100
let
achx100
=
item
[
9
]
==
'100%'
&&
(
item
[
8
]
==
'HIB'
||
item
[
8
]
==
'HIG'
)
?
(
Number
(
totalAch
)
/
100
>
1
?
1
:
Number
(
totalAch
)
/
100
)
:
Number
(
totalAch
)
/
100
// if (item[5] == "Max Quality drop from Bor-Barge") {
// console.log(listParameterFilter)
// console.log(listParameterFilterCompany)
...
...
@@ -776,7 +777,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
})
}
let
totalScorez
=
Number
(
totalScore
).
toFixed
(
0
)
let
totalScorez
=
this
.
props
.
lastStatus
==
'APPROVED'
?
item
[
14
]
:
Number
(
totalScore
).
toFixed
(
0
)
// if (item[5] == "Max Quality drop from Bor-Barge") {
// console.log(totalScorez)
// }
...
...
@@ -793,7 +794,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
else
{
totalSW
=
(
Number
(
totalScorez
)
*
Number
(
handlePercent
)
/
100
)
}
totalSW
=
Number
(
totalSW
).
toFixed
(
2
)
totalSW
=
this
.
props
.
lastStatus
==
'APPROVED'
?
item
[
15
]
:
Number
(
totalSW
).
toFixed
(
2
)
if
(
item
[
0
]
!==
1
&&
item
[
0
]
!==
4
)
{
total
+=
Number
(
totalSW
)
}
...
...
@@ -804,6 +805,8 @@ export default class CorporateAnnualTargetMR extends Component {
// console.log(listParameterFilterCompany);
// console.log(totalScorez)
// console.log(totalSW)
// console.log(item[12])
// console.log(item[5])
// console.log(total)
return
[
item
[
0
],
...
...
@@ -1373,7 +1376,7 @@ export default class CorporateAnnualTargetMR extends Component {
let
listParameterFilter
=
listParameter
.
filter
((
val
)
=>
val
.
setting_type
==
String
(
parameterMix
).
toLocaleUpperCase
()
&&
String
(
val
.
company_name
).
toLocaleLowerCase
()
===
"default"
)
let
listParameterFilterCompany
=
listParameterFilter
.
filter
((
val
)
=>
val
.
company_id
==
this
.
props
.
company
.
company_id
)
let
totalScore
=
0
let
achx100
=
tableMeta
.
rowData
[
9
]
==
'100%'
&&
(
tableMeta
.
rowData
[
8
]
==
'HIB'
||
tableMeta
.
rowData
[
8
]
==
'HIG'
)
?
Number
(
tableMeta
.
rowData
[
13
])
/
100
>
1
?
1
:
Number
(
tableMeta
.
rowData
[
13
])
/
100
:
Number
(
tableMeta
.
rowData
[
13
])
/
100
let
achx100
=
tableMeta
.
rowData
[
9
]
==
'100%'
&&
(
tableMeta
.
rowData
[
8
]
==
'HIB'
||
tableMeta
.
rowData
[
8
]
==
'HIG'
)
?
(
Number
(
tableMeta
.
rowData
[
13
])
/
100
>
1
?
1
:
Number
(
tableMeta
.
rowData
[
13
])
/
100
)
:
Number
(
tableMeta
.
rowData
[
13
])
/
100
if
(
listParameterFilterCompany
.
length
==
0
)
{
listParameterFilter
.
map
((
item
,
index
)
=>
{
if
(
Number
(
achx100
)
>=
Number
(
item
.
min_value
)
&&
Number
(
achx100
)
<=
Number
(
item
.
max_value
))
{
...
...
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