TT#14334 Fix showing customer name

* If firstname or lastname is missing, avoid showing "null" in
  custom column renderer.

Change-Id: I5e8e28e41d9c9379bc790a802048c9b820f70713
changes/49/12649/1
Andreas Granig 8 years ago
parent 6eeaa8e8ac
commit 80e69e5b5f

@ -62,7 +62,7 @@ sub list_customer :Chained('/') :PathPart('customer') :CaptureArgs(0) {
{ name => "contact.email", search => 1, title => $c->loc("Contact Email") },
{ name => "contact.firstname", search => 1, title => '' },
{ name => "contact.lastname", search => 1, title => $c->loc("Name"),
custom_renderer => 'function ( data, type, full ) { return full.contact_firstname + " " + full.contact_lastname; }' },
custom_renderer => 'function ( data, type, full ) { var sep = (full.contact_firstname && full.contact_lastname) ? " " : ""; return (full.contact_firstname || "") + sep + (full.contact_lastname || ""); }' },
{ name => "billing_mappings_actual.billing_mappings.product.name", search => 1, title => $c->loc("Product") },
{ name => "billing_mappings_actual.billing_mappings.billing_profile.name", search => 1, title => $c->loc("Billing Profile") },
{ name => "status", search => 1, title => $c->loc("Status") },

Loading…
Cancel
Save