diff --git a/app/assets/javascripts/spree/backend/solidus_stock_transfers.js b/app/assets/javascripts/spree/backend/solidus_stock_transfers.js index 58c46df..2fb26b0 100644 --- a/app/assets/javascripts/spree/backend/solidus_stock_transfers.js +++ b/app/assets/javascripts/spree/backend/solidus_stock_transfers.js @@ -1,4 +1,5 @@ //= require spree/backend/templates/stock_transfers/transfer_item +//= require spree/backend/stock_transfers/routes //= require spree/backend/stock_transfers/count_update_forms //= require spree/backend/stock_transfers/edit //= require spree/backend/stock_transfers/receive diff --git a/app/assets/javascripts/spree/backend/stock_transfers/routes.js b/app/assets/javascripts/spree/backend/stock_transfers/routes.js new file mode 100644 index 0000000..5657e92 --- /dev/null +++ b/app/assets/javascripts/spree/backend/stock_transfers/routes.js @@ -0,0 +1,11 @@ +Spree.routes.receive_stock_transfer_api = function(stockTransferNumber) { + return Spree.pathFor('api/stock_transfers/' + stockTransferNumber + '/receive') +} + +Spree.routes.create_transfer_items_api = function(stockTransferNumber) { + return Spree.pathFor('api/stock_transfers/' + stockTransferNumber + '/transfer_items') +} + +Spree.routes.update_transfer_items_api = function(stockTransferNumber, itemId) { + return Spree.pathFor('api/stock_transfers/' + stockTransferNumber + '/transfer_items/' + itemId) +}