fix: missing ID photo date

This commit is contained in:
Nikola Ubavic 2022-03-01 12:57:35 +01:00
parent 7e9fd148f3
commit 31c57d3a2c
4 changed files with 16 additions and 15 deletions

View file

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

View file

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

View file

@ -64,6 +64,7 @@ const GET_CUSTOMER = gql`
idCardDataExpiration
idCardPhotoPath
idCardPhotoOverride
idCardPhotoAt
usSsn
usSsnOverride
sanctions
@ -498,7 +499,8 @@ const CustomerProfile = memo(() => {
? [
{
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>
{photosData[currentIndex].date && (
<>
<Label>Date</Label>
<div>
{photosData &&
formatDate(
photosData[currentIndex]?.date,
timezone,
'yyyy-MM-dd HH:mm'
)}
</div>
</>
)}
<>
<Label>Date</Label>
<div>
{photosData &&
formatDate(
photosData[currentIndex]?.date,
timezone,
'yyyy-MM-dd HH:mm'
)}
</div>
</>
</div>
<div>
<Label>Taken by</Label>