Move customer address lookup action to CustomersController

This commit is contained in:
Rob Harrington
2017-10-27 16:30:14 +11:00
parent 3ac2ac34ed
commit d3937e5c80
7 changed files with 60 additions and 56 deletions

View File

@@ -47,7 +47,7 @@ angular.module("admin.standingOrders").controller "StandingOrderController", ($s
$scope.$watch "standingOrder.customer_id", (newValue, oldValue) ->
return if !newValue? || newValue == oldValue
$http.get("/admin/search/customer_addresses", params: { customer_id: newValue })
$http.get("/admin/customers/#{newValue}/addresses")
.success (response) =>
delete response.bill_address.id
delete response.ship_address.id