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
c09af89e
Commit
c09af89e
authored
Dec 01, 2022
by
qorri_di
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ENV-DEPLOYMENT' into 'ENV-PROD'
merger from Env deployment See merge request
!1630
parents
60f43ba6
35be4ba8
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
167 additions
and
142 deletions
+167
-142
CorporateAnnualTargetMR.js
src/container/MonthlyReport/CorporateAnnualTargetMR.js
+22
-16
CorporateAnnualTargetRO.js
src/container/RollingOutlook/CorporateAnnualTargetRO.js
+12
-12
ProfitLossRO.js
src/container/RollingOutlook/ProfitLossRO.js
+127
-113
Utils.js
src/library/Utils.js
+6
-1
No files found.
src/container/MonthlyReport/CorporateAnnualTargetMR.js
View file @
c09af89e
...
@@ -133,25 +133,29 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -133,25 +133,29 @@ export default class CorporateAnnualTargetMR extends Component {
}
}
getParameterGroup
()
{
getParameterGroup
()
{
this
.
setState
({
loading
:
true
},
()
=>
{
api
.
create
().
getParameterByGroupName
({
api
.
create
().
getParameterByGroupName
({
"group_name"
:
'ACHIEVEMENT_KPI'
"group_name"
:
'ACHIEVEMENT_KPI'
}).
then
((
response
)
=>
{
}).
then
((
response
)
=>
{
console
.
log
(
response
.
data
)
console
.
log
(
response
.
data
)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
this
.
setState
({
parameterScore
:
response
.
data
.
data
})
this
.
setState
({
parameterScore
:
response
.
data
.
data
,
loading
:
false
})
}
}
})
})
})
}
}
getParameterGroupPerfom
()
{
getParameterGroupPerfom
()
{
this
.
setState
({
loading
:
true
},
()
=>
{
api
.
create
().
getParameterByGroupName
({
api
.
create
().
getParameterByGroupName
({
"group_name"
:
"PERFORMANCE_KPI"
"group_name"
:
"PERFORMANCE_KPI"
}).
then
((
response
)
=>
{
}).
then
((
response
)
=>
{
console
.
log
(
response
.
data
)
console
.
log
(
response
.
data
)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
this
.
setState
({
parameterPerfom
:
response
.
data
.
data
})
this
.
setState
({
parameterPerfom
:
response
.
data
.
data
,
loading
:
false
})
}
}
})
})
})
}
}
getLatestUpdate
()
{
getLatestUpdate
()
{
...
@@ -582,7 +586,9 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -582,7 +586,9 @@ export default class CorporateAnnualTargetMR extends Component {
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
value
),
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
value
),
};
};
// setTimeout(() => {
// setTimeout(() => {
this
.
setState
({
maxAchList
:
defaultProps
})
this
.
setState
({
maxAchList
:
defaultProps
},
()
=>
{
this
.
getItemHierarki
()
})
// }, 300);
// }, 300);
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
...
@@ -601,7 +607,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -601,7 +607,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
}
this
.
getItemHierarki
()
})
})
}
}
...
...
src/container/RollingOutlook/CorporateAnnualTargetRO.js
View file @
c09af89e
...
@@ -826,14 +826,14 @@ export default class CorporateAnnualTargetRO extends Component {
...
@@ -826,14 +826,14 @@ export default class CorporateAnnualTargetRO extends Component {
}
else
{
}
else
{
let
convertID
=
-
1
let
convertID
=
-
1
if
(
tableMeta
.
rowData
[
1
1
].
value
==
'FORMULA'
)
{
if
(
tableMeta
.
rowData
[
1
0
].
value
==
'FORMULA'
)
{
let
indexIDReport
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
item
)
let
indexIDReport
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
item
)
convertID
=
dataTable2
[
indexIDReport
][
31
]
convertID
=
dataTable2
[
indexIDReport
][
26
]
}
}
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
31
]
==
(
convertID
==
-
1
?
item
:
convertID
))
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
26
]
==
(
convertID
==
-
1
?
item
:
convertID
))
if
(
indexID
!==
-
1
)
{
if
(
indexID
!==
-
1
)
{
let
valuezz
=
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
value
==
undefined
?
dataTable2
[
indexID
][
tableMeta
.
columnIndex
]
:
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
value
let
valuezz
=
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
value
==
undefined
?
dataTable2
[
indexID
][
tableMeta
.
columnIndex
]
:
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
value
if
(
item
==
dataTable2
[
tableMeta
.
rowIndex
][
31
])
{
if
(
item
==
dataTable2
[
tableMeta
.
rowIndex
][
26
])
{
anjay
.
push
(
0
)
anjay
.
push
(
0
)
}
else
{
}
else
{
anjay
.
push
(
valuezz
==
""
?
"0"
:
valuezz
)
anjay
.
push
(
valuezz
==
""
?
"0"
:
valuezz
)
...
@@ -1445,7 +1445,7 @@ export default class CorporateAnnualTargetRO extends Component {
...
@@ -1445,7 +1445,7 @@ export default class CorporateAnnualTargetRO extends Component {
{
{
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
:
this
.
state
.
get_for
==
"view"
?
this
.
state
.
get_for
==
"view"
||
this
.
props
.
quartal
==
"q2"
||
this
.
props
.
quartal
==
"q3"
?
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
...
@@ -1545,7 +1545,7 @@ export default class CorporateAnnualTargetRO extends Component {
...
@@ -1545,7 +1545,7 @@ export default class CorporateAnnualTargetRO extends Component {
{
{
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
:
this
.
state
.
get_for
==
"view"
?
this
.
state
.
get_for
==
"view"
||
this
.
props
.
quartal
==
"q2"
||
this
.
props
.
quartal
==
"q3"
?
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
...
@@ -1645,7 +1645,7 @@ export default class CorporateAnnualTargetRO extends Component {
...
@@ -1645,7 +1645,7 @@ export default class CorporateAnnualTargetRO extends Component {
{
{
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
:
this
.
state
.
get_for
==
"view"
?
this
.
state
.
get_for
==
"view"
||
this
.
props
.
quartal
==
"q2"
||
this
.
props
.
quartal
==
"q3"
?
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
...
@@ -1745,7 +1745,7 @@ export default class CorporateAnnualTargetRO extends Component {
...
@@ -1745,7 +1745,7 @@ export default class CorporateAnnualTargetRO extends Component {
{
{
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
:
this
.
state
.
get_for
==
"view"
?
this
.
state
.
get_for
==
"view"
||
this
.
props
.
quartal
==
"q3"
?
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
...
@@ -1845,7 +1845,7 @@ export default class CorporateAnnualTargetRO extends Component {
...
@@ -1845,7 +1845,7 @@ export default class CorporateAnnualTargetRO extends Component {
{
{
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
:
this
.
state
.
get_for
==
"view"
?
this
.
state
.
get_for
==
"view"
||
this
.
props
.
quartal
==
"q3"
?
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
...
@@ -1945,7 +1945,7 @@ export default class CorporateAnnualTargetRO extends Component {
...
@@ -1945,7 +1945,7 @@ export default class CorporateAnnualTargetRO extends Component {
{
{
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
:
this
.
state
.
get_for
==
"view"
?
this
.
state
.
get_for
==
"view"
||
this
.
props
.
quartal
==
"q3"
?
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
...
...
src/container/RollingOutlook/ProfitLossRO.js
View file @
c09af89e
This diff is collapsed.
Click to expand it.
src/library/Utils.js
View file @
c09af89e
...
@@ -11,3 +11,8 @@ export function roundMath(number, decimalPlaces) {
...
@@ -11,3 +11,8 @@ export function roundMath(number, decimalPlaces) {
const
factorOfTen
=
Math
.
pow
(
10
,
decimalPlaces
)
const
factorOfTen
=
Math
.
pow
(
10
,
decimalPlaces
)
return
Math
.
round
(
number
*
factorOfTen
)
/
factorOfTen
return
Math
.
round
(
number
*
factorOfTen
)
/
factorOfTen
}
}
export
function
fixNumber
(
num
,
decimalCount
=
2
)
{
const
output
=
Math
.
round
((
num
+
Number
.
EPSILON
)
*
(
Math
.
pow
(
10
,
decimalCount
)))
/
(
Math
.
pow
(
10
,
decimalCount
))
return
output
}
\ No newline at end of file
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