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
36d9be0b
Commit
36d9be0b
authored
Oct 04, 2020
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'didam' into 'master'
update semongko See merge request
!439
parents
6fac1bef
0e2f5528
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
45 deletions
+55
-45
BudgetTahunan.js
src/container/BudgetTahunan.js
+1
-0
CorporateAnnualTarget.js
src/container/BudgetTahunan/CorporateAnnualTarget.js
+54
-45
No files found.
src/container/BudgetTahunan.js
View file @
36d9be0b
...
...
@@ -1254,6 +1254,7 @@ export default class BudgetTahunan extends Component {
onClickClose
=
{()
=>
this
.
setState
({
visibleCAT
:
false
,
visibleBudgetTahunan
:
true
})}
getReport
=
{
this
.
getSubmission
.
bind
(
this
)}
isApprover
=
{
this
.
state
.
isApprover
}
status
=
{
this
.
state
.
status
}
lastStatus
=
{
this
.
state
.
lastStatus
}
prevRevision
=
{
this
.
state
.
prevRevision
}
/
>
...
...
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
36d9be0b
...
...
@@ -85,7 +85,6 @@ export default class CorporateAnnualTarget extends Component {
}
componentDidMount
()
{
this
.
getItemHierarki
()
this
.
getKPIType
()
this
.
getMaxAch
()
this
.
getLatestUpdate
()
...
...
@@ -163,9 +162,9 @@ export default class CorporateAnnualTarget extends Component {
item
.
description
,
item
.
type_report_id
==
1
?
`
${
Number
(
item
.
weight
)
*
100
}
%`
:
item
.
cat
.
weight
,
item
.
cat
.
uom
,
item
.
cat
.
kpi_type
==
""
?
null
:
{
value
:
item
.
cat
.
kpi_type
},
item
.
cat
.
max_ach
==
""
?
null
:
{
value
:
item
.
cat
.
max_ach
},
item
.
cat
.
formula
==
""
?
null
:
{
value
:
item
.
cat
.
formula
},
item
.
kpi_type
==
""
?
null
:
{
value
:
item
.
kpi_type
},
item
.
max_ach
==
""
?
null
:
{
value
:
item
.
max_ach
},
item
.
formula
==
""
?
null
:
{
value
:
item
.
formula_ytd
},
item
.
cat
.
total_actual_before
==
""
?
item
.
cat
.
total_actual_before
:
String
(
item
.
cat
.
total_actual_before
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
total_actual_before
)
:
Number
(
item
.
cat
.
total_actual_before
).
toFixed
(
1
),
item
.
cat
.
january
==
""
?
item
.
cat
.
january
:
String
(
item
.
cat
.
january
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
january
)
:
Number
(
item
.
cat
.
january
).
toFixed
(
1
),
item
.
cat
.
february
==
""
?
item
.
cat
.
february
:
String
(
item
.
cat
.
february
).
indexOf
(
"."
)
==
-
1
?
Number
(
item
.
cat
.
february
)
:
Number
(
item
.
cat
.
february
).
toFixed
(
1
),
...
...
@@ -308,6 +307,7 @@ export default class CorporateAnnualTarget extends Component {
}
checkUpload
()
{
this
.
setState
({
loading
:
true
})
let
dataDelete
=
this
.
state
.
dataDelete
api
.
create
().
getIdDeleteFromExcel
(
this
.
state
.
payload
).
then
((
response
)
=>
{
if
(
response
.
data
)
{
...
...
@@ -328,17 +328,17 @@ export default class CorporateAnnualTarget extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
// this.setState({ visibleUpload: false, visibleCAT: false })
this
.
setState
({
visibleUpload
:
false
,
visibleCAT
:
false
,
loading
:
true
})
this
.
setState
({
visibleUpload
:
false
,
visibleCAT
:
false
})
let
dataTable
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
return
[
item
.
type_report_id
,
item
.
item_report_id
,
item
.
parent
,
item
.
formula
,
item
.
level
,
item
.
level
==
null
?
1
:
item
.
level
,
""
,
item
.
item_report
,
item
.
type_report_id
==
1
?
`
${
Number
(
item
.
weight
)
*
100
}
%`
:
item
.
weight
,
item
.
type_report_id
==
1
?
`
${
Number
(
item
.
weight
)
*
100
}
%`
:
(
String
(
item
.
weight
).
indexOf
(
"."
)
==
-
1
?
item
.
weight
:
`
${
Number
(
item
.
weight
)
*
100
}
%`
)
,
item
.
uom
,
item
.
kpi_type
==
""
||
item
.
kpi_type
==
null
?
null
:
{
value
:
item
.
kpi_type
},
item
.
max_ach
==
""
||
item
.
max_ach
==
null
?
null
:
{
value
:
item
.
max_ach
},
...
...
@@ -398,7 +398,7 @@ export default class CorporateAnnualTarget extends Component {
console
.
log
(
this
.
state
.
dataTable
)
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
"item_report_id"
:
i
[
1
],
"item_report_id"
:
i
[
1
]
==
""
?
null
:
i
[
1
]
,
"item_report"
:
String
(
i
[
6
]),
"weight"
:
String
(
i
[
7
]),
"uom"
:
String
(
i
[
8
]),
...
...
@@ -642,10 +642,12 @@ export default class CorporateAnnualTarget extends Component {
if
(
response
.
data
.
status
===
'success'
)
{
let
data
=
response
.
data
.
data
console
.
log
(
data
)
let
inputKPI
=
data
.
map
((
item
)
=>
{
return
{
let
inputKPI
=
[]
data
.
map
((
item
)
=>
{
inputKPI
.
push
({
value
:
item
.
value
}
}
)
})
let
defaultProps
=
{
options
:
inputKPI
,
...
...
@@ -693,7 +695,9 @@ export default class CorporateAnnualTarget extends Component {
options
:
inputMaxAch
,
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
value
),
};
// setTimeout(() => {
this
.
setState
({
maxAchList
:
defaultProps
})
// }, 300);
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
...
...
@@ -711,6 +715,7 @@ export default class CorporateAnnualTarget extends Component {
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
this
.
getItemHierarki
()
})
}
...
...
@@ -810,7 +815,7 @@ export default class CorporateAnnualTarget extends Component {
// this.setState({dataTable: dataTable2})
}
const
handleAction
=
(
idParent
)
=>
{
const
handleAction
=
(
idParent
,
typeReport
)
=>
{
if
(
idParent
!==
null
)
{
let
indexsss
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
idParent
)
if
(
dataTable2
[
indexsss
][
6
]
==
'CUSTOMER PERSPECTIVE'
||
dataTable2
[
indexsss
][
6
]
==
'INTERNAL BUSINESS PROCESS PERSPECTIVE'
)
{
...
...
@@ -818,10 +823,14 @@ export default class CorporateAnnualTarget extends Component {
}
else
{
return
false
}
}
else
{
if
(
typeReport
==
null
)
{
return
true
}
else
{
return
false
}
}
}
const
handleTambah
=
(
data
,
rowIndex
)
=>
{
console
.
log
(
dataTable2
)
...
...
@@ -940,7 +949,7 @@ export default class CorporateAnnualTarget extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
// handleAction(tableMeta.rowData[2]) &&
handleAction
(
tableMeta
.
rowData
[
2
])
&&
<
div
style
=
{{
display
:
'flex'
}}
>
handleAction
(
tableMeta
.
rowData
[
2
]
,
tableMeta
.
rowData
[
0
]
)
&&
<
div
style
=
{{
display
:
'flex'
}}
>
{
/* {tableMeta.rowData[6] === "Active" ? */
}
{
<
span
>
<
LightTooltip
title
=
{
'Add'
}
arrow
>
...
...
@@ -1081,7 +1090,7 @@ export default class CorporateAnnualTarget extends Component {
type
=
"text"
placeholder
=
""
value
=
{
value
}
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
?
false
:
true
)}
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
)}
maxLength
=
{
4
}
onBlur
=
{(
event
)
=>
{
// updateValue(some)
...
...
@@ -1113,7 +1122,7 @@ export default class CorporateAnnualTarget extends Component {
style
=
{{
margin
:
0
}}
// value={value}
control
=
{
!
handleAction
(
tableMeta
.
rowData
[
2
])
?
!
handleAction
(
tableMeta
.
rowData
[
2
]
,
tableMeta
.
rowData
[
0
]
)
?
<
Input
disableUnderline
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'center'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
,
marginTop
:
-
10
}}
...
...
@@ -1172,12 +1181,12 @@ export default class CorporateAnnualTarget extends Component {
onChange
=
{(
event
,
newInputValue
)
=>
handleChangeDropdown
(
newInputValue
,
tableMeta
)}
debug
disableClearable
disabled
=
{
!
handleAction
(
tableMeta
.
rowData
[
2
])}
disabled
=
{
!
handleAction
(
tableMeta
.
rowData
[
2
]
,
tableMeta
.
rowData
[
0
]
)}
value
=
{
val
}
style
=
{{
padding
:
0
,
margin
:
0
}}
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
])
?
"#5198ea"
:
"black"
}}
type
=
"text"
{...
params
.
inputProps
}
/
>
<
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
>
}
/
>
...
...
@@ -1208,10 +1217,10 @@ export default class CorporateAnnualTarget extends Component {
disableClearable
value
=
{
val
}
style
=
{{
padding
:
0
,
margin
:
0
}}
disabled
=
{
!
handleAction
(
tableMeta
.
rowData
[
2
])}
disabled
=
{
!
handleAction
(
tableMeta
.
rowData
[
2
]
,
tableMeta
.
rowData
[
0
]
)}
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
])
?
"#5198ea"
:
"black"
}}
type
=
"text"
{...
params
.
inputProps
}
/
>
<
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}
...
...
@@ -1245,11 +1254,11 @@ export default class CorporateAnnualTarget extends Component {
debug
disableClearable
value
=
{
val
}
disabled
=
{
!
handleAction
(
tableMeta
.
rowData
[
2
])}
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
:
96
,
textAlign
:
'center'
,
padding
:
0
,
margin
:
0
,
color
:
handleAction
(
tableMeta
.
rowData
[
2
])
?
"#5198ea"
:
"black"
}}
type
=
"text"
{...
params
.
inputProps
}
/
>
<
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}
...
...
@@ -1284,7 +1293,7 @@ export default class CorporateAnnualTarget extends Component {
type
=
"text"
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
?
false
:
true
)}
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
)}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -1325,7 +1334,7 @@ export default class CorporateAnnualTarget extends Component {
type
=
"text"
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
?
false
:
true
)}
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
)}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -1366,7 +1375,7 @@ export default class CorporateAnnualTarget extends Component {
type
=
"text"
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
?
false
:
true
)}
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
)}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -1408,7 +1417,7 @@ export default class CorporateAnnualTarget extends Component {
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
decimalScale
=
{
1
}
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
?
false
:
true
)}
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
)}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
...
...
@@ -1448,7 +1457,7 @@ export default class CorporateAnnualTarget extends Component {
type
=
"text"
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
?
false
:
true
)}
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
)}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -1488,7 +1497,7 @@ export default class CorporateAnnualTarget extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
?
false
:
true
)}
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
)}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
...
...
@@ -1529,7 +1538,7 @@ export default class CorporateAnnualTarget extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
?
false
:
true
)}
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
)}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
...
...
@@ -1571,7 +1580,7 @@ export default class CorporateAnnualTarget extends Component {
type
=
"text"
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
?
false
:
true
)}
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
)}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -1611,7 +1620,7 @@ export default class CorporateAnnualTarget extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
?
false
:
true
)}
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
)}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
...
...
@@ -1652,7 +1661,7 @@ export default class CorporateAnnualTarget extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
?
false
:
true
)}
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
)}
decimalScale
=
{
1
}
value
=
{
Number
(
value
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
...
...
@@ -1694,7 +1703,7 @@ export default class CorporateAnnualTarget extends Component {
type
=
"text"
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
?
false
:
true
)}
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
)}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -1735,7 +1744,7 @@ export default class CorporateAnnualTarget extends Component {
type
=
"text"
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
?
false
:
true
)}
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
)}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -1776,7 +1785,7 @@ export default class CorporateAnnualTarget extends Component {
type
=
"text"
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
?
false
:
true
)}
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
)}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -1855,7 +1864,7 @@ export default class CorporateAnnualTarget extends Component {
type
=
"text"
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
?
false
:
true
)}
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
)}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -1896,7 +1905,7 @@ export default class CorporateAnnualTarget extends Component {
type
=
"text"
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
?
false
:
true
)}
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
)}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
...
...
@@ -1934,7 +1943,7 @@ export default class CorporateAnnualTarget extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'center'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
,
marginBottom
:
-
5
}}
type
=
"text"
placeholder
=
""
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
?
false
:
true
)}
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
)}
defaultValue
=
{
value
}
onBlur
=
{(
event
)
=>
{
console
.
log
(
event
.
target
.
value
)
...
...
@@ -1974,7 +1983,7 @@ export default class CorporateAnnualTarget extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'center'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
,
marginBottom
:
-
5
}}
type
=
"text"
placeholder
=
""
disabled
=
{
this
.
props
.
isApprover
?
true
:
((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
?
false
:
true
)}
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
)}
defaultValue
=
{
value
}
onBlur
=
{(
event
)
=>
{
console
.
log
(
event
.
target
.
value
)
...
...
@@ -2030,7 +2039,7 @@ export default class CorporateAnnualTarget extends Component {
<
/div
>
{
!
this
.
props
.
isApprover
&&
<
div
style
=
{{
width
:
'50%'
}}
>
<
div
style
=
{{
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
{((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
)
&&
<
a
data
-
tip
=
{
'Download Template'
}
data
-
for
=
"template"
>
{((
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'
)
)
&&
<
a
data
-
tip
=
{
'Download Template'
}
data
-
for
=
"template"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
...
...
@@ -2044,7 +2053,7 @@ export default class CorporateAnnualTarget extends Component {
<
/button
>
<
/a>
}
<
ReactTooltip
border
=
{
true
}
id
=
"template"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
{((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
)
&&
<
a
data
-
tip
=
{
'Upload'
}
data
-
for
=
"upload"
>
{((
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'
)
)
&&
<
a
data
-
tip
=
{
'Upload'
}
data
-
for
=
"upload"
>
<
button
style
=
{{
backgroundColor
:
'transparent'
,
...
...
@@ -2116,7 +2125,7 @@ export default class CorporateAnnualTarget extends Component {
<
/button
>
<
/div
>
{
!
this
.
props
.
isApprover
&&
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
{((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
)
&&
<
button
{((
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'
)
)
&&
<
button
className
=
"button"
type
=
"button"
style
=
{{
...
...
@@ -2138,7 +2147,7 @@ export default class CorporateAnnualTarget extends Component {
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Calculate
<
/Typography
>
<
/div
>
<
/button>
}
{((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
)
&&
<
button
{((
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'
)
)
&&
<
button
className
=
"button"
type
=
"button"
style
=
{{
...
...
@@ -2162,7 +2171,7 @@ export default class CorporateAnnualTarget extends Component {
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
as
Draft
<
/Typography
>
<
/div
>
<
/button>
}
{((
this
.
props
.
lastStatus
==
'SUBMIT'
||
this
.
props
.
lastStatus
==
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
)
&&
<
button
{((
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'
)
)
&&
<
button
type
=
"button"
// disabled={this.state.buttonError}
onClick
=
{()
=>
this
.
state
.
buttonError
?
...
...
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