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
71f6d7fa
Commit
71f6d7fa
authored
Sep 01, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bs++
parent
5ccd8333
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
42 deletions
+66
-42
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+66
-42
No files found.
src/container/BudgetTahunan/BalanceSheet.js
View file @
71f6d7fa
import
React
,
{
Component
}
from
'react'
;
import
{
Typography
,
Paper
,
createMuiTheme
,
MuiThemeProvider
,
TableCell
,
FormControlLabel
,
TextField
,
Input
}
from
'@material-ui/core'
;
import
{
Typography
,
Paper
,
createMuiTheme
,
MuiThemeProvider
,
TableCell
,
FormControlLabel
,
TextField
,
Input
,
Fab
}
from
'@material-ui/core'
;
import
MUIDataTable
from
'mui-datatables'
;
import
NumberFormat
from
'react-number-format'
;
import
api
from
'../../api'
;
import
AddIcon
from
'@material-ui/icons/Add'
;
var
ct
=
require
(
"../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
...
...
@@ -106,7 +107,7 @@ export default class BalanceSheet extends Component {
itemss
.
formula
,
itemss
.
level
,
itemss
.
description
])
])
itemss
.
children
.
map
(
item1
=>
{
if
(
item1
.
children
&&
item1
.
children
.
length
>
0
)
{
dataTable
.
push
([
...
...
@@ -116,7 +117,7 @@ export default class BalanceSheet extends Component {
item1
.
formula
,
item1
.
level
,
item1
.
description
])
])
item1
.
children
.
map
(
item2
=>
{
if
(
item2
.
children
&&
item2
.
children
.
length
>
0
)
{
dataTable
.
push
([
...
...
@@ -126,7 +127,7 @@ export default class BalanceSheet extends Component {
item2
.
formula
,
item2
.
level
,
item2
.
description
])
])
item2
.
children
.
map
(
item3
=>
{
if
(
item3
.
children
&&
item3
.
children
.
length
>
0
)
{
dataTable
.
push
([
...
...
@@ -136,7 +137,7 @@ export default class BalanceSheet extends Component {
item3
.
formula
,
item3
.
level
,
item3
.
description
])
])
item3
.
children
.
map
(
item4
=>
{
if
(
item4
.
children
&&
item4
.
children
.
length
>
0
)
{
dataTable
.
push
([
...
...
@@ -146,7 +147,7 @@ export default class BalanceSheet extends Component {
item4
.
formula
,
item4
.
level
,
item4
.
description
])
])
}
else
{
dataTable
.
push
([
item4
.
type_report_id
,
...
...
@@ -155,7 +156,7 @@ export default class BalanceSheet extends Component {
item4
.
formula
,
item4
.
level
,
item4
.
description
])
])
}
})
}
else
{
...
...
@@ -166,7 +167,7 @@ export default class BalanceSheet extends Component {
item3
.
formula
,
item3
.
level
,
item3
.
description
])
])
}
})
}
else
{
...
...
@@ -177,9 +178,9 @@ export default class BalanceSheet extends Component {
item2
.
formula
,
item2
.
level
,
item2
.
description
])
])
}
})
})
}
else
{
dataTable
.
push
([
item1
.
type_report_id
,
...
...
@@ -188,7 +189,7 @@ export default class BalanceSheet extends Component {
item1
.
formula
,
item1
.
level
,
item1
.
description
])
])
}
})
}
else
{
...
...
@@ -360,11 +361,11 @@ export default class BalanceSheet extends Component {
return
(
<
div
style
=
{{
width
:
388
}}
>
{
tableMeta
.
rowData
[
4
]
==
0
?
<
span
style
=
{{
fontSize
:
12
,
fontWeight
:
'bold'
}}
>
{
String
(
val
).
toUpperCase
()}
<
/span
>
<
span
style
=
{{
fontSize
:
12
,
fontWeight
:
'bold'
}}
>
{
String
(
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
).
toUpperCase
()}
<
/span
>
:
tableMeta
.
rowData
[
4
]
===
1
?
<
span
style
=
{{
fontSize
:
12
,
marginLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
{
val
}
<
/span>
:
<
span
style
=
{{
fontSize
:
12
,
marginLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
{
val
}
<
/span
>
<
span
style
=
{{
fontSize
:
12
,
marginLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
}
<
/span>
:
<
span
style
=
{{
fontSize
:
12
,
marginLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
""
:
val
}
<
/span
>
}
<
/div
>
)
...
...
@@ -415,12 +416,12 @@ export default class BalanceSheet extends Component {
<
/span
>
:
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
null
:
<
span
>
validasi
<
/span
>
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
:
<
span
>
validasi
<
/span
>
}
<
/div
>
)
...
...
@@ -437,7 +438,7 @@ export default class BalanceSheet extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
3
?
{
tableMeta
.
rowData
[
0
]
===
3
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
...
...
@@ -470,10 +471,13 @@ export default class BalanceSheet extends Component {
/
>
<
/span
>
:
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
tableMeta
.
rowData
[
0
]
===
4
?
null
:
<
span
>
validasi
<
/span
>
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
:
<
span
>
validasi
<
/span
>
}
<
/div
>
)
...
...
@@ -490,7 +494,7 @@ export default class BalanceSheet extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
3
?
{
tableMeta
.
rowData
[
0
]
===
3
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
...
...
@@ -523,10 +527,13 @@ export default class BalanceSheet extends Component {
/
>
<
/span
>
:
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
tableMeta
.
rowData
[
0
]
===
4
?
null
:
<
span
>
validasi
<
/span
>
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
:
<
span
>
validasi
<
/span
>
}
<
/div
>
)
...
...
@@ -576,10 +583,13 @@ export default class BalanceSheet extends Component {
/
>
<
/span
>
:
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
tableMeta
.
rowData
[
0
]
===
4
?
null
:
<
span
>
validasi
<
/span
>
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
:
<
span
>
validasi
<
/span
>
}
<
/div
>
)
...
...
@@ -596,7 +606,7 @@ export default class BalanceSheet extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
3
?
{
tableMeta
.
rowData
[
0
]
===
3
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
...
...
@@ -629,10 +639,13 @@ export default class BalanceSheet extends Component {
/
>
<
/span
>
:
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
tableMeta
.
rowData
[
0
]
===
4
?
null
:
<
span
>
validasi
<
/span
>
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
:
<
span
>
validasi
<
/span
>
}
<
/div
>
)
...
...
@@ -649,7 +662,7 @@ export default class BalanceSheet extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
3
?
{
tableMeta
.
rowData
[
0
]
===
3
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
...
...
@@ -682,10 +695,13 @@ export default class BalanceSheet extends Component {
/
>
<
/span
>
:
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
tableMeta
.
rowData
[
0
]
===
4
?
null
:
<
span
>
validasi
<
/span
>
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
:
<
span
>
validasi
<
/span
>
}
<
/div
>
)
...
...
@@ -702,7 +718,7 @@ export default class BalanceSheet extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
3
?
{
tableMeta
.
rowData
[
0
]
===
3
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
...
...
@@ -735,10 +751,13 @@ export default class BalanceSheet extends Component {
/
>
<
/span
>
:
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
tableMeta
.
rowData
[
0
]
===
4
?
null
:
<
span
>
validasi
<
/span
>
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
:
<
span
>
validasi
<
/span
>
}
<
/div
>
)
...
...
@@ -820,6 +839,11 @@ export default class BalanceSheet extends Component {
options
=
{
options
}
/
>
<
/MuiThemeProvider
>
<
Fab
color
=
"primary"
aria
-
label
=
"add"
style
=
{{
bottom
:
0
,
right
:
0
,
position
:
'fixed'
}}
onClick
=
{()
=>
{
this
.
forceUpdate
()
}}
>
<
AddIcon
/>
<
/Fab
>
<
/div
>
<
/div
>
<
div
className
=
"grid grid-2x"
>
...
...
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