inventory development
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
class Inventory::InventoryController < BaseInventoryController
|
||||
|
||||
def index
|
||||
|
||||
@products = InventoryDefinition.all.active.order('created_at desc')
|
||||
end
|
||||
end
|
||||
|
||||
@@ -28,7 +28,7 @@ class Inventory::InventoryDefinitionsController < BaseInventoryController
|
||||
|
||||
respond_to do |format|
|
||||
if @inventory_definition.save
|
||||
format.html { redirect_to @inventory_definition, notice: 'Inventory definition was successfully created.' }
|
||||
format.html { redirect_to inventory_path, notice: 'Inventory definition was successfully created.' }
|
||||
format.json { render :show, status: :created, location: @inventory_definition }
|
||||
else
|
||||
format.html { render :new }
|
||||
@@ -69,6 +69,6 @@ class Inventory::InventoryDefinitionsController < BaseInventoryController
|
||||
|
||||
# Never trust parameters from the scary internet, only allow the white list through.
|
||||
def inventory_definition_params
|
||||
params.fetch(:inventory_definition, {})
|
||||
params.require(:inventory_definition).permit(:item_code, :min_order_level, :max_stock_level)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class StockChecksController < ApplicationController
|
||||
class Inventory::StockChecksController < BaseInventoryController
|
||||
before_action :set_stock_check, only: [:show, :edit, :update, :destroy]
|
||||
|
||||
# GET /stock_checks
|
||||
|
||||
Reference in New Issue
Block a user