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
76ae7cba
Commit
76ae7cba
authored
Dec 10, 2020
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apdet
parent
480e7a56
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
CorporateAnnualTarget.js
src/container/BudgetTahunan/CorporateAnnualTarget.js
+5
-5
No files found.
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
76ae7cba
...
...
@@ -731,17 +731,17 @@ export default class CorporateAnnualTarget extends Component {
let
valReal
=
Number
(
i
[
7
]
==
""
||
i
[
7
]
==
undefined
?
0
:
i
[
7
].
replace
(
'%'
,
''
))
let
totalBaru
=
valChild
+
valReal
if
(
totalBaru
>
weightParent
)
{
dataTableBaru
[
index
][
7
]
=
`
${
(
weightParent
-
valChild
)}
%
`
dataTableBaru
[
index
][
7
]
=
`
${
String
(
Number
(
weightParent
-
valChild
).
toFixed
(
1
))
+
'%'
}
`
dataTampung
[
indexID
].
valChild
=
dataTampung
[
indexID
].
valChild
+
weightParent
-
valChild
weightReal
=
`
${
(
weightParent
-
valChild
)}
%
`
weightReal
=
`
${
String
(
Number
(
weightParent
-
valChild
).
toFixed
(
1
))
+
'%'
}
`
}
else
{
dataTableBaru
[
index
][
7
]
=
i
[
7
]
weightReal
=
i
[
7
]
dataTampung
[
indexID
].
valChild
=
dataTampung
[
indexID
].
valChild
+
Number
(
i
[
7
]
==
""
||
i
[
7
]
==
undefined
?
0
:
i
[
7
].
replace
(
'%'
,
''
))
}
// // // // console.log(weightReal)
//
// // //
console.log(dataTableBaru[index][7])
//
// // //
console.log(dataTampung[indexID].valChild)
// console.log(dataTableBaru[index][7])
// console.log(dataTampung[indexID].valChild)
}
}
// // console.log(String(weightReal).substr(0,String(weightReal).length-1))
...
...
@@ -750,7 +750,7 @@ export default class CorporateAnnualTarget extends Component {
"item_report_id"
:
i
[
1
]
==
""
||
i
[
1
]
==
null
?
0
:
i
[
1
],
"item_name"
:
String
(
i
[
6
]),
"parent"
:
i
[
2
]
==
""
?
null
:
i
[
2
],
"weight"
:
weightReal
==
null
?
String
(
i
[
7
])
:
String
(
Number
(
String
(
weightReal
).
substr
(
0
,
String
(
weightReal
).
length
-
1
)).
toFixed
(
1
))
+
'%'
,
"weight"
:
weightReal
==
null
?
String
(
i
[
7
])
:
weightReal
,
"uom"
:
String
(
i
[
8
]),
"kpi_type"
:
i
[
9
]
==
null
?
""
:
i
[
9
].
value
,
"max_ach"
:
i
[
10
]
==
null
?
""
:
i
[
10
].
value
,
...
...
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