fix: trim customer names
This commit is contained in:
parent
686dc3e992
commit
fdff4feeae
1 changed files with 2 additions and 2 deletions
|
|
@ -190,11 +190,11 @@ function searchCustomers(searchTerm: string, limit: number = 20): Promise<any> {
|
|||
'cst.id',
|
||||
'cst.phone',
|
||||
'cst.email',
|
||||
sql`CONCAT(
|
||||
sql`TRIM(CONCAT(
|
||||
COALESCE(${selectNewestIdCardData(eb)}->>'firstName', ''),
|
||||
' ',
|
||||
COALESCE(${selectNewestIdCardData(eb)}->>'lastName', '')
|
||||
)`.as('customerName'),
|
||||
))`.as('customerName'),
|
||||
])
|
||||
.where('cst.id', '!=', ANON_ID)
|
||||
.as('customers_with_names'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue