Merge pull request #1141 from ubavic/add-front-photo-date

fix: missing ID photo date
This commit is contained in:
Rafael Taranto 2022-03-01 14:30:30 +00:00 committed by GitHub
commit 4d04298f6a
4 changed files with 16 additions and 15 deletions

View file

@ -20,6 +20,7 @@ const typeDef = gql`
idCardPhoto: UploadGQL idCardPhoto: UploadGQL
idCardPhotoPath: String idCardPhotoPath: String
idCardPhotoOverride: String idCardPhotoOverride: String
idCardPhotoAt: Date
usSsn: String usSsn: String
usSsnOverride: String usSsnOverride: String
sanctions: Boolean sanctions: Boolean

View file

@ -73,7 +73,7 @@ export const PhotoCard = ({
<div className={classes.footer}> <div className={classes.footer}>
<CameraIcon /> <CameraIcon />
<Label2 className={classes.date}> <Label2 className={classes.date}>
{date ? format('yyyy-MM-dd', new Date(date)) : 'ID card image'} {format('yyyy-MM-dd', new Date(date))}
</Label2> </Label2>
</div> </div>
</Paper> </Paper>

View file

@ -64,6 +64,7 @@ const GET_CUSTOMER = gql`
idCardDataExpiration idCardDataExpiration
idCardPhotoPath idCardPhotoPath
idCardPhotoOverride idCardPhotoOverride
idCardPhotoAt
usSsn usSsn
usSsnOverride usSsnOverride
sanctions sanctions
@ -498,7 +499,8 @@ const CustomerProfile = memo(() => {
? [ ? [
{ {
photoDir: 'id-card-photo', photoDir: 'id-card-photo',
path: customerData.idCardPhotoPath path: customerData.idCardPhotoPath,
date: customerData.idCardPhotoAt
} }
] ]
: [] : []

View file

@ -38,19 +38,17 @@ const PhotosCarousel = memo(({ photosData, timezone }) => {
)} )}
<div className={classes.secondRow}> <div className={classes.secondRow}>
<div> <div>
{photosData[currentIndex].date && ( <>
<> <Label>Date</Label>
<Label>Date</Label> <div>
<div> {photosData &&
{photosData && formatDate(
formatDate( photosData[currentIndex]?.date,
photosData[currentIndex]?.date, timezone,
timezone, 'yyyy-MM-dd HH:mm'
'yyyy-MM-dd HH:mm' )}
)} </div>
</div> </>
</>
)}
</div> </div>
<div> <div>
<Label>Taken by</Label> <Label>Taken by</Label>