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
Hide 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 {
componentDidMount
()
{
// console.log(this.props.data);
this
.
getDetailReportItems
();
this
.
getInputType
()
this
.
getPerusahaan
()
this
.
getReportType
()
this
.
getParent
()
}
handleChange
(
e
,
type
)
{
...
...
@@ -148,13 +145,13 @@ export default class EditReportItems extends Component {
updateReportItems
()
{
// alert('test')
let
payload
=
{
"item_report_id"
:
this
.
state
.
tempData
.
item_report_id
,
"report_id"
:
this
.
state
.
tempData
.
report_id
,
"company_id"
:
this
.
state
.
tempData
.
company_id
,
"item_report_id"
:
this
.
state
.
parent
.
item_report_id
,
"report_id"
:
this
.
state
.
reportType
.
report_id
,
"company_id"
:
this
.
state
.
company
.
company_id
,
"description"
:
this
.
state
.
tempData
.
description
,
"orders"
:
this
.
state
.
tempData
.
order
,
"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
,
"uom"
:
this
.
state
.
tempData
.
uom
,
"weight"
:
this
.
state
.
tempData
.
weight
,
...
...
@@ -164,14 +161,14 @@ export default class EditReportItems extends Component {
"end_date"
:
this
.
state
.
tempData
.
end_date
}
console
.
log
(
payload
)
// api.create().updateUser
(payload).then((response) => {
//
if (response.data.status === 'success') {
//
this.props.onClickClose()
//
this.props.refresh()
//
} else {
//
alert(response.data.message)
//
}
//
})
api
.
create
().
updateReportItems
(
payload
).
then
((
response
)
=>
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
props
.
onClickClose
()
this
.
props
.
refresh
()
}
else
{
alert
(
response
.
data
.
message
)
}
})
}
getDetailReportItems
()
{
...
...
@@ -665,35 +662,20 @@ export default class EditReportItems extends Component {
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
DatePicker
margin
=
"normal"
id
=
"endDate"
label
=
"Berlaku Hingga"
format
=
"dd MMMM yyyy"
value
=
{
this
.
state
.
tempData
===
null
?
''
:
this
.
state
.
tempData
.
end_date
}
error
=
{
this
.
state
.
errorEndDate
}
helperText
=
{
this
.
state
.
msgErrorED
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'end_date'
)}
minDate
=
{
this
.
state
.
tempData
===
null
?
null
:
this
.
state
.
tempData
.
start_date
}
KeyboardButtonProps
=
{{
'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%'
}}
margin
=
"normal"
id
=
"endDate"
label
=
"Berlaku Hingga"
format
=
"dd MMMM yyyy"
value
=
{
this
.
state
.
tempData
===
null
?
null
:
this
.
state
.
tempData
.
end_date
}
error
=
{
this
.
state
.
errorEndDate
}
helperText
=
{
this
.
state
.
msgErrorED
}
minDate
=
{
this
.
state
.
tempData
===
null
?
null
:
this
.
state
.
tempData
.
start_date
}
onChange
=
{(
e
)
=>
this
.
handleChange
(
e
,
'end_date'
)}
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
}}
style
=
{{
padding
:
0
,
margin
:
0
,
width
:
'100%'
}}
/
>
<
/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