From 1b4d144b4666c025e3133407e8779ad8547dd90b Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Wed, 23 May 2018 10:29:32 +0630 Subject: [PATCH 1/3] migerate employee --- config/initializers/action_controller.rb | 2 +- db/migrate/20170403155230_create_employees.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/initializers/action_controller.rb b/config/initializers/action_controller.rb index e0eb7455..1d8b678e 100644 --- a/config/initializers/action_controller.rb +++ b/config/initializers/action_controller.rb @@ -19,7 +19,7 @@ class ActionController::Base render :json => [{ status: false, message: 'Invalid Access!'}] end else - #check for license file + check for license file if check_license current_license(ENV["SX_PROVISION_URL"]) else diff --git a/db/migrate/20170403155230_create_employees.rb b/db/migrate/20170403155230_create_employees.rb index 4270b265..16e741d8 100755 --- a/db/migrate/20170403155230_create_employees.rb +++ b/db/migrate/20170403155230_create_employees.rb @@ -3,6 +3,7 @@ class CreateEmployees < ActiveRecord::Migration[5.1] create_table :employees do |t| t.string :name, :null => false t.string :role, :null => false, :default => "cashier" + t.boolean :is_active, :default => true t.string :emp_id, :null => false t.string :password_digest, :null => false t.string :token_session From ddeb2f258287bdc809536296b27e67c7b4f8c211 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Wed, 23 May 2018 14:53:11 +0630 Subject: [PATCH 2/3] update production commission --- app/controllers/origami/product_commissions_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/origami/product_commissions_controller.rb b/app/controllers/origami/product_commissions_controller.rb index 31343fe5..1156827a 100755 --- a/app/controllers/origami/product_commissions_controller.rb +++ b/app/controllers/origami/product_commissions_controller.rb @@ -91,7 +91,7 @@ class Origami::ProductCommissionsController < BaseOrigamiController # @commission = Commission.where('product_code = ? AND is_active = ?', @menu_item.item_code, true).take Commission.all.each do |com| - if com.product_code.include? @menu_item.item_code && com.active == true + if com.product_code.include? @menu_item.item_code && com.is_active == true @commission = Commission.find(com.id) break end From 055ca1c95b50cd0848004548b091fb455af1114d Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Wed, 23 May 2018 15:38:35 +0630 Subject: [PATCH 3/3] update action controller --- config/initializers/action_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/action_controller.rb b/config/initializers/action_controller.rb index 1d8b678e..fb212f13 100644 --- a/config/initializers/action_controller.rb +++ b/config/initializers/action_controller.rb @@ -19,7 +19,7 @@ class ActionController::Base render :json => [{ status: false, message: 'Invalid Access!'}] end else - check for license file + # check for license file if check_license current_license(ENV["SX_PROVISION_URL"]) else