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
abb866ec
Commit
abb866ec
authored
Feb 15, 2021
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'GGMAC' into 'master'
update See merge request
!1158
parents
c3258179
521aa617
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
11 deletions
+34
-11
DashboardFinancial.js
src/container/Laporan/DashboardFinancial.js
+34
-11
No files found.
src/container/Laporan/DashboardFinancial.js
View file @
abb866ec
...
...
@@ -316,6 +316,28 @@ export default class DashboardFinancial extends React.Component {
"month_to"
:
this
.
state
.
month2
.
month_id
}
}
const
handleName
=
(
name
)
=>
{
let
newName
=
''
if
(
String
(
name
).
includes
(
':'
))
{
let
indexTidu
=
String
(
name
).
indexOf
(
':'
)
let
indexSpace
=
String
(
name
).
indexOf
(
' '
)
if
(
indexTidu
>
indexSpace
)
{
newName
=
String
(
name
).
substr
(
0
,
indexSpace
)
}
else
{
newName
=
String
(
name
).
substr
(
0
,
indexTidu
)
}
}
else
{
// if (String(name).includes('Consolidated')) {
// newName = `asd \n baba`
// } else {
let
splitName
=
String
(
name
).
split
(
' '
)
console
.
log
(
splitName
)
newName
=
name
// }
}
return
newName
}
api
.
create
().
getDashboardFinancial
(
payload
).
then
((
res
)
=>
{
console
.
log
(
res
)
if
(
res
.
data
)
{
...
...
@@ -327,7 +349,7 @@ export default class DashboardFinancial extends React.Component {
let
totalAssets
=
[]
response
.
revenue
.
nodes
.
map
((
item
,
index
)
=>
{
revenue
.
push
({
"company"
:
item
.
company
,
"company"
:
handleName
(
item
.
company
)
,
"MB"
:
item
.
value_mb
,
"MBColor"
:
"hsl(212, 64%, 46%)"
,
"MR"
:
item
.
value_mr
,
...
...
@@ -338,7 +360,7 @@ export default class DashboardFinancial extends React.Component {
response
.
tpat
.
nodes
.
map
((
item
,
index
)
=>
{
tpat
.
push
({
"company"
:
item
.
company
,
"company"
:
handleName
(
item
.
company
)
,
"MB"
:
item
.
value_mb
,
"MBColor"
:
"hsl(212, 64%, 46%)"
,
"MR"
:
item
.
value_mr
,
...
...
@@ -349,7 +371,7 @@ export default class DashboardFinancial extends React.Component {
response
.
ebitda
.
nodes
.
map
((
item
,
index
)
=>
{
ebitda
.
push
({
"company"
:
item
.
company
,
"company"
:
handleName
(
item
.
company
)
,
"MB"
:
item
.
value_mb
,
"MBColor"
:
"hsl(212, 64%, 46%)"
,
"MR"
:
item
.
value_mr
,
...
...
@@ -611,14 +633,15 @@ export default class DashboardFinancial extends React.Component {
// legendOrientation: 'vertical',
legendOffset
:
50
,
}}
// axisLeft={{
// tickSize: 5,
// tickPadding: 5,
// tickRotation: 0,
// legend: 'food',
// legendPosition: 'middle',
// legendOffset: -40
// }}
axisLeft
=
{{
tickSize
:
5
,
tickPadding
:
5
,
tickRotation
:
0
,
legend
:
'(Rp bn)'
,
legendPosition
:
'middle'
,
legendOffset
:
-
60
}}
// axisRight={{ format: v => `${v}%`, legend: '(%)', legendOffset: 52 }}
labelSkipWidth
=
{
12
}
labelSkipHeight
=
{
12
}
labelTextColor
=
{{
from
:
'color'
,
modifiers
:
[[
'darker'
,
1.6
]]
}}
...
...
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