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
39218e81
Commit
39218e81
authored
Mar 07, 2021
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update new req mba sab
parent
1d0c9422
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
99 additions
and
11 deletions
+99
-11
HomePage.js
src/container/HomePage.js
+4
-4
CorporateAnnualTargetMR.js
src/container/MonthlyReport/CorporateAnnualTargetMR.js
+95
-7
No files found.
src/container/HomePage.js
View file @
39218e81
...
...
@@ -640,13 +640,13 @@ class HomePage extends Component {
<
div
style
=
{{
display
:
'flex'
,
overflowX
:
'scroll'
,
width
:
this
.
props
.
width
*
0.9
}}
>
{
items
.
category
.
map
((
item
,
index
)
=>
{
return
(
<
div
style
=
{{
padding
:
10
,
backgroundColor
:
'#fff'
,
borderRadius
:
6
,
paddingBottom
:
20
,
margin
:
10
,
boxShadow
:
'0 1px 4px 0 rgba(0, 0, 0, 0.25)'
,
width
:
250
,
marginRight
:
index
==
items
.
category
.
length
-
1
?
25
:
0
,
marginLeft
:
index
==
0
?
5
:
25
}}
>
<
div
style
=
{{
padding
:
10
,
backgroundColor
:
'#fff'
,
height
:
350
,
borderRadius
:
6
,
paddingBottom
:
20
,
margin
:
10
,
boxShadow
:
'0 1px 4px 0 rgba(0, 0, 0, 0.25)'
,
width
:
250
,
marginRight
:
index
==
items
.
category
.
length
-
1
?
25
:
0
,
marginLeft
:
index
==
0
?
5
:
25
}}
>
{
/* <span style={{ fontSize: '17px', color: this.state.selectIndex === index ? '#fff' : '#7e8085', maxWidth: 100 }}>{item.category_name}</span> */
}
<
div
style
=
{{
fontSize
:
'17px'
,
width
:
'100%'
}}
>
<
Typography
style
=
{{
textAlign
:
'left'
,
color
:
'#4b4b4b'
}}
>
{
titleCase
(
String
(
item
.
category_name
).
toLocaleLowerCase
())
}
<
/Typography
>
<
div
style
=
{{
fontSize
:
'17px'
,
width
:
'100%'
,
height
:
25
}}
>
<
Typography
style
=
{{
textAlign
:
'left'
,
color
:
'#4b4b4b'
}}
>
{
item
.
category_name
}
<
/Typography
>
<
/div
>
{
item
.
total_kpi
!=
null
&&
<
div
style
=
{{
width
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'center'
,
marginTop
:
String
(
item
.
category_name
).
toLocaleLowerCase
().
includes
(
'internal'
)
?
0
:
25
}}
>
<
div
style
=
{{
width
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'center'
,
marginTop
:
10
}}
>
<
span
style
=
{{
textAlign
:
'center'
,
fontSize
:
'18px'
,
color
:
"#fff"
}}
>
{
item
.
total_kpi
}
<
/span
>
{
/* <span style={{ textAlign: 'center', fontSize: '11px', color: selectIndex === index ? "#fff" : '#4b4b4b' }}>KPIs</span> */
}
<
/div>
}
...
...
src/container/MonthlyReport/CorporateAnnualTargetMR.js
View file @
39218e81
...
...
@@ -671,17 +671,60 @@ export default class CorporateAnnualTargetMR extends Component {
if
(
item
[
8
]
==
'HIB'
)
{
let
actual
=
item
[
11
]
==
""
?
0
:
Number
(
item
[
11
])
let
target
=
item
[
12
]
==
""
?
0
:
Number
(
item
[
12
])
totalAch
=
2
-
(
actual
/
target
)
// if (item[5] == "Striping Ratio (SR) YTD") {
// console.log(actual)
// console.log(target)
// console.log(actual/target)
// }
if
(
target
<
0
)
{
if
(
actual
>
target
)
{
totalAch
=
(
actual
/
target
)
-
1
}
else
{
totalAch
=
(
actual
/
target
)
}
}
else
if
(
target
==
0
)
{
if
(
target
>=
actual
)
{
totalAch
=
1.25
}
else
{
totalAch
=
0
}
}
else
{
if
(
actual
==
target
)
{
totalAch
=
(
actual
/
target
)
}
else
{
totalAch
=
1
-
(
actual
/
target
)
}
}
// if (item[5] == "Striping Ratio (SR) YTD") {
// console.log(actual)
// console.log(target)
// console.log(actual/target)
// }
}
else
{
let
actual
=
item
[
11
]
==
""
?
0
:
Number
(
item
[
11
])
let
target
=
item
[
12
]
==
""
?
0
:
Number
(
item
[
12
])
totalAch
=
actual
/
target
if
(
target
<
0
)
{
if
(
actual
>=
target
)
{
totalAch
=
((
target
-
actual
)
/
target
)
+
1
}
else
{
totalAch
=
(
target
-
actual
)
/
target
}
}
else
if
(
target
==
0
)
{
if
(
target
<=
actual
)
{
totalAch
=
1.25
}
else
{
totalAch
=
0
}
}
else
{
if
(
actual
<=
target
)
{
totalAch
=
(
actual
/
target
)
}
else
{
totalAch
=
1
-
(
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
...
...
@@ -1209,14 +1252,59 @@ export default class CorporateAnnualTargetMR extends Component {
const
handleAchiement
=
(
tableMeta
)
=>
{
let
total
=
0
// if (tableMeta.rowData[8] == 'HIB') {
// let actual = tableMeta.rowData[11] == "" ? 0 : Number(tableMeta.rowData[11])
// let target = tableMeta.rowData[12] == "" ? 0 : Number(tableMeta.rowData[12])
// total = 2 - (actual / target)
// } else {
// let actual = tableMeta.rowData[11] == "" ? 0 : Number(tableMeta.rowData[11])
// let target = tableMeta.rowData[12] == "" ? 0 : Number(tableMeta.rowData[12])
// total = actual / target
// }
if
(
tableMeta
.
rowData
[
8
]
==
'HIB'
)
{
let
actual
=
tableMeta
.
rowData
[
11
]
==
""
?
0
:
Number
(
tableMeta
.
rowData
[
11
])
let
target
=
tableMeta
.
rowData
[
12
]
==
""
?
0
:
Number
(
tableMeta
.
rowData
[
12
])
total
=
2
-
(
actual
/
target
)
if
(
target
<
0
)
{
if
(
actual
>
target
)
{
total
=
(
actual
/
target
)
-
1
}
else
{
total
=
(
actual
/
target
)
}
}
else
if
(
target
==
0
)
{
if
(
target
>=
actual
)
{
total
=
1.25
}
else
{
total
=
0
}
}
else
{
if
(
actual
==
target
)
{
total
=
(
actual
/
target
)
}
else
{
total
=
1
-
(
actual
/
target
)
}
}
}
else
{
let
actual
=
tableMeta
.
rowData
[
11
]
==
""
?
0
:
Number
(
tableMeta
.
rowData
[
11
])
let
target
=
tableMeta
.
rowData
[
12
]
==
""
?
0
:
Number
(
tableMeta
.
rowData
[
12
])
total
=
actual
/
target
if
(
target
<
0
)
{
if
(
actual
>=
target
)
{
total
=
((
target
-
actual
)
/
target
)
+
1
}
else
{
total
=
(
target
-
actual
)
/
target
}
}
else
if
(
target
==
0
)
{
if
(
target
<=
actual
)
{
total
=
1.25
}
else
{
total
=
0
}
}
else
{
if
(
actual
<=
target
)
{
total
=
(
actual
/
target
)
}
else
{
total
=
1
-
(
actual
/
target
)
}
}
}
total
=
String
(
total
)
==
'NaN'
||
String
(
total
)
==
'Infinity'
||
String
(
total
)
==
'-Infinity'
?
0
:
total
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
total
)
*
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