diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 030056a2..28a1d23d 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -34,6 +34,7 @@ //= require BSBMaterial/admin.js //= require BSBMaterial/pages/index.js //= require BSBMaterial/demo.js +//= require select2 //= require custom.js $(function(){ diff --git a/app/assets/javascripts/inventory.js b/app/assets/javascripts/inventory.js new file mode 100644 index 00000000..1e789598 --- /dev/null +++ b/app/assets/javascripts/inventory.js @@ -0,0 +1,13 @@ +//= require jquery +//= require tether +//= require bootstrap/js/popper.min +//= require bootstrap/js/bootstrap-material-design.min +//= require jquery_ujs +//= require turbolinks +//= require jquery-slimscroll/jquery.slimscroll.js +//= require node-waves/waves.js +//= require sweetalert/sweetalert.min.js +//= require BSBMaterial/admin.js +//= require BSBMaterial/demo.js +//= require custom.js +//= require select2 diff --git a/app/assets/javascripts/inventory_definitions.coffee b/app/assets/javascripts/inventory_definitions.coffee deleted file mode 100644 index 24f83d18..00000000 --- a/app/assets/javascripts/inventory_definitions.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/stylesheets/inventory_definitions.scss b/app/assets/stylesheets/inventory_definitions.scss index e7fc208e..0a113e90 100644 --- a/app/assets/stylesheets/inventory_definitions.scss +++ b/app/assets/stylesheets/inventory_definitions.scss @@ -1,10 +1,16 @@ -@import "bootstrap"; -@import "font-awesome"; -@import "theme"; -@import "jquery-ui"; -@import "bootstrap-datepicker3"; +@import "tether"; +@import "bootstrap/css/bootstrap-material-design.min"; +@import "node-waves/waves"; +@import "animate-css/animate"; +@import "sweetalert/sweetalert.css"; +@import "multi-select/css/multi-select.css"; +@import "bootstrap-material-datetimepicker/css/bootstrap-material-datetimepicker"; +@import "morrisjs/morris"; +@import "BSBMaterial/style"; +@import "BSBMaterial/themes/all-themes"; +@import "reset"; @import "select2"; -@import "jquery.datetimepicker"; + /* Show it is fixed to the top */ // body { diff --git a/app/controllers/inventory/inventory_controller.rb b/app/controllers/inventory/inventory_controller.rb index 3bf3c84c..673cf943 100644 --- a/app/controllers/inventory/inventory_controller.rb +++ b/app/controllers/inventory/inventory_controller.rb @@ -1,4 +1,4 @@ -class Inventory::InventoryController < ApplicationController#BaseInventoryController +class Inventory::InventoryController < BaseInventoryController def index @products = InventoryDefinition.all.active.order('created_at desc') diff --git a/app/controllers/inventory/inventory_definitions_controller.rb b/app/controllers/inventory/inventory_definitions_controller.rb index cc9eecd8..33b7dd75 100644 --- a/app/controllers/inventory/inventory_definitions_controller.rb +++ b/app/controllers/inventory/inventory_definitions_controller.rb @@ -1,4 +1,4 @@ -class Inventory::InventoryDefinitionsController < ApplicationController#BaseInventoryController +class Inventory::InventoryDefinitionsController < BaseInventoryController before_action :set_inventory_definition, only: [:show, :edit, :update, :destroy] # GET /inventory_definitions diff --git a/app/controllers/inventory/stock_check_items_controller.rb b/app/controllers/inventory/stock_check_items_controller.rb index 43782767..18980f29 100644 --- a/app/controllers/inventory/stock_check_items_controller.rb +++ b/app/controllers/inventory/stock_check_items_controller.rb @@ -1,4 +1,4 @@ -class Inventory::StockCheckItemsController < ApplicationController#BaseInventoryController +class Inventory::StockCheckItemsController < BaseInventoryController before_action :set_stock_check_item, only: [:show, :edit, :update, :destroy] # GET /stock_check_items diff --git a/app/controllers/inventory/stock_checks_controller.rb b/app/controllers/inventory/stock_checks_controller.rb index f7a9e7fe..52d183de 100644 --- a/app/controllers/inventory/stock_checks_controller.rb +++ b/app/controllers/inventory/stock_checks_controller.rb @@ -1,4 +1,4 @@ -class Inventory::StockChecksController < ApplicationController#BaseInventoryController +class Inventory::StockChecksController < BaseInventoryController def index @check = StockCheck.new @inventory_definitions = InventoryDefinition.active.all diff --git a/app/views/inventory/inventory_definitions/_form.html.erb b/app/views/inventory/inventory_definitions/_form.html.erb index f5149fee..7a5f06ff 100644 --- a/app/views/inventory/inventory_definitions/_form.html.erb +++ b/app/views/inventory/inventory_definitions/_form.html.erb @@ -1,4 +1,7 @@ -<%= simple_form_for([:inventory, @inventory_definition]) do |f| %> +