fix: add T&C photo to tx details
This commit is contained in:
parent
348260931e
commit
13a16bc965
2 changed files with 22 additions and 14 deletions
|
|
@ -49,6 +49,7 @@ const GET_TRANSACTIONS = gql`
|
|||
customerIdCardData
|
||||
customerIdCardPhotoPath
|
||||
customerFrontCameraPath
|
||||
txCustomerPhotoPath
|
||||
customerPhone
|
||||
discount
|
||||
customerId
|
||||
|
|
|
|||
|
|
@ -121,6 +121,8 @@ const DetailsRow = ({ it: tx, timezone }) => {
|
|||
|
||||
const isCashIn = tx.txClass === 'cashIn'
|
||||
|
||||
console.log(tx)
|
||||
|
||||
const zip = new JSZip()
|
||||
|
||||
const [fetchSummary] = useLazyQuery(TX_SUMMARY, {
|
||||
|
|
@ -259,20 +261,25 @@ const DetailsRow = ({ it: tx, timezone }) => {
|
|||
{tx.customerPhone}
|
||||
</IDButton>
|
||||
)}
|
||||
{tx.customerIdCardPhotoPath && !tx.customerIdCardData && (
|
||||
<IDButton
|
||||
popoverClassname={classes.clipboardPopover}
|
||||
className={classes.idButton}
|
||||
name="card"
|
||||
Icon={CardIdIcon}
|
||||
InverseIcon={CardIdInverseIcon}>
|
||||
<img
|
||||
className={classes.idCardPhoto}
|
||||
src={`${URI}/id-card-photo/${tx.customerIdCardPhotoPath}`}
|
||||
alt=""
|
||||
/>
|
||||
</IDButton>
|
||||
)}
|
||||
{(tx.customerIdCardPhotoPath || tx.txCustomerPhotoPath) &&
|
||||
!tx.customerIdCardData && (
|
||||
<IDButton
|
||||
popoverClassname={classes.clipboardPopover}
|
||||
className={classes.idButton}
|
||||
name="card"
|
||||
Icon={CardIdIcon}
|
||||
InverseIcon={CardIdInverseIcon}>
|
||||
<img
|
||||
className={classes.idCardPhoto}
|
||||
src={`${URI}${
|
||||
tx.customerIdCardPhotoPath
|
||||
? '/id-card-photo/'
|
||||
: 'operator-data/customersphotos'
|
||||
}${tx.customerIdCardPhotoPath ?? tx.txCustomerPhotoPath}`}
|
||||
alt=""
|
||||
/>
|
||||
</IDButton>
|
||||
)}
|
||||
{tx.customerIdCardData && (
|
||||
<IDButton
|
||||
className={classes.idButton}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue