Update the order of orders report summary numbers (https://github.com/woocommerce/woocommerce-admin/pull/547)

* Update the order of orders report summary numbers

* Teamwork makes the dreamwork.
This commit is contained in:
David Levin 2018-10-18 13:45:36 -07:00 committed by Timmy Crawford
parent 71b2435d96
commit f74ae15b91
2 changed files with 9 additions and 5 deletions

View File

@ -18,6 +18,8 @@ import { SummaryList, SummaryListPlaceholder, SummaryNumber } from '@woocommerce
import { getDateParamsFromQuery } from 'lib/date';
import { getSummaryNumbers } from 'store/reports/utils';
import ReportError from 'analytics/components/report-error';
import { numberFormat } from 'lib/number';
class ReportSummary extends Component {
render() {
const { selectedChart, charts } = this.props;
@ -56,6 +58,8 @@ class ReportSummary extends Component {
secondaryValue = secondaryValue && formatCurrency( secondaryValue );
break;
case 'number':
value = numberFormat( value );
secondaryValue = secondaryValue && numberFormat( secondaryValue );
break;
}

View File

@ -16,6 +16,11 @@ import ReportSummary from 'analytics/components/report-summary';
class OrdersReportChart extends Component {
getCharts() {
return [
{
key: 'orders_count',
label: __( 'Orders Count', 'wc-admin' ),
type: 'number',
},
{
key: 'net_revenue',
label: __( 'Net Revenue', 'wc-admin' ),
@ -31,11 +36,6 @@ class OrdersReportChart extends Component {
label: __( 'Average Items Per Order', 'wc-admin' ),
type: 'average',
},
{
key: 'orders_count',
label: __( 'Orders Count', 'wc-admin' ),
type: 'number',
},
];
}