From 13a16bc965d0295ca6dc44a1553fdbbc1d224646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Oliveira?= Date: Wed, 9 Mar 2022 12:35:37 +0000 Subject: [PATCH] fix: add T&C photo to tx details --- .../Transactions/Transactions.js | 1 + .../src/pages/Transactions/DetailsCard.js | 35 +++++++++++-------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/new-lamassu-admin/src/pages/Machines/MachineComponents/Transactions/Transactions.js b/new-lamassu-admin/src/pages/Machines/MachineComponents/Transactions/Transactions.js index 9b1bac05..fe37c323 100644 --- a/new-lamassu-admin/src/pages/Machines/MachineComponents/Transactions/Transactions.js +++ b/new-lamassu-admin/src/pages/Machines/MachineComponents/Transactions/Transactions.js @@ -49,6 +49,7 @@ const GET_TRANSACTIONS = gql` customerIdCardData customerIdCardPhotoPath customerFrontCameraPath + txCustomerPhotoPath customerPhone discount customerId diff --git a/new-lamassu-admin/src/pages/Transactions/DetailsCard.js b/new-lamassu-admin/src/pages/Transactions/DetailsCard.js index 5322a306..ca27a6d1 100644 --- a/new-lamassu-admin/src/pages/Transactions/DetailsCard.js +++ b/new-lamassu-admin/src/pages/Transactions/DetailsCard.js @@ -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} )} - {tx.customerIdCardPhotoPath && !tx.customerIdCardData && ( - - - - )} + {(tx.customerIdCardPhotoPath || tx.txCustomerPhotoPath) && + !tx.customerIdCardData && ( + + + + )} {tx.customerIdCardData && (