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
61b32313
Commit
61b32313
authored
Sep 02, 2020
by
EKSAD
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
solve issue report item
parent
0f26e4a6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
348 additions
and
344 deletions
+348
-344
ReportItems.js
src/container/MasterData/ReportItems.js
+348
-344
No files found.
src/container/MasterData/ReportItems.js
View file @
61b32313
...
...
@@ -53,6 +53,7 @@ export default class ReportItems extends Component {
fileHandler
=
(
event
)
=>
{
let
fileObj
=
event
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
// console.log(resp)
if
(
err
)
{
console
.
log
(
err
);
}
...
...
@@ -82,10 +83,14 @@ export default class ReportItems extends Component {
let
body
=
{
item_report
:
payload
}
// console.log(JSON.stringify(body))
console
.
log
(
resp
.
rows
[
1
])
this
.
setState
({
payload
:
body
,
buttonError
:
false
,
judul
:
resp
.
rows
[
1
][
0
]
})
api
.
create
().
checkUploadReportItems
(
body
).
then
(
response
=>
{
}
});
}
checkUpload
(){
api
.
create
().
checkUploadReportItems
(
this
.
state
.
payload
).
then
(
response
=>
{
console
.
log
(
response
)
let
dataRow
=
[]
if
(
response
.
data
)
{
...
...
@@ -445,11 +450,12 @@ export default class ReportItems extends Component {
}
]
console
.
log
(
dataRow
);
//
console.log(dataRow);
this
.
setState
({
dataLoaded
:
true
,
cols
:
columns
,
rows
:
dataRow
rows
:
dataRow
,
visibleUpload
:
false
,
itemReport
:
false
});
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
...
...
@@ -467,13 +473,11 @@ export default class ReportItems extends Component {
}
else
{
this
.
setState
({
dataLoaded
:
false
,
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
});
}
console
.
log
(
response
);
})
}
});
}
componentDidMount
()
{
this
.
getData
()
...
...
@@ -1057,7 +1061,7 @@ export default class ReportItems extends Component {
}}
onUpload
=
{()
=>
{
this
.
state
.
judul
===
"MASTER DATA - REPORT ITEMS"
?
this
.
setState
({
visibleUpload
:
false
,
itemReport
:
false
}
)
:
this
.
checkUpload
(
)
:
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
}}
...
...
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