woocommerce/plugins/woocommerce-admin/client/analytics/report/customers/index.js

46 lines
900 B
JavaScript
Raw Normal View History

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;
const tableQuery = {
2019-01-23 18:08:27 +00:00
orderby: 'date_last_active',
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
/>
<CustomersReportTable query={ tableQuery } />
2018-12-06 22:21:46 +00:00
</Fragment>
);
}
}
CustomersReport.propTypes = {
query: PropTypes.object.isRequired,
};