refactor: format gender
This commit is contained in:
parent
2b0587c116
commit
c07ac9d66f
1 changed files with 5 additions and 1 deletions
|
|
@ -27,7 +27,11 @@ const DEFAULT_FIELD = {
|
||||||
field: 'nationality',
|
field: 'nationality',
|
||||||
format: (value, _) => value.replace(/0/, 'O'),
|
format: (value, _) => value.replace(/0/, 'O'),
|
||||||
},
|
},
|
||||||
gender: { field: 'sex' },
|
gender: {
|
||||||
|
field: 'sex',
|
||||||
|
|
||||||
|
format: (value, _) => (value === 'M' ? 'male' : 'female'),
|
||||||
|
},
|
||||||
birthDate: {
|
birthDate: {
|
||||||
field: 'birth_date',
|
field: 'birth_date',
|
||||||
format: (value, _) => moment(value, 'YYMMDD').format('YYYY-MM-DD'),
|
format: (value, _) => moment(value, 'YYMMDD').format('YYYY-MM-DD'),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue