42 lines
1.0 KiB
JavaScript
42 lines
1.0 KiB
JavaScript
/**
|
|
* External dependencies
|
|
*/
|
|
import { __ } from '@wordpress/i18n';
|
|
import { applyFilters } from '@wordpress/hooks';
|
|
|
|
const STOCK_REPORT_FILTERS_FILTER = 'woocommerce_admin_stock_report_filters';
|
|
const STOCK_REPORT_ADVANCED_FILTERS_FILTER =
|
|
'woocommerce_admin_stock_report_advanced_filters';
|
|
|
|
export const showDatePicker = false;
|
|
|
|
export const filters = applyFilters( STOCK_REPORT_FILTERS_FILTER, [
|
|
{
|
|
label: __( 'Show', 'woocommerce-admin' ),
|
|
staticParams: [ 'paged', 'per_page' ],
|
|
param: 'type',
|
|
showFilters: () => true,
|
|
filters: [
|
|
{ label: __( 'All Products', 'woocommerce-admin' ), value: 'all' },
|
|
{
|
|
label: __( 'Out of Stock', 'woocommerce-admin' ),
|
|
value: 'outofstock',
|
|
},
|
|
{
|
|
label: __( 'Low Stock', 'woocommerce-admin' ),
|
|
value: 'lowstock',
|
|
},
|
|
{ label: __( 'In Stock', 'woocommerce-admin' ), value: 'instock' },
|
|
{
|
|
label: __( 'On Backorder', 'woocommerce-admin' ),
|
|
value: 'onbackorder',
|
|
},
|
|
],
|
|
},
|
|
] );
|
|
|
|
export const advancedFilters = applyFilters(
|
|
STOCK_REPORT_ADVANCED_FILTERS_FILTER,
|
|
{}
|
|
);
|