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
acb4bd4f
Commit
acb4bd4f
authored
Apr 29, 2021
by
d.arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into GGMAC
parents
acd2cc47
d4e4f38d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
241 additions
and
181 deletions
+241
-181
index.js
src/api/index.js
+3
-1
CorporateAnnualTargetOLPA.js
src/container/OutlookPA/CorporateAnnualTargetOLPA.js
+238
-180
No files found.
src/api/index.js
View file @
acb4bd4f
...
@@ -366,6 +366,7 @@ const create = (type = "") => {
...
@@ -366,6 +366,7 @@ const create = (type = "") => {
const
createDBPLOLPA
=
(
body
)
=>
api
.
post
(
'transaction/db_profit_loss/outlook_pa/create_outlook_report'
,
body
)
const
createDBPLOLPA
=
(
body
)
=>
api
.
post
(
'transaction/db_profit_loss/outlook_pa/create_outlook_report'
,
body
)
const
getHierarkiDBPLRO
=
(
body
)
=>
api
.
post
(
'transaction/db_profit_loss/rolling_outlook/get_report_hierarki'
,
body
)
const
getHierarkiDBPLRO
=
(
body
)
=>
api
.
post
(
'transaction/db_profit_loss/rolling_outlook/get_report_hierarki'
,
body
)
const
createDBPLRO
=
(
body
)
=>
api
.
post
(
'transaction/db_profit_loss/rolling_outlook/create_rolling_outlook'
,
body
)
const
createDBPLRO
=
(
body
)
=>
api
.
post
(
'transaction/db_profit_loss/rolling_outlook/create_rolling_outlook'
,
body
)
const
getDetailReportOLPACAT
=
(
body
)
=>
api
.
post
(
'transaction/cat/outlook_pa/get_report_hierarki'
,
body
)
// Monthly
// Monthly
const
getMonthlyReport
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/get_all_report'
,
body
)
const
getMonthlyReport
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/get_all_report'
,
body
)
...
@@ -802,7 +803,8 @@ const create = (type = "") => {
...
@@ -802,7 +803,8 @@ const create = (type = "") => {
getHierarkiDBPLOLPA
,
getHierarkiDBPLOLPA
,
createDBPLOLPA
,
createDBPLOLPA
,
getHierarkiDBPLRO
,
getHierarkiDBPLRO
,
createDBPLRO
createDBPLRO
,
getDetailReportOLPACAT
}
}
}
}
...
...
src/container/OutlookPA/CorporateAnnualTargetOLPA.js
View file @
acb4bd4f
...
@@ -93,10 +93,11 @@ export default class CorporateAnnualTargetOLPA extends Component {
...
@@ -93,10 +93,11 @@ export default class CorporateAnnualTargetOLPA extends Component {
}
}
componentDidMount
()
{
componentDidMount
()
{
//
this.getKPIType()
this
.
getKPIType
()
//
this.getMaxAch()
this
.
getMaxAch
()
//
this.getLatestUpdate()
this
.
getLatestUpdate
()
// this.handleViewOnly()
// this.handleViewOnly()
// this.getItemHierarki()
console
.
log
(
this
.
state
.
get_for
)
console
.
log
(
this
.
state
.
get_for
)
}
}
...
@@ -144,19 +145,22 @@ export default class CorporateAnnualTargetOLPA extends Component {
...
@@ -144,19 +145,22 @@ export default class CorporateAnnualTargetOLPA extends Component {
getItemHierarki
()
{
getItemHierarki
()
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
let
payload
=
{
let
payload
=
{
"report_id"
:
this
.
props
.
report_id
,
"report_id"
:
10
,
"revision"
:
Number
(
this
.
props
.
revision
),
"revision"
:
Number
(
this
.
props
.
revision
),
"periode"
:
this
.
props
.
periode
,
"periode"
:
this
.
props
.
periode
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"submission_id"
:
this
.
props
.
submissionID
"get_for"
:
this
.
state
.
get_for
,
"quartal"
:
"q1"
,
"rolling_outlook_id"
:
0
}
}
console
.
log
(
JSON
.
stringify
(
payload
))
//
console.log(JSON.stringify(payload))
api
.
create
().
getDetailReport
MB
(
payload
).
then
(
response
=>
{
api
.
create
().
getDetailReport
OLPACAT
(
payload
).
then
(
response
=>
{
let
dataTable
=
[]
let
dataTable
=
[]
let
dataCustomerPrs
=
[]
let
dataCustomerPrs
=
[]
let
dataInternalBsn
=
[]
let
dataInternalBsn
=
[]
let
dataFin
=
[]
let
dataFin
=
[]
let
dataLearn
=
[]
let
dataLearn
=
[]
console
.
log
(
payload
)
console
.
log
(
response
)
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
...
@@ -215,30 +219,30 @@ export default class CorporateAnnualTargetOLPA extends Component {
...
@@ -215,30 +219,30 @@ export default class CorporateAnnualTargetOLPA extends Component {
item
.
level
,
item
.
level
,
""
,
""
,
item
.
description
,
item
.
description
,
item
.
type_report_id
==
1
?
`
${
Number
(
item
.
weight
)
*
100
}
%`
:
(
String
(
Number
(
String
(
item
.
c
at
.
weight
).
substr
(
0
,
String
(
item
.
ca
t
.
weight
).
length
-
1
)).
toFixed
(
1
))
+
'%'
),
item
.
type_report_id
==
1
?
`
${
Number
(
item
.
weight
)
*
100
}
%`
:
(
String
(
Number
(
String
(
item
.
c
orporate_annual_target
.
weight
).
substr
(
0
,
String
(
item
.
corporate_annual_targe
t
.
weight
).
length
-
1
)).
toFixed
(
1
))
+
'%'
),
parentTrue
?
item
.
c
a
t
.
uom
:
item
.
uom
,
parentTrue
?
item
.
c
orporate_annual_targe
t
.
uom
:
item
.
uom
,
parentTrue
?
item
.
c
at
.
kpi_type
==
""
?
null
:
{
value
:
item
.
ca
t
.
kpi_type
}
:
item
.
kpi_type
==
""
?
null
:
{
value
:
item
.
kpi_type
},
parentTrue
?
item
.
c
orporate_annual_target
.
kpi_type
==
""
?
null
:
{
value
:
item
.
corporate_annual_targe
t
.
kpi_type
}
:
item
.
kpi_type
==
""
?
null
:
{
value
:
item
.
kpi_type
},
parentTrue
?
item
.
c
at
.
max_ach
==
""
?
null
:
{
value
:
titleCase
(
item
.
ca
t
.
max_ach
)
}
:
item
.
max_ach
==
""
?
null
:
{
value
:
titleCase
(
item
.
max_ach
)
},
parentTrue
?
item
.
c
orporate_annual_target
.
max_ach
==
""
?
null
:
{
value
:
titleCase
(
item
.
corporate_annual_targe
t
.
max_ach
)
}
:
item
.
max_ach
==
""
?
null
:
{
value
:
titleCase
(
item
.
max_ach
)
},
parentTrue
?
item
.
c
at
.
formula
==
""
?
null
:
{
value
:
item
.
ca
t
.
formula
}
:
item
.
formula_ytd
==
""
?
null
:
{
value
:
item
.
formula_ytd
},
parentTrue
?
item
.
c
orporate_annual_target
.
formula
==
""
?
null
:
{
value
:
item
.
corporate_annual_targe
t
.
formula
}
:
item
.
formula_ytd
==
""
?
null
:
{
value
:
item
.
formula_ytd
},
item
.
c
at
.
total_actual_before
==
""
?
item
.
cat
.
total_actual_before
:
String
(
item
.
cat
.
total_actual_before
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
total_actual_before
)
:
Number
(
item
.
ca
t
.
total_actual_before
).
toFixed
(
1
),
item
.
c
orporate_annual_target
.
total_actual_before
==
""
?
item
.
corporate_annual_target
.
total_actual_before
:
String
(
item
.
corporate_annual_target
.
total_actual_before
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
total_actual_before
)
:
Number
(
item
.
corporate_annual_targe
t
.
total_actual_before
).
toFixed
(
1
),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
at
.
january
==
""
?
item
.
cat
.
january
:
String
(
item
.
cat
.
january
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
january
)
:
Number
(
item
.
cat
.
january
).
toFixed
(
1
))
:
{
value
:
item
.
cat
.
january
,
formula
:
item
.
cat
.
january_formula
}
:
(
item
.
cat
.
january
==
""
?
item
.
cat
.
january
:
String
(
item
.
cat
.
january
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
january
)
:
Number
(
item
.
ca
t
.
january
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
orporate_annual_target
.
january
==
""
?
item
.
corporate_annual_target
.
january
:
String
(
item
.
corporate_annual_target
.
january
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
january
)
:
Number
(
item
.
corporate_annual_target
.
january
).
toFixed
(
1
))
:
{
value
:
item
.
corporate_annual_target
.
january
,
formula
:
item
.
corporate_annual_target
.
january_formula
}
:
(
item
.
corporate_annual_target
.
january
==
""
?
item
.
corporate_annual_target
.
january
:
String
(
item
.
corporate_annual_target
.
january
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
january
)
:
Number
(
item
.
corporate_annual_targe
t
.
january
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
at
.
february
==
""
?
item
.
cat
.
february
:
String
(
item
.
cat
.
february
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
february
)
:
Number
(
item
.
cat
.
february
).
toFixed
(
1
))
:
{
value
:
item
.
cat
.
february
,
formula
:
item
.
cat
.
february_formula
}
:
(
item
.
cat
.
february
==
""
?
item
.
cat
.
february
:
String
(
item
.
cat
.
february
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
february
)
:
Number
(
item
.
ca
t
.
february
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
orporate_annual_target
.
february
==
""
?
item
.
corporate_annual_target
.
february
:
String
(
item
.
corporate_annual_target
.
february
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
february
)
:
Number
(
item
.
corporate_annual_target
.
february
).
toFixed
(
1
))
:
{
value
:
item
.
corporate_annual_target
.
february
,
formula
:
item
.
corporate_annual_target
.
february_formula
}
:
(
item
.
corporate_annual_target
.
february
==
""
?
item
.
corporate_annual_target
.
february
:
String
(
item
.
corporate_annual_target
.
february
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
february
)
:
Number
(
item
.
corporate_annual_targe
t
.
february
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
at
.
march
==
""
?
item
.
cat
.
march
:
String
(
item
.
cat
.
march
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
march
)
:
Number
(
item
.
cat
.
march
).
toFixed
(
1
))
:
{
value
:
item
.
cat
.
march
,
formula
:
item
.
cat
.
march_formula
}
:
(
item
.
cat
.
march
==
""
?
item
.
cat
.
march
:
String
(
item
.
cat
.
march
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
march
)
:
Number
(
item
.
ca
t
.
march
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
orporate_annual_target
.
march
==
""
?
item
.
corporate_annual_target
.
march
:
String
(
item
.
corporate_annual_target
.
march
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
march
)
:
Number
(
item
.
corporate_annual_target
.
march
).
toFixed
(
1
))
:
{
value
:
item
.
corporate_annual_target
.
march
,
formula
:
item
.
corporate_annual_target
.
march_formula
}
:
(
item
.
corporate_annual_target
.
march
==
""
?
item
.
corporate_annual_target
.
march
:
String
(
item
.
corporate_annual_target
.
march
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
march
)
:
Number
(
item
.
corporate_annual_targe
t
.
march
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
at
.
april
==
""
?
item
.
cat
.
april
:
String
(
item
.
cat
.
april
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
april
)
:
Number
(
item
.
cat
.
april
).
toFixed
(
1
))
:
{
value
:
item
.
cat
.
april
,
formula
:
item
.
cat
.
april_formula
}
:
(
item
.
cat
.
april
==
""
?
item
.
cat
.
april
:
String
(
item
.
cat
.
april
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
april
)
:
Number
(
item
.
ca
t
.
april
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
orporate_annual_target
.
april
==
""
?
item
.
corporate_annual_target
.
april
:
String
(
item
.
corporate_annual_target
.
april
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
april
)
:
Number
(
item
.
corporate_annual_target
.
april
).
toFixed
(
1
))
:
{
value
:
item
.
corporate_annual_target
.
april
,
formula
:
item
.
corporate_annual_target
.
april_formula
}
:
(
item
.
corporate_annual_target
.
april
==
""
?
item
.
corporate_annual_target
.
april
:
String
(
item
.
corporate_annual_target
.
april
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
april
)
:
Number
(
item
.
corporate_annual_targe
t
.
april
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
at
.
may
==
""
?
item
.
cat
.
may
:
String
(
item
.
cat
.
may
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
may
)
:
Number
(
item
.
cat
.
may
).
toFixed
(
1
))
:
{
value
:
item
.
cat
.
may
,
formula
:
item
.
cat
.
may_formula
}
:
(
item
.
cat
.
may
==
""
?
item
.
cat
.
may
:
String
(
item
.
cat
.
may
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
may
)
:
Number
(
item
.
ca
t
.
may
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
orporate_annual_target
.
may
==
""
?
item
.
corporate_annual_target
.
may
:
String
(
item
.
corporate_annual_target
.
may
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
may
)
:
Number
(
item
.
corporate_annual_target
.
may
).
toFixed
(
1
))
:
{
value
:
item
.
corporate_annual_target
.
may
,
formula
:
item
.
corporate_annual_target
.
may_formula
}
:
(
item
.
corporate_annual_target
.
may
==
""
?
item
.
corporate_annual_target
.
may
:
String
(
item
.
corporate_annual_target
.
may
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
may
)
:
Number
(
item
.
corporate_annual_targe
t
.
may
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
at
.
june
==
""
?
item
.
cat
.
june
:
String
(
item
.
cat
.
june
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
june
)
:
Number
(
item
.
cat
.
june
).
toFixed
(
1
))
:
{
value
:
item
.
cat
.
june
,
formula
:
item
.
cat
.
june_formula
}
:
(
item
.
cat
.
june
==
""
?
item
.
cat
.
june
:
String
(
item
.
cat
.
june
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
june
)
:
Number
(
item
.
ca
t
.
june
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
orporate_annual_target
.
june
==
""
?
item
.
corporate_annual_target
.
june
:
String
(
item
.
corporate_annual_target
.
june
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
june
)
:
Number
(
item
.
corporate_annual_target
.
june
).
toFixed
(
1
))
:
{
value
:
item
.
corporate_annual_target
.
june
,
formula
:
item
.
corporate_annual_target
.
june_formula
}
:
(
item
.
corporate_annual_target
.
june
==
""
?
item
.
corporate_annual_target
.
june
:
String
(
item
.
corporate_annual_target
.
june
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
june
)
:
Number
(
item
.
corporate_annual_targe
t
.
june
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
at
.
july
==
""
?
item
.
cat
.
july
:
String
(
item
.
cat
.
july
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
july
)
:
Number
(
item
.
cat
.
july
).
toFixed
(
1
))
:
{
value
:
item
.
cat
.
july
,
formula
:
item
.
cat
.
july_formula
}
:
(
item
.
cat
.
july
==
""
?
item
.
cat
.
july
:
String
(
item
.
cat
.
july
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
july
)
:
Number
(
item
.
ca
t
.
july
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
orporate_annual_target
.
july
==
""
?
item
.
corporate_annual_target
.
july
:
String
(
item
.
corporate_annual_target
.
july
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
july
)
:
Number
(
item
.
corporate_annual_target
.
july
).
toFixed
(
1
))
:
{
value
:
item
.
corporate_annual_target
.
july
,
formula
:
item
.
corporate_annual_target
.
july_formula
}
:
(
item
.
corporate_annual_target
.
july
==
""
?
item
.
corporate_annual_target
.
july
:
String
(
item
.
corporate_annual_target
.
july
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
july
)
:
Number
(
item
.
corporate_annual_targe
t
.
july
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
at
.
august
==
""
?
item
.
cat
.
august
:
String
(
item
.
cat
.
august
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
august
)
:
Number
(
item
.
cat
.
august
).
toFixed
(
1
))
:
{
value
:
item
.
cat
.
august
,
formula
:
item
.
cat
.
august_formula
}
:
(
item
.
cat
.
august
==
""
?
item
.
cat
.
august
:
String
(
item
.
cat
.
august
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
august
)
:
Number
(
item
.
ca
t
.
august
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
orporate_annual_target
.
august
==
""
?
item
.
corporate_annual_target
.
august
:
String
(
item
.
corporate_annual_target
.
august
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
august
)
:
Number
(
item
.
corporate_annual_target
.
august
).
toFixed
(
1
))
:
{
value
:
item
.
corporate_annual_target
.
august
,
formula
:
item
.
corporate_annual_target
.
august_formula
}
:
(
item
.
corporate_annual_target
.
august
==
""
?
item
.
corporate_annual_target
.
august
:
String
(
item
.
corporate_annual_target
.
august
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
august
)
:
Number
(
item
.
corporate_annual_targe
t
.
august
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
at
.
september
==
""
?
item
.
cat
.
september
:
String
(
item
.
cat
.
september
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
september
)
:
Number
(
item
.
cat
.
september
).
toFixed
(
1
))
:
{
value
:
item
.
cat
.
september
,
formula
:
item
.
cat
.
september_formula
}
:
(
item
.
cat
.
september
==
""
?
item
.
cat
.
september
:
String
(
item
.
cat
.
september
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
september
)
:
Number
(
item
.
ca
t
.
september
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
orporate_annual_target
.
september
==
""
?
item
.
corporate_annual_target
.
september
:
String
(
item
.
corporate_annual_target
.
september
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
september
)
:
Number
(
item
.
corporate_annual_target
.
september
).
toFixed
(
1
))
:
{
value
:
item
.
corporate_annual_target
.
september
,
formula
:
item
.
corporate_annual_target
.
september_formula
}
:
(
item
.
corporate_annual_target
.
september
==
""
?
item
.
corporate_annual_target
.
september
:
String
(
item
.
corporate_annual_target
.
september
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
september
)
:
Number
(
item
.
corporate_annual_targe
t
.
september
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
at
.
october
==
""
?
item
.
cat
.
october
:
String
(
item
.
cat
.
october
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
october
)
:
Number
(
item
.
cat
.
october
).
toFixed
(
1
))
:
{
value
:
item
.
cat
.
october
,
formula
:
item
.
cat
.
october_formula
}
:
(
item
.
cat
.
october
==
""
?
item
.
cat
.
october
:
String
(
item
.
cat
.
october
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
october
)
:
Number
(
item
.
ca
t
.
october
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
orporate_annual_target
.
october
==
""
?
item
.
corporate_annual_target
.
october
:
String
(
item
.
corporate_annual_target
.
october
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
october
)
:
Number
(
item
.
corporate_annual_target
.
october
).
toFixed
(
1
))
:
{
value
:
item
.
corporate_annual_target
.
october
,
formula
:
item
.
corporate_annual_target
.
october_formula
}
:
(
item
.
corporate_annual_target
.
october
==
""
?
item
.
corporate_annual_target
.
october
:
String
(
item
.
corporate_annual_target
.
october
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
october
)
:
Number
(
item
.
corporate_annual_targe
t
.
october
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
at
.
november
==
""
?
item
.
cat
.
november
:
String
(
item
.
cat
.
november
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
november
)
:
Number
(
item
.
cat
.
november
).
toFixed
(
1
))
:
{
value
:
item
.
cat
.
november
,
formula
:
item
.
cat
.
november_formula
}
:
(
item
.
cat
.
november
==
""
?
item
.
cat
.
november
:
String
(
item
.
cat
.
november
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
november
)
:
Number
(
item
.
ca
t
.
november
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
orporate_annual_target
.
november
==
""
?
item
.
corporate_annual_target
.
november
:
String
(
item
.
corporate_annual_target
.
november
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
november
)
:
Number
(
item
.
corporate_annual_target
.
november
).
toFixed
(
1
))
:
{
value
:
item
.
corporate_annual_target
.
november
,
formula
:
item
.
corporate_annual_target
.
november_formula
}
:
(
item
.
corporate_annual_target
.
november
==
""
?
item
.
corporate_annual_target
.
november
:
String
(
item
.
corporate_annual_target
.
november
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
november
)
:
Number
(
item
.
corporate_annual_targe
t
.
november
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
at
.
december
==
""
?
item
.
cat
.
december
:
String
(
item
.
cat
.
december
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
december
)
:
Number
(
item
.
cat
.
december
).
toFixed
(
1
))
:
{
value
:
item
.
cat
.
december
,
formula
:
item
.
cat
.
december_formula
}
:
(
item
.
cat
.
december
==
""
?
item
.
cat
.
december
:
String
(
item
.
cat
.
december
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
december
)
:
Number
(
item
.
ca
t
.
december
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
item
.
type_report_id
==
3
?
(
item
.
c
orporate_annual_target
.
december
==
""
?
item
.
corporate_annual_target
.
december
:
String
(
item
.
corporate_annual_target
.
december
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
december
)
:
Number
(
item
.
corporate_annual_target
.
december
).
toFixed
(
1
))
:
{
value
:
item
.
corporate_annual_target
.
december
,
formula
:
item
.
corporate_annual_target
.
december_formula
}
:
(
item
.
corporate_annual_target
.
december
==
""
?
item
.
corporate_annual_target
.
december
:
String
(
item
.
corporate_annual_target
.
december
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
december
)
:
Number
(
item
.
corporate_annual_targe
t
.
december
).
toFixed
(
1
)),
item
.
c
at
.
total_current_year
==
""
?
0
:
String
(
item
.
cat
.
total_current_year
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
total_current_year
)
:
Number
(
item
.
ca
t
.
total_current_year
).
toFixed
(
1
),
item
.
c
orporate_annual_target
.
total_current_year
==
""
?
0
:
String
(
item
.
corporate_annual_target
.
total_current_year
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
total_current_year
)
:
Number
(
item
.
corporate_annual_targe
t
.
total_current_year
).
toFixed
(
1
),
item
.
c
at
.
total_next_year
==
""
?
item
.
cat
.
total_next_year
:
String
(
item
.
cat
.
total_next_year
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
total_next_year
)
:
Number
(
item
.
ca
t
.
total_next_year
).
toFixed
(
1
),
item
.
c
orporate_annual_target
.
total_next_year
==
""
?
item
.
corporate_annual_target
.
total_next_year
:
String
(
item
.
corporate_annual_target
.
total_next_year
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
total_next_year
)
:
Number
(
item
.
corporate_annual_targe
t
.
total_next_year
).
toFixed
(
1
),
item
.
c
at
.
total_more_year
==
""
?
item
.
cat
.
total_more_year
:
String
(
item
.
cat
.
total_more_year
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
total_more_year
)
:
Number
(
item
.
ca
t
.
total_more_year
).
toFixed
(
1
),
item
.
c
orporate_annual_target
.
total_more_year
==
""
?
item
.
corporate_annual_target
.
total_more_year
:
String
(
item
.
corporate_annual_target
.
total_more_year
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
total_more_year
)
:
Number
(
item
.
corporate_annual_targe
t
.
total_more_year
).
toFixed
(
1
),
item
.
c
a
t
.
strategic
,
item
.
c
orporate_annual_targe
t
.
strategic
,
item
.
c
a
t
.
pic
,
item
.
c
orporate_annual_targe
t
.
pic
,
item
.
c
a
t
.
forecast_formula
,
item
.
c
orporate_annual_targe
t
.
forecast_formula
,
item
.
order
item
.
order
])
])
}
}
...
@@ -259,30 +263,30 @@ export default class CorporateAnnualTargetOLPA extends Component {
...
@@ -259,30 +263,30 @@ export default class CorporateAnnualTargetOLPA extends Component {
item
.
level
,
item
.
level
,
""
,
""
,
item
.
description
,
item
.
description
,
item
.
type_report_id
==
1
?
`
${
Number
(
item
.
weight
)
*
100
}
%`
:
(
String
(
Number
(
String
(
item
.
c
at
.
weight
).
substr
(
0
,
String
(
item
.
ca
t
.
weight
).
length
-
1
)).
toFixed
(
1
))
+
'%'
),
item
.
type_report_id
==
1
?
`
${
Number
(
item
.
weight
)
*
100
}
%`
:
(
String
(
Number
(
String
(
item
.
c
orporate_annual_target
.
weight
).
substr
(
0
,
String
(
item
.
corporate_annual_targe
t
.
weight
).
length
-
1
)).
toFixed
(
1
))
+
'%'
),
item
.
c
a
t
.
uom
,
item
.
c
orporate_annual_targe
t
.
uom
,
item
.
kpi_type
==
""
?
null
:
{
value
:
item
.
kpi_type
},
item
.
kpi_type
==
""
?
null
:
{
value
:
item
.
kpi_type
},
item
.
max_ach
==
""
?
null
:
{
value
:
titleCase
(
item
.
max_ach
)
},
item
.
max_ach
==
""
?
null
:
{
value
:
titleCase
(
item
.
max_ach
)
},
item
.
formula
==
""
?
null
:
{
value
:
item
.
formula_ytd
},
item
.
formula
==
""
?
null
:
{
value
:
item
.
formula_ytd
},
item
.
c
at
.
total_actual_before
==
""
?
item
.
cat
.
total_actual_before
:
String
(
item
.
cat
.
total_actual_before
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
total_actual_before
)
:
Number
(
item
.
ca
t
.
total_actual_before
).
toFixed
(
1
),
item
.
c
orporate_annual_target
.
total_actual_before
==
""
?
item
.
corporate_annual_target
.
total_actual_before
:
String
(
item
.
corporate_annual_target
.
total_actual_before
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
total_actual_before
)
:
Number
(
item
.
corporate_annual_targe
t
.
total_actual_before
).
toFixed
(
1
),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
at
.
january
,
formula
:
item
.
cat
.
january_formula
}
:
(
item
.
cat
.
january
==
""
?
item
.
cat
.
january
:
String
(
item
.
cat
.
january
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
january
)
:
Number
(
item
.
ca
t
.
january
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
orporate_annual_target
.
january
,
formula
:
item
.
corporate_annual_target
.
january_formula
}
:
(
item
.
corporate_annual_target
.
january
==
""
?
item
.
corporate_annual_target
.
january
:
String
(
item
.
corporate_annual_target
.
january
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
january
)
:
Number
(
item
.
corporate_annual_targe
t
.
january
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
at
.
february
,
formula
:
item
.
cat
.
february_formula
}
:
(
item
.
cat
.
february
==
""
?
item
.
cat
.
february
:
String
(
item
.
cat
.
february
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
february
)
:
Number
(
item
.
ca
t
.
february
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
orporate_annual_target
.
february
,
formula
:
item
.
corporate_annual_target
.
february_formula
}
:
(
item
.
corporate_annual_target
.
february
==
""
?
item
.
corporate_annual_target
.
february
:
String
(
item
.
corporate_annual_target
.
february
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
february
)
:
Number
(
item
.
corporate_annual_targe
t
.
february
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
at
.
march
,
formula
:
item
.
cat
.
march_formula
}
:
(
item
.
cat
.
march
==
""
?
item
.
cat
.
march
:
String
(
item
.
cat
.
march
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
march
)
:
Number
(
item
.
ca
t
.
march
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
orporate_annual_target
.
march
,
formula
:
item
.
corporate_annual_target
.
march_formula
}
:
(
item
.
corporate_annual_target
.
march
==
""
?
item
.
corporate_annual_target
.
march
:
String
(
item
.
corporate_annual_target
.
march
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
march
)
:
Number
(
item
.
corporate_annual_targe
t
.
march
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
at
.
april
,
formula
:
item
.
cat
.
april_formula
}
:
(
item
.
cat
.
april
==
""
?
item
.
cat
.
april
:
String
(
item
.
cat
.
april
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
april
)
:
Number
(
item
.
ca
t
.
april
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
orporate_annual_target
.
april
,
formula
:
item
.
corporate_annual_target
.
april_formula
}
:
(
item
.
corporate_annual_target
.
april
==
""
?
item
.
corporate_annual_target
.
april
:
String
(
item
.
corporate_annual_target
.
april
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
april
)
:
Number
(
item
.
corporate_annual_targe
t
.
april
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
at
.
may
,
formula
:
item
.
cat
.
may_formula
}
:
(
item
.
cat
.
may
==
""
?
item
.
cat
.
may
:
String
(
item
.
cat
.
may
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
may
)
:
Number
(
item
.
ca
t
.
may
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
orporate_annual_target
.
may
,
formula
:
item
.
corporate_annual_target
.
may_formula
}
:
(
item
.
corporate_annual_target
.
may
==
""
?
item
.
corporate_annual_target
.
may
:
String
(
item
.
corporate_annual_target
.
may
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
may
)
:
Number
(
item
.
corporate_annual_targe
t
.
may
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
at
.
june
,
formula
:
item
.
cat
.
june_formula
}
:
(
item
.
cat
.
june
==
""
?
item
.
cat
.
june
:
String
(
item
.
cat
.
june
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
june
)
:
Number
(
item
.
ca
t
.
june
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
orporate_annual_target
.
june
,
formula
:
item
.
corporate_annual_target
.
june_formula
}
:
(
item
.
corporate_annual_target
.
june
==
""
?
item
.
corporate_annual_target
.
june
:
String
(
item
.
corporate_annual_target
.
june
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
june
)
:
Number
(
item
.
corporate_annual_targe
t
.
june
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
at
.
july
,
formula
:
item
.
cat
.
july_formula
}
:
(
item
.
cat
.
july
==
""
?
item
.
cat
.
july
:
String
(
item
.
cat
.
july
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
july
)
:
Number
(
item
.
ca
t
.
july
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
orporate_annual_target
.
july
,
formula
:
item
.
corporate_annual_target
.
july_formula
}
:
(
item
.
corporate_annual_target
.
july
==
""
?
item
.
corporate_annual_target
.
july
:
String
(
item
.
corporate_annual_target
.
july
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
july
)
:
Number
(
item
.
corporate_annual_targe
t
.
july
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
at
.
august
,
formula
:
item
.
cat
.
august_formula
}
:
(
item
.
cat
.
august
==
""
?
item
.
cat
.
august
:
String
(
item
.
cat
.
august
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
august
)
:
Number
(
item
.
ca
t
.
august
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
orporate_annual_target
.
august
,
formula
:
item
.
corporate_annual_target
.
august_formula
}
:
(
item
.
corporate_annual_target
.
august
==
""
?
item
.
corporate_annual_target
.
august
:
String
(
item
.
corporate_annual_target
.
august
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
august
)
:
Number
(
item
.
corporate_annual_targe
t
.
august
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
at
.
september
,
formula
:
item
.
cat
.
september_formula
}
:
(
item
.
cat
.
september
==
""
?
item
.
cat
.
september
:
String
(
item
.
cat
.
september
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
september
)
:
Number
(
item
.
ca
t
.
september
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
orporate_annual_target
.
september
,
formula
:
item
.
corporate_annual_target
.
september_formula
}
:
(
item
.
corporate_annual_target
.
september
==
""
?
item
.
corporate_annual_target
.
september
:
String
(
item
.
corporate_annual_target
.
september
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
september
)
:
Number
(
item
.
corporate_annual_targe
t
.
september
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
at
.
october
,
formula
:
item
.
cat
.
october_formula
}
:
(
item
.
cat
.
october
==
""
?
item
.
cat
.
october
:
String
(
item
.
cat
.
october
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
october
)
:
Number
(
item
.
ca
t
.
october
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
orporate_annual_target
.
october
,
formula
:
item
.
corporate_annual_target
.
october_formula
}
:
(
item
.
corporate_annual_target
.
october
==
""
?
item
.
corporate_annual_target
.
october
:
String
(
item
.
corporate_annual_target
.
october
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
october
)
:
Number
(
item
.
corporate_annual_targe
t
.
october
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
at
.
november
,
formula
:
item
.
cat
.
november_formula
}
:
(
item
.
cat
.
november
==
""
?
item
.
cat
.
november
:
String
(
item
.
cat
.
november
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
november
)
:
Number
(
item
.
ca
t
.
november
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
orporate_annual_target
.
november
,
formula
:
item
.
corporate_annual_target
.
november_formula
}
:
(
item
.
corporate_annual_target
.
november
==
""
?
item
.
corporate_annual_target
.
november
:
String
(
item
.
corporate_annual_target
.
november
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
november
)
:
Number
(
item
.
corporate_annual_targe
t
.
november
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
at
.
december
,
formula
:
item
.
cat
.
december_formula
}
:
(
item
.
cat
.
december
==
""
?
item
.
cat
.
december
:
String
(
item
.
cat
.
december
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
december
)
:
Number
(
item
.
ca
t
.
december
).
toFixed
(
1
)),
item
.
parent_name
==
"FINANCIAL PERSPECTIVE"
?
{
value
:
item
.
c
orporate_annual_target
.
december
,
formula
:
item
.
corporate_annual_target
.
december_formula
}
:
(
item
.
corporate_annual_target
.
december
==
""
?
item
.
corporate_annual_target
.
december
:
String
(
item
.
corporate_annual_target
.
december
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
december
)
:
Number
(
item
.
corporate_annual_targe
t
.
december
).
toFixed
(
1
)),
item
.
c
at
.
total_current_year
==
""
?
0
:
String
(
item
.
cat
.
total_current_year
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
total_current_year
)
:
Number
(
item
.
ca
t
.
total_current_year
).
toFixed
(
1
),
item
.
c
orporate_annual_target
.
total_current_year
==
""
?
0
:
String
(
item
.
corporate_annual_target
.
total_current_year
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
total_current_year
)
:
Number
(
item
.
corporate_annual_targe
t
.
total_current_year
).
toFixed
(
1
),
item
.
c
at
.
total_next_year
==
""
?
item
.
cat
.
total_next_year
:
String
(
item
.
cat
.
total_next_year
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
total_next_year
)
:
Number
(
item
.
ca
t
.
total_next_year
).
toFixed
(
1
),
item
.
c
orporate_annual_target
.
total_next_year
==
""
?
item
.
corporate_annual_target
.
total_next_year
:
String
(
item
.
corporate_annual_target
.
total_next_year
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
total_next_year
)
:
Number
(
item
.
corporate_annual_targe
t
.
total_next_year
).
toFixed
(
1
),
item
.
c
at
.
total_more_year
==
""
?
item
.
cat
.
total_more_year
:
String
(
item
.
cat
.
total_more_year
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
total_more_year
)
:
Number
(
item
.
ca
t
.
total_more_year
).
toFixed
(
1
),
item
.
c
orporate_annual_target
.
total_more_year
==
""
?
item
.
corporate_annual_target
.
total_more_year
:
String
(
item
.
corporate_annual_target
.
total_more_year
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
corporate_annual_target
.
total_more_year
)
:
Number
(
item
.
corporate_annual_targe
t
.
total_more_year
).
toFixed
(
1
),
item
.
c
a
t
.
strategic
,
item
.
c
orporate_annual_targe
t
.
strategic
,
item
.
c
a
t
.
pic
,
item
.
c
orporate_annual_targe
t
.
pic
,
item
.
c
a
t
.
forecast_formula
,
item
.
c
orporate_annual_targe
t
.
forecast_formula
,
item
.
order
item
.
order
])
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
!==
null
)
{
...
@@ -938,12 +942,12 @@ export default class CorporateAnnualTargetOLPA extends Component {
...
@@ -938,12 +942,12 @@ export default class CorporateAnnualTargetOLPA extends Component {
type
:
'KPI_TYPE'
type
:
'KPI_TYPE'
}
}
api
.
create
().
getAllSettingByType
(
body
).
then
(
response
=>
{
api
.
create
().
getAllSettingByType
(
body
).
then
(
response
=>
{
//
// // // //
console.log(response)
// console.log(response)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
let
data
=
response
.
data
.
data
let
data
=
response
.
data
.
data
//
// // //
console.log(data)
// console.log(data)
let
inputKPI
=
[]
let
inputKPI
=
[]
data
.
map
((
item
)
=>
{
data
.
map
((
item
)
=>
{
...
@@ -955,7 +959,7 @@ export default class CorporateAnnualTargetOLPA extends Component {
...
@@ -955,7 +959,7 @@ export default class CorporateAnnualTargetOLPA extends Component {
options
:
inputKPI
,
options
:
inputKPI
,
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
value
),
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
value
),
};
};
//
// // //
console.log(defaultProps)
// console.log(defaultProps)
this
.
setState
({
kpiTypeList
:
defaultProps
})
this
.
setState
({
kpiTypeList
:
defaultProps
})
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
...
@@ -1528,32 +1532,32 @@ export default class CorporateAnnualTargetOLPA extends Component {
...
@@ -1528,32 +1532,32 @@ export default class CorporateAnnualTargetOLPA extends Component {
}
}
const
columns
=
[
const
columns
=
[
//
{
{
//
name: "",
name
:
""
,
//
options: {
options
:
{
//
display: false
display
:
false
//
}
}
//
}, {
},
{
//
name: "",
name
:
""
,
//
options: {
options
:
{
//
display: false
display
:
false
//
}
}
//
}, {
},
{
//
name: "",
name
:
""
,
//
options: {
options
:
{
//
display: false
display
:
false
//
}
}
//
}, {
},
{
//
name: "",
name
:
""
,
//
options: {
options
:
{
//
display: false
display
:
false
//
}
}
//
}, {
},
{
//
name: "",
name
:
""
,
//
options: {
options
:
{
//
display: false
display
:
false
//
}
}
//
},
},
{
{
name
:
""
,
name
:
""
,
options
:
{
options
:
{
...
@@ -1569,7 +1573,7 @@ export default class CorporateAnnualTargetOLPA extends Component {
...
@@ -1569,7 +1573,7 @@ export default class CorporateAnnualTargetOLPA extends Component {
// handleAction(tableMeta.rowData[2]) &&
// handleAction(tableMeta.rowData[2]) &&
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
/* {tableMeta.rowData[6] === "Active" ? */
}
{
/* {tableMeta.rowData[6] === "Active" ? */
}
{
/* {
handleAction(tableMeta.rowData[2], tableMeta.rowData[0], tableMeta) && <span>
{
handleAction
(
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
0
],
tableMeta
)
&&
<
span
>
<
LightTooltip
title
=
{
'Add'
}
arrow
>
<
LightTooltip
title
=
{
'Add'
}
arrow
>
<
button
<
button
style
=
{{
style
=
{{
...
@@ -1604,7 +1608,7 @@ export default class CorporateAnnualTargetOLPA extends Component {
...
@@ -1604,7 +1608,7 @@ export default class CorporateAnnualTargetOLPA extends Component {
<
img
src
=
{
Images
.
delete
}
/
>
<
img
src
=
{
Images
.
delete
}
/
>
<
/button
>
<
/button
>
<
/LightTooltip
>
<
/LightTooltip
>
</span>}
*/
}
<
/span>
}
<
/div
>
<
/div
>
);
);
}
}
...
@@ -1620,64 +1624,62 @@ export default class CorporateAnnualTargetOLPA extends Component {
...
@@ -1620,64 +1624,62 @@ export default class CorporateAnnualTargetOLPA extends Component {
setCellProps
:
()
=>
({
style
}),
setCellProps
:
()
=>
({
style
}),
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
//
handleAction(tableMeta.rowData[2], tableMeta.rowData[0], tableMeta) && (tableMeta.rowData[1] == "" || String(this.props.status).toLocaleLowerCase() == 'draft' || String(this.props.status).toLocaleLowerCase() == 'submitted' || String(this.props.status).toLocaleLowerCase() == 'revision') ?
handleAction
(
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
0
],
tableMeta
)
&&
(
tableMeta
.
rowData
[
1
]
==
""
||
String
(
this
.
props
.
status
).
toLocaleLowerCase
()
==
'draft'
||
String
(
this
.
props
.
status
).
toLocaleLowerCase
()
==
'submitted'
||
String
(
this
.
props
.
status
).
toLocaleLowerCase
()
==
'revision'
)
?
<
div
style
=
{{
textAlign
:
'left'
,
paddingLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
<
div
style
=
{{
textAlign
:
'left'
,
paddingLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
{
!
this
.
state
.
loading
&&
{
!
this
.
state
.
loading
&&
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
control
=
{
control
=
{
<
Input
<
Input
disableUnderline
=
{
true
}
disableUnderline
=
{
true
}
style
=
{{
color
:
tableMeta
.
rowData
[
1
]
==
""
?
"#5198ea"
:
"black"
,
fontSize
:
12
,
textAlign
:
'left'
,
borderColor
:
'transparent'
,
margin
:
0
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
tableMeta
.
rowData
[
1
]
==
""
?
"#5198ea"
:
"black"
,
fontSize
:
12
,
textAlign
:
'left'
,
borderColor
:
'transparent'
,
margin
:
0
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
defaultValue
=
{
val
}
defaultValue
=
{
val
}
disabled
=
{
true
}
// disabled={!handleAction(tableMeta.rowData[2])}
// disabled={!handleAction(tableMeta.rowData[2])}
// onBlur={(event) => {
onBlur
=
{(
event
)
=>
{
// // // // console.log(event.target.value)
// console.log(event.target.value)
// handleChangeText(event.target.value, tableMeta)
handleChangeText
(
event
.
target
.
value
,
tableMeta
)
// // // console.log(dataTable2)
// console.log(dataTable2)
// }}
}}
/
>
/
>
}
}
/>
}
/>
}
<
/div
>
:
<
div
style
=
{{
width
:
300
}}
>
{
tableMeta
.
rowData
[
32
]
?
tableMeta
.
rowData
[
32
].
length
>
0
?
<
div
style
=
{{
paddingLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
<
LightTooltip
title
=
{
"Report Items Not Registered"
}
arrow
>
<
span
style
=
{{
fontSize
:
12
,
color
:
'red'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
}
<
/span
>
<
/LightTooltip
>
<
/div
>
:
tableMeta
.
rowData
[
4
]
==
0
?
<
span
style
=
{{
fontSize
:
12
,
fontWeight
:
'bold'
}}
>
{
String
(
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
).
toUpperCase
()}
<
/span
>
:
tableMeta
.
rowData
[
1
]
==
null
?
<
div
style
=
{{
paddingLeft
:
20
}}
>
<
span
style
=
{{
fontSize
:
12
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
}
<
/span
>
<
/div
>
:
<
div
style
=
{{
paddingLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
<
span
style
=
{{
fontSize
:
12
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
}
<
/span
>
<
/div
>
:
tableMeta
.
rowData
[
4
]
==
0
?
<
span
style
=
{{
fontSize
:
12
,
fontWeight
:
'bold'
}}
>
{
String
(
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
).
toUpperCase
()}
<
/span
>
:
tableMeta
.
rowData
[
1
]
==
null
?
<
div
style
=
{{
paddingLeft
:
20
}}
>
<
span
style
=
{{
fontSize
:
12
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
}
<
/span
>
<
/div
>
:
<
div
style
=
{{
paddingLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
<
span
style
=
{{
fontSize
:
12
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
}
<
/span
>
<
/div
>
}
<
/div
>
<
/div
>
// :
// <div style={{ width: 300 }}>
// {tableMeta.rowData[32] ?
// tableMeta.rowData[32].length > 0 ?
// <div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
// <LightTooltip title={"Report Items Not Registered"} arrow>
// <span style={{ fontSize: 12, color: 'red' }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
// </LightTooltip>
// </div>
// :
// tableMeta.rowData[4] == 0 ?
// <span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
// :
// tableMeta.rowData[1] == null ?
// <div style={{ paddingLeft: 20 }}>
// <span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
// </div>
// :
// <div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
// <span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
// </div>
// :
// tableMeta.rowData[4] == 0 ?
// <span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
// :
// tableMeta.rowData[1] == null ?
// <div style={{ paddingLeft: 20 }}>
// <span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
// </div>
// :
// <div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
// <span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
// </div>
// }
// </div>
)
)
}
}
}
}
...
@@ -1705,12 +1707,17 @@ export default class CorporateAnnualTargetOLPA extends Component {
...
@@ -1705,12 +1707,17 @@ export default class CorporateAnnualTargetOLPA extends Component {
control
=
{
control
=
{
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
suffix
=
"%"
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
value
=
{
value
}
suffix
=
{
'%'
}
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
&&
(
this
.
props
.
status
===
'revision'
||
this
.
props
.
status
===
'not-yet'
||
this
.
props
.
status
===
'draft'
||
this
.
props
.
status
===
'submitted'
)
?
false
:
true
)}
value
=
{
Number
(
value
).
toFixed
(
1
)}
maxLength
=
{
4
}
onBlur
=
{(
event
)
=>
{
// updateValue(some)
handleChangePercentage
(
event
.
target
.
value
,
tableMeta
)
}}
/
>
/
>
}
}
/
>
/
>
...
@@ -1733,16 +1740,45 @@ export default class CorporateAnnualTargetOLPA extends Component {
...
@@ -1733,16 +1740,45 @@ export default class CorporateAnnualTargetOLPA extends Component {
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
null
:
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
Input
style
=
{{
margin
:
0
}}
disableUnderline
=
{
true
}
// value={value}
style
=
{{
fontSize
:
12
,
textAlign
:
'left'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
control
=
{
type
=
"text"
!
handleAction
(
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
0
])
?
placeholder
=
""
<
Input
disabled
=
{
true
}
disableUnderline
=
{
true
}
defaultValue
=
{
"Rp Bio"
}
style
=
{{
fontSize
:
12
,
textAlign
:
'center'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
,
marginTop
:
-
10
}}
/
>
type
=
"text"
<
/div
>
placeholder
=
""
defaultValue
=
{
value
}
color
=
{
"#5198ea"
}
disabled
=
{
true
}
onBlur
=
{(
event
)
=>
{
// console.log(event.target.value)
// updateValue(event.target.value)
handleChangeText
(
event
.
target
.
value
,
tableMeta
)
// console.log(dataTable2)
}}
/>
:
<
ThemeProvider
theme
=
{
theme
}
>
<
Input
disableUnderline
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'center'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
,
marginBottom
:
-
5
}}
type
=
"text"
placeholder
=
""
defaultValue
=
{
value
}
color
=
{
"#5198ea"
}
// disabled={this.props.isApprover ? true : ((this.props.lastStatus == 'SUBMIT' || this.props.lastStatus == 'REVISION') && this.props.prevRevision === false ? false : !handleAction(tableMeta.rowData[2]))}
onBlur
=
{(
event
)
=>
{
// console.log(event.target.value)
// updateValue(event.target.value)
handleChangeText
(
event
.
target
.
value
,
tableMeta
)
// console.log(dataTable2)
}}
/
>
<
/ThemeProvider
>
}
/
>
}
}
<
/div
>
<
/div
>
)
)
...
@@ -1756,21 +1792,26 @@ export default class CorporateAnnualTargetOLPA extends Component {
...
@@ -1756,21 +1792,26 @@ export default class CorporateAnnualTargetOLPA extends Component {
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
<
/TableCell
>
),
),
customBodyRender
:
(
val
ue
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
width
:
96
}}
>
<
div
style
=
{{
width
:
96
}}
>
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
null
:
<
div
style
=
{{
flex
:
1
}}
>
<
Autocomplete
<
Input
{...
this
.
state
.
kpiTypeList
}
disableUnderline
=
{
true
}
id
=
"kpiType"
style
=
{{
fontSize
:
12
,
textAlign
:
'left'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
onChange
=
{(
event
,
newInputValue
)
=>
handleChangeDropdown
(
newInputValue
,
tableMeta
)}
type
=
"text"
debug
placeholder
=
""
disableClearable
disabled
=
{
true
}
disabled
=
{
!
handleAction
(
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
0
])}
defaultValue
=
{
"HIG"
}
value
=
{
handleValueDropdown
(
val
,
'KPI'
,
tableMeta
)}
/
>
style
=
{{
padding
:
0
,
margin
:
0
}}
<
/div
>
renderInput
=
{(
params
)
=>
<
div
ref
=
{
params
.
InputProps
.
ref
}
style
=
{{
padding
:
0
,
margin
:
0
}}
>
<
input
style
=
{{
borderColor
:
'white'
,
width
:
96
,
textAlign
:
'center'
,
padding
:
0
,
margin
:
0
,
color
:
handleAction
(
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
0
])
?
"#5198ea"
:
"black"
}}
type
=
"text"
{...
params
.
inputProps
}
/
>
<
/div
>
}
/
>
}
}
<
/div
>
<
/div
>
...
@@ -1785,21 +1826,27 @@ export default class CorporateAnnualTargetOLPA extends Component {
...
@@ -1785,21 +1826,27 @@ export default class CorporateAnnualTargetOLPA extends Component {
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
<
/TableCell
>
),
),
customBodyRender
:
(
val
ue
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
width
:
96
}}
>
<
div
style
=
{{
width
:
96
}}
>
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
null
:
<
div
style
=
{{
flex
:
1
}}
>
<
Autocomplete
<
Input
{...
this
.
state
.
maxAchList
}
disableUnderline
=
{
true
}
id
=
"maxAchList"
style
=
{{
fontSize
:
12
,
textAlign
:
'left'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
onChange
=
{(
event
,
newInputValue
)
=>
handleChangeDropdown
(
newInputValue
,
tableMeta
)}
type
=
"text"
debug
placeholder
=
""
disableClearable
disabled
=
{
true
}
value
=
{
handleValueDropdown
(
val
,
'MAX'
,
tableMeta
)}
defaultValue
=
{
"Unlimited"
}
style
=
{{
padding
:
0
,
margin
:
0
}}
/
>
disabled
=
{
!
handleAction
(
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
0
])}
<
/div
>
renderInput
=
{(
params
)
=>
<
div
ref
=
{
params
.
InputProps
.
ref
}
style
=
{{
padding
:
0
,
margin
:
0
}}
>
<
input
style
=
{{
borderColor
:
'white'
,
width
:
96
,
textAlign
:
'center'
,
padding
:
0
,
margin
:
0
,
color
:
handleAction
(
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
0
])
?
"#5198ea"
:
"black"
}}
type
=
"text"
{...
params
.
inputProps
}
/
>
<
/div
>
}
// value={this.state.parent}
/
>
}
}
<
/div
>
<
/div
>
)
)
...
@@ -1813,21 +1860,31 @@ export default class CorporateAnnualTargetOLPA extends Component {
...
@@ -1813,21 +1860,31 @@ export default class CorporateAnnualTargetOLPA extends Component {
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
<
/TableCell
>
),
),
customBodyRender
:
(
val
ue
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
width
:
105
}}
>
<
div
style
=
{{
width
:
105
}}
>
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
0
]
===
1
||
tableMeta
.
rowData
[
0
]
===
2
||
tableMeta
.
rowData
[
0
]
===
4
?
null
:
null
:
<
div
style
=
{{
flex
:
1
}}
>
<
Autocomplete
<
Input
{...
this
.
state
.
formulaYtdList
}
disableUnderline
=
{
true
}
id
=
"formulaYtdList"
style
=
{{
fontSize
:
12
,
textAlign
:
'left'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
onChange
=
{(
event
,
newInputValue
)
=>
{
type
=
"text"
// updateValue(newInputValue)
placeholder
=
""
handleChangeDropdown
(
newInputValue
,
tableMeta
)
disabled
=
{
true
}
}
defaultValue
=
{
"SUM"
}
}
/
>
debug
<
/div
>
disableClearable
value
=
{
handleValueDropdown
(
val
,
'FORMULA'
,
tableMeta
)}
disabled
=
{
!
handleAction
(
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
0
])}
style
=
{{
padding
:
0
,
margin
:
0
}}
renderInput
=
{(
params
)
=>
<
div
ref
=
{
params
.
InputProps
.
ref
}
style
=
{{
padding
:
0
,
margin
:
0
}}
>
<
input
style
=
{{
borderColor
:
'white'
,
width
:
105
,
textAlign
:
'center'
,
padding
:
0
,
margin
:
0
,
color
:
handleAction
(
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
0
])
?
"#5198ea"
:
"black"
}}
type
=
"text"
{...
params
.
inputProps
}
/
>
<
/div
>
}
// value={this.state.parent}
/
>
}
}
<
/div
>
<
/div
>
)
)
...
@@ -3092,7 +3149,8 @@ export default class CorporateAnnualTargetOLPA extends Component {
...
@@ -3092,7 +3149,8 @@ export default class CorporateAnnualTargetOLPA extends Component {
{
this
.
state
.
loading
&&
loadingComponent
}
{
this
.
state
.
loading
&&
loadingComponent
}
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
<
MUIDataTable
data
=
{
this
.
state
.
dataTableDummy
}
// data={this.state.dataTableDummy}
data
=
{
dataTable2
}
columns
=
{
columns
}
columns
=
{
columns
}
options
=
{
options
}
options
=
{
options
}
/
>
/
>
...
...
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