fix: replaced country info with state/province and added birth date on
the id data card
This commit is contained in:
parent
6ec629fdcd
commit
14f814029a
1 changed files with 13 additions and 7 deletions
|
|
@ -15,6 +15,7 @@ import Field from './Field'
|
||||||
const IdDataCard = memo(({ customerData, updateCustomer }) => {
|
const IdDataCard = memo(({ customerData, updateCustomer }) => {
|
||||||
const idData = R.path(['idCardData'])(customerData)
|
const idData = R.path(['idCardData'])(customerData)
|
||||||
const rawExpirationDate = R.path(['expirationDate'])(idData)
|
const rawExpirationDate = R.path(['expirationDate'])(idData)
|
||||||
|
const country = R.path(['country'])(idData)
|
||||||
const rawDob = R.path(['dateOfBirth'])(idData)
|
const rawDob = R.path(['dateOfBirth'])(idData)
|
||||||
|
|
||||||
const elements = [
|
const elements = [
|
||||||
|
|
@ -23,12 +24,17 @@ const IdDataCard = memo(({ customerData, updateCustomer }) => {
|
||||||
display: `${R.path(['firstName'])(idData)} ${R.path(['lastName'])(
|
display: `${R.path(['firstName'])(idData)} ${R.path(['lastName'])(
|
||||||
idData
|
idData
|
||||||
)}`,
|
)}`,
|
||||||
size: 160
|
size: 190
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
header: 'ID number',
|
header: 'ID number',
|
||||||
display: R.path(['documentNumber'])(idData),
|
display: R.path(['documentNumber'])(idData),
|
||||||
size: 190
|
size: 160
|
||||||
|
},
|
||||||
|
{
|
||||||
|
header: 'Birth Date',
|
||||||
|
display: ifNotNull(rawDob, moment.utc(rawDob).format('YYYY-MM-D')),
|
||||||
|
size: 110
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
header: 'Age',
|
header: 'Age',
|
||||||
|
|
@ -36,17 +42,17 @@ const IdDataCard = memo(({ customerData, updateCustomer }) => {
|
||||||
rawDob,
|
rawDob,
|
||||||
moment.utc().diff(moment.utc(rawDob).format('YYYY-MM-D'), 'years')
|
moment.utc().diff(moment.utc(rawDob).format('YYYY-MM-D'), 'years')
|
||||||
),
|
),
|
||||||
size: 70
|
size: 50
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
header: 'Gender',
|
header: 'Gender',
|
||||||
display: R.path(['gender'])(idData),
|
display: R.path(['gender'])(idData),
|
||||||
size: 100
|
size: 80
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
header: 'Country',
|
header: country === 'Canada' ? 'Province' : 'State',
|
||||||
display: R.path(['country'])(idData),
|
display: R.path(['state'])(idData),
|
||||||
size: 140
|
size: 120
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
header: 'Expiration Date',
|
header: 'Expiration Date',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue