From b8cf358fb9734d92213b4860d5354a8bb789303a Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Tue, 21 Nov 2017 13:54:04 -0800 Subject: [PATCH] Add missing JS routes --- .../spree/backend/solidus_stock_transfers.js | 1 + .../spree/backend/stock_transfers/routes.js | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 app/assets/javascripts/spree/backend/stock_transfers/routes.js 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) +}