From 515ee0d1c54957e7539a646dba1a5af1e1840226 Mon Sep 17 00:00:00 2001 From: Nikola Ubavic <53820106+ubavic@users.noreply.github.com> Date: Fri, 8 Oct 2021 01:03:33 +0200 Subject: [PATCH] fix: no customer number showing in transactions --- lib/new-admin/services/transactions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/new-admin/services/transactions.js b/lib/new-admin/services/transactions.js index 84630d33..44de0ab2 100644 --- a/lib/new-admin/services/transactions.js +++ b/lib/new-admin/services/transactions.js @@ -46,7 +46,7 @@ function batch ( 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, - concat(c.id_card_data::json->>'firstName', ' ', c.id_card_data::json->>'lastName') AS customer_name, + array_to_string(array[c.id_card_data::json->>'firstName', c.id_card_data::json->>'lastName'], ' ') AS customer_name, c.front_camera_path AS customer_front_camera_path, c.id_card_photo_path AS customer_id_card_photo_path, ((NOT txs.send_confirmed) AND (txs.created <= now() - interval $1)) AS expired @@ -73,7 +73,7 @@ function batch ( 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, - concat(c.id_card_data::json->>'firstName', ' ', c.id_card_data::json->>'lastName') AS customer_name, + array_to_string(array[c.id_card_data::json->>'firstName', c.id_card_data::json->>'lastName'], ' ') AS customer_name, c.front_camera_path AS customer_front_camera_path, c.id_card_photo_path AS customer_id_card_photo_path, (extract(epoch FROM (now() - greatest(txs.created, txs.confirmed_at))) * 1000) >= $1 AS expired