Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Yossapol
/
transaction-log
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2a45b833
authored
Feb 18, 2019
by
Thanaporn Rattanaburi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated : funtion get set form
1 parent
19ce8925
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
src/templates/form/wdsTransLog/WDSSearch.jsx
src/templates/form/wdsTransLog/WDSSearch.jsx
View file @
2a45b83
...
@@ -3,7 +3,7 @@ import moment from 'moment'
...
@@ -3,7 +3,7 @@ import moment from 'moment'
import
'antd/dist/antd.css'
import
'antd/dist/antd.css'
import
'./resources/css/wdsSearchStyle.css'
import
'./resources/css/wdsSearchStyle.css'
import
{
Form
,
Input
,
Button
,
Icon
,
Select
,
Row
,
Col
,
DatePicker
}
from
'antd'
import
{
Form
,
Input
,
Button
,
Icon
,
Select
,
Row
,
Col
,
DatePicker
}
from
'antd'
import
*
as
UrlConstants
from
'../../../resources/js/constants/Url
Constants'
import
*
as
EventConstants
from
'../../../resources/js/constants/Event
Constants'
const
{
RangePicker
}
=
DatePicker
const
{
RangePicker
}
=
DatePicker
const
{
Option
}
=
Select
const
{
Option
}
=
Select
...
@@ -29,12 +29,26 @@ class WDSSearch extends Component {
...
@@ -29,12 +29,26 @@ class WDSSearch extends Component {
return
current
&&
current
<
moment
().
subtract
(
30
,
'days'
)
return
current
&&
current
<
moment
().
subtract
(
30
,
'days'
)
}
}
// ex ['username','action']
getField
=
fieldsArray
=>
{
return
this
.
props
.
form
.
getFieldsValue
(
fieldsArray
)
}
getFrom
=
()
=>
{
return
this
.
props
.
form
.
getFieldsValue
()
}
// ex { screen: 'test' , action: 'xxx'}
setFrom
=
fieldsArray
=>
{
return
this
.
props
.
form
.
setFieldsValue
(
fieldsArray
)
}
_handleSubmitFn
=
e
=>
{
_handleSubmitFn
=
e
=>
{
e
.
preventDefault
()
e
.
preventDefault
()
this
.
props
.
form
.
validateFields
((
err
,
values
)
=>
{
this
.
props
.
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
if
(
!
err
)
{
console
.
log
(
'Transaction Search values of form: '
,
values
)
console
.
log
(
'Transaction Search values of form: '
,
values
)
this
.
props
.
eventEmitter
.
emit
(
Url
Constants
.
SEARCH_LOGS
,
values
)
this
.
props
.
eventEmitter
.
emit
(
Event
Constants
.
SEARCH_LOGS
,
values
)
}
}
})
})
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment