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' ),
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,