From f2a304ae494f2a269ba77bf05bbc5938317fc9cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Salgado?= Date: Mon, 28 Jun 2021 01:24:15 +0100 Subject: [PATCH] fix: customer filters not being applied fix: customer name edge cases fix: sql uppercasing --- lib/customers.js | 7 +++++++ new-lamassu-admin/src/pages/Customers/Customers.js | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/lib/customers.js b/lib/customers.js index b2e913b9..8cd35924 100644 --- a/lib/customers.js +++ b/lib/customers.js @@ -451,8 +451,12 @@ function batch () { * @returns {array} Array of customers with it's transactions aggregations */ function getCustomersList (phone = null, name = null, address = null, id = null) { +<<<<<<< HEAD const sql = `SELECT id, authorized_override, days_suspended, is_suspended, front_camera_path, front_camera_override, +======= + const sql = `SELECT id, authorized_override, days_suspended, front_camera_path, front_camera_override, +>>>>>>> fix: customer filters not being applied phone, sms_override, id_card_data, id_card_data_override, id_card_data_expiration, id_card_photo_path, id_card_photo_override, us_ssn, us_ssn_override, sanctions, sanctions_at, sanctions_override, total_txs, total_spent, created AS last_active, fiat AS last_tx_fiat, @@ -460,7 +464,10 @@ function getCustomersList (phone = null, name = null, address = null, id = null) FROM ( SELECT c.id, c.authorized_override, greatest(0, date_part('day', c.suspended_until - now())) AS days_suspended, +<<<<<<< HEAD c.suspended_until > now() AS is_suspended, +======= +>>>>>>> fix: customer filters not being applied c.front_camera_path, c.front_camera_override, c.phone, c.sms_override, c.id_card_data, c.id_card_data_override, c.id_card_data_expiration, c.id_card_photo_path, c.id_card_photo_override, c.us_ssn, c.us_ssn_override, c.sanctions, diff --git a/new-lamassu-admin/src/pages/Customers/Customers.js b/new-lamassu-admin/src/pages/Customers/Customers.js index f263de86..d05a2ef1 100644 --- a/new-lamassu-admin/src/pages/Customers/Customers.js +++ b/new-lamassu-admin/src/pages/Customers/Customers.js @@ -98,6 +98,13 @@ const Customers = () => { id: filtersObject.id }) + console.log({ + phone: filtersObject.phone, + name: filtersObject.name, + address: filtersObject.address, + id: filtersObject.id + }) + refetch && refetch() }