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 1/3] 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 && ( Date: Wed, 9 Mar 2022 16:18:36 +0000 Subject: [PATCH 2/3] fix: T&C icon --- .../src/pages/Transactions/DetailsCard.js | 44 +++++++++++-------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/new-lamassu-admin/src/pages/Transactions/DetailsCard.js b/new-lamassu-admin/src/pages/Transactions/DetailsCard.js index ca27a6d1..9e152a6b 100644 --- a/new-lamassu-admin/src/pages/Transactions/DetailsCard.js +++ b/new-lamassu-admin/src/pages/Transactions/DetailsCard.js @@ -261,25 +261,20 @@ const DetailsRow = ({ it: tx, timezone }) => { {tx.customerPhone} )} - {(tx.customerIdCardPhotoPath || tx.txCustomerPhotoPath) && - !tx.customerIdCardData && ( - - - - )} + {tx.customerIdCardPhotoPath && !tx.customerIdCardData && ( + + + + )} {tx.customerIdCardData && ( { /> )} + {tx.txCustomerPhotoPath && ( + + + + )}
From b81479707c4deda062ee528a8da51999bc92afeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Oliveira?= Date: Wed, 9 Mar 2022 17:57:16 +0000 Subject: [PATCH 3/3] fix: remove console log --- .../Machines/MachineComponents/Transactions/Transactions.js | 1 - new-lamassu-admin/src/pages/Transactions/DetailsCard.js | 5 ++--- new-lamassu-admin/src/pages/Transactions/Transactions.js | 1 + 3 files changed, 3 insertions(+), 4 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 fe37c323..9b1bac05 100644 --- a/new-lamassu-admin/src/pages/Machines/MachineComponents/Transactions/Transactions.js +++ b/new-lamassu-admin/src/pages/Machines/MachineComponents/Transactions/Transactions.js @@ -49,7 +49,6 @@ 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 9e152a6b..b0256f0c 100644 --- a/new-lamassu-admin/src/pages/Transactions/DetailsCard.js +++ b/new-lamassu-admin/src/pages/Transactions/DetailsCard.js @@ -121,8 +121,6 @@ const DetailsRow = ({ it: tx, timezone }) => { const isCashIn = tx.txClass === 'cashIn' - console.log(tx) - const zip = new JSZip() const [fetchSummary] = useLazyQuery(TX_SUMMARY, { @@ -311,6 +309,7 @@ const DetailsRow = ({ it: tx, timezone }) => { )} {tx.customerFrontCameraPath && ( @@ -326,7 +325,7 @@ const DetailsRow = ({ it: tx, timezone }) => { Icon={CamIdIcon} InverseIcon={CamIdInverseIcon}> diff --git a/new-lamassu-admin/src/pages/Transactions/Transactions.js b/new-lamassu-admin/src/pages/Transactions/Transactions.js index d8ba5c6b..e6ea2c76 100644 --- a/new-lamassu-admin/src/pages/Transactions/Transactions.js +++ b/new-lamassu-admin/src/pages/Transactions/Transactions.js @@ -110,6 +110,7 @@ const GET_TRANSACTIONS = gql` customerIdCardData customerIdCardPhotoPath customerFrontCameraPath + txCustomerPhotoPath customerPhone discount customerId