Skip to content

Commit

Permalink
Remove stock transfers from api
Browse files Browse the repository at this point in the history
  • Loading branch information
jhawthorn committed Nov 22, 2017
1 parent 2483984 commit 8fea56b
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 336 deletions.
20 changes: 0 additions & 20 deletions api/app/controllers/spree/api/stock_transfers_controller.rb

This file was deleted.

42 changes: 0 additions & 42 deletions api/app/controllers/spree/api/transfer_items_controller.rb

This file was deleted.

9 changes: 0 additions & 9 deletions api/app/helpers/spree/api/api_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ module ApiHelpers
:promotion_attributes,
:store_attributes,
:store_credit_history_attributes,
:stock_transfer_attributes,
:transfer_item_attributes,
:transfer_item_variant_attributes,
:variant_property_attributes
]

Expand Down Expand Up @@ -177,12 +174,6 @@ def required_fields_for(model)
:display_event_date
]

@@stock_transfer_attributes = [:id, :number]

@@transfer_item_attributes = [:id, :expected_quantity, :received_quantity]

@@transfer_item_variant_attributes = []

def variant_attributes
if @current_user_roles && @current_user_roles.include?("admin")
@@variant_attributes + [:cost_price]
Expand Down

This file was deleted.

4 changes: 0 additions & 4 deletions api/app/views/spree/api/stock_transfers/receive.json.jbuilder

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion api/app/views/spree/api/transfer_items/show.json.jbuilder

This file was deleted.

7 changes: 0 additions & 7 deletions api/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,6 @@

resources :stock_items, only: [:index, :update, :destroy]

resources :stock_transfers, only: [] do
member do
post :receive
end
resources :transfer_items, only: [:create, :update, :destroy]
end

resources :stores

resources :store_credit_events, only: [] do
Expand Down
97 changes: 0 additions & 97 deletions api/spec/requests/spree/api/stock_transfers_controller_spec.rb

This file was deleted.

150 changes: 0 additions & 150 deletions api/spec/requests/spree/api/transfer_items_controller_spec.rb

This file was deleted.

0 comments on commit 8fea56b

Please sign in to comment.