2018-12-06 22:21:46 +00:00
|
|
|
/** @format */
|
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { Component, Fragment } from '@wordpress/element';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* WooCommerce dependencies
|
|
|
|
*/
|
|
|
|
import { ReportFilters } from '@woocommerce/components';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
2018-12-10 20:01:22 +00:00
|
|
|
import { filters, advancedFilters } from './config';
|
2018-12-06 22:21:46 +00:00
|
|
|
import CustomersReportTable from './table';
|
|
|
|
|
|
|
|
export default class CustomersReport extends Component {
|
|
|
|
render() {
|
|
|
|
const { query, path } = this.props;
|
2019-01-10 00:43:39 +00:00
|
|
|
const tableQuery = {
|
|
|
|
orderby: 'date_registered',
|
|
|
|
order: 'desc',
|
|
|
|
...query,
|
|
|
|
};
|
2018-12-06 22:21:46 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<Fragment>
|
|
|
|
<ReportFilters
|
|
|
|
query={ query }
|
|
|
|
path={ path }
|
|
|
|
filters={ filters }
|
2018-12-10 20:01:22 +00:00
|
|
|
showDatePicker={ false }
|
|
|
|
advancedFilters={ advancedFilters }
|
2018-12-06 22:21:46 +00:00
|
|
|
/>
|
2019-01-10 00:43:39 +00:00
|
|
|
<CustomersReportTable query={ tableQuery } />
|
2018-12-06 22:21:46 +00:00
|
|
|
</Fragment>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CustomersReport.propTypes = {
|
|
|
|
query: PropTypes.object.isRequired,
|
|
|
|
};
|