2018-11-12 16:27:19 +00:00
|
|
|
/** @format */
|
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { __ } from '@wordpress/i18n';
|
2019-05-20 01:57:06 +00:00
|
|
|
import { applyFilters } from '@wordpress/hooks';
|
2018-11-12 16:27:19 +00:00
|
|
|
|
2019-05-20 01:57:06 +00:00
|
|
|
const REVENUE_REPORT_CHART_FILTER = 'woocommerce_admin_revenue_report_chart_filter';
|
2019-08-27 19:33:31 +00:00
|
|
|
const REVENUE_REPORT_FILTERS_FILTER = 'woocommerce_admin_revenue_report_filters';
|
|
|
|
const REVENUE_REPORT_ADVANCED_FILTERS_FILTER = 'woocommerce_admin_revenue_report_advanced_filters';
|
2019-05-20 01:57:06 +00:00
|
|
|
|
|
|
|
export const charts = applyFilters( REVENUE_REPORT_CHART_FILTER, [
|
2018-11-12 16:27:19 +00:00
|
|
|
{
|
|
|
|
key: 'gross_revenue',
|
2019-03-13 17:14:02 +00:00
|
|
|
label: __( 'Gross Revenue', 'woocommerce-admin' ),
|
2019-02-15 10:54:41 +00:00
|
|
|
order: 'desc',
|
|
|
|
orderby: 'gross_revenue',
|
2018-11-12 16:27:19 +00:00
|
|
|
type: 'currency',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'refunds',
|
2019-03-13 17:14:02 +00:00
|
|
|
label: __( 'Refunds', 'woocommerce-admin' ),
|
2019-02-15 10:54:41 +00:00
|
|
|
order: 'desc',
|
|
|
|
orderby: 'refunds',
|
2018-11-12 16:27:19 +00:00
|
|
|
type: 'currency',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'coupons',
|
2019-03-13 17:14:02 +00:00
|
|
|
label: __( 'Coupons', 'woocommerce-admin' ),
|
2019-02-15 10:54:41 +00:00
|
|
|
order: 'desc',
|
|
|
|
orderby: 'coupons',
|
2018-11-12 16:27:19 +00:00
|
|
|
type: 'currency',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'taxes',
|
2019-03-13 17:14:02 +00:00
|
|
|
label: __( 'Taxes', 'woocommerce-admin' ),
|
2019-02-15 10:54:41 +00:00
|
|
|
order: 'desc',
|
|
|
|
orderby: 'taxes',
|
2018-11-12 16:27:19 +00:00
|
|
|
type: 'currency',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'shipping',
|
2019-03-13 17:14:02 +00:00
|
|
|
label: __( 'Shipping', 'woocommerce-admin' ),
|
2019-02-15 10:54:41 +00:00
|
|
|
orderby: 'shipping',
|
2018-11-12 16:27:19 +00:00
|
|
|
type: 'currency',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: 'net_revenue',
|
2019-03-13 17:14:02 +00:00
|
|
|
label: __( 'Net Revenue', 'woocommerce-admin' ),
|
2019-02-15 10:54:41 +00:00
|
|
|
orderby: 'net_revenue',
|
2018-11-12 16:27:19 +00:00
|
|
|
type: 'currency',
|
|
|
|
},
|
2019-05-20 01:57:06 +00:00
|
|
|
] );
|
2019-08-27 19:33:31 +00:00
|
|
|
|
|
|
|
export const filters = applyFilters( REVENUE_REPORT_FILTERS_FILTER, [] );
|
|
|
|
export const advancedFilters = applyFilters( REVENUE_REPORT_ADVANCED_FILTERS_FILTER, {} );
|