1
0

Added quantity edit form

Changed quantity long text field width setting
This commit is contained in:
cryptogopher
2019-11-24 01:26:35 +01:00
parent 8c073494e5
commit fdfedf3bc9
9 changed files with 116 additions and 81 deletions

View File

@@ -1,7 +1,7 @@
class QuantitiesController < ApplicationController
before_action :init_session_filters
before_action :find_project_by_project_id, only: [:index, :create, :filter]
before_action :find_quantity, only: [:destroy, :toggle, :move]
before_action :find_quantity, only: [:edit, :update, :destroy, :toggle, :move]
before_action :authorize
def index
@@ -21,6 +21,17 @@ class QuantitiesController < ApplicationController
end
end
def filter
session[:q_filters] = params[:filters]
prepare_quantities
render :toggle
end
def edit
prepare_quantities
render :toggle
end
def destroy
if @quantity.destroy
flash[:notice] = 'Deleted quantity'
@@ -34,12 +45,6 @@ class QuantitiesController < ApplicationController
prepare_quantities
end
def filter
session[:q_filters] = params[:filters]
prepare_quantities
render :toggle
end
def move
direction = params[:direction].to_sym
case direction