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
a673f6d2
Commit
a673f6d2
authored
Jun 22, 2021
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update issue
parent
54f32a51
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
151 additions
and
29 deletions
+151
-29
DashboardCAT.js
src/container/Laporan/DashboardCAT.js
+120
-6
KPIs.js
src/container/Laporan/KPIs.js
+12
-4
BalanceSheetMR.js
src/container/MonthlyReport/BalanceSheetMR.js
+10
-10
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+9
-9
No files found.
src/container/Laporan/DashboardCAT.js
View file @
a673f6d2
This diff is collapsed.
Click to expand it.
src/container/Laporan/KPIs.js
View file @
a673f6d2
...
...
@@ -25,12 +25,19 @@ export default class StrategiMap extends Component {
this
.
olahDataKPI
()
}
handleKPI
(
name
)
{
let
arrayCAT
=
this
.
props
.
tableCAT
let
indexID
=
this
.
props
.
tableCAT
.
findIndex
((
val
)
=>
String
(
val
[
5
]).
toLocaleLowerCase
()
==
String
(
name
).
toLocaleLowerCase
())
return
arrayCAT
[
indexID
][
8
]
}
olahDataKPI
()
{
console
.
log
(
this
.
state
.
dataStrategy
)
let
arrayNew
=
this
.
state
.
dataStrategyNew
this
.
state
.
dataStrategy
.
map
((
item
,
index
)
=>
{
let
arrayNodes
=
[]
item
.
nodes
.
map
((
itemz
,
indexz
)
=>
{
let
kpi
=
this
.
handleKPI
(
itemz
.
item_name
)
let
act
=
[]
let
mbv
=
[]
let
yoy
=
[]
...
...
@@ -88,7 +95,7 @@ export default class StrategiMap extends Component {
sortMin
=
[
minYOY
]
sortMax
=
[
maxYOY
]
}
arrayNodes
.
push
({
...
itemz
,
trends
:
{
act
,
mbv
,
yoy
,
minACT
,
maxACT
,
minMBV
,
maxMBV
,
minYOY
,
maxYOY
,
sortMin
,
sortMax
}
})
arrayNodes
.
push
({
...
itemz
,
kpi
,
trends
:
{
act
,
mbv
,
yoy
,
minACT
,
maxACT
,
minMBV
,
maxMBV
,
minYOY
,
maxYOY
,
sortMin
,
sortMax
}
})
})
arrayNew
.
push
({
...
item
,
nodes
:
arrayNodes
})
})
...
...
@@ -166,11 +173,11 @@ export default class StrategiMap extends Component {
}
if
(
actMo
>
prevMo
)
{
isHigh
=
'tru
e'
isHigh
=
item
.
kpi
==
'HIG'
?
'true'
:
'fals
e'
}
else
if
(
actMo
==
prevMo
)
{
isHigh
=
'same'
}
else
{
isHigh
=
'false'
isHigh
=
item
.
kpi
==
'HIB'
?
'true'
:
'false'
}
return
isHigh
...
...
@@ -185,8 +192,9 @@ export default class StrategiMap extends Component {
let
trendsMBLength
=
trendsMB
.
length
actMR
=
trendsAct
[
trendsActLength
-
1
]
actMB
=
trendsMB
[
trendsMBLength
-
1
]
let
percentage
=
String
(
item
.
achievement
).
includes
(
'%'
)?
Number
(
String
(
item
.
achievement
).
substr
(
0
,
String
(
item
.
achievement
).
length
-
1
))
:
Number
(
item
.
achievement
)
if
(
actMR
<
actMB
)
{
if
(
percentage
<
100
)
{
isHigh
=
false
}
else
{
isHigh
=
true
...
...
src/container/MonthlyReport/BalanceSheetMR.js
View file @
a673f6d2
This diff is collapsed.
Click to expand it.
src/container/MonthlyReport/ProfitLossMR.js
View file @
a673f6d2
...
...
@@ -237,7 +237,7 @@ export default class ProfitLossMR extends Component {
const
handlePushChild
=
(
item
)
=>
{
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
if
(
item
.
type_report_id
===
3
)
{
if
(
item
.
profit_loss
.
mtd_vs_mb
==
""
&&
Number
(
item
.
profit_loss
.
percent_act_vs_mb
)
<
this
.
state
.
minValue
||
Number
(
item
.
profit_loss
.
percent_act_vs_mb
)
>
this
.
state
.
maxValue
)
{
if
(
item
.
profit_loss
.
mtd_vs_mb
==
""
&&
Number
(
item
.
profit_loss
.
percent_act_vs_mb
)
.
toFixed
(
1
)
<
this
.
state
.
minValue
||
Number
(
item
.
profit_loss
.
percent_act_vs_mb
).
toFixed
(
1
)
>
this
.
state
.
maxValue
)
{
err
=
true
}
}
...
...
@@ -279,7 +279,7 @@ export default class ProfitLossMR extends Component {
}
res
.
map
((
item
,
index
)
=>
{
if
(
item
.
type_report_id
===
3
)
{
if
(
item
.
profit_loss
.
mtd_vs_mb
==
""
&&
Number
(
item
.
profit_loss
.
percent_act_vs_mb
)
<
this
.
state
.
minValue
||
Number
(
item
.
profit_loss
.
percent_act_vs_mb
)
>
this
.
state
.
maxValue
)
{
if
(
item
.
profit_loss
.
mtd_vs_mb
==
""
&&
Number
(
item
.
profit_loss
.
percent_act_vs_mb
)
.
toFixed
(
1
)
<
this
.
state
.
minValue
||
Number
(
item
.
profit_loss
.
percent_act_vs_mb
).
toFixed
(
1
)
>
this
.
state
.
maxValue
)
{
err
=
true
}
}
...
...
@@ -610,7 +610,7 @@ export default class ProfitLossMR extends Component {
this
.
state
.
dataTable
.
map
((
i
,
index
)
=>
{
if
(
i
[
0
]
===
3
)
{
// console.log(i);
if
(
i
[
19
]
===
""
&&
(
Number
(
i
[
16
])
<
this
.
state
.
minValue
||
Number
(
i
[
16
]
)
>
this
.
state
.
maxValue
))
{
if
(
i
[
19
]
===
""
&&
(
Number
(
i
[
16
])
.
toFixed
(
1
)
<
this
.
state
.
minValue
||
Number
(
i
[
16
]).
toFixed
(
1
)
>
this
.
state
.
maxValue
))
{
console
.
log
(
'msk 1'
);
// console.log(i);
err
=
true
...
...
@@ -1533,7 +1533,7 @@ export default class ProfitLossMR extends Component {
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
color
:
Number
(
tableMeta
.
rowData
[
14
])
<
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
14
]
)
>
this
.
state
.
maxValue
?
'red'
:
'#000000b0'
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
Number
(
tableMeta
.
rowData
[
14
])
.
toFixed
(
1
)
<
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
14
]).
toFixed
(
1
)
>
this
.
state
.
maxValue
?
'red'
:
'#000000b0'
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
suffix
=
{
'%'
}
...
...
@@ -1612,7 +1612,7 @@ export default class ProfitLossMR extends Component {
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
color
:
Number
(
tableMeta
.
rowData
[
16
])
<
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
16
]
)
>
this
.
state
.
maxValue
?
'red'
:
'#000000b0'
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
Number
(
tableMeta
.
rowData
[
16
])
.
toFixed
(
1
)
<
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
16
]).
toFixed
(
1
)
>
this
.
state
.
maxValue
?
'red'
:
'#000000b0'
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
suffix
=
{
'%'
}
type
=
"text"
placeholder
=
""
...
...
@@ -1693,7 +1693,7 @@ export default class ProfitLossMR extends Component {
style
=
{{
color
:
'red'
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
style
=
{{
color
:
Number
(
tableMeta
.
rowData
[
18
])
<
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
18
]
)
>
this
.
state
.
maxValue
?
'red'
:
'#000000b0'
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
Number
(
tableMeta
.
rowData
[
18
])
.
toFixed
(
1
)
<
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
18
]).
toFixed
(
1
)
>
this
.
state
.
maxValue
?
'red'
:
'#000000b0'
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
suffix
=
{
'%'
}
disabled
=
{
true
}
value
=
{
Number
(
handleVariancePercent
(
tableMeta
,
3
,
5
)).
toFixed
(
1
)}
...
...
@@ -1790,7 +1790,7 @@ export default class ProfitLossMR extends Component {
defaultValue
=
{
tableMeta
.
rowData
[
19
]}
inputProps
=
{{
style
:
{
color
:
Number
(
tableMeta
.
rowData
[
16
])
<
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
16
]
)
>
this
.
state
.
maxValue
?
"#5198ea"
:
'#5198ea'
,
color
:
Number
(
tableMeta
.
rowData
[
16
])
.
toFixed
(
1
)
<
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
16
]).
toFixed
(
1
)
>
this
.
state
.
maxValue
?
"#5198ea"
:
'#5198ea'
,
textAlign
:
'left'
}
}}
...
...
@@ -1803,7 +1803,7 @@ export default class ProfitLossMR extends Component {
style
=
{{
margin
:
0
}}
// value={tableMeta.rowData[19]}
control
=
{
tableMeta
.
rowData
[
19
]
===
""
&&
(
Number
(
tableMeta
.
rowData
[
16
])
<
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
16
]
)
>
this
.
state
.
maxValue
)
?
tableMeta
.
rowData
[
19
]
===
""
&&
(
Number
(
tableMeta
.
rowData
[
16
])
.
toFixed
(
1
)
<
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
16
]).
toFixed
(
1
)
>
this
.
state
.
maxValue
)
?
<
LightTooltipError
title
=
{
"MTD Explanation vs MB is Reqiured"
}
arrow
>
<
Input
disableUnderline
=
{
true
}
...
...
@@ -1839,7 +1839,7 @@ export default class ProfitLossMR extends Component {
defaultValue
=
{
tableMeta
.
rowData
[
19
]}
inputProps
=
{{
style
:
{
color
:
Number
(
tableMeta
.
rowData
[
16
])
<
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
16
]
)
>
this
.
state
.
maxValue
?
"#5198ea"
:
'#5198ea'
,
color
:
Number
(
tableMeta
.
rowData
[
16
])
.
toFixed
(
1
)
<
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
16
]).
toFixed
(
1
)
>
this
.
state
.
maxValue
?
"#5198ea"
:
'#5198ea'
,
textAlign
:
'left'
}
}}
...
...
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