2018-12-14 23:58:08 +00:00
|
|
|
/** @format */
|
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { Component, Fragment } from '@wordpress/element';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import { showDatePicker, filters } from './config';
|
|
|
|
import StockReportTable from './table';
|
2019-06-27 02:44:39 +00:00
|
|
|
import ReportFilters from 'analytics/components/report-filters';
|
2018-12-14 23:58:08 +00:00
|
|
|
|
|
|
|
export default class StockReport extends Component {
|
|
|
|
render() {
|
|
|
|
const { query, path } = this.props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Fragment>
|
|
|
|
<ReportFilters
|
|
|
|
query={ query }
|
|
|
|
path={ path }
|
|
|
|
showDatePicker={ showDatePicker }
|
|
|
|
filters={ filters }
|
2019-06-27 02:44:39 +00:00
|
|
|
report="stock"
|
2018-12-14 23:58:08 +00:00
|
|
|
/>
|
2019-03-21 03:25:05 +00:00
|
|
|
<StockReportTable query={ query } filters={ filters } />
|
2018-12-14 23:58:08 +00:00
|
|
|
</Fragment>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StockReport.propTypes = {
|
|
|
|
query: PropTypes.object.isRequired,
|
|
|
|
};
|