From 228acaf09eba02f0ea3ca3a6c0a46c9c05744cc4 Mon Sep 17 00:00:00 2001 From: Kurt Zenisek Date: Wed, 19 Jun 2019 17:15:58 -0500 Subject: [PATCH] Added state alongside city & other info, and made location info sortable for convenient grouping of data at a glance. I figured there's no reason you couldn't sort by the location data just so you can group them together (ex. quickly see how many are from a specific state at a glance rather than having it spread out & not having a means to group them together from this view.) --- .../client/analytics/report/customers/table.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/plugins/woocommerce-admin/client/analytics/report/customers/table.js b/plugins/woocommerce-admin/client/analytics/report/customers/table.js index 9259d3556c7..7308a137377 100644 --- a/plugins/woocommerce-admin/client/analytics/report/customers/table.js +++ b/plugins/woocommerce-admin/client/analytics/report/customers/table.js @@ -78,16 +78,25 @@ export default class CustomersReportTable extends Component { { label: __( 'Country', 'woocommerce-admin' ), key: 'country', + isSortable: true, }, { label: __( 'City', 'woocommerce-admin' ), key: 'city', hiddenByDefault: true, + isSortable: true, + }, + { + label: __( 'State', 'woocommerce-admin' ), + key: 'state', + hiddenByDefault: true, + isSortable: true, }, { label: __( 'Postal Code', 'woocommerce-admin' ), key: 'postal_code', hiddenByDefault: true, + isSortable: true, }, ]; } @@ -112,6 +121,7 @@ export default class CustomersReportTable extends Component { total_spend, postcode, city, + state, country, } = customer; const countryName = this.getCountryName( country ); @@ -182,6 +192,10 @@ export default class CustomersReportTable extends Component { display: city, value: city, }, + { + display: state, + value: state, + }, { display: postcode, value: postcode,