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
7bbaef0c
Commit
7bbaef0c
authored
Sep 21, 2020
by
EKSAD
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aplod pl
parent
db1fd98d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
ProfitLoss.js
src/container/BudgetTahunan/ProfitLoss.js
+7
-5
No files found.
src/container/BudgetTahunan/ProfitLoss.js
View file @
7bbaef0c
...
...
@@ -241,8 +241,8 @@ export default class ProfitLoss extends Component {
payload
.
push
({
item_report_id
:
i
[
0
]
===
undefined
?
""
:
String
(
i
[
0
]).
trim
(),
item_report
:
i
[
1
]
===
undefined
?
""
:
String
(
i
[
1
]).
trim
(),
notes
:
i
[
2
]
===
undefined
?
""
:
reg
.
test
(
String
(
i
[
2
]))
===
false
?
""
:
String
(
i
[
2
]).
trim
(),
total_actual_before
:
i
[
3
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
3
]))
===
false
?
"0"
:
String
(
i
[
3
]).
trim
(),
notes
:
i
[
2
]
===
undefined
?
""
:
String
(
i
[
2
]).
trim
(),
total_actual_before
:
i
[
3
]
===
undefined
?
"0"
:
String
(
i
[
3
]).
trim
(),
january
:
i
[
4
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
4
]))
===
false
?
"0"
:
String
(
i
[
4
]).
trim
(),
february
:
i
[
5
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
5
]))
===
false
?
"0"
:
String
(
i
[
5
]).
trim
(),
march
:
i
[
6
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
6
]))
===
false
?
"0"
:
String
(
i
[
6
]).
trim
(),
...
...
@@ -267,7 +267,7 @@ export default class ProfitLoss extends Component {
report_id
:
this
.
props
.
report_id
,
profit_loss
:
payload
}
console
.
log
(
body
)
console
.
log
(
payload
)
this
.
setState
({
payload
:
body
,
judul
:
resp
.
rows
[
1
][
0
]
})
}
});
...
...
@@ -308,6 +308,7 @@ export default class ProfitLoss extends Component {
item
.
error
]
})
// console.log(dataTable)
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
},
()
=>
{
if
(
this
.
state
.
dataTable
[
23
].
length
>
0
)
{
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
})
...
...
@@ -323,7 +324,7 @@ export default class ProfitLoss extends Component {
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
item_report_id
:
i
[
1
],
notes
:
i
[
6
]
,
notes
:
String
(
i
[
6
])
,
total_actual_before
:
String
(
i
[
7
]),
january
:
String
(
i
[
8
]),
february
:
String
(
i
[
9
]),
...
...
@@ -349,6 +350,7 @@ export default class ProfitLoss extends Component {
profit_loss
:
data
}
console
.
log
(
data
);
// console.log(JSON.stringify(body));
api
.
create
(
'UPLOAD'
).
uploadMasterBudget
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
...
...
@@ -2211,7 +2213,7 @@ export default class ProfitLoss extends Component {
<
/button
>
<
button
type
=
"button"
disabled
=
{
this
.
state
.
buttonError
}
//
disabled={this.state.buttonError}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
uploadProfitLoss
()
...
...
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