From 14f814029a028ad0e66eaf4db58fb43766677200 Mon Sep 17 00:00:00 2001 From: Liordino Neto Date: Tue, 27 Oct 2020 22:45:16 -0300 Subject: [PATCH] fix: replaced country info with state/province and added birth date on the id data card --- .../pages/Customers/components/IdDataCard.js | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/new-lamassu-admin/src/pages/Customers/components/IdDataCard.js b/new-lamassu-admin/src/pages/Customers/components/IdDataCard.js index 60bd5b91..5828c986 100644 --- a/new-lamassu-admin/src/pages/Customers/components/IdDataCard.js +++ b/new-lamassu-admin/src/pages/Customers/components/IdDataCard.js @@ -15,6 +15,7 @@ import Field from './Field' const IdDataCard = memo(({ customerData, updateCustomer }) => { const idData = R.path(['idCardData'])(customerData) const rawExpirationDate = R.path(['expirationDate'])(idData) + const country = R.path(['country'])(idData) const rawDob = R.path(['dateOfBirth'])(idData) const elements = [ @@ -23,12 +24,17 @@ const IdDataCard = memo(({ customerData, updateCustomer }) => { display: `${R.path(['firstName'])(idData)} ${R.path(['lastName'])( idData )}`, - size: 160 + size: 190 }, { header: 'ID number', 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', @@ -36,17 +42,17 @@ const IdDataCard = memo(({ customerData, updateCustomer }) => { rawDob, moment.utc().diff(moment.utc(rawDob).format('YYYY-MM-D'), 'years') ), - size: 70 + size: 50 }, { header: 'Gender', display: R.path(['gender'])(idData), - size: 100 + size: 80 }, { - header: 'Country', - display: R.path(['country'])(idData), - size: 140 + header: country === 'Canada' ? 'Province' : 'State', + display: R.path(['state'])(idData), + size: 120 }, { header: 'Expiration Date',