Add new serializer to allow search for customer addresses

This commit is contained in:
Rob Harrington
2018-05-10 13:08:03 +10:00
committed by Maikel Linke
parent c71a5ec0df
commit e0d46aa105
4 changed files with 44 additions and 1 deletions

View File

@@ -21,6 +21,7 @@ angular.module("admin.subscriptions").controller "DetailsController", ($scope, $
$scope.loadCustomer = ->
params = { id: $scope.subscription.customer_id }
params.ams_prefix = 'subscription' unless $scope.subscription.id
$scope.customer = CustomerResource.get params, (response) ->
for address in ['bill_address','ship_address']
return unless response[address]