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

47 lines
1000 B
JavaScript
Raw Normal View History

2018-12-06 22:21:46 +00:00
/**
* External dependencies
*/
import { Component, Fragment } from '@wordpress/element';
import PropTypes from 'prop-types';
/**
* 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';
import ReportFilters from '../../components/report-filters';
2018-12-06 22:21:46 +00:00
export default class CustomersReport extends Component {
render() {
const { isRequesting, 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 }
2019-06-27 02:44:39 +00:00
report="customers"
2018-12-06 22:21:46 +00:00
/>
2019-03-21 03:25:05 +00:00
<CustomersReportTable
isRequesting={ isRequesting }
query={ tableQuery }
filters={ filters }
advancedFilters={ advancedFilters }
/>
2018-12-06 22:21:46 +00:00
</Fragment>
);
}
}
CustomersReport.propTypes = {
query: PropTypes.object.isRequired,
};