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.)
This commit is contained in:
Kurt Zenisek 2019-06-19 17:15:58 -05:00 committed by GitHub
parent 7e7583710a
commit 228acaf09e
1 changed files with 14 additions and 0 deletions

View File

@ -78,16 +78,25 @@ export default class CustomersReportTable extends Component {
{ {
label: __( 'Country', 'woocommerce-admin' ), label: __( 'Country', 'woocommerce-admin' ),
key: 'country', key: 'country',
isSortable: true,
}, },
{ {
label: __( 'City', 'woocommerce-admin' ), label: __( 'City', 'woocommerce-admin' ),
key: 'city', key: 'city',
hiddenByDefault: true, hiddenByDefault: true,
isSortable: true,
},
{
label: __( 'State', 'woocommerce-admin' ),
key: 'state',
hiddenByDefault: true,
isSortable: true,
}, },
{ {
label: __( 'Postal Code', 'woocommerce-admin' ), label: __( 'Postal Code', 'woocommerce-admin' ),
key: 'postal_code', key: 'postal_code',
hiddenByDefault: true, hiddenByDefault: true,
isSortable: true,
}, },
]; ];
} }
@ -112,6 +121,7 @@ export default class CustomersReportTable extends Component {
total_spend, total_spend,
postcode, postcode,
city, city,
state,
country, country,
} = customer; } = customer;
const countryName = this.getCountryName( country ); const countryName = this.getCountryName( country );
@ -182,6 +192,10 @@ export default class CustomersReportTable extends Component {
display: city, display: city,
value: city, value: city,
}, },
{
display: state,
value: state,
},
{ {
display: postcode, display: postcode,
value: postcode, value: postcode,