Commit Graph

225 Commits

Author SHA1 Message Date
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 03e17d372b Add new props to chart component (https://github.com/woocommerce/woocommerce-admin/pull/1247)
* Add different props to chart component that were inferred from 'mode'

* Add new chart props to packages CHANGELOG
2019-01-08 10:21:47 +01:00
Joshua T Flowers ef6d7ec4cb Add leaderboard section (https://github.com/woocommerce/woocommerce-admin/pull/1234)
* Add leaderboard section to dashboard

* Add rows per table user preference

* Pass in rowsPerTable to leaderboards to adjust total rows

* Add styling for rows select dropdown

* Set default for total rows if tableQuery is undefined

* Remove double localization on leaderboard labels

* Simplify toggle logic for hidden leaderboards

* Move updateCurrentUserData outside of setState callback
2019-01-08 15:20:01 +08: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
Albert Juhé Lluveras a0f23c93c9 Improve Charts X-axis when displaying a single date (https://github.com/woocommerce/woocommerce-admin/pull/1195)
* Improve Charts X-axis when displaying a single date

* Add tests for getXTicks

* Fix typo in tests

* Add assertion in compareStrings test for dates with commas

* Update interval options

* Fix secondaryDate always showing 12AM

* Don't convert dates to UTC when checking if they belong to the same date
2018-12-27 19:51:58 +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
Albert Juhé Lluveras 5c8cfbc03f Report components docs (https://github.com/woocommerce/woocommerce-admin/pull/1140)
* Extend docs to report components

* Improve inline documentation in some files

* Update doc files

* Undo unnecessary doc changes

* Remove unnecessary line breaks in sidebar

* Rename 'Client components' to 'Analytics components'

* Minor docs fixes

* Rename toc contents to toc sections

* Update endpoint props doc to add an example and more information

* Fix outdated comment

* Fix merge error
2018-12-22 12:46:10 +01:00
Joshua T Flowers 9a4e613a2e Make user column preferences refer to hidden columns (https://github.com/woocommerce/woocommerce-admin/pull/1150)
* Make user column preferences refer to hidden columns

* Destructure props in onColumnsChange
2018-12-22 10:27:30 +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
Robert Elliott ebd857cefa Add/chart dashboard block (https://github.com/woocommerce/woocommerce-admin/pull/1002)
* added new block and dashboard charts

section title and filters... lots of duplicate keys

toggle chart types in block heading

* Updates per feedback.

* Add some documentaiton about new interactive prop on chart/legend

* Revert a few files that only had whitespace changes.
2018-12-21 16:24:26 -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 346ed578ae Update comment to specify extendItemsMethodNames must be available in 'wc-api' 2018-12-14 18:12:56 +01: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 c0ee524d6b Remove unnecessary query parameters 2018-12-12 15:51:24 +01:00
Albert Juhé Lluveras 110c4f0f73 Fix missing AOV value 2018-12-12 15:46:40 +01:00
Albert Juhé Lluveras 9b4e7ad963 Extract extendTableData to a utils file 2018-12-12 15:25:36 +01:00
Albert Juhé Lluveras c679c8bad7 Extend customers data with data from WC endpoint 2018-12-12 15:22:25 +01:00