Add reviews to OrderPage and SalePage

This commit is contained in:
Hannu Lyytikainen 2017-11-27 15:47:39 +02:00
parent dccf787f13
commit 1f3e0e9fce
2 changed files with 18 additions and 1 deletions

View file

@ -117,7 +117,21 @@ export const fetchOrder = id => (dispatch, getState, sdk) => {
let txResponse = null;
return sdk.transactions
.show({ id, include: ['customer', 'provider', 'listing', 'booking'] }, { expand: true })
.show(
{
id,
include: [
'customer',
'provider',
'listing',
'booking',
'reviews',
'reviews.author',
'reviews.subject',
],
},
{ expand: true }
)
.then(response => {
txResponse = response;
const listingId = listingRelationship(response).id;

View file

@ -159,6 +159,9 @@ export const fetchSale = id => (dispatch, getState, sdk) => {
'provider.profileImage',
'listing',
'booking',
'reviews',
'reviews.author',
'reviews.subject',
],
},
{ expand: true }