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
5676a0fa
Commit
5676a0fa
authored
Aug 25, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'deni-dev(pc)' into 'master'
Deni dev(pc) See merge request
!185
parents
ae10c8fd
abfd6fdb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
39 deletions
+53
-39
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+26
-28
Parameter.js
src/container/MasterData/Parameter/Parameter.js
+2
-1
ReportItems.js
src/container/MasterData/ReportItems.js
+8
-8
CustomTable.js
src/library/CustomTable.js
+17
-2
No files found.
src/container/BudgetTahunan/BalanceSheet.js
View file @
5676a0fa
...
...
@@ -56,7 +56,7 @@ export default class BalanceSheet extends Component {
if
(
response
.
data
.
status
===
"success"
)
{
let
dataTable
=
[]
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
if
(
item
.
children
.
length
>
0
)
{
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
dataTable
.
push
([
item
.
type_report_id
,
item
.
id
,
...
...
@@ -122,26 +122,31 @@ export default class BalanceSheet extends Component {
handleValue
(
data
)
{
let
total
=
0
this
.
state
.
dataTable
.
map
((
item
,
index
)
=>
{
if
(
data
[
1
]
==
item
[
2
])
{
if
(
data
.
rowData
[
1
]
==
item
[
2
])
{
total
=
item
[
6
]
==
undefined
?
(
total
+
0
)
:
(
total
+
item
[
6
])
}
// console.log(data[2])
})
return
total
let
indexParent
=
this
.
state
.
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
==
this
.
state
.
dataTable
[
data
.
rowIndex
][
2
])
let
a
=
this
.
state
.
dataTable
[
data
.
rowIndex
][
data
.
columnIndex
]
=
total
// console.log(indexParent);
return
a
}
handleChange
(
value
,
tableMeta
)
{
let
data
=
this
.
state
.
dataTable
let
indexParent
=
data
.
findIndex
((
val
)
=>
val
[
1
]
==
data
[
tableMeta
.
rowIndex
][
2
])
let
a
=
data
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
value
)
let
jagain
=
data
[
indexParent
][
tableMeta
.
columnIndex
]
a
=
data
[
indexParent
][
tableMeta
.
columnIndex
]
=
jagain
==
undefined
?
(
0
+
Number
(
value
))
:
(
jagain
+
Number
(
value
))
this
.
setState
({
data
:
a
},
()
=>
console
.
log
(
this
.
state
.
dataTable
))
// let a = data[0].tableMeta.tableData[tableMeta.rowIndex] === value
// console.log(data)
// console.log(indexParent);
if
(
indexParent
>
0
)
{
let
a
=
data
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
value
)
let
jagain
=
data
[
indexParent
][
tableMeta
.
columnIndex
]
a
=
data
[
indexParent
][
tableMeta
.
columnIndex
]
=
jagain
==
undefined
?
(
0
+
Number
(
value
))
:
(
jagain
+
Number
(
value
))
}
else
{
let
a
=
data
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
value
)
}
// this.setState({
// data: a,
// }, () => console.log(this.state.dataTable))
}
render
()
{
...
...
@@ -216,25 +221,12 @@ export default class BalanceSheet extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
!==
2
?
{
tableMeta
.
rowData
[
0
]
===
4
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
// <Input
// value={this.formatValue(value)}
// style={{}}
// inputProps={{
// style: {
// color: "#5198ea",
// fontSize: 12,
// textAlign: 'right'
// }
// }}
// disableUnderline={true}
// inputStyle={{ color: 'red' }}
// />
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
...
...
@@ -250,7 +242,13 @@ export default class BalanceSheet extends Component {
}
/
>
<
/div>
:
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
{
this
.
handleValue
(
tableMeta
.
rowData
)}
<
/span
>
tableMeta
.
rowData
[
0
]
===
2
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
{
this
.
handleValue
(
tableMeta
)}
<
/span
>
:
tableMeta
.
rowData
[
0
]
===
1
?
<
span
>-<
/span
>
:
<
span
>
validasi
<
/span
>
}
<
/div
>
)
...
...
src/container/MasterData/Parameter/Parameter.js
View file @
5676a0fa
...
...
@@ -183,7 +183,8 @@ export default class Parameter extends Component {
let
data
=
response
.
data
.
data
let
listData
=
data
.
map
((
item
,
index
)
=>
{
return
[
index
,
item
.
setting_id
,
item
.
setting_id
,
item
.
setting_group
,
item
.
setting_type
,
item
.
company_name
,
...
...
src/container/MasterData/ReportItems.js
View file @
5676a0fa
...
...
@@ -65,14 +65,14 @@ export default class ReportItems extends Component {
report
:
item
[
0
],
company
:
item
[
1
],
orders
:
item
[
2
],
description
:
item
[
3
],
parent
:
item
[
4
],
uom
:
item
[
5
],
weight
:
item
[
6
]
==
null
?
null
:
String
(
item
[
6
])
,
description
:
item
[
3
]
===
undefined
?
null
:
item
[
3
]
,
parent
:
item
[
4
]
===
undefined
?
null
:
item
[
4
]
,
uom
:
item
[
5
]
===
undefined
?
null
:
item
[
5
]
,
weight
:
item
[
6
]
==
=
undefined
?
""
:
item
[
6
]
,
type_report
:
item
[
7
],
formula
:
item
[
8
],
condition_it_should_be
:
item
[
9
],
condition_if_wrong
:
item
[
10
],
condition_it_should_be
:
item
[
9
]
===
undefined
?
null
:
item
[
9
]
,
condition_if_wrong
:
item
[
10
]
===
undefined
?
null
:
item
[
10
]
,
start_date
:
item
[
11
],
end_date
:
item
[
12
],
})
...
...
@@ -81,12 +81,12 @@ export default class ReportItems extends Component {
let
body
=
{
item_report
:
payload
}
console
.
log
(
JSON
.
stringify
(
body
))
this
.
setState
({
payload
:
body
,
buttonError
:
false
})
api
.
create
().
checkUploadReportItems
(
body
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
data
.
status
===
"success"
)
{
console
.
log
(
response
)
let
dataRow
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
return
[
index
+
1
,
item
.
report
,
...
...
src/library/CustomTable.js
View file @
5676a0fa
...
...
@@ -84,6 +84,21 @@ exports.customTable = function () {
verticalAlign
:
"top"
,
},
},
MuiTableCell
:
{
root
:
{
display
:
'table-cell'
,
padding
:
15
,
paddingLeft
:
25
,
fontSize
:
'0.875rem'
,
textAlign
:
'left'
,
fontFamily
:
"Roboto, Helvetica, Arial, sans-serif"
,
fontWeight
:
400
,
lineHeight
:
1.43
,
borderBottom
:
'1px solid rgba(224, 224, 224, 1)'
,
letterSpacing
:
'0.01071em'
,
verticalAlign
:
'inherit'
,
}
},
MUIDataTableHead
:
{
main
:
{
position
:
'relative'
,
...
...
@@ -97,7 +112,7 @@ exports.customTable = function () {
borderBottom
:
"1px rgba(0,0,0,0.1) solid"
,
backgroundColor
:
'#f2f6fa'
,
//'rgba(0,76,151,0.05)',
color
:
"#555"
,
padding
:
"10px
15
px"
,
padding
:
"10px
20
px"
,
height
:
"auto"
},
},
...
...
@@ -119,7 +134,7 @@ exports.customTable = function () {
borderBottom
:
"1px rgba(0,0,0,0.1) solid"
,
backgroundColor
:
'#f2f6fa'
,
//'rgba(0,76,151,0.05)',
color
:
"#555"
,
padding
:
"10px
1
5px"
,
padding
:
"10px
2
5px"
,
height
:
"auto"
},
toolButton
:
{
...
...
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