Commit Graph

66 Commits

Author SHA1 Message Date
Joshua T Flowers 7cdbbf87e8 Update all wc-admin endpoints to v4 (https://github.com/woocommerce/woocommerce-admin/pull/1298)
* Update all wc-admin endpoints to v4

* Add namespace for products and customers controllers

* Include product quantity in orders data store

* Add coupons to extended data in the orders data store

* Format order statuses response from database

* Hook up orders table to orders endpoint

* Add namespace to data endpoint controller

* Add namespaces to remaining extended controllers

* Use NAMESPACE var in place of wc/v4

* Update product links in orders table to products reports

* Add coupons rest controller override

* Format coupon code in response

Co-Authored-By: joshuatf <joshuatf@gmail.com>
2019-01-18 10:52:58 +08:00
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
Jeff Stieler 6ed8ea117a Refactor formatCurrency() to use store settings for formatting rather than store locale. 2019-01-17 00:04:57 -07: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
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 03adb993c9 Use <Link> instead of <a> for Orders table link 2018-12-18 10:44:43 +01: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 f9533afdda Rename 'totalCount' to 'totalResults' (https://github.com/woocommerce/woocommerce-admin/pull/1093) 2018-12-14 15:56:52 -08: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
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
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
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
Paul Sealock 47291b3873 Filters: code -> coupon in config 2018-11-29 09:29:12 +13: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 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
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
Jonathan Belcher ffee7cc841 Moves charts to config to delete chart.js (https://github.com/woocommerce/woocommerce-admin/pull/793) 2018-11-07 11:38:34 -05:00
Kelly Dwan d27cb26ef7 Build: Move `lib/nav-utils` and `lib/history` to `@woocommerce/navigation` (https://github.com/woocommerce/woocommerce-admin/pull/763)
* Move nav-utils and history to new package

* Update config to build and use new navigation package

* Update all imports to use new navigation package

* Remove unnecessary README

* Update nav-utils path
2018-11-05 16:02:04 -05:00
Albert Juhé Lluveras 33cdba6945 Fix charts redirecting to previous path when changing interval value (https://github.com/woocommerce/woocommerce-admin/pull/731)
* Fix charts redirecting to previous path when changing interval value

* Fix chart being reset when changing interval

* Fix chart being reset when changing filters
2018-11-01 10:13:45 +01:00
Joshua T Flowers 0f45a08f20 Update order summary in Orders report (https://github.com/woocommerce/woocommerce-admin/pull/613)
* Move TableSummary below pagination

* Add summary to order table

* Add new and returning customers

* Add product to totals in API

* Use get_var instead of get_results for unique products

* Change table summary styling

Remove slashes and increase padding between items based on discussion with @LevinMedia

Change margin to padding to overlap table shadow when pagination is not present.

* Fix wp_posts prefix and move to separate fxn

* Change new/returning customer column types to intval

* Add new/returning customer data to tests and fix formatting
2018-10-31 14:09:38 -05:00
Paul Sealock e8f3258d47 Filters: Add Variations extra filters 2018-10-31 11:26:05 +13:00
Kelly Dwan f62537fc17 Try: Add Lerna to split out utility packages (https://github.com/woocommerce/woocommerce-admin/pull/678)
* Add lerna & GB package-building script

* Move currency library to lerna module

* Update lerna config

* Add publish commands

* Add currency as an faux-external module

* Add separate command to build just core files

* Update dependency path

* Update build script to build all packages into `dist`

* Add packages to the jest test setup

* Move date library to packages

* Update imports to use @woocommerce/date

* Output wcSettings definition before any scripts are output

Fixes issues where wc-dates lib relies on settings object

* Add the build step into travis

* Update jest config to dynamically get package paths

* Update package postcss config to match wc-admin’s main config

* Add combined watch scripts for package+app, add a `clean` command to clean up old build files

* Ignore PHPCS error (leave todo message to fix)

* Concat files with a space, fix issue where all files join in one continuous string and fail the check
2018-10-30 14:57:48 -04:00
David Levin a1e8eb0a80 Fix spelling of AVERAGE order value in orders report 2018-10-30 10:24:34 -07:00
Albert Juhé Lluveras 2b3446540c Move withSelect() inside table components (https://github.com/woocommerce/woocommerce-admin/pull/707)
* Move withSelect() inside table components

* Add isLoading prop to TableCard (https://github.com/woocommerce/woocommerce-admin/pull/713)

* Add isLoading prop to TableCard

* Add onSort prop to TablePlaceholder

* All checkbox shouldn't be checked if the number of rows is 0
2018-10-29 08:57:05 +01:00
Paul Sealock 7e5c124ce1 Filters: Add params to request query 2018-10-29 13:07:13 +13:00
Albert Juhé Lluveras 0caed9a28a Create QUERY_DEFAULTS object with default values for queries (https://github.com/woocommerce/woocommerce-admin/pull/686) 2018-10-26 10:19:39 +02:00
Albert Juhé Lluveras 29f68a9ce8 Products table (https://github.com/woocommerce/woocommerce-admin/pull/619)
* Add Products table

* Update tests

* Cleanup

* Make placeholder table have the correct sorted column selected

* Change default sort to items_sold & desc

* Fix wrong CSV filename

* Remove unnecessary constructor in ProductsReportTable

* Add @TODO comment to Products table summary

* Set ProductsReportTable link to wc-admin type

* Make sure categories is an array before using map
2018-10-24 09:50:05 +02:00
Albert Juhé Lluveras 7be34b3f37 Move Download table logic inside the TableCard component (https://github.com/woocommerce/woocommerce-admin/pull/652)
* Move Download table logic inside the TableCard component

* Make title lowercase inside generateCSVFileName

* Update JSDoc comment
2018-10-24 09:48:20 +02:00
Albert Juhé Lluveras 7979dbc474 Make Orders placeholder table have the correct sorted column (https://github.com/woocommerce/woocommerce-admin/pull/620)
* Make Orders placeholder table have the correct sorted column

* Fix wrong CSV filename
2018-10-23 09:49:04 +02:00
Timmy Crawford d64fda9c54 Orders Report: Fix key prop warning. (https://github.com/woocommerce/woocommerce-admin/pull/580) 2018-10-18 13:45:59 -07:00
David Levin f74ae15b91 Update the order of orders report summary numbers (https://github.com/woocommerce/woocommerce-admin/pull/547)
* Update the order of orders report summary numbers

* Teamwork makes the dreamwork.
2018-10-18 13:45:36 -07:00
Paul Sealock 71b2435d96 Merge pull request woocommerce/woocommerce-admin#565 from woocommerce/try/fix-dry-queries-2nd-round
Reports: create queries for data requests in one place
2018-10-19 09:33:12 +13:00
Albert Juhé Lluveras 8cf34964e5 Align status indicator to the right in Orders table (https://github.com/woocommerce/woocommerce-admin/pull/539)
* Align status indicator to the right in Orders table

* Align 'Order' column to the right in Orders table
2018-10-18 12:43:45 +02:00
Paul Sealock cf358f50fc Reports: create queries for data requests in one place 2018-10-18 12:02:31 +13:00
Jonathan Belcher 74d8d431e4 Removes unwanted orders report filters (https://github.com/woocommerce/woocommerce-admin/pull/553) 2018-10-17 16:50:05 -04:00
Albert Juhé Lluveras 3982ebc32e Create appendTimestamp() utils function (https://github.com/woocommerce/woocommerce-admin/pull/542)
* appendTimestamp() utils function

* Make appendTimestamp() to throw and error if timeOfDay is not a valid value
2018-10-17 18:01:58 +02:00
Jonathan Belcher 386933a182 Refactors out summary and graph (https://github.com/woocommerce/woocommerce-admin/pull/517)
* Refactors out summary and chart
2018-10-16 12:07:43 -04:00
Albert Juhé Lluveras ae6652b26c Send params with Orders table API calls (https://github.com/woocommerce/woocommerce-admin/pull/519)
* Send params with Orders table API calls

* Add onError case and caching for Orders calls

* Remove unused actions

* Load only 'processing', 'on-hold' and 'completed' orders

* Use NAMESPACE constant instead of hard-coded value

* Comment typos

* Add tests to Orders reducer, resolvers and selectors

* Typos

* Fix JSDoc mismatch
2018-10-16 10:50:07 +02:00
Paul Sealock 4bc8c82820 Merge pull request woocommerce/woocommerce-admin#457 from woocommerce/fix/advanced-filters-i18n
i18n: Advanced Filters strings
2018-10-16 10:54:45 +13:00
Albert Juhé Lluveras 17e9f151be Create ViewMoreList component (https://github.com/woocommerce/woocommerce-admin/pull/503)
* Create ViewMoreList component

* Update Tag component with the new style and popover

* Display number of times an item was bought in the Orders table (2x, 1x, ...)

* Refactor ViewMoreList so the elements to display in the list and the popover are different props

* Cleanup

* Fix CSV values for products and coupons

* Minor fixes

* Rename ViewMoreList prop from 'popoverItems' to 'items'

* Cleanup props

* Add ViewMoreList to devdocs examples

* Order Tag props alphabetically

* Move withState to export line so it doesn't break docs generation

* Rename 'is-not-unique' class name to 'is-inline'

* Fix missing comma

* Remove margin from popover list

* Use pseudo-selector to replace 'is-inline' class in cell links
2018-10-12 23:29:25 +02:00
Jonathan Belcher 96f2024305 Round average orders in order summary (https://github.com/woocommerce/woocommerce-admin/pull/515) 2018-10-12 11:02:58 -04:00
Paul Sealock 178135eea5 i18n: Advanced Filters strings 2018-10-12 16:58:35 +13:00
Jonathan Belcher 27fa0bfc85 Follow new summary numbers pattern 2018-10-11 15:27:29 -04:00
Jonathan Belcher 26300fb953 Adds graphs 2018-10-11 13:07:59 -04:00
Jonathan Belcher aa56621ab8 Get Order Summary working with API 2018-10-11 12:00:06 -04:00