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
74e00f82
Commit
74e00f82
authored
Jan 09, 2021
by
rifkaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
issue excel cat
parent
3dcaf866
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
CorporateAnnualTargetMR.js
src/container/MonthlyReport/CorporateAnnualTargetMR.js
+13
-13
No files found.
src/container/MonthlyReport/CorporateAnnualTargetMR.js
View file @
74e00f82
...
@@ -128,7 +128,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -128,7 +128,7 @@ export default class CorporateAnnualTargetMR extends Component {
api
.
create
().
getParameterByGroupName
({
api
.
create
().
getParameterByGroupName
({
"group_name"
:
'ACHIEVEMENT_KPI'
"group_name"
:
'ACHIEVEMENT_KPI'
}).
then
((
response
)
=>
{
}).
then
((
response
)
=>
{
console
.
log
(
response
.
data
.
data
)
//
console.log(response.data.data)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
this
.
setState
({
parameterScore
:
response
.
data
.
data
})
this
.
setState
({
parameterScore
:
response
.
data
.
data
})
}
}
...
@@ -146,7 +146,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -146,7 +146,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
}
// console.log(payload)
// console.log(payload)
api
.
create
().
getLastestUpdateMR
(
payload
).
then
(
response
=>
{
api
.
create
().
getLastestUpdateMR
(
payload
).
then
(
response
=>
{
console
.
log
(
JSON
.
stringify
(
response
))
//
console.log(JSON.stringify(response))
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
this
.
setState
({
...
@@ -193,7 +193,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -193,7 +193,7 @@ export default class CorporateAnnualTargetMR extends Component {
if
(
indexIDzz
===
-
1
)
{
if
(
indexIDzz
===
-
1
)
{
let
parentTrue
=
item
.
parent_name
==
'INTERNAL BUSINESS PROCESS PERSPECTIVE'
||
item
.
parent_name
==
'CUSTOMER PERSPECTIVE'
let
parentTrue
=
item
.
parent_name
==
'INTERNAL BUSINESS PROCESS PERSPECTIVE'
||
item
.
parent_name
==
'CUSTOMER PERSPECTIVE'
let
weight
=
String
(
item
.
corporate_annual_target
.
weight
).
substr
(
0
,
String
(
item
.
corporate_annual_target
.
weight
).
length
-
1
)
let
weight
=
String
(
item
.
corporate_annual_target
.
weight
).
substr
(
0
,
String
(
item
.
corporate_annual_target
.
weight
).
length
-
1
)
console
.
log
(
weight
)
//
console.log(weight)
dataTable
.
push
([
dataTable
.
push
([
item
.
type_report_id
,
item
.
type_report_id
,
item
.
id
,
item
.
id
,
...
@@ -601,7 +601,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -601,7 +601,7 @@ export default class CorporateAnnualTargetMR extends Component {
let
total
=
0
let
total
=
0
let
perfomanceScore
=
''
let
perfomanceScore
=
''
let
dataTable2
=
this
.
state
.
dataTable
let
dataTable2
=
this
.
state
.
dataTable
console
.
log
(
dataTable2
)
//
console.log(dataTable2)
dataTable2
.
map
((
item
,
index
)
=>
{
dataTable2
.
map
((
item
,
index
)
=>
{
let
value
=
String
(
item
[
15
])
==
'NaN'
||
String
(
item
[
15
])
==
''
?
0
:
Number
(
item
[
15
])
let
value
=
String
(
item
[
15
])
==
'NaN'
||
String
(
item
[
15
])
==
''
?
0
:
Number
(
item
[
15
])
total
+=
value
total
+=
value
...
@@ -1240,7 +1240,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -1240,7 +1240,7 @@ export default class CorporateAnnualTargetMR extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
suffix
=
{
"%"
}
suffix
=
{
"%"
}
value
=
{
value
}
value
=
{
Number
(
value
).
toFixed
(
1
)
}
disabled
=
{
true
}
disabled
=
{
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)}
// 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
}
decimalScale
=
{
1
}
...
@@ -1533,7 +1533,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -1533,7 +1533,7 @@ export default class CorporateAnnualTargetMR extends Component {
value
=
{
Number
(
value
).
toFixed
(
2
)}
value
=
{
Number
(
value
).
toFixed
(
2
)}
// 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)}
// 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)}
disabled
=
{
true
}
disabled
=
{
true
}
decimalScale
=
{
1
}
decimalScale
=
{
2
}
/
>
/
>
:
:
<
NumberFormat
<
NumberFormat
...
@@ -1560,7 +1560,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -1560,7 +1560,7 @@ export default class CorporateAnnualTargetMR extends Component {
),
),
customBodyRender
:
(
value
,
tableMeta
)
=>
{
customBodyRender
:
(
value
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
width
:
75
}}
>
<
div
style
=
{{
width
:
150
}}
>
{
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
:
:
...
@@ -1811,7 +1811,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -1811,7 +1811,7 @@ export default class CorporateAnnualTargetMR extends Component {
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data Incomplete'
,
tipeAlert
:
'error'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data Incomplete'
,
tipeAlert
:
'error'
})
:
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
setState
({
handleTekTekTek
:
1
,
loading
:
true
},
()
=>
{
this
.
backToMonthlyReport
(
'draft'
)
this
.
backToMonthlyReport
(
'draft'
)
})
})
}
}
...
@@ -1828,7 +1828,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -1828,7 +1828,7 @@ export default class CorporateAnnualTargetMR extends Component {
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data Incomplete'
,
tipeAlert
:
'error'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data Incomplete'
,
tipeAlert
:
'error'
})
:
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
setState
({
handleTekTekTek
:
1
,
loading
:
true
},
()
=>
{
this
.
backToMonthlyReport
(
'submitted'
)
this
.
backToMonthlyReport
(
'submitted'
)
})}
})}
style
=
{{
style
=
{{
...
@@ -1893,7 +1893,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -1893,7 +1893,7 @@ export default class CorporateAnnualTargetMR extends Component {
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"grid grid-2x"
style
=
{{
marginTop
:
10
,
padding
:
20
}}
>
<
div
className
=
"grid grid-2x"
style
=
{{
marginTop
:
10
,
padding
:
20
,
paddingLeft
:
0
,
paddingRight
:
0
}}
>
<
div
className
=
"col-1"
style
=
{{
paddingLeft
:
0
}}
>
<
div
className
=
"col-1"
style
=
{{
paddingLeft
:
0
}}
>
<
button
<
button
type
=
"button"
type
=
"button"
...
@@ -1914,7 +1914,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -1914,7 +1914,7 @@ export default class CorporateAnnualTargetMR extends Component {
<
/div
>
<
/div
>
<
/button
>
<
/button
>
<
/div
>
<
/div
>
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
,
paddingRight
:
5
}}
>
<
button
<
button
className
=
"button"
className
=
"button"
type
=
"button"
type
=
"button"
...
@@ -1953,7 +1953,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -1953,7 +1953,7 @@ export default class CorporateAnnualTargetMR extends Component {
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data Incomplete'
,
tipeAlert
:
'error'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data Incomplete'
,
tipeAlert
:
'error'
})
:
:
this
.
state
.
handleTekTekTek
===
1
?
null
:
this
.
state
.
handleTekTekTek
===
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
setState
({
handleTekTekTek
:
1
,
loading
:
true
},
()
=>
{
this
.
uploadCATMR
(
'draft'
)
this
.
uploadCATMR
(
'draft'
)
})
})
}
}
...
@@ -1970,7 +1970,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -1970,7 +1970,7 @@ export default class CorporateAnnualTargetMR extends Component {
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data Incomplete'
,
tipeAlert
:
'error'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
'Data Incomplete'
,
tipeAlert
:
'error'
})
:
:
this
.
state
.
handleTekTekTek
===
1
?
null
:
this
.
state
.
handleTekTekTek
===
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
setState
({
handleTekTekTek
:
1
,
loading
:
true
},
()
=>
{
this
.
uploadCATMR
(
'submitted'
)
this
.
uploadCATMR
(
'submitted'
)
})}
})}
style
=
{{
style
=
{{
...
...
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