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
fa3f1797
Commit
fa3f1797
authored
Sep 22, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'faisal' into 'master'
update fam 220920 malam See merge request
!354
parents
d92ca86a
8c08f7a7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
5 deletions
+47
-5
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+47
-5
No files found.
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
fa3f1797
...
@@ -346,6 +346,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -346,6 +346,7 @@ export default class FixedAssetsMovement extends Component {
})
})
})
})
let
body
=
{
let
body
=
{
submission_id
:
this
.
props
.
submissionID
,
company_id
:
this
.
props
.
company
.
company_id
,
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
periode
:
this
.
props
.
periode
,
report_id
:
this
.
props
.
report_id
,
report_id
:
this
.
props
.
report_id
,
...
@@ -383,6 +384,50 @@ export default class FixedAssetsMovement extends Component {
...
@@ -383,6 +384,50 @@ export default class FixedAssetsMovement extends Component {
}
}
}
}
handleValidate
()
{
let
data
=
[]
// console.log(this.state.dataTable)
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
item_report_id
:
i
[
1
],
total_actual_before
:
String
(
i
[
6
]),
january
:
String
(
i
[
7
]),
february
:
String
(
i
[
8
]),
march
:
String
(
i
[
9
]),
april
:
String
(
i
[
10
]),
may
:
String
(
i
[
11
]),
june
:
String
(
i
[
12
]),
july
:
String
(
i
[
13
]),
august
:
String
(
i
[
14
]),
september
:
String
(
i
[
15
]),
october
:
String
(
i
[
16
]),
november
:
String
(
i
[
17
]),
december
:
String
(
i
[
18
]),
total_current_year
:
String
(
i
[
19
]),
total_next_year
:
String
(
i
[
20
]),
total_more_year
:
String
(
i
[
21
])
})
})
// console.log(JSON.stringify(data))
let
payload
=
{
submission_id
:
this
.
props
.
submissionID
,
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
report_id
:
this
.
props
.
report_id
,
fixed_asset_movement
:
data
,
status
:
"submitted"
}
console
.
log
(
payload
)
api
.
create
().
validateSubmitReport
(
payload
).
then
((
response
)
=>
{
console
.
log
(
response
)
if
(
response
.
data
.
data
.
result
)
{
this
.
setState
({
loading
:
false
,
buttonError
:
false
,
editable
:
true
})
}
else
{
this
.
setState
({
loading
:
false
,
buttonError
:
true
,
editable
:
true
})
}
})
}
render
()
{
render
()
{
let
dataTable2
=
this
.
state
.
dataTable
let
dataTable2
=
this
.
state
.
dataTable
const
handleChange
=
(
value
,
tableMeta
,
type
)
=>
{
const
handleChange
=
(
value
,
tableMeta
,
type
)
=>
{
...
@@ -507,8 +552,6 @@ export default class FixedAssetsMovement extends Component {
...
@@ -507,8 +552,6 @@ export default class FixedAssetsMovement extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
width
:
300
}}
>
<
div
style
=
{{
width
:
300
}}
>
{
/* {console.log(val)} */
}
{
/* {console.log(tableMeta)} */
}
{
tableMeta
.
rowData
[
22
]
?
{
tableMeta
.
rowData
[
22
]
?
tableMeta
.
rowData
[
22
].
length
>
0
?
tableMeta
.
rowData
[
22
].
length
>
0
?
<
div
style
=
{{
paddingLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
<
div
style
=
{{
paddingLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
...
@@ -547,8 +590,6 @@ export default class FixedAssetsMovement extends Component {
...
@@ -547,8 +590,6 @@ export default class FixedAssetsMovement extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
console
.
log
(
tableMeta
)}
{
console
.
log
(
value
)}
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
0
]
===
4
?
null
null
:
:
...
@@ -2012,7 +2053,8 @@ export default class FixedAssetsMovement extends Component {
...
@@ -2012,7 +2053,8 @@ export default class FixedAssetsMovement extends Component {
onClick
=
{()
=>
{
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
loading
:
false
,
buttonError
:
false
,
editable
:
true
})
// this.setState({ loading: false, buttonError: false, editable: true })
this
.
handleValidate
()
},
100
);
},
100
);
})
})
}}
}}
...
...
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