2018-12-14 23:58:08 +00:00
|
|
|
/** @format */
|
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { __ } from '@wordpress/i18n';
|
2019-08-23 16:41:42 +00:00
|
|
|
import { applyFilters } from '@wordpress/hooks';
|
|
|
|
|
|
|
|
const STOCK_REPORT_FILTERS_FILTER = 'woocommerce_admin_stock_report_filters';
|
2019-08-27 19:33:31 +00:00
|
|
|
const STOCK_REPORT_ADVANCED_FILTERS_FILTER = 'woocommerce_admin_stock_report_advanced_filters';
|
2018-12-14 23:58:08 +00:00
|
|
|
|
|
|
|
export const showDatePicker = false;
|
|
|
|
|
2019-08-23 16:41:42 +00:00
|
|
|
export const filters = applyFilters( STOCK_REPORT_FILTERS_FILTER, [
|
2018-12-14 23:58:08 +00:00
|
|
|
{
|
2019-03-13 17:14:02 +00:00
|
|
|
label: __( 'Show', 'woocommerce-admin' ),
|
2018-12-14 23:58:08 +00:00
|
|
|
staticParams: [],
|
|
|
|
param: 'type',
|
|
|
|
showFilters: () => true,
|
|
|
|
filters: [
|
2019-03-13 17:14:02 +00:00
|
|
|
{ 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' },
|
2018-12-14 23:58:08 +00:00
|
|
|
],
|
|
|
|
},
|
2019-08-23 16:41:42 +00:00
|
|
|
] );
|
2019-08-27 19:33:31 +00:00
|
|
|
|
|
|
|
export const advancedFilters = applyFilters( STOCK_REPORT_ADVANCED_FILTERS_FILTER, {} );
|