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
706b7267
Commit
706b7267
authored
Mar 07, 2021
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'GGMAC' into 'master'
update new req mba sab See merge request
!1258
parents
1d0c9422
39218e81
Changes
2
Hide 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 @
706b7267
...
@@ -640,13 +640,13 @@ class HomePage extends Component {
...
@@ -640,13 +640,13 @@ class HomePage extends Component {
<
div
style
=
{{
display
:
'flex'
,
overflowX
:
'scroll'
,
width
:
this
.
props
.
width
*
0.9
}}
>
<
div
style
=
{{
display
:
'flex'
,
overflowX
:
'scroll'
,
width
:
this
.
props
.
width
*
0.9
}}
>
{
items
.
category
.
map
((
item
,
index
)
=>
{
{
items
.
category
.
map
((
item
,
index
)
=>
{
return
(
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> */
}
{
/* <span style={{ fontSize: '17px', color: this.state.selectIndex === index ? '#fff' : '#7e8085', maxWidth: 100 }}>{item.category_name}</span> */
}
<
div
style
=
{{
fontSize
:
'17px'
,
width
:
'100%'
}}
>
<
div
style
=
{{
fontSize
:
'17px'
,
width
:
'100%'
,
height
:
25
}}
>
<
Typography
style
=
{{
textAlign
:
'left'
,
color
:
'#4b4b4b'
}}
>
{
titleCase
(
String
(
item
.
category_name
).
toLocaleLowerCase
())
}
<
/Typography
>
<
Typography
style
=
{{
textAlign
:
'left'
,
color
:
'#4b4b4b'
}}
>
{
item
.
category_name
}
<
/Typography
>
<
/div
>
<
/div
>
{
item
.
total_kpi
!=
null
&&
{
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
:
'18px'
,
color
:
"#fff"
}}
>
{
item
.
total_kpi
}
<
/span
>
{
/* <span style={{ textAlign: 'center', fontSize: '11px', color: selectIndex === index ? "#fff" : '#4b4b4b' }}>KPIs</span> */
}
{
/* <span style={{ textAlign: 'center', fontSize: '11px', color: selectIndex === index ? "#fff" : '#4b4b4b' }}>KPIs</span> */
}
<
/div>
}
<
/div>
}
...
...
src/container/MonthlyReport/CorporateAnnualTargetMR.js
View file @
706b7267
...
@@ -671,17 +671,60 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -671,17 +671,60 @@ export default class CorporateAnnualTargetMR extends Component {
if
(
item
[
8
]
==
'HIB'
)
{
if
(
item
[
8
]
==
'HIB'
)
{
let
actual
=
item
[
11
]
==
""
?
0
:
Number
(
item
[
11
])
let
actual
=
item
[
11
]
==
""
?
0
:
Number
(
item
[
11
])
let
target
=
item
[
12
]
==
""
?
0
:
Number
(
item
[
12
])
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
{
}
else
{
let
actual
=
item
[
11
]
==
""
?
0
:
Number
(
item
[
11
])
let
actual
=
item
[
11
]
==
""
?
0
:
Number
(
item
[
11
])
let
target
=
item
[
12
]
==
""
?
0
:
Number
(
item
[
12
])
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
=
String
(
totalAch
)
==
'NaN'
||
String
(
totalAch
)
==
'Infinity'
||
String
(
totalAch
)
==
'-Infinity'
?
0
:
totalAch
totalAch
=
Number
(
totalAch
)
*
100
totalAch
=
Number
(
totalAch
)
*
100
// if (item[5] == "People Benchstrength") {
// console.log(totalAch)
// }
//score
//score
let
listParameter
=
this
.
state
.
parameterScore
let
listParameter
=
this
.
state
.
parameterScore
...
@@ -1209,14 +1252,59 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -1209,14 +1252,59 @@ export default class CorporateAnnualTargetMR extends Component {
const
handleAchiement
=
(
tableMeta
)
=>
{
const
handleAchiement
=
(
tableMeta
)
=>
{
let
total
=
0
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'
)
{
if
(
tableMeta
.
rowData
[
8
]
==
'HIB'
)
{
let
actual
=
tableMeta
.
rowData
[
11
]
==
""
?
0
:
Number
(
tableMeta
.
rowData
[
11
])
let
actual
=
tableMeta
.
rowData
[
11
]
==
""
?
0
:
Number
(
tableMeta
.
rowData
[
11
])
let
target
=
tableMeta
.
rowData
[
12
]
==
""
?
0
:
Number
(
tableMeta
.
rowData
[
12
])
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
{
}
else
{
let
actual
=
tableMeta
.
rowData
[
11
]
==
""
?
0
:
Number
(
tableMeta
.
rowData
[
11
])
let
actual
=
tableMeta
.
rowData
[
11
]
==
""
?
0
:
Number
(
tableMeta
.
rowData
[
11
])
let
target
=
tableMeta
.
rowData
[
12
]
==
""
?
0
:
Number
(
tableMeta
.
rowData
[
12
])
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
total
=
String
(
total
)
==
'NaN'
||
String
(
total
)
==
'Infinity'
||
String
(
total
)
==
'-Infinity'
?
0
:
total
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
total
)
*
100
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