fix: UI stuff and mailgun typos
This commit is contained in:
parent
142f86c85c
commit
3221a7a828
13 changed files with 75 additions and 13 deletions
|
|
@ -31,6 +31,7 @@ function transaction () {
|
|||
function customer () {
|
||||
const sql = `SELECT DISTINCT * FROM (
|
||||
SELECT 'phone' AS type, phone AS value FROM customers WHERE phone IS NOT NULL UNION
|
||||
SELECT 'email' AS type, email AS value FROM customers WHERE email IS NOT NULL UNION
|
||||
SELECT 'name' AS type, id_card_data::json->>'firstName' AS value FROM customers WHERE id_card_data::json->>'firstName' IS NOT NULL AND id_card_data::json->>'lastName' IS NULL UNION
|
||||
SELECT 'name' AS type, id_card_data::json->>'lastName' AS value FROM customers WHERE id_card_data::json->>'firstName' IS NULL AND id_card_data::json->>'lastName' IS NOT NULL UNION
|
||||
SELECT 'name' AS type, concat(id_card_data::json->>'firstName', ' ', id_card_data::json->>'lastName') AS value FROM customers WHERE id_card_data::json->>'firstName' IS NOT NULL AND id_card_data::json->>'lastName' IS NOT NULL UNION
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const resolvers = {
|
|||
isAnonymous: parent => (parent.customerId === anonymous.uuid)
|
||||
},
|
||||
Query: {
|
||||
customers: (...[, { phone, name, address, id }]) => customers.getCustomersList(phone, name, address, id),
|
||||
customers: (...[, { phone, email, name, address, id }]) => customers.getCustomersList(phone, name, address, id, email),
|
||||
customer: (...[, { customerId }]) => customers.getCustomerById(customerId),
|
||||
customerFilters: () => filters.customer()
|
||||
},
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ const typeDef = gql`
|
|||
}
|
||||
|
||||
type Query {
|
||||
customers(phone: String, name: String, address: String, id: String): [Customer] @auth
|
||||
customers(phone: String, name: String, email: String, address: String, id: String): [Customer] @auth
|
||||
customer(customerId: ID!): Customer @auth
|
||||
customerFilters: [Filter] @auth
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ const typeDef = gql`
|
|||
rawTickerPrice: String
|
||||
isPaperWallet: Boolean
|
||||
customerPhone: String
|
||||
customerEmail: String
|
||||
customerIdCardDataNumber: String
|
||||
customerIdCardDataExpiration: Date
|
||||
customerIdCardData: JSONObject
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ function batch (
|
|||
|
||||
const cashInSql = `SELECT 'cashIn' AS tx_class, txs.*,
|
||||
c.phone AS customer_phone,
|
||||
c.email AS customer_email,
|
||||
c.id_card_data_number AS customer_id_card_data_number,
|
||||
c.id_card_data_expiration AS customer_id_card_data_expiration,
|
||||
c.id_card_data AS customer_id_card_data,
|
||||
|
|
@ -86,6 +87,7 @@ function batch (
|
|||
txs.*,
|
||||
actions.tx_hash,
|
||||
c.phone AS customer_phone,
|
||||
c.email AS customer_email,
|
||||
c.id_card_data_number AS customer_id_card_data_number,
|
||||
c.id_card_data_expiration AS customer_id_card_data_expiration,
|
||||
c.id_card_data AS customer_id_card_data,
|
||||
|
|
@ -157,7 +159,7 @@ function advancedBatch (data) {
|
|||
'denomination1', 'denomination2', 'errorCode', 'customerId',
|
||||
'txVersion', 'publishedAt', 'termsAccepted', 'layer2Address',
|
||||
'commissionPercentage', 'rawTickerPrice', 'receivedCryptoAtoms',
|
||||
'discount', 'txHash', 'customerPhone', 'customerIdCardDataNumber',
|
||||
'discount', 'txHash', 'customerPhone', 'customerEmail', 'customerIdCardDataNumber',
|
||||
'customerIdCardDataExpiration', 'customerIdCardData', 'customerName', 'sendTime',
|
||||
'customerFrontCameraPath', 'customerIdCardPhotoPath', 'expired', 'machineName', 'walletScore']
|
||||
|
||||
|
|
@ -173,7 +175,7 @@ function advancedBatch (data) {
|
|||
|
||||
function simplifiedBatch (data) {
|
||||
const fields = ['txClass', 'id', 'created', 'machineName',
|
||||
'cryptoCode', 'cryptoAtoms', 'fiat', 'fiatCode', 'phone', 'toAddress',
|
||||
'cryptoCode', 'cryptoAtoms', 'fiat', 'fiatCode', 'phone', 'email', 'toAddress',
|
||||
'txHash', 'dispense', 'error', 'status', 'fiatProfit', 'cryptoAmount']
|
||||
|
||||
const addSimplifiedFields = _.map(it => ({
|
||||
|
|
@ -234,6 +236,7 @@ function getCustomerTransactionsBatch (ids) {
|
|||
|
||||
const cashInSql = `SELECT 'cashIn' AS tx_class, txs.*,
|
||||
c.phone AS customer_phone,
|
||||
c.email AS customer_email,
|
||||
c.id_card_data_number AS customer_id_card_data_number,
|
||||
c.id_card_data_expiration AS customer_id_card_data_expiration,
|
||||
c.id_card_data AS customer_id_card_data,
|
||||
|
|
@ -252,6 +255,7 @@ function getCustomerTransactionsBatch (ids) {
|
|||
txs.*,
|
||||
actions.tx_hash,
|
||||
c.phone AS customer_phone,
|
||||
c.email AS customer_email,
|
||||
c.id_card_data_number AS customer_id_card_data_number,
|
||||
c.id_card_data_expiration AS customer_id_card_data_expiration,
|
||||
c.id_card_data AS customer_id_card_data,
|
||||
|
|
@ -280,6 +284,7 @@ function single (txId) {
|
|||
|
||||
const cashInSql = `SELECT 'cashIn' AS tx_class, txs.*,
|
||||
c.phone AS customer_phone,
|
||||
c.email AS customer_email,
|
||||
c.id_card_data_number AS customer_id_card_data_number,
|
||||
c.id_card_data_expiration AS customer_id_card_data_expiration,
|
||||
c.id_card_data AS customer_id_card_data,
|
||||
|
|
@ -297,6 +302,7 @@ function single (txId) {
|
|||
txs.*,
|
||||
actions.tx_hash,
|
||||
c.phone AS customer_phone,
|
||||
c.email AS customer_email,
|
||||
c.id_card_data_number AS customer_id_card_data_number,
|
||||
c.id_card_data_expiration AS customer_id_card_data_expiration,
|
||||
c.id_card_data AS customer_id_card_data,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue