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
2626058b
Commit
2626058b
authored
Jan 13, 2021
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apdet
parent
311df875
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
34 deletions
+15
-34
CorporateAnnualTargetMR.js
src/container/MonthlyReport/CorporateAnnualTargetMR.js
+15
-34
No files found.
src/container/MonthlyReport/CorporateAnnualTargetMR.js
View file @
2626058b
...
...
@@ -630,13 +630,18 @@ export default class CorporateAnnualTargetMR extends Component {
perfomanceScore
=
'IST'
}
this.setState({ totalScore: total, perfomanceScore })
this
.
setState
({
totalScore
:
total
,
perfomanceScore
},
()
=>
{
setTimeout
(()
=>
{
console
.
log
(
total
)
this
.
setState
({
totalScore
:
total
})
},
1000
);
})
})
}
handleBackgroundPerf
(
total
)
{
console.log(total)
//
console.log(total)
let
color
=
'white'
if
(
total
>=
1.00
&&
total
<=
2.00
)
{
color
=
'red'
...
...
@@ -1071,7 +1076,14 @@ export default class CorporateAnnualTargetMR extends Component {
// if (tableMeta.rowData[5] == 'Trading profit (NPBT buah luar & plasma)') {
// console.log(dataTable2[tableMeta.rowIndex])
// }
let handlePercent = String(dataTable2[tableMeta.rowIndex][6]).substr(0, String(dataTable2[tableMeta.rowIndex][6]).length - 1)
let
handlePercent
=
''
if
(
String
(
dataTable2
[
tableMeta
.
rowIndex
][
6
]).
includes
(
'%'
))
{
// handlePercent = String(dataTable2[tableMeta.rowIndex][6])
handlePercent
=
String
(
dataTable2
[
tableMeta
.
rowIndex
][
6
]).
substr
(
0
,
String
(
dataTable2
[
tableMeta
.
rowIndex
][
6
]).
length
-
1
)
}
else
{
handlePercent
=
String
(
dataTable2
[
tableMeta
.
rowIndex
][
6
])
}
// console.log(handlePercent)
if
(
dataTable2
[
tableMeta
.
rowIndex
][
12
]
==
''
||
String
(
dataTable2
[
tableMeta
.
rowIndex
][
12
])
==
'0'
||
String
(
dataTable2
[
tableMeta
.
rowIndex
][
12
])
==
'0.0'
)
{
total
=
0
}
else
{
...
...
@@ -1079,37 +1091,6 @@ export default class CorporateAnnualTargetMR extends Component {
// console.log(total)
}
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
total
).
toFixed
(
2
)
if (tableMeta.rowIndex == dataTable2.length - 1) {
let totals = 0
let perfomanceScoreX = ''
dataTable2.map((item, index) => {
let value = String(item[15]) == 'NaN' || String(item[15]) == '' ? 0 : Number(item[15])
totals += value
})
totals = Number(totals).toFixed(2)
if (totals >= 1.00 && totals <= 2.00) {
perfomanceScoreX = 'K'
} else if (totals >= 2.01 && totals <= 2.75) {
perfomanceScoreX = 'C'
} else if (totals >= 2.76 && totals <= 3.00) {
perfomanceScoreX = 'B-'
} else if (totals >= 3.01 && totals <= 3.75) {
perfomanceScoreX = 'B'
} else if (totals >= 3.76 && totals <= 4.00) {
perfomanceScoreX = 'B+'
} else if (totals >= 4.01 && totals <= 4.75) {
perfomanceScoreX = 'BS'
} else if (totals >= 4.76 && totals <= 5.00) {
perfomanceScoreX = 'IST'
}
// totalScoreXXX = totals
// perfomanceScore = perfomanceScoreX
// setTimeout(() => {
// console.log(totalScoreXXX)
// console.log(perfomanceScore)
// }, 300);
}
return
total
}
...
...
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