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
dd6887b9
Commit
dd6887b9
authored
Oct 15, 2020
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'didam' into 'master'
apdet gays See merge request
!545
parents
7a0efa59
19b6a282
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
3 deletions
+50
-3
CashFlow.js
src/container/BudgetTahunan/CashFlow.js
+50
-3
No files found.
src/container/BudgetTahunan/CashFlow.js
View file @
dd6887b9
...
@@ -136,18 +136,56 @@ export default class CashFlow extends Component {
...
@@ -136,18 +136,56 @@ export default class CashFlow extends Component {
const
handleValueFormula
=
(
value
,
tableMeta
,
column
)
=>
{
const
handleValueFormula
=
(
value
,
tableMeta
,
column
)
=>
{
// console.log(value)
// console.log(value)
// console.log(dataTable2[tableMeta.rowIndex])
// console.log(dataTable2[tableMeta.rowIndex])
// let splitFormula = String(tableMeta.rowData[3]).split(/([()@])/)
let
splitFormula
=
String
(
tableMeta
.
rowData
[
3
]).
split
(
'@'
)
let
splitFormula
=
String
(
tableMeta
.
rowData
[
3
]).
split
(
'@'
)
// console.log(splitFormula)
// console.log(splitFormula)
let
baru
=
[]
let
baru
=
[]
let
anjay
=
[]
let
anjay
=
[]
splitFormula
.
map
((
item
,
index
)
=>
{
splitFormula
.
map
((
item
,
index
)
=>
{
let
items
=
String
(
item
).
substr
(
Number
(
String
(
item
).
length
)
-
1
,
1
)
let
items
=
String
(
item
).
substr
(
Number
(
String
(
item
).
length
)
-
1
,
1
)
let
subForm
=
String
(
item
).
substr
(
0
,
Number
(
String
(
item
).
length
)
-
1
)
let
re
=
/^
[
a-zA-Z0-9_
]
+$/
;
let
re
=
/^
[
a-zA-Z0-9_
]
+$/
;
let
asd
=
''
let
asd
=
''
if
(
item
!==
""
)
{
if
(
item
!==
""
)
{
if
(
!
re
.
test
(
items
))
{
if
(
!
re
.
test
(
items
))
{
baru
.
push
(
String
(
item
).
substr
(
0
,
Number
(
String
(
item
).
length
)
-
1
))
let
itemss
=
String
(
subForm
).
substr
(
Number
(
String
(
subForm
).
length
)
-
1
,
1
)
baru
.
push
(
String
(
item
).
substr
(
Number
(
String
(
item
).
length
)
-
1
,
1
))
let
subForms
=
String
(
subForm
).
substr
(
0
,
Number
(
String
(
subForm
).
length
)
-
1
)
if
(
subForm
!==
""
)
{
if
(
!
re
.
test
(
itemss
))
{
let
itemsss
=
String
(
subForms
).
substr
(
Number
(
String
(
subForms
).
length
)
-
1
,
1
)
let
subFormss
=
String
(
subForms
).
substr
(
0
,
Number
(
String
(
subForms
).
length
)
-
1
)
if
(
subForms
!==
""
)
{
if
(
!
re
.
test
(
itemsss
))
{
let
itemssss
=
String
(
subFormss
).
substr
(
Number
(
String
(
subFormss
).
length
)
-
1
,
1
)
let
subFormsss
=
String
(
subFormss
).
substr
(
0
,
Number
(
String
(
subFormss
).
length
)
-
1
)
if
(
subFormss
!==
""
)
{
if
(
!
re
.
test
(
itemssss
))
{
let
itemsssss
=
String
(
subFormsss
).
substr
(
Number
(
String
(
subFormsss
).
length
)
-
1
,
1
)
let
subFormssss
=
String
(
subFormsss
).
substr
(
0
,
Number
(
String
(
subFormsss
).
length
)
-
1
)
if
(
subFormsss
!==
""
)
{
if
(
!
re
.
test
(
itemsssss
))
{
}
else
{
baru
.
push
(
subFormsss
)
}
}
baru
.
push
(
itemsss
)
}
else
{
baru
.
push
(
subFormss
)
}
}
baru
.
push
(
itemsss
)
}
else
{
baru
.
push
(
subForms
)
}
}
baru
.
push
(
itemss
)
}
else
{
baru
.
push
(
subForm
)
}
}
// baru.push(String(item).substr(0, Number(String(item).length) - 1))
baru
.
push
(
items
)
}
else
{
}
else
{
baru
.
push
(
String
(
item
))
baru
.
push
(
String
(
item
))
}
}
...
@@ -158,7 +196,8 @@ export default class CashFlow extends Component {
...
@@ -158,7 +196,8 @@ export default class CashFlow extends Component {
// console.log(splitFormula)
// console.log(splitFormula)
// console.log(baru)
// console.log(baru)
// }
// }
console
.
log
(
baru
)
// console.log(tableMeta.rowData[3])
// console.log(baru)
baru
.
map
((
item
,
index
)
=>
{
baru
.
map
((
item
,
index
)
=>
{
if
(
item
==
'-'
||
item
==
'+'
||
item
==
'/'
||
item
==
'*'
||
item
==
'('
||
item
==
')'
)
{
if
(
item
==
'-'
||
item
==
'+'
||
item
==
'/'
||
item
==
'*'
||
item
==
'('
||
item
==
')'
)
{
anjay
.
push
(
item
)
anjay
.
push
(
item
)
...
@@ -170,11 +209,19 @@ export default class CashFlow extends Component {
...
@@ -170,11 +209,19 @@ export default class CashFlow extends Component {
let
period
=
data
==
18
?
Number
(
this
.
props
.
periode
)
-
1
:
this
.
props
.
periode
let
period
=
data
==
18
?
Number
(
this
.
props
.
periode
)
-
1
:
this
.
props
.
periode
// console.log(data)
// console.log(data)
// console.log(column)
// console.log(column)
// console.log(tableMeta.rowData)
// console.log(tableMeta.rowData)
// console.log(tableMeta.rowData[data])
// console.log(tableMeta.rowData[data])
let
indexID
=
tableMeta
.
rowData
[
data
].
formula
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
tst
}
`
)
&&
val
.
periode
==
period
)
let
indexID
=
tableMeta
.
rowData
[
data
].
formula
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
tst
}
`
)
&&
val
.
periode
==
period
)
// // console.log(indexID)
// // console.log(indexID)
if
(
item
==
'79[M-1]#BS'
)
{
console
.
log
(
tableMeta
.
rowData
)
console
.
log
(
tableMeta
.
rowData
[
data
].
formula
)
}
if
(
indexID
!==
-
1
)
{
if
(
indexID
!==
-
1
)
{
if
(
item
==
'79[M-1]#BS'
)
{
console
.
log
(
tableMeta
.
rowData
[
data
].
formula
[
indexID
])
}
let
valuezz
=
tableMeta
.
rowData
[
data
].
formula
[
indexID
].
value
let
valuezz
=
tableMeta
.
rowData
[
data
].
formula
[
indexID
].
value
// baru.push(valuezz)
// baru.push(valuezz)
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
...
...
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