Merge pull request woocommerce/woocommerce-admin#1833 from woocommerce/fix/table-links-wc-admnin

Fix table links to internal reports
This commit is contained in:
Paul Sealock 2019-03-19 16:21:17 +13:00 committed by GitHub
commit 36a60c59d5
7 changed files with 9 additions and 9 deletions

View File

@ -56,7 +56,7 @@ export default class CategoryBreadcrumbs extends Component {
<div className="woocommerce-table__breadcrumbs">
{ this.getCategoryAncestors( category, categories ) }
<Link
href={ getNewPath( persistedQuery, 'categories', {
href={ getNewPath( persistedQuery, '/analytics/categories', {
filter: 'single_category',
categories: category.id,
} ) }

View File

@ -92,7 +92,7 @@ class CategoriesReportTable extends Component {
{
display: category && (
<Link
href={ getNewPath( persistedQuery, 'categories', {
href={ getNewPath( persistedQuery, '/analytics/categories', {
filter: 'single_category',
categories: category.id,
} ) }

View File

@ -83,7 +83,7 @@ export default class CouponsReportTable extends Component {
} = download;
const { name: productName } = _embedded.product[ 0 ];
const productLink = getNewPath( persistedQuery, 'products', {
const productLink = getNewPath( persistedQuery, '/analytics/products', {
filter: 'single_product',
products: product_id,
} );

View File

@ -112,7 +112,7 @@ export default class OrdersReportTable extends Component {
.map( item => ( {
label: item.name,
quantity: item.quantity,
href: getNewPath( persistedQuery, 'products', {
href: getNewPath( persistedQuery, '/analytics/products', {
filter: 'single_product',
products: item.id,
} ),
@ -120,7 +120,7 @@ export default class OrdersReportTable extends Component {
const formattedCoupons = coupons.map( coupon => ( {
label: coupon.code,
href: getNewPath( persistedQuery, 'coupons', {
href: getNewPath( persistedQuery, '/analytics/coupons', {
filter: 'single_coupon',
coupons: coupon.id,
} ),

View File

@ -85,7 +85,7 @@ export default class VariationsReportTable extends Component {
const extended_info = row.extended_info || {};
const { stock_status, stock_quantity, low_stock_amount, sku } = extended_info;
const name = get( row, [ 'extended_info', 'name' ], '' );
const ordersLink = getNewPath( persistedQuery, 'orders', {
const ordersLink = getNewPath( persistedQuery, '/analytics/orders', {
filter: 'advanced',
product_includes: query.products,
} );

View File

@ -108,11 +108,11 @@ class ProductsReportTable extends Component {
stock_quantity,
variations = [],
} = extended_info;
const ordersLink = getNewPath( persistedQuery, 'orders', {
const ordersLink = getNewPath( persistedQuery, '/analytics/orders', {
filter: 'advanced',
product_includes: product_id,
} );
const productDetailLink = getNewPath( persistedQuery, 'products', {
const productDetailLink = getNewPath( persistedQuery, '/analytics/products', {
filter: 'single_product',
products: product_id,
} );

View File

@ -62,7 +62,7 @@ export default class StockReportTable extends Component {
return products.map( product => {
const { id, manage_stock, name, parent_id, sku, stock_quantity, stock_status } = product;
const productDetailLink = getNewPath( persistedQuery, 'products', {
const productDetailLink = getNewPath( persistedQuery, '/analytics/products', {
filter: 'single_product',
products: parent_id || id,
} );