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
4f33c3c6
Commit
4f33c3c6
authored
Jan 10, 2024
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue Weight CAT
parent
9afbb74f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
CorporateAnnualTargetMR.js
src/container/MonthlyReport/CorporateAnnualTargetMR.js
+17
-13
No files found.
src/container/MonthlyReport/CorporateAnnualTargetMR.js
View file @
4f33c3c6
...
...
@@ -196,6 +196,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
getItemHierarki
()
{
this
.
setState
({
loading
:
true
})
let
payload
=
{
"report_id"
:
this
.
props
.
report_id
,
"revision"
:
Number
(
this
.
props
.
revision
),
...
...
@@ -218,7 +219,7 @@ export default class CorporateAnnualTargetMR extends Component {
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
if
(
indexIDzz
===
-
1
)
{
let
parentTrue
=
item
.
parent_name
==
'INTERNAL BUSINESS PROCESS PERSPECTIVE'
||
item
.
parent_name
==
'CUSTOMER PERSPECTIVE'
let
weight
=
String
(
item
.
weight
).
includes
(
'%'
)
?
String
(
item
.
weight
).
substr
(
0
,
String
(
item
.
weight
).
length
-
1
)
:
String
(
item
.
weight
)
//
let weight = String(item.weight).includes('%') ? String(item.weight).substr(0, String(item.weight).length - 1) : String(item.weight)
let
weightTB
=
String
(
item
.
corporate_annual_target
.
weight
).
includes
(
'%'
)
?
String
(
item
.
corporate_annual_target
.
weight
).
substr
(
0
,
String
(
item
.
corporate_annual_target
.
weight
).
length
-
1
)
:
String
(
item
.
corporate_annual_target
.
weight
)
// console.log(weight)
dataTable
.
push
([
...
...
@@ -229,7 +230,8 @@ export default class CorporateAnnualTargetMR extends Component {
item
.
level
,
item
.
description
,
// item.corporate_annual_target.weight == "" ? Number(0).toFixed(1) : Number(weight).toFixed(1),
parentTrue
?
weight
:
weightTB
,
// parentTrue ? weight : weightTB,
weightTB
,
parentTrue
?
item
.
corporate_annual_target
.
uom
:
item
.
uom
,
parentTrue
?
item
.
corporate_annual_target
.
jenis_kpi
==
""
?
null
:
item
.
corporate_annual_target
.
jenis_kpi
:
item
.
jenis_kpi
==
""
?
null
:
item
.
kpi_type
,
// parentTrue ? item.corporate_annual_target.kpi_type == "" ? null : { value: item.corporate_annual_target.kpi_type } : item.kpi_type == "" ? null : { value: item.kpi_type },
...
...
@@ -282,6 +284,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
}
res
.
map
((
item
,
index
)
=>
{
let
weightParent
=
String
(
item
.
corporate_annual_target
.
weight
).
includes
(
'%'
)
?
String
(
item
.
corporate_annual_target
.
weight
).
substr
(
0
,
String
(
item
.
corporate_annual_target
.
weight
).
length
-
1
)
:
String
(
item
.
corporate_annual_target
.
weight
)
dataTable
.
push
([
item
.
type_report_id
,
item
.
id
,
...
...
@@ -289,7 +292,8 @@ export default class CorporateAnnualTargetMR extends Component {
item
.
formula
,
item
.
level
,
item
.
description
,
item
.
weight
==
''
?
Number
(
0
)
:
Number
(
Number
(
item
.
weight
)
*
100
),
item
.
parent
==
null
?
weightParent
:
item
.
corporate_annual_target
.
weight
,
// item.weight == '' ? Number(0) : Number(Number(item.weight) * 100),
item
.
uom
,
item
.
kpi_type
==
""
?
null
:
item
.
kpi_type
,
// item.kpi_type == "" ? null : { value: item.kpi_type },
...
...
@@ -621,11 +625,11 @@ export default class CorporateAnnualTargetMR extends Component {
options
:
inputMaxAch
,
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
value
),
};
//
setTimeout(() => {
this
.
setState
({
maxAchList
:
defaultProps
},
()
=>
{
this
.
getItemHierarki
()
})
//
}, 300);
setTimeout
(()
=>
{
this
.
setState
({
maxAchList
:
defaultProps
},
()
=>
{
this
.
getItemHierarki
()
})
},
300
);
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
...
...
@@ -939,11 +943,11 @@ export default class CorporateAnnualTargetMR extends Component {
})
}
// console.log(Number(lastTotal))
console
.
log
(
this
.
state
.
parameterPerfom
)
console
.
log
(
listPerfomanceDefault
)
console
.
log
(
perfomanceScore
)
console
.
log
(
perfomanceScoreColor
)
console
.
log
(
datatable3
)
//
console.log(this.state.parameterPerfom)
//
console.log(listPerfomanceDefault)
//
console.log(perfomanceScore)
//
console.log(perfomanceScoreColor)
//
console.log(datatable3)
// if (lastTotal >= 1.00 && lastTotal <= 2.00) {
// perfomanceScore = 'K'
// } else if (lastTotal >= 2.01 && lastTotal <= 2.75) {
...
...
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