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
0082810f
Commit
0082810f
authored
Aug 17, 2020
by
EKSAD
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit
parent
5b4e080b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
45 deletions
+27
-45
EditReportItems.js
src/container/MasterData/formReportItems/EditReportItems.js
+27
-45
No files found.
src/container/MasterData/formReportItems/EditReportItems.js
View file @
0082810f
...
@@ -54,10 +54,7 @@ export default class EditReportItems extends Component {
...
@@ -54,10 +54,7 @@ export default class EditReportItems extends Component {
componentDidMount
()
{
componentDidMount
()
{
// console.log(this.props.data);
// console.log(this.props.data);
this
.
getDetailReportItems
();
this
.
getDetailReportItems
();
this
.
getInputType
()
this
.
getPerusahaan
()
this
.
getReportType
()
this
.
getParent
()
}
}
handleChange
(
e
,
type
)
{
handleChange
(
e
,
type
)
{
...
@@ -148,13 +145,13 @@ export default class EditReportItems extends Component {
...
@@ -148,13 +145,13 @@ export default class EditReportItems extends Component {
updateReportItems
()
{
updateReportItems
()
{
// alert('test')
// alert('test')
let
payload
=
{
let
payload
=
{
"item_report_id"
:
this
.
state
.
tempData
.
item_report_id
,
"item_report_id"
:
this
.
state
.
parent
.
item_report_id
,
"report_id"
:
this
.
state
.
tempData
.
report_id
,
"report_id"
:
this
.
state
.
reportType
.
report_id
,
"company_id"
:
this
.
state
.
tempData
.
company_id
,
"company_id"
:
this
.
state
.
company
.
company_id
,
"description"
:
this
.
state
.
tempData
.
description
,
"description"
:
this
.
state
.
tempData
.
description
,
"orders"
:
this
.
state
.
tempData
.
order
,
"orders"
:
this
.
state
.
tempData
.
order
,
"parent"
:
this
.
state
.
tempData
.
parent
,
"parent"
:
this
.
state
.
tempData
.
parent
,
"type_report_id"
:
this
.
state
.
tempData
.
type_report_id
,
"type_report_id"
:
this
.
state
.
InputType
.
type_report_id
,
"formula"
:
this
.
state
.
tempData
.
formula
,
"formula"
:
this
.
state
.
tempData
.
formula
,
"uom"
:
this
.
state
.
tempData
.
uom
,
"uom"
:
this
.
state
.
tempData
.
uom
,
"weight"
:
this
.
state
.
tempData
.
weight
,
"weight"
:
this
.
state
.
tempData
.
weight
,
...
@@ -164,14 +161,14 @@ export default class EditReportItems extends Component {
...
@@ -164,14 +161,14 @@ export default class EditReportItems extends Component {
"end_date"
:
this
.
state
.
tempData
.
end_date
"end_date"
:
this
.
state
.
tempData
.
end_date
}
}
console
.
log
(
payload
)
console
.
log
(
payload
)
// api.create().updateUser
(payload).then((response) => {
api
.
create
().
updateReportItems
(
payload
).
then
((
response
)
=>
{
//
if (response.data.status === 'success') {
if
(
response
.
data
.
status
===
'success'
)
{
//
this.props.onClickClose()
this
.
props
.
onClickClose
()
//
this.props.refresh()
this
.
props
.
refresh
()
//
} else {
}
else
{
//
alert(response.data.message)
alert
(
response
.
data
.
message
)
//
}
}
//
})
})
}
}
getDetailReportItems
()
{
getDetailReportItems
()
{
...
@@ -669,31 +666,16 @@ export default class EditReportItems extends Component {
...
@@ -669,31 +666,16 @@ export default class EditReportItems extends Component {
id
=
"endDate"
id
=
"endDate"
label
=
"Berlaku Hingga"
label
=
"Berlaku Hingga"
format
=
"dd MMMM yyyy"
format
=
"dd MMMM yyyy"
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
end_date
}
value
=
{
this
.
state
.
tempData
===
null
?
null
:
this
.
state
.
tempData
.
end_date
}
error
=
{
this
.
state
.
errorEndDate
}
error
=
{
this
.
state
.
errorEndDate
}
helperText
=
{
this
.
state
.
msgErrorED
}
helperText
=
{
this
.
state
.
msgErrorED
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'end_date'
)}
minDate
=
{
this
.
state
.
tempData
===
null
?
null
:
this
.
state
.
tempData
.
start_date
}
minDate
=
{
this
.
state
.
tempData
===
null
?
null
:
this
.
state
.
tempData
.
start_date
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'end_date'
)}
KeyboardButtonProps
=
{{
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
'aria-label'
:
'change date'
,
}}
}}
inputProps
=
{{
style
:
{
fontSize
:
11
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
,
fontWeight
:
600
,
fontFamily
:
'Nunito Sans, sans-serif'
,
}
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
/
>
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
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