fix: UI stuff and mailgun typos
This commit is contained in:
parent
142f86c85c
commit
3221a7a828
13 changed files with 75 additions and 13 deletions
|
|
@ -488,7 +488,7 @@ function batch () {
|
|||
* @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, email = null) {
|
||||
const passableErrorCodes = _.map(Pgp.as.text, TX_PASSTHROUGH_ERROR_CODES).join(',')
|
||||
|
||||
const sql = `SELECT id, authorized_override, days_suspended, is_suspended, front_camera_path, front_camera_override,
|
||||
|
|
@ -529,8 +529,10 @@ function getCustomersList (phone = null, name = null, address = null, id = null)
|
|||
AND ($5 IS NULL OR CONCAT(id_card_data::json->>'firstName', ' ', id_card_data::json->>'lastName') = $5 OR id_card_data::json->>'firstName' = $5 OR id_card_data::json->>'lastName' = $5)
|
||||
AND ($6 IS NULL OR id_card_data::json->>'address' = $6)
|
||||
AND ($7 IS NULL OR id_card_data::json->>'documentNumber' = $7)
|
||||
AND ($8 IS NULL OR email = $8)
|
||||
limit $3`
|
||||
return db.any(sql, [ passableErrorCodes, anonymous.uuid, NUM_RESULTS, phone, name, address, id ])
|
||||
console.log(email)
|
||||
return db.any(sql, [ passableErrorCodes, anonymous.uuid, NUM_RESULTS, phone, name, address, id, email ])
|
||||
.then(customers => Promise.all(_.map(customer =>
|
||||
getCustomInfoRequestsData(customer)
|
||||
.then(camelizeDeep), customers)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue