fix: add ID photo to Photos & files
This commit is contained in:
parent
18c92d2536
commit
f8ca83921c
3 changed files with 26 additions and 13 deletions
|
|
@ -73,7 +73,7 @@ export const PhotoCard = ({
|
|||
<div className={classes.footer}>
|
||||
<CameraIcon />
|
||||
<Label2 className={classes.date}>
|
||||
{format('yyyy-MM-dd', new Date(date))}
|
||||
{date ? format('yyyy-MM-dd', new Date(date)) : 'ID card image'}
|
||||
</Label2>
|
||||
</div>
|
||||
</Paper>
|
||||
|
|
|
|||
|
|
@ -480,6 +480,14 @@ const CustomerProfile = memo(() => {
|
|||
)
|
||||
|
||||
const photosData = formatPhotosData(R.append(frontCameraData, txPhotosData))
|
||||
const IDphotoData = customerData.idCardPhotoPath
|
||||
? [
|
||||
{
|
||||
photoDir: 'id-card-photo',
|
||||
path: customerData.idCardPhotoPath
|
||||
}
|
||||
]
|
||||
: []
|
||||
|
||||
const loading = customerLoading || configLoading
|
||||
|
||||
|
|
@ -647,7 +655,10 @@ const CustomerProfile = memo(() => {
|
|||
)}
|
||||
{isPhotos && (
|
||||
<div>
|
||||
<CustomerPhotos photosData={photosData} timezone={timezone} />
|
||||
<CustomerPhotos
|
||||
photosData={R.concat(photosData, IDphotoData)}
|
||||
timezone={timezone}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -38,17 +38,19 @@ const PhotosCarousel = memo(({ photosData, timezone }) => {
|
|||
)}
|
||||
<div className={classes.secondRow}>
|
||||
<div>
|
||||
<div>
|
||||
<Label>Date</Label>
|
||||
<div>
|
||||
{photosData &&
|
||||
formatDate(
|
||||
photosData[currentIndex]?.date,
|
||||
timezone,
|
||||
'yyyy-MM-dd HH:mm'
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{photosData[currentIndex].date && (
|
||||
<>
|
||||
<Label>Date</Label>
|
||||
<div>
|
||||
{photosData &&
|
||||
formatDate(
|
||||
photosData[currentIndex]?.date,
|
||||
timezone,
|
||||
'yyyy-MM-dd HH:mm'
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
<div>
|
||||
<Label>Taken by</Label>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue