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
c6368b10
Commit
c6368b10
authored
Sep 01, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+
parent
5b1197fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
136 additions
and
31 deletions
+136
-31
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+136
-31
No files found.
src/container/BudgetTahunan/BalanceSheet.js
View file @
c6368b10
...
@@ -88,15 +88,130 @@ export default class BalanceSheet extends Component {
...
@@ -88,15 +88,130 @@ export default class BalanceSheet extends Component {
val
.
description
val
.
description
])
])
val
.
children
.
map
(
items
=>
{
val
.
children
.
map
(
items
=>
{
console
.
log
(
items
)
if
(
items
.
children
&&
items
.
children
.
length
>
0
)
{
dataTable
.
push
([
dataTable
.
push
([
items
.
type_report_id
,
items
.
type_report_id
,
items
.
id
,
items
.
id
,
items
.
parent
,
items
.
parent
,
items
.
formula
,
items
.
formula
,
items
.
level
,
items
.
level
,
items
.
description
items
.
description
])
])
items
.
children
.
map
(
itemss
=>
{
if
(
itemss
.
children
&&
itemss
.
children
.
length
>
0
)
{
dataTable
.
push
([
itemss
.
type_report_id
,
itemss
.
id
,
itemss
.
parent
,
itemss
.
formula
,
itemss
.
level
,
itemss
.
description
])
itemss
.
children
.
map
(
item1
=>
{
if
(
item1
.
children
&&
item1
.
children
.
length
>
0
)
{
dataTable
.
push
([
item1
.
type_report_id
,
item1
.
id
,
item1
.
parent
,
item1
.
formula
,
item1
.
level
,
item1
.
description
])
item1
.
children
.
map
(
item2
=>
{
if
(
item2
.
children
&&
item2
.
children
.
length
>
0
)
{
dataTable
.
push
([
item2
.
type_report_id
,
item2
.
id
,
item2
.
parent
,
item2
.
formula
,
item2
.
level
,
item2
.
description
])
item2
.
children
.
map
(
item3
=>
{
if
(
item3
.
children
&&
item3
.
children
.
length
>
0
)
{
dataTable
.
push
([
item3
.
type_report_id
,
item3
.
id
,
item3
.
parent
,
item3
.
formula
,
item3
.
level
,
item3
.
description
])
item3
.
children
.
map
(
item4
=>
{
if
(
item4
.
children
&&
item4
.
children
.
length
>
0
)
{
dataTable
.
push
([
item4
.
type_report_id
,
item4
.
id
,
item4
.
parent
,
item4
.
formula
,
item4
.
level
,
item4
.
description
])
}
else
{
dataTable
.
push
([
item4
.
type_report_id
,
item4
.
id
,
item4
.
parent
,
item4
.
formula
,
item4
.
level
,
item4
.
description
])
}
})
}
else
{
dataTable
.
push
([
item3
.
type_report_id
,
item3
.
id
,
item3
.
parent
,
item3
.
formula
,
item3
.
level
,
item3
.
description
])
}
})
}
else
{
dataTable
.
push
([
item2
.
type_report_id
,
item2
.
id
,
item2
.
parent
,
item2
.
formula
,
item2
.
level
,
item2
.
description
])
}
})
}
else
{
dataTable
.
push
([
item1
.
type_report_id
,
item1
.
id
,
item1
.
parent
,
item1
.
formula
,
item1
.
level
,
item1
.
description
])
}
})
}
else
{
dataTable
.
push
([
itemss
.
type_report_id
,
itemss
.
id
,
itemss
.
parent
,
itemss
.
formula
,
itemss
.
level
,
itemss
.
description
])
}
})
}
else
{
dataTable
.
push
([
items
.
type_report_id
,
items
.
id
,
items
.
parent
,
items
.
formula
,
items
.
level
,
items
.
description
])
}
})
})
}
else
{
}
else
{
dataTable
.
push
([
dataTable
.
push
([
...
@@ -166,7 +281,7 @@ export default class BalanceSheet extends Component {
...
@@ -166,7 +281,7 @@ export default class BalanceSheet extends Component {
let
data
=
this
.
state
.
dataTable
let
data
=
this
.
state
.
dataTable
let
indexParent
=
data
.
findIndex
((
val
)
=>
val
[
1
]
==
data
[
tableMeta
.
rowIndex
][
2
])
let
indexParent
=
data
.
findIndex
((
val
)
=>
val
[
1
]
==
data
[
tableMeta
.
rowIndex
][
2
])
if
(
indexParent
>
0
)
{
if
(
indexParent
>
0
)
{
console
.
log
(
indexParent
)
//
console.log(indexParent)
let
a
=
data
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
let
a
=
data
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
let
jagain
=
data
[
indexParent
][
tableMeta
.
columnIndex
]
let
jagain
=
data
[
indexParent
][
tableMeta
.
columnIndex
]
a
=
data
[
indexParent
][
tableMeta
.
columnIndex
]
=
jagain
==
undefined
?
(
0
+
Number
(
val
))
:
(
jagain
+
Number
(
val
))
a
=
data
[
indexParent
][
tableMeta
.
columnIndex
]
=
jagain
==
undefined
?
(
0
+
Number
(
val
))
:
(
jagain
+
Number
(
val
))
...
@@ -237,23 +352,10 @@ export default class BalanceSheet extends Component {
...
@@ -237,23 +352,10 @@ export default class BalanceSheet extends Component {
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
<
/TableCell
>
),
),
// customHeadRender: (columnMeta) => (
// <TableCell key={columnMeta.index} style={{ ...style2, top: 0, zIndex: 102, backgroundColor: '#354960', width: 96 }}>
// <Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
// </TableCell>
// ),
// setCellProps: () => ({
// style: {
// position: "sticky",
// left: 420,
// background: "white",
// zIndex: 101
// }
// }),
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
0
]
===
3
?
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
@@ -268,7 +370,7 @@ export default class BalanceSheet extends Component {
...
@@ -268,7 +370,7 @@ export default class BalanceSheet extends Component {
onChange
=
{
event
=>
{
onChange
=
{
event
=>
{
// console.log(event.target)
// console.log(event.target)
updateValue
(
event
.
target
.
value
)
updateValue
(
event
.
target
.
value
)
this
.
handleChange
(
event
.
target
.
value
,
tableMeta
)
//
this.handleChange(event.target.value, tableMeta)
}}
}}
/
>
/
>
}
}
...
@@ -286,6 +388,9 @@ export default class BalanceSheet extends Component {
...
@@ -286,6 +388,9 @@ export default class BalanceSheet extends Component {
/
>
/
>
<
/span
>
<
/span
>
:
:
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
1
?
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
<
span
>-<
/span
>
:
:
...
@@ -306,7 +411,7 @@ export default class BalanceSheet extends Component {
...
@@ -306,7 +411,7 @@ export default class BalanceSheet extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
0
]
===
3
?
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
@@ -359,7 +464,7 @@ export default class BalanceSheet extends Component {
...
@@ -359,7 +464,7 @@ export default class BalanceSheet extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
0
]
===
3
?
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
@@ -412,7 +517,7 @@ export default class BalanceSheet extends Component {
...
@@ -412,7 +517,7 @@ export default class BalanceSheet extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
0
]
===
3
?
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
@@ -465,7 +570,7 @@ export default class BalanceSheet extends Component {
...
@@ -465,7 +570,7 @@ export default class BalanceSheet extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
0
]
===
3
?
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
@@ -518,7 +623,7 @@ export default class BalanceSheet extends Component {
...
@@ -518,7 +623,7 @@ export default class BalanceSheet extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
0
]
===
3
?
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
@@ -571,7 +676,7 @@ export default class BalanceSheet extends Component {
...
@@ -571,7 +676,7 @@ export default class BalanceSheet extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
0
]
===
3
?
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
...
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