From e390ab6b42b5c424da3774d20d9b46abbdab2199 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Fri, 27 May 2022 09:25:21 +0200 Subject: [PATCH] The filter HTML will use no-value placeholders for empty fields --- assets/js/pages/customers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/pages/customers.js b/assets/js/pages/customers.js index 0ea92904..604f6eba 100644 --- a/assets/js/pages/customers.js +++ b/assets/js/pages/customers.js @@ -412,9 +412,9 @@ App.Pages.Customers = (function () { * @return {String} Returns the record HTML code. */ function getFilterHtml(customer) { - const name = customer.first_name + ' ' + customer.last_name; + const name = (customer.first_name || '[No First Name]') + ' ' + (customer.last_name || '[No Last Name]'); - let info = customer.email; + let info = customer.email || '[No Email]'; info = customer.phone_number ? info + ', ' + customer.phone_number : info;