Commit Graph

168 Commits

Author SHA1 Message Date
Albert Juhé Lluveras 46d3be23dd Add Historical Data Import Screen (https://github.com/woocommerce/woocommerce-admin/pull/2073)
* Add Historical Data Import Screen

* Fix date picker not being accessible

* Cleanup

* Fix period selector typo

Co-Authored-By: Aljullu <aljullu@gmail.com>

* Move state to props

* Add filter to status labels

* Get rid of 'step' state property

* Format 'importDate' as YYYY-MM-DD

* Minor improvements

* Hardcode control height

* Use dateValidationMessages when possible

* Update imported all data actions

* Update filter name
2019-05-07 09:18:48 +02:00
Jeff Stieler a36e3cd024 Merge pull request woocommerce/woocommerce-admin#2034 from woocommerce/add/1850-import-endpoint
Add import endpoint and controller
2019-05-01 13:29:00 -06:00
Jeff Stieler cda1645672 Review feedback changes.
Incorrect comment and unused function argument.
2019-05-01 08:30:27 -06:00
Joshua Flowers fe0dea6373 Add delete imports endpoint 2019-04-30 17:37:19 -06:00
Joshua Flowers cad94415c5 Add endpoint route to cancel all pending import actions 2019-04-30 10:17:08 -06:00
Jeff Stieler a3fdd72ba5 Merge pull request woocommerce/woocommerce-admin#1907 from woocommerce/fix/1615-order-number-filter
Support Sequential Order Numbers in Downloads Report order number filter
2019-04-30 10:10:39 -06:00
Joshua T Flowers 53a4098de1 Fix missing leaderboard schema options (https://github.com/woocommerce/woocommerce-admin/pull/2059)
* Add missing schema properties

* Add missing leaderboard schema tests
2019-04-26 10:43:52 -07:00
Joshua T Flowers c17baa02cd Encode and decode persited query as JSON string in the leaderboards controller (https://github.com/woocommerce/woocommerce-admin/pull/2100)
* Encode and decode persited query as JSON string in leaderboards controller

* Update peristed query tests to use JSON string
2019-04-24 04:38:49 +08:00
Joshua T Flowers 8bc3d8622e Add order date filter to customers data store (https://github.com/woocommerce/woocommerce-admin/pull/2094)
* Add before and after params to customers controller

* Map before and after order params to order creation date filter

* Hook up customer date filter params in leaderboards controller
2019-04-23 10:01:36 +08:00
Jeff Stieler ba69a634f5 Document why the order number field should be a string. 2019-04-19 11:41:39 +02:00
Jeff Stieler ef0fd73f2c Merge pull request woocommerce/woocommerce-admin#1998 from woocommerce/add/247-stock-panel
Hook up Stock panel
2019-04-12 09:19:21 -06:00
Joshua Flowers 4180b48346 Add reports import controller and endpoint 2019-04-12 16:50:42 +08:00
Joshua T Flowers eb0b137020 Hook up leaderboards endpoint to dashboard (https://github.com/woocommerce/woocommerce-admin/pull/2004)
* Add allowed leaderboards endpoint to prefetch list

* Hook up leadboards endpoint to dashboard

* Skip data fetch for leaderboard if per page is less than 1

* Add tests to check for rendered html display
2019-04-11 10:53:05 +08:00
Albert Juhé Lluveras 5ae9ee65b0 PHP Lint fixes (https://github.com/woocommerce/woocommerce-admin/pull/2023) 2019-04-10 10:49:00 +02:00
Joshua T Flowers f682fe76be Add leaderboard controller and endpoint (https://github.com/woocommerce/woocommerce-admin/pull/1995)
* Add leaderboard controller and endpoint

* Add existing leaderboard stats to leaderboard endpoint

* Add persisted query to leaderboard params

* Add leaderboard endpoint tests

* Check if extended_info params are set before assigning

* Change number param input format to mixed inside wc_admin_number_format
2019-04-09 11:34:56 +08:00
Joshua T Flowers 753780bf7b Onboarding: Add levels REST API (https://github.com/woocommerce/woocommerce-admin/pull/1938)
* Add levels rest controller

* Add default levels

* Add onboarding level API tests

* Drop all since tags

* Make pre-response levels array associative for easier formatting

* Fix level tests for associative array
2019-04-05 10:35:30 +08:00
Jeff Stieler 9bcbda0f98 Add expected (missing) properties to product variation API response.
Parent product ID, name, and product type.
2019-04-03 12:35:18 -06:00
Jeff Stieler 18a2dd01cb Add variations to low stock query. 2019-04-02 11:37:24 -06:00
Albert Juhé Lluveras 17141cd4d8 Update Variations controller filter names (https://github.com/woocommerce/woocommerce-admin/pull/1949) 2019-04-01 10:09:53 +02:00
Joshua T Flowers 9c3faea12f Refactor notes controller and add ordering params (https://github.com/woocommerce/woocommerce-admin/pull/1878)
* Separate notes controller request args and add collection params

* Fix page param var

* Fix collection params sanitization

* Allow array of note types to be queried

* Add order and orderby collection params to notes controller

* Allow sorting by order and orderby params in notes data store

* Make sure notes are ordered by date and unread matches inbox note types

* Allow status or type params to use an array of items

* Add tests for notes ordering

* Remove unnecessary query arg assignment in the notes data store

* Update get_notes_count to use array for status and type
2019-04-01 10:53:34 +08:00
Joshua T Flowers 42ddfc0108 Add coupons count to data store and hook up to summary numbers in orders report (https://github.com/woocommerce/woocommerce-admin/pull/1912)
* Change coupons sum to distinct coupon count in REST API

* Hook up unique coupon count to orders summary numbers

* Add coupons count to order segmenting

* Add coupons count to expected stats in order test and revenue tests
2019-04-01 10:16:57 +08:00
ronakganatra9 3cddc714c6 issue fix woocommerce/woocommerce-admin#1801 SKU filter issue fixed. (https://github.com/woocommerce/woocommerce-admin/pull/1837)
* issue fix woocommerce/woocommerce-admin#1801 SKU filter issue fixed.

* make is sortable true.

* phpcs error fix.

* Fix PHPCS errors and warnings.

* Fix PHPCS errors and warnings.

* Update client/analytics/report/products/table-variations.js

Co-Authored-By: ronakganatra9 <ronakganatra9@gmail.com>

* Update includes/data-stores/class-wc-admin-reports-variations-data-store.php

Co-Authored-By: ronakganatra9 <ronakganatra9@gmail.com>

* changed postmeta.meta_value to meta_value
2019-03-31 20:53:48 +02:00
Joshua T Flowers 6ff9d0673a Add low product stock indicator (https://github.com/woocommerce/woocommerce-admin/pull/1866)
* Move product low stock count to controller param instead of data store

* Add totalCount to items API

* Extract unread indicators to separate file and add unread stock

* Trim initial search variable in wp_query

* Parse low stock option as an absolute integer

* Fix low stock meta comparison with product specific low stock amount

* Make group by query function static

* Check for empty strings and null values for product low_stock_amount
2019-03-29 10:45:19 +08:00
Paul Sealock 3dd99108fa Customers API: fix exact match params 2019-03-29 11:40:37 +13:00
Jeff Stieler 0013495fff Orders endpoint: add LIMIT clause to the order number query. 2019-03-26 11:22:50 -06:00
Jeff Stieler 2d8f8f9137 Merge pull request woocommerce/woocommerce-admin#1848 from woocommerce/add/1756-snooze-admin-notes
Add "remind me later" functionality to StoreAlert component.
2019-03-21 08:41:44 -06:00
Jeff Stieler 276a6e6744 Hook up “remind me later” button.
Update the admin note status and date_reminder fields.
2019-03-20 08:52:27 -06:00
Jeff Stieler 7892ade278 Properly coerce snooze flag to API response. 2019-03-20 08:52:27 -06:00
Paul Sealock 7f0aa7e616 Merge pull request woocommerce/woocommerce-admin#1835 from woocommerce/fix/product-search-multiple-results
Products: Group API search items by id
2019-03-20 07:09:53 +13:00
Albert Juhé Lluveras 58154d1d39 Activity Panel: set orders unread indicator based on real data (https://github.com/woocommerce/woocommerce-admin/pull/1824) 2019-03-19 11:57:11 +01:00
Paul Sealock 0aef533d6a Products: Group API search items by id 2019-03-19 16:36:47 +13:00
Joshua T Flowers d416f78e9f Update/variations search method (https://github.com/woocommerce/woocommerce-admin/pull/1792)
* Add product search option REST API

* Remove product_name search in favor of sku and name searching

* Search by product search term instead of generic search in autocompleter

* Add product search option REST API

* Override existing search param instead of new param

* Remove product_name search in favor of sku and name searching

* Add product search param to variations controller

* Add group by to prevent duplicate variations in response

* Use product_search in variation autocompleter

* Trim whitespace in product_search query

* Change variation search placeholder

* Override search param instead of using new product_search param

* Add baseSearchQuery to prevent losing single_product filter in variations report

* Unset s param instead of setting to false
2019-03-18 12:23:08 +08:00
Joshua T Flowers 7653859509 Update product searching to search by name or sku (https://github.com/woocommerce/woocommerce-admin/pull/1791)
* Add product search option REST API

* Remove join and where filters for wp_query after rest response

* Remove product_name search in favor of sku and name searching

* Allow searching for products to compare by product sku

* Search by product search term instead of generic search in autocompleter

* Trim whitespace on product_search query

* Override existing search param instead of new param

* Use double quotes to avoid escaping search query

* Unset s param instead of setting to false
2019-03-18 11:31:02 +08:00
Albert Juhé Lluveras e6cf40e3f0 Allow sorting by tax_code in Taxes report (https://github.com/woocommerce/woocommerce-admin/pull/1812) 2019-03-15 21:44:03 +01:00
Joshua T Flowers fae447014f Update coupon search to allow searching by code (https://github.com/woocommerce/woocommerce-admin/pull/1800)
* Add coupon code search filtering to REST API

* Use search_code param in coupon search results

* Use search_code param in coupon autocompleter

* Override search param instead of adding search_code param
2019-03-15 12:29:14 +08:00
Jeff Stieler bfe5a75e98 Update text domain. (https://github.com/woocommerce/woocommerce-admin/pull/1795)
* Translation call text domain change from “wc-admin” to “woocommerce-admin”.

* Fix .pot file generation.

* Fix errantly closed array item in /revenue/stats controller.

* Rename plugin zip, main file, and repo name to "woocommerce-admin".
2019-03-13 11:14:02 -06:00
Justin Shreve 1348245406 Add store notice around processing historical data. (https://github.com/woocommerce/woocommerce-admin/pull/1763)
* Add store notice around processing historical data.

* Cleanup

* Handle PR feedback.

* Clean up `add` logic and add empty content_data. Also add logic to get_notes_count so that we can hide unactioned statuses.

* Add the ability to update a note, and to also mark a status when an alert is clicked.

* Remove mark_actioned call on sync

* add missing todo
2019-03-12 09:13:20 -04:00
Justin Shreve fce16ade7a Display order number on reports (https://github.com/woocommerce/woocommerce-admin/pull/1706)
* Display order number on reports, and add to API response.

* Add method for getting order number, avoiding loading the data store if no filter is attached.
2019-02-28 09:14:21 -05:00
Joshua T Flowers 241be1f547 Add product name filtering (https://github.com/woocommerce/woocommerce-admin/pull/1670)
* Add post_title__like param to wp query

* Add product_name filter option to products rest controller

* Change autocomplete search to use product_name param

* Change add_wp_query_post_title_filter to static method

* Only add wp_query filter in the products rest controller
2019-02-27 16:49:21 +08:00
Joshua T Flowers 6a18202f61 Add tax include param to tax REST API (https://github.com/woocommerce/woocommerce-admin/pull/1672)
* Add code to collection params to allow searching

* Add include param to tax rest api

* Remove duplicate get_collection_params

* Revert to previous taxes getLabel config
2019-02-27 10:37:24 +08:00
Joshua T Flowers 13b72f2fde Add tax code filter to tax REST API (https://github.com/woocommerce/woocommerce-admin/pull/1671)
* Add in hook to rest tax controller modify tax items query

* Modify query string for getting tax code items

* Add code to collection params to allow searching

* Change filter to use entire tax code without null values

* Hook up tax code filter to autocomplete search

* Overwrite get_items instead of using hooks for code filtering
2019-02-26 14:19:38 +08:00
Justin Shreve 4f64358c8e Fix customer filters and download user filtering (https://github.com/woocommerce/woocommerce-admin/pull/1618)
* Add the ability to search name, username, and email fields on the customer endpoint, update autocompletors, add in include parameter.

* Update the username to be returned in the download response, update download filtering based on customer id, and only rename include parameter on main customers endpoint.
2019-02-19 14:35:29 -05:00
Justin Shreve 24301e0090 Add stock stats endpoint and hook up to the stock report. (https://github.com/woocommerce/woocommerce-admin/pull/1535)
* Add stock stats endpoint and hook up to the stock report.

* Handle PR feedback
2019-02-13 22:31:27 -05:00
Joshua T Flowers 746d062f09 Check and update customer first orders to fix returning_customers (https://github.com/woocommerce/woocommerce-admin/pull/1517)
* Add get_oldest_orders function to customer data store

* Check if is first order in is_returning_customer()

* Check if the customers first order has changed and update all orders respectively

* Fix check for empty oldest_orders array

* Change avg_items_per_order to number instead of integer

* Fix failing tests for new/returning customers

Only the first orders with product 1 and without coupons should be new per each customer

* Remove sleep functions from tests

* Assign second order to a variable for legibility

* Fix second order assignment and check if set
2019-02-14 11:14:01 +08:00
Jeff Stieler 9762810b70 Support ReportTable search in customers report (list of customer IDs). 2019-02-12 11:08:33 -08:00
Jeff Stieler e36d25e112 Make customer object IDs compatible with `wc-api`/`fresh-data`. 2019-02-12 11:08:03 -08:00
Jeff Stieler 926fdcfb97 Hook `v4/customers` endpoint up to customers report/lookup table and change name search to be fuzzy. 2019-02-12 11:06:22 -08:00
Joshua T Flowers 8c3973a445 Add manage_stock to stock controller response (https://github.com/woocommerce/woocommerce-admin/pull/1475)
* Add manage_stock to stock controller response

* Add manage_stock property to stock report tests

* Add changelog entry

* Make stock quantity float instead of int

* Add manage_stock to the products API response

* Check for manage_stock in products table

* Add manage_stock property to product API tests
2019-02-07 16:29:01 +08:00
Albert Juhé Lluveras 79738b2022 Add 'variations' attribute in products 'extended_info' (https://github.com/woocommerce/woocommerce-admin/pull/1478)
* Add 'variations' attribute in products 'extended_info'

* Add tests
2019-02-07 09:27:02 +01:00
Joshua T Flowers b7379def1b Format todo comments to match WC Core format (https://github.com/woocommerce/woocommerce-admin/pull/1474)
* Format todo comments to match WC Core format

* Remove variations todo comment
2019-02-06 14:41:53 +08:00