fix: customer filters not being applied
fix: customer name edge cases fix: sql uppercasing
This commit is contained in:
parent
2a2a0a8a8b
commit
f2a304ae49
2 changed files with 14 additions and 0 deletions
|
|
@ -451,8 +451,12 @@ function batch () {
|
||||||
* @returns {array} Array of customers with it's transactions aggregations
|
* @returns {array} Array of customers with it's transactions aggregations
|
||||||
*/
|
*/
|
||||||
function getCustomersList (phone = null, name = null, address = null, id = null) {
|
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, 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,
|
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,
|
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,
|
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 (
|
FROM (
|
||||||
SELECT c.id, c.authorized_override,
|
SELECT c.id, c.authorized_override,
|
||||||
greatest(0, date_part('day', c.suspended_until - now())) AS days_suspended,
|
greatest(0, date_part('day', c.suspended_until - now())) AS days_suspended,
|
||||||
|
<<<<<<< HEAD
|
||||||
c.suspended_until > now() AS is_suspended,
|
c.suspended_until > now() AS is_suspended,
|
||||||
|
=======
|
||||||
|
>>>>>>> fix: customer filters not being applied
|
||||||
c.front_camera_path, c.front_camera_override,
|
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.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,
|
c.id_card_photo_path, c.id_card_photo_override, c.us_ssn, c.us_ssn_override, c.sanctions,
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,13 @@ const Customers = () => {
|
||||||
id: filtersObject.id
|
id: filtersObject.id
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log({
|
||||||
|
phone: filtersObject.phone,
|
||||||
|
name: filtersObject.name,
|
||||||
|
address: filtersObject.address,
|
||||||
|
id: filtersObject.id
|
||||||
|
})
|
||||||
|
|
||||||
refetch && refetch()
|
refetch && refetch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue