Commit Graph

256 Commits

Author SHA1 Message Date
Jeff Stieler 4407e05bc4 Merge pull request woocommerce/woocommerce-admin#1342 from woocommerce/fix/1090-currency-settings-formatting
Honor WooCommerce Settings When Formatting Currency/Price
2019-01-17 17:06:13 -07:00
Albert Juhé Lluveras 059cd0ef0d Set default order to 'desc' in time tables (https://github.com/woocommerce/woocommerce-admin/pull/1341) 2019-01-17 22:14:12 +01:00
Paul Sealock 3ba676ac57 Merge pull request woocommerce/woocommerce-admin#1305 from woocommerce/fix/date-query-formats
Advanced Filters: append time stamp to dates for API query
2019-01-18 07:00:40 +13:00
Jeff Stieler 6ed8ea117a Refactor formatCurrency() to use store settings for formatting rather than store locale. 2019-01-17 00:04:57 -07:00
Paul Sealock c866d1e1e2 Customers Report: remove extended data call 2019-01-17 10:10:23 +13:00
Paul Sealock 7556b45eab Advanced Filters: Dates, fix query formats 2019-01-15 13:02:24 +13:00
Paul Sealock 1fa45e4364 Merge pull request woocommerce/woocommerce-admin#1146 from woocommerce/add/date-filter-calendar
Advanced Filters: Add DatePicker
2019-01-15 09:43:10 +13:00
Albert Juhé Lluveras f009506a45 Makes table dates accessible (https://github.com/woocommerce/woocommerce-admin/pull/1274)
* Create 'Date' component to render accessible dates

* Add tests
2019-01-14 10:54:44 +01:00
Paul Sealock 7525e2347a Add calendar to date advanced filter 2019-01-14 13:22:39 +13:00
Joshua T Flowers e68f751298 Change category gross stats to net (https://github.com/woocommerce/woocommerce-admin/pull/1283) 2019-01-11 17:56:58 +08:00
Justin Shreve 350e296d2c Allow sorting by title and SKU to report tables (https://github.com/woocommerce/woocommerce-admin/pull/1266) 2019-01-10 12:10:31 -05:00
Jeff Stieler c223977dbd Hook up customers report table to real data. 2019-01-09 17:45:24 -07:00
Joshua T Flowers 80fe765657 Use a date instead of hour for single dates in report tables (https://github.com/woocommerce/woocommerce-admin/pull/1208)
* Use a date instead of hour for single dates in report tables

* Add hour to allowed list when day difference is less than 1

* Prioritize hour format over day and set day as default for tables

* Add default intervals for report tables

* Use explicit date format in report tables

* Add constant for default table format

* Restore allowed intervals for >1 && <7 days
2019-01-09 08:24:49 +08:00
Albert Juhé Lluveras 41b933e714 Add link to file in Downloads table (https://github.com/woocommerce/woocommerce-admin/pull/1253)
* Add link to file in Downloads table

* Fix wrong param name for 'ip_address'
2019-01-08 17:51:19 +01:00
Albert Juhé Lluveras 6ca0c628b2 Connect Downloads report to REST API (https://github.com/woocommerce/woocommerce-admin/pull/1238)
* Connect downloads chart and table to REST API

* Display date picker in Downloads report

* Fix missing value for 'days' in Downloads table summary

* Fix download_count being a string instead of a number

* Minor date packages comment fixes

* Fix filters in Downloads report

* Add back empty line

* JSDoc comments style fixes

* Fix username filter not working

* Fix days counter off by 1

* Fix alignment issue
2019-01-07 12:54:42 +01:00
Joshua T Flowers c747d3399e Use unbounded per_page limit in apiFetch for categories (https://github.com/woocommerce/woocommerce-admin/pull/1149) 2018-12-26 10:37:02 +08:00
Joshua T Flowers f88311b372 Check for product categories before loading value (https://github.com/woocommerce/woocommerce-admin/pull/1164)
* Check for product categories before loading value

* Filter product category list for undefined values

* Remove unnecessary double check of productCategories
2018-12-25 18:28:37 +08:00
Albert Juhé Lluveras 1ca1dba3e7 Add Categories report filters (https://github.com/woocommerce/woocommerce-admin/pull/1167)
* Add Categories report filters

* Remove the option to sort categories by name, given that it's not supported by the endpoint
2018-12-25 10:28:20 +01:00
Joshua T Flowers dcaa35c7bf Add product SKU to products report (https://github.com/woocommerce/woocommerce-admin/pull/1161)
* Add product SKU to products report

* Add tests for SKU data
2018-12-25 11:02:06 +08:00
Justin Shreve 579113910d Add remaining filters to the downloads report (https://github.com/woocommerce/woocommerce-admin/pull/1141)
* Add order number, username, and IP address filters to the downloads report.

* Adds tests
2018-12-21 16:40:41 -08:00
Joshua T Flowers 56577101c4 Add customer numeric filters (https://github.com/woocommerce/woocommerce-admin/pull/1116)
* Add customer numeric filters

* Add between params to customers controller

* Escape strings for translation and change inputs to currency

* Add Currency shorthand filter
2018-12-21 12:07:54 +08:00
Joshua T Flowers f83b0e0615 Add product categories wc-api and breadcrumbs (https://github.com/woocommerce/woocommerce-admin/pull/1131)
* Add support for product cats in wp rest api

* Add categories to WC API

* Add category breadcrumbs component

* Increase per_page limit size for product cat API

* Use wc/v3 API to pull product categories

* Return category IDs in API

* Add categories to product reports

* Add category IDs test for REST API

* Switch to getResource instead of require for total count selector
2018-12-21 10:44:27 +08:00
Joshua T Flowers 716ebc0658 Hook up coupons to REST API (https://github.com/woocommerce/woocommerce-admin/pull/1112) 2018-12-21 10:13:57 +08:00
Paul Sealock 280e78cf01 Merge pull request woocommerce/woocommerce-admin#1134 from woocommerce/fix/variations-query-params
Variations Table: add product, variations query params
2018-12-20 14:19:06 +13:00
Paul Sealock eebc20e293 Variations Table: add product, variations query params 2018-12-20 08:43:35 +13:00
Albert Juhé Lluveras 5f593d663e Downloads Report: add summary number, chart and table (https://github.com/woocommerce/woocommerce-admin/pull/1113)
* Downloads Report: add summary number, chart and table

* Use template literal for Downlodas table link

* Add columnPrefsKey to Downloads report table
2018-12-19 12:18:43 +01:00
Albert Juhé Lluveras 776e8d31fe Merge pull request woocommerce/woocommerce-admin#1085 from woocommerce/add/name-filter-autocompleter
Customers report: Name Advanced Filter
2018-12-19 10:39:22 +01:00
Joshua T Flowers 08d3e2c38d Change product_gross_revenue to product_net_revenue (https://github.com/woocommerce/woocommerce-admin/pull/1105)
* Change product_gross_revenue to product_net_revenue

* Change product_gross_revenue to product_net_revenue in category data store

* Change to net_revenue in frontend category report
2018-12-19 08:56:27 +08:00
Paul Sealock 15bbbe739d Hook up Categories table to endpoint 2018-12-19 08:36:42 +13:00
Albert Juhé Lluveras 9adf2c6c86 Merge pull request woocommerce/woocommerce-admin#1117 from woocommerce/add/1030-customer-username-filter
Add customer username filter to Customers page
2018-12-18 15:55:53 +01:00
Albert Juhé Lluveras c4290f757e Merge branch 'master' into add/name-filter-autocompleter 2018-12-18 13:52:48 +01:00
Albert Juhé Lluveras 3c876fedf1 Filter missing parts of the name before displaying it 2018-12-18 13:46:24 +01:00
Albert Juhé Lluveras 741a0098fd Add placeholder to customers table searchbox 2018-12-18 13:35:58 +01:00
Albert Juhé Lluveras a836d1a89b Add customer username filter to Customers page 2018-12-18 12:11:45 +01:00
Albert Juhé Lluveras 03adb993c9 Use <Link> instead of <a> for Orders table link 2018-12-18 10:44:43 +01:00
Albert Juhé Lluveras 9ef07a41b6 Merge pull request woocommerce/woocommerce-admin#1075 from woocommerce/add/extend-customers-data-from-endpoint
Extend customers table data with data from WC endpoint
2018-12-18 09:30:03 +01:00
Joshua T Flowers 9486ab7896 Update/taxes endpoint hookup/941 (https://github.com/woocommerce/woocommerce-admin/pull/1008)
* Hook up taxes to endpoint

* Hook up tax stats endpoint

* Add default tax stat totals for empty results

* Create subtotals from intervals in API

* Change orders to orders_count to keep consistent naming
2018-12-18 10:26:46 +08:00
Justin Shreve 5924be5fa2 Add base downloads report page (https://github.com/woocommerce/woocommerce-admin/pull/1106) 2018-12-17 15:50:45 -05:00
Justin Shreve e42ad6956b Add customer email filter (https://github.com/woocommerce/woocommerce-admin/pull/1092)
* Add customer email filter

* Handle PR feedback: Fix up if statement and add extra info to validation comment
2018-12-17 11:20:11 -05:00
Albert Juhé Lluveras 501842a421 Rename 'isError' methods to 'getError' when they return an object instead of a boolean 2018-12-15 13:38:54 +01:00
Albert Juhé Lluveras 77381c0e20 Rename isError to getError in report table props 2018-12-15 13:15:13 +01:00
Albert Juhé Lluveras 41c48126bf Rename isGetCustomersError to getCustomersError 2018-12-15 13:09:47 +01:00
Albert Juhé Lluveras e4fb53b8f8 Stock report (https://github.com/woocommerce/woocommerce-admin/pull/977)
* Create Stock report

* Create Stock report page

* Display product name in Stock table

* Hide 'Parent' column in Stock table

* Add stock to endpoints map

* Remove dateRangeFilter.show from ReportFilters

* Fix stock status link

* Set the default order to 'stock_quanity'

* Add correct name to StockReport
2018-12-14 15:58:08 -08:00
Albert Juhé Lluveras f9533afdda Rename 'totalCount' to 'totalResults' (https://github.com/woocommerce/woocommerce-admin/pull/1093) 2018-12-14 15:56:52 -08:00
Albert Juhé Lluveras 4656f459a7 Remove old comment 2018-12-14 16:35:32 +01:00
Justin Shreve 43055d25a5 Add a country filter to the customers report (https://github.com/woocommerce/woocommerce-admin/pull/1080)
* Add an advanced country filter to the customers report

* Handle PR feedback: Fix PropType warnings, move filter/label logic to config getLabels() function, fix typo.

* Add flag thumbnail to the country filter

* Update README and CHANGELOG
2018-12-14 10:13:34 -05:00
Albert Juhé Lluveras bb16ba07c8 Use search box for searches instead of comparisons in Customers table 2018-12-14 14:31:41 +01:00
Kevin Killingsworth a7aed85244 Add column visibility prefs to all tables (https://github.com/woocommerce/woocommerce-admin/pull/1082)
* Add column prefs to the other tables

This adds column prefs to the other remaining report tables.

* Table columns: Override defaults with user prefs.

* table columns: Add remaining analytics tables

* user read/update operation: Combine responses

This combines the response handling for the read and update operations.
2018-12-13 14:34:23 -06:00
Kevin Killingsworth 11176f7b0e wc-api: Add user meta for UI preferences (https://github.com/woocommerce/woocommerce-admin/pull/1057)
* wc-api: Add user meta for UI preferences

This adds wc-api code to store UI preferences and provides one example
of updating the revenue table to save column preferences.

* wc-api user: fix returns of operations to arrays

Before, a function was returning undefined when the resourceNames didn't
include what we wanted for the user operations. This was causing some
console errors.

* ReportTable: use columnPrefsKey

This uses `columnPrefsKey` for the user preferences key instead of some
erroneously hard-coded values.

* Fix formatting/comments

These are a couple of small formatting and comment fixes.

* Replace woocommerce_meta_ prefix with wc_admin_

This changes the prefix for the meta fields for the `woocommerce_meta`
user meta array to be `wc_admin_` which better hints at the purpose of
these settings.
2018-12-13 13:24:54 -06:00
Albert Juhé Lluveras d9fe77de24 Add autocompleter for customer name 2018-12-13 18:51:48 +01:00
Albert Juhé Lluveras 110c4f0f73 Fix missing AOV value 2018-12-12 15:46:40 +01:00
Albert Juhé Lluveras c679c8bad7 Extend customers data with data from WC endpoint 2018-12-12 15:22:25 +01:00
Paul Sealock 7f00329889 update comments 2018-12-11 11:18:45 +13:00
Paul Sealock 2240d3d713 Customers: add one advanced filter 2018-12-11 09:01:22 +13:00
Albert Juhé Lluveras d79b490dda Add Customers Report page (https://github.com/woocommerce/woocommerce-admin/pull/1018)
* Create Customers Report page

* Hide date range filter if dateRangeFilter.show is false

* Rename dateRangeFilter.show to showDatePicker in filters config

* Add correct key 'average_order_value'

* Fix customers autocompleter not working
2018-12-10 13:26:43 -06:00
Paul Sealock 93a7472e54 REST API: Add stock info to products and variations 2018-12-11 07:19:46 +13:00
Albert Juhé Lluveras 6208fb9f34 Add correct key 'average_order_value' 2018-12-10 16:23:02 +01:00
Albert Juhé Lluveras 93a18be2f0 Rename dateRangeFilter.show to showDatePicker in filters config 2018-12-10 16:18:17 +01:00
Jeff Stieler 47703fa9b9 Remove debug logging, restore RevenueReportTable component. 2018-12-07 16:39:42 -07:00
Jeff Stieler 98478653e4 Attempt to include report stats type in resource name prefix rather than identifier. 2018-12-07 16:39:42 -07:00
Jeff Stieler c8a76d6dc0 Use fresh-data/wc-api for revenue report table. 2018-12-07 16:39:41 -07:00
Albert Juhé Lluveras d161732c0a Create Customers Report page 2018-12-06 16:25:31 -06:00
Timmy Crawford 46c8518fe1 Add/tax report filters/924 (https://github.com/woocommerce/woocommerce-admin/pull/1017)
* Add comparison filter to tax reports

* Extract tax code function to utils

* Filter tax code strings and add priority
2018-12-06 17:18:46 -05:00
Albert Juhé Lluveras 96d930b119 Fix Orders table summary display 'order' in singular when it should be plural (https://github.com/woocommerce/woocommerce-admin/pull/1003) 2018-12-05 15:54:52 -06:00
Joshua T Flowers 755b9c94f7 Reduce order table net revenue by refund total (https://github.com/woocommerce/woocommerce-admin/pull/988)
* Reduce order table net revenue by refund total

* Use order utils to get refund total
2018-12-05 10:06:00 +08:00
Joshua T Flowers 9e1cb88dfa Add filters for order tables column headers/rows (https://github.com/woocommerce/woocommerce-admin/pull/781)
* Add filters for order tables column headers/rows

* Move filters inside rows

* Rename filter constants

* Apply filters directly to rows

* Rename Orders table filter to be more consistent with core

* Filter entire reports table
2018-12-05 09:44:32 +08:00
Albert Juhé Lluveras e1fd72d06b Fix 'categories' value in Categories report table summary (https://github.com/woocommerce/woocommerce-admin/pull/995)
* Add table summary to Revenue report

* Fix 'categories' value in Categories report table summary
2018-12-04 13:29:58 -06:00
Albert Juhé Lluveras 98289b32c9 Add table summary to Revenue report (https://github.com/woocommerce/woocommerce-admin/pull/994) 2018-12-04 13:28:18 -06:00
Peter Fabian 1c8459244a Merge branch 'master' into fix/749
# Conflicts:
#	includes/data-stores/class-wc-admin-reports-products-data-store.php
2018-12-04 12:07:43 +01:00
Paul Sealock bf0e025b05 REST API: isolate extened info in /reports/products 2018-12-04 13:01:36 +13:00
Albert Juhé Lluveras 093b6d9ec0 Use ReportTable in Revenue report (https://github.com/woocommerce/woocommerce-admin/pull/982)
* Use ReportTable in RevenueTable component

* Convert 'query.per_page' to an integer before using it as a prop
2018-12-03 18:00:13 -06:00
Peter Fabian 1acb9827e7 Merge branch 'master' into fix/749
# Conflicts:
#	includes/data-stores/class-wc-admin-reports-products-data-store.php
2018-12-03 16:21:04 +01:00
Albert Juhé Lluveras bda7d0a6ee Use ReportTable in Orders report (https://github.com/woocommerce/woocommerce-admin/pull/968)
* Use ReportTable in Orders report

* Get totalCount from hte X-WP-Total header

* Order props alphabetically

* Cleanup report table 'tableData' prop

* Use short-circuit evaluation
2018-12-02 21:40:57 -06:00
Paul Sealock da4dea57be Variations: Add endopoint repsonse to table data 2018-12-03 12:16:43 +13:00
Albert Juhé Lluveras 293d58615d Add screen reader labels to table headers (https://github.com/woocommerce/woocommerce-admin/pull/964)
* Add screen reader labels to tables

* Add missing propType
2018-11-30 14:44:02 -06:00
Kevin Killingsworth 847131c6c9 Add wc-api and "Fresh Data" (https://github.com/woocommerce/woocommerce-admin/pull/833)
* data: Add @fresh-data/framework to package.json

* data: Add fresh-data and replace orders in table

This PR adds fresh-data with a WooCommerce API spec to fulfill order
information. It then replaces the existing selectors for the orders
table with the new selectors as a proof-of-concept.

* wc-api: Add temporary code for `withSelect`

This adds temporary code for a `withSelect` function outside of
`@wordpress/data` until the context PR is merged:

https://github.com/WordPress/gutenberg/pull/11460

* wc-api: Update fresh-data to 0.5.0
2018-11-29 09:57:49 -06:00
Albert Juhé Lluveras 540a191b57 Use X-WP-Total header to set the total number of items in tables (https://github.com/woocommerce/woocommerce-admin/pull/952)
* Use X-WP-Total header to set the total number of items in tables

* Improve naming

* Improve tests

* Make getReportItems() return a 'data' property by default

* Make getSummary prop behavior more clear
2018-11-29 08:03:04 -06:00
Paul Sealock 47291b3873 Filters: code -> coupon in config 2018-11-29 09:29:12 +13:00
Albert Juhé Lluveras 5fe5dbe5cd Categories table (https://github.com/woocommerce/woocommerce-admin/pull/903)
* Merge table stores

* Add Categories table

* Add numberFormat to non-currency numbers displayed to the user in the Categories Table

* Rename 'Coupons' to 'Categories' in Categories table title

* Update Categories table to use the ReportTable
2018-11-27 10:44:03 -08:00
Albert Juhé Lluveras 0cbe3034d8 Merge report tables (https://github.com/woocommerce/woocommerce-admin/pull/928)
* Merge report tables

* Remove unnecessary semicolon

* Improve sorting of variables

* Rename props to tableProps in ReportTable
2018-11-26 08:01:20 -06:00
Albert Juhé Lluveras b84fce8580 Add Summary to Products table (https://github.com/woocommerce/woocommerce-admin/pull/904)
* Add Summary to Products table

* Use numberFormat() in tables summary
2018-11-25 21:41:56 -06:00
Albert Juhé Lluveras 0acc43a551 Use numberFormat() to format all non-currency numbers in tables (https://github.com/woocommerce/woocommerce-admin/pull/913) 2018-11-25 21:31:38 -06:00
Albert Juhé Lluveras 2057741853 Merge table stores (https://github.com/woocommerce/woocommerce-admin/pull/896) 2018-11-22 17:12:12 -06:00
David Levin c3275fd4c9 Update order of summary numbers and remove product count 2018-11-21 20:52:24 -07:00
Albert Juhé Lluveras 2a95345bb9 Add chartMode property to filters configuration (https://github.com/woocommerce/woocommerce-admin/pull/884)
* Add chartMode property to filters configuration

* Add tests

* Cleanup

* Add chartMode propType to filters
2018-11-20 16:21:47 -06:00
Paul Sealock 67c7dabc29 Add Variations table 2018-11-20 13:42:55 +13:00
Paul Sealock 38264239fc Merge pull request woocommerce/woocommerce-admin#824 from woocommerce/add/product-detail-link
Add/product detail link
2018-11-20 13:14:34 +13:00
Paul Sealock b7acbd9b2f Add Product Detail link in table 2018-11-20 12:57:36 +13:00
Paul Sealock 0d59998625 Persist chart settings 2018-11-20 12:55:30 +13:00
Albert Juhé Lluveras 9938707970 Add Taxes report table (https://github.com/woocommerce/woocommerce-admin/pull/881)
* Add Taxes report table

* Add taxes autocompleter to Search

* Minor fixes

* Improve @TODO comment explanation
2018-11-19 09:55:15 -06:00
Jonathan Belcher f167c27b5e Adds UI wiring for Coupons chart and summary (https://github.com/woocommerce/woocommerce-admin/pull/724)
* Adds UI wiring for Coupons chart and summary

* Update for changes in master

* Update to use current method

* Remove accidental paste

* Fix typo

* Seperate WooCommerce deps
2018-11-16 08:39:29 -05:00
Jonathan Belcher 8ddcb7ce4a Adds UI wiring for Catgories chart and summary (https://github.com/woocommerce/woocommerce-admin/pull/725)
* Adds UI wiring for Catgories chart and summary

* Use new format for charts

* Use swagger api

* Get rid of store references

* Final touch ups

* Seperate out WooCommerce dep
2018-11-16 08:33:58 -05:00
Albert Juhé Lluveras cc86233e0f Add Coupons report table (https://github.com/woocommerce/woocommerce-admin/pull/867)
* Add Coupons report table

* Fix propTypes warning in CouponsReportTable

* Remove unnecessary constructors from tables
2018-11-15 21:35:10 -06:00
Kelly Dwan 2a9cb6509b Build: Move components to packages dir (https://github.com/woocommerce/woocommerce-admin/pull/804)
* Move components to packages folder

* Update documentation generator to handle packages/components and client/components

* Update component locations

* Update CSS build process

* Remove react-dates css, this is already included by gutenberg

* Fix CSS style - single quotes

* Fix incorrect imports

* Update package-lock with new dependencies

* Update component locations for devdocs

* Fix location of tests
2018-11-15 13:16:23 -05:00
Jonathan Belcher 2dbe3e8cc7 Adds UI wiring for Taxes chart and summary (https://github.com/woocommerce/woocommerce-admin/pull/779)
* Adds UI wiring for Taxes chart and summary

* Update to latest method for creating summary/chart

* Switch out API for swagger

* Fix copy pasta

* Implement swagger api

* Update config to match swagger API

* Code review fixes

* Remove store code as it isnt used
2018-11-14 16:04:59 -05:00
Paul Sealock c809fa6cb9 Apply onQueryChange to more than just 'filter' 2018-11-14 09:56:39 +13:00
Albert Juhé Lluveras 5033a1ba5c Update comparison chart design and show it on the Product report (https://github.com/woocommerce/woocommerce-admin/pull/816)
* Display comparison chart in Product detail report

* Make legend to overflow in comparison charts

* Show comparison chart also when comparing products

* Update comparison chart legend design

* Send itemsLabel and comparisonChart as props to the ReportChart component

* Update styles and create a legend.scss file

* Minor cleanup

* Fix legend test

* Sort props alphabetically
2018-11-12 15:41:33 -06:00
Jonathan Belcher bccae052ae Refactor to remove products chart.js (https://github.com/woocommerce/woocommerce-admin/pull/799)
* Refactor to remove products chartjs

* Delete chartjs

* Fix copy pasta error
2018-11-12 11:28:03 -05:00
Jonathan Belcher e49997381b Refactor to remove revenue chartjs (https://github.com/woocommerce/woocommerce-admin/pull/800)
* Refactor to remove revenue chartjs

* Update index.js

* Remove extra line
2018-11-12 11:27:19 -05:00
Jonathan Belcher c102e78523 Creates a helper function to get selected chart (https://github.com/woocommerce/woocommerce-admin/pull/794)
* Creates a helper function to get selected chart

* remove console log

* Make sure charts is never empty

* Clarify docs
2018-11-07 12:19:59 -05:00