2018-07-05 03:14:40 +00:00
|
|
|
/** @format */
|
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
2018-08-06 21:33:55 +00:00
|
|
|
import { Component, Fragment } from '@wordpress/element';
|
2018-10-11 17:07:59 +00:00
|
|
|
import PropTypes from 'prop-types';
|
2018-07-05 03:14:40 +00:00
|
|
|
|
|
|
|
/**
|
2018-10-30 18:57:48 +00:00
|
|
|
* WooCommerce dependencies
|
2018-07-05 03:14:40 +00:00
|
|
|
*/
|
2018-10-29 07:57:05 +00:00
|
|
|
import { ReportFilters } from '@woocommerce/components';
|
2018-10-30 18:57:48 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import { advancedFilters, filters } from './config';
|
2018-10-16 16:07:43 +00:00
|
|
|
import OrdersReportChart from './chart';
|
2018-10-11 08:30:51 +00:00
|
|
|
import OrdersReportTable from './table';
|
2018-07-05 03:14:40 +00:00
|
|
|
|
2018-10-29 07:57:05 +00:00
|
|
|
export default class OrdersReport extends Component {
|
2018-07-05 03:14:40 +00:00
|
|
|
render() {
|
2018-10-29 07:57:05 +00:00
|
|
|
const { path, query } = this.props;
|
2018-10-11 08:30:51 +00:00
|
|
|
|
2018-07-05 03:14:40 +00:00
|
|
|
return (
|
|
|
|
<Fragment>
|
2018-08-08 21:24:48 +00:00
|
|
|
<ReportFilters
|
|
|
|
query={ query }
|
|
|
|
path={ path }
|
|
|
|
filters={ filters }
|
2018-10-18 09:34:37 +00:00
|
|
|
advancedConfig={ advancedFilters }
|
2018-08-08 21:24:48 +00:00
|
|
|
/>
|
2018-10-16 16:07:43 +00:00
|
|
|
<OrdersReportChart query={ query } />
|
2018-10-29 07:57:05 +00:00
|
|
|
<OrdersReportTable query={ query } />
|
2018-07-05 03:14:40 +00:00
|
|
|
</Fragment>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-11 17:07:59 +00:00
|
|
|
OrdersReport.propTypes = {
|
|
|
|
path: PropTypes.string.isRequired,
|
|
|
|
query: PropTypes.object.isRequired,
|
|
|
|
};
|