From ef8198733422d491619e0dab907a9c0713328c49 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Fri, 4 May 2018 13:16:57 +0630 Subject: [PATCH 1/2] udpate access code for supervisor and manager --- app/assets/stylesheets/addorder.scss | 23 +++++++++++++++++++++ app/controllers/base_origami_controller.rb | 2 +- app/controllers/origami/home_controller.rb | 2 +- app/views/origami/addorders/detail.html.erb | 2 +- app/views/origami/home/show.html.erb | 9 ++++++-- app/views/origami/payments/show.html.erb | 22 ++++++++++++++------ 6 files changed, 49 insertions(+), 11 deletions(-) diff --git a/app/assets/stylesheets/addorder.scss b/app/assets/stylesheets/addorder.scss index d8adba16..ba1089d2 100755 --- a/app/assets/stylesheets/addorder.scss +++ b/app/assets/stylesheets/addorder.scss @@ -247,4 +247,27 @@ i.logout_icon{ } .list-menu > a:hover{ text-decoration: none; +} +.cashier_number{ + width: 33%; + height:58px; + line-height:58px; + text-align:center; + background:#54A5AF; + // float:left; + // margin:2px; + font-size:20px; + color:white; + // cursor:pointer; +} +.border-top{ + border-top:1px solid #fff; +} + +.border-right{ + border-right:1px solid #fff; +} + +.border-left{ + border-left:1px solid #fff; } \ No newline at end of file diff --git a/app/controllers/base_origami_controller.rb b/app/controllers/base_origami_controller.rb index 3cb1eacc..040ee2bf 100755 --- a/app/controllers/base_origami_controller.rb +++ b/app/controllers/base_origami_controller.rb @@ -23,7 +23,7 @@ class BaseOrigamiController < ActionController::Base end else if ENV["SERVER_MODE"] != 'cloud' - protect_from_forgery with: :exception + # protect_from_forgery with: :exception end if current_user.nil? diff --git a/app/controllers/origami/home_controller.rb b/app/controllers/origami/home_controller.rb index ed857104..e2f15d19 100755 --- a/app/controllers/origami/home_controller.rb +++ b/app/controllers/origami/home_controller.rb @@ -132,7 +132,7 @@ class Origami::HomeController < BaseOrigamiController def check_emp_access_code pin_code = params[:code] employee = Employee.find_by_emp_id(pin_code) - if employee && employee.role == "manager" + if employee && (employee.role == "manager" || employee.role == "supervisor") result = {:status=> true, :message=>"Success" } else result = {:status=> false, :message=>"Invalid Access Code" } diff --git a/app/views/origami/addorders/detail.html.erb b/app/views/origami/addorders/detail.html.erb index 7e8cbb2c..5f451408 100644 --- a/app/views/origami/addorders/detail.html.erb +++ b/app/views/origami/addorders/detail.html.erb @@ -313,7 +313,7 @@
9
0
00
-
Clr
+
Clr