diff --git a/lib/customers.js b/lib/customers.js index 03852d32..18a5f3ca 100644 --- a/lib/customers.js +++ b/lib/customers.js @@ -488,7 +488,7 @@ function getCustomersList () { */ function getCustomerById (id) { const sql = `select id, authorized_override, days_suspended, front_camera_path, front_camera_override, - phone, sms_override, id_card_data, id_card_data_override, id_card_data_expiration, + phone, name, 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, fiat_code as last_tx_fiat_code, tx_class as last_tx_class @@ -496,7 +496,7 @@ function getCustomerById (id) { select c.id, c.authorized_override, greatest(0, date_part('day', c.suspended_until - now())) as days_suspended, 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.name, 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.sanctions_at, c.sanctions_override, t.tx_class, t.fiat, t.fiat_code, t.created, row_number() over (partition by c.id order by t.created desc) as rn, diff --git a/lib/new-admin/graphql/schema.js b/lib/new-admin/graphql/schema.js index e26c70ba..99880eab 100644 --- a/lib/new-admin/graphql/schema.js +++ b/lib/new-admin/graphql/schema.js @@ -86,6 +86,7 @@ const typeDefs = gql` frontCameraPath: String frontCameraOverride: String phone: String + name: String smsOverride: String idCardData: JSONObject idCardDataOverride: String diff --git a/new-lamassu-admin/src/pages/Customers/CustomerProfile.js b/new-lamassu-admin/src/pages/Customers/CustomerProfile.js index 03049099..4b3c2963 100644 --- a/new-lamassu-admin/src/pages/Customers/CustomerProfile.js +++ b/new-lamassu-admin/src/pages/Customers/CustomerProfile.js @@ -27,6 +27,7 @@ import { import { getFormattedPhone, getName } from './helper' const useStyles = makeStyles(styles) +const ANONYMOUS_USER_NAME = 'anonymous' const GET_CUSTOMER = gql` query customer($customerId: ID!) { @@ -37,6 +38,7 @@ const GET_CUSTOMER = gql` frontCameraPath frontCameraOverride phone + name smsOverride idCardData idCardDataOverride @@ -165,22 +167,26 @@ const CustomerProfile = memo(() => { locale={locale} setShowCompliance={() => setShowCompliance(!showCompliance)} /> -