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
6903d5b6
Commit
6903d5b6
authored
Aug 28, 2020
by
EKSAD
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update edit report item
parent
e535953b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
EditReportItems.js
src/container/MasterData/formReportItems/EditReportItems.js
+14
-4
No files found.
src/container/MasterData/formReportItems/EditReportItems.js
View file @
6903d5b6
...
@@ -286,6 +286,7 @@ export default class EditReportItems extends Component {
...
@@ -286,6 +286,7 @@ export default class EditReportItems extends Component {
getParent
()
{
getParent
()
{
if
(
this
.
state
.
reportType
!==
null
&&
this
.
state
.
company
!==
null
)
{
if
(
this
.
state
.
reportType
!==
null
&&
this
.
state
.
company
!==
null
)
{
console
.
log
(
this
.
state
.
tempData
.
item_report_id
)
let
payload
=
{
let
payload
=
{
"report_id"
:
this
.
state
.
reportType
.
report_id
,
"report_id"
:
this
.
state
.
reportType
.
report_id
,
"company_id"
:
this
.
state
.
company
.
company_id
"company_id"
:
this
.
state
.
company
.
company_id
...
@@ -295,12 +296,21 @@ export default class EditReportItems extends Component {
...
@@ -295,12 +296,21 @@ export default class EditReportItems extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
let
data
=
response
.
data
.
data
let
data
=
response
.
data
.
data
let
parentData
=
data
.
map
((
item
)
=>
{
let
currentIndex
=
null
let
parentData
=
data
.
map
((
item
,
index
)
=>
{
if
(
this
.
state
.
tempData
.
item_report_id
!==
item
.
item_report_id
)
{
return
{
return
{
item_report_id
:
item
.
item_report_id
,
item_report_id
:
item
.
item_report_id
,
description
:
item
.
description
description
:
item
.
description
}
}
}
else
{
currentIndex
=
index
}
})
})
if
(
currentIndex
!==
null
)
{
parentData
.
splice
(
currentIndex
,
1
)
}
console
.
log
(
parentData
)
let
defaultProps
=
{
let
defaultProps
=
{
options
:
parentData
,
options
:
parentData
,
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
description
),
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
description
),
...
...
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