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
0417ffcb
Commit
0417ffcb
authored
Jun 22, 2021
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'GGMAC' into 'master'
update issue See merge request
!1531
parents
b678956e
a673f6d2
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 @
0417ffcb
This diff is collapsed.
Click to expand it.
src/container/Laporan/KPIs.js
View file @
0417ffcb
...
@@ -25,12 +25,19 @@ export default class StrategiMap extends Component {
...
@@ -25,12 +25,19 @@ export default class StrategiMap extends Component {
this
.
olahDataKPI
()
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
()
{
olahDataKPI
()
{
console
.
log
(
this
.
state
.
dataStrategy
)
console
.
log
(
this
.
state
.
dataStrategy
)
let
arrayNew
=
this
.
state
.
dataStrategyNew
let
arrayNew
=
this
.
state
.
dataStrategyNew
this
.
state
.
dataStrategy
.
map
((
item
,
index
)
=>
{
this
.
state
.
dataStrategy
.
map
((
item
,
index
)
=>
{
let
arrayNodes
=
[]
let
arrayNodes
=
[]
item
.
nodes
.
map
((
itemz
,
indexz
)
=>
{
item
.
nodes
.
map
((
itemz
,
indexz
)
=>
{
let
kpi
=
this
.
handleKPI
(
itemz
.
item_name
)
let
act
=
[]
let
act
=
[]
let
mbv
=
[]
let
mbv
=
[]
let
yoy
=
[]
let
yoy
=
[]
...
@@ -88,7 +95,7 @@ export default class StrategiMap extends Component {
...
@@ -88,7 +95,7 @@ export default class StrategiMap extends Component {
sortMin
=
[
minYOY
]
sortMin
=
[
minYOY
]
sortMax
=
[
maxYOY
]
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
})
arrayNew
.
push
({
...
item
,
nodes
:
arrayNodes
})
})
})
...
@@ -166,11 +173,11 @@ export default class StrategiMap extends Component {
...
@@ -166,11 +173,11 @@ export default class StrategiMap extends Component {
}
}
if
(
actMo
>
prevMo
)
{
if
(
actMo
>
prevMo
)
{
isHigh
=
'tru
e'
isHigh
=
item
.
kpi
==
'HIG'
?
'true'
:
'fals
e'
}
else
if
(
actMo
==
prevMo
)
{
}
else
if
(
actMo
==
prevMo
)
{
isHigh
=
'same'
isHigh
=
'same'
}
else
{
}
else
{
isHigh
=
'false'
isHigh
=
item
.
kpi
==
'HIB'
?
'true'
:
'false'
}
}
return
isHigh
return
isHigh
...
@@ -185,8 +192,9 @@ export default class StrategiMap extends Component {
...
@@ -185,8 +192,9 @@ export default class StrategiMap extends Component {
let
trendsMBLength
=
trendsMB
.
length
let
trendsMBLength
=
trendsMB
.
length
actMR
=
trendsAct
[
trendsActLength
-
1
]
actMR
=
trendsAct
[
trendsActLength
-
1
]
actMB
=
trendsMB
[
trendsMBLength
-
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
isHigh
=
false
}
else
{
}
else
{
isHigh
=
true
isHigh
=
true
...
...
src/container/MonthlyReport/BalanceSheetMR.js
View file @
0417ffcb
This diff is collapsed.
Click to expand it.
src/container/MonthlyReport/ProfitLossMR.js
View file @
0417ffcb
...
@@ -237,7 +237,7 @@ export default class ProfitLossMR extends Component {
...
@@ -237,7 +237,7 @@ export default class ProfitLossMR extends Component {
const
handlePushChild
=
(
item
)
=>
{
const
handlePushChild
=
(
item
)
=>
{
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
if
(
item
.
type_report_id
===
3
)
{
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
err
=
true
}
}
}
}
...
@@ -279,7 +279,7 @@ export default class ProfitLossMR extends Component {
...
@@ -279,7 +279,7 @@ export default class ProfitLossMR extends Component {
}
}
res
.
map
((
item
,
index
)
=>
{
res
.
map
((
item
,
index
)
=>
{
if
(
item
.
type_report_id
===
3
)
{
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
err
=
true
}
}
}
}
...
@@ -610,7 +610,7 @@ export default class ProfitLossMR extends Component {
...
@@ -610,7 +610,7 @@ export default class ProfitLossMR extends Component {
this
.
state
.
dataTable
.
map
((
i
,
index
)
=>
{
this
.
state
.
dataTable
.
map
((
i
,
index
)
=>
{
if
(
i
[
0
]
===
3
)
{
if
(
i
[
0
]
===
3
)
{
// console.log(i);
// 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
(
'msk 1'
);
// console.log(i);
// console.log(i);
err
=
true
err
=
true
...
@@ -1533,7 +1533,7 @@ export default class ProfitLossMR extends Component {
...
@@ -1533,7 +1533,7 @@ export default class ProfitLossMR extends Component {
control
=
{
control
=
{
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
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"
type
=
"text"
placeholder
=
""
placeholder
=
""
suffix
=
{
'%'
}
suffix
=
{
'%'
}
...
@@ -1612,7 +1612,7 @@ export default class ProfitLossMR extends Component {
...
@@ -1612,7 +1612,7 @@ export default class ProfitLossMR extends Component {
control
=
{
control
=
{
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
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
=
{
'%'
}
suffix
=
{
'%'
}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
...
@@ -1693,7 +1693,7 @@ export default class ProfitLossMR extends Component {
...
@@ -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'
}}
style
=
{{
color
:
'red'
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
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
=
{
'%'
}
suffix
=
{
'%'
}
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handleVariancePercent
(
tableMeta
,
3
,
5
)).
toFixed
(
1
)}
value
=
{
Number
(
handleVariancePercent
(
tableMeta
,
3
,
5
)).
toFixed
(
1
)}
...
@@ -1790,7 +1790,7 @@ export default class ProfitLossMR extends Component {
...
@@ -1790,7 +1790,7 @@ export default class ProfitLossMR extends Component {
defaultValue
=
{
tableMeta
.
rowData
[
19
]}
defaultValue
=
{
tableMeta
.
rowData
[
19
]}
inputProps
=
{{
inputProps
=
{{
style
:
{
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'
textAlign
:
'left'
}
}
}}
}}
...
@@ -1803,7 +1803,7 @@ export default class ProfitLossMR extends Component {
...
@@ -1803,7 +1803,7 @@ export default class ProfitLossMR extends Component {
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
// value={tableMeta.rowData[19]}
// value={tableMeta.rowData[19]}
control
=
{
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
>
<
LightTooltipError
title
=
{
"MTD Explanation vs MB is Reqiured"
}
arrow
>
<
Input
<
Input
disableUnderline
=
{
true
}
disableUnderline
=
{
true
}
...
@@ -1839,7 +1839,7 @@ export default class ProfitLossMR extends Component {
...
@@ -1839,7 +1839,7 @@ export default class ProfitLossMR extends Component {
defaultValue
=
{
tableMeta
.
rowData
[
19
]}
defaultValue
=
{
tableMeta
.
rowData
[
19
]}
inputProps
=
{{
inputProps
=
{{
style
:
{
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'
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