From 41b933e71446ff6304a3bffb296d90d265e6be6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Juh=C3=A9=20Lluveras?= Date: Tue, 8 Jan 2019 17:51:19 +0100 Subject: [PATCH] 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' --- .../client/analytics/report/downloads/config.js | 2 +- .../client/analytics/report/downloads/table.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/woocommerce-admin/client/analytics/report/downloads/config.js b/plugins/woocommerce-admin/client/analytics/report/downloads/config.js index a9694e358f3..15293e39134 100644 --- a/plugins/woocommerce-admin/client/analytics/report/downloads/config.js +++ b/plugins/woocommerce-admin/client/analytics/report/downloads/config.js @@ -132,7 +132,7 @@ export const advancedFilters = { } ) ), }, }, - downloadIp: { + ip_address: { labels: { add: __( 'IP Address', 'wc-admin' ), placeholder: __( 'Search IP address', 'wc-admin' ), diff --git a/plugins/woocommerce-admin/client/analytics/report/downloads/table.js b/plugins/woocommerce-admin/client/analytics/report/downloads/table.js index d6f7e724520..67ccc3fe277 100644 --- a/plugins/woocommerce-admin/client/analytics/report/downloads/table.js +++ b/plugins/woocommerce-admin/client/analytics/report/downloads/table.js @@ -72,7 +72,7 @@ export default class CouponsReportTable extends Component { const persistedQuery = getPersistedQuery( query ); return map( downloads, download => { - const { _embedded, date, file_name, ip_address, order_id, product_id } = download; + const { _embedded, date, file_name, file_path, ip_address, order_id, product_id } = download; const { name: productName } = _embedded.product[ 0 ]; const { name: userName } = _embedded.user[ 0 ]; @@ -95,7 +95,11 @@ export default class CouponsReportTable extends Component { value: productName, }, { - display: file_name, + display: ( + + { file_name } + + ), value: file_name, }, {