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'
This commit is contained in:
parent
d2ca354bd5
commit
41b933e714
|
@ -132,7 +132,7 @@ export const advancedFilters = {
|
|||
} ) ),
|
||||
},
|
||||
},
|
||||
downloadIp: {
|
||||
ip_address: {
|
||||
labels: {
|
||||
add: __( 'IP Address', 'wc-admin' ),
|
||||
placeholder: __( 'Search IP address', 'wc-admin' ),
|
||||
|
|
|
@ -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: (
|
||||
<Link href={ file_path } type="external">
|
||||
{ file_name }
|
||||
</Link>
|
||||
),
|
||||
value: file_name,
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue