diff --git a/app/controllers/origami/addorders_controller.rb b/app/controllers/origami/addorders_controller.rb index c9b1bc44..c71199e9 100755 --- a/app/controllers/origami/addorders_controller.rb +++ b/app/controllers/origami/addorders_controller.rb @@ -103,10 +103,15 @@ class Origami::AddordersController < ApplicationController#BaseOrigamiController } # begin + if params[:order_source] == "quick_service" + customer_id = "CUS-000000000002" # for no customer id from mobile + else + customer_id = params[:customer_id] == ""? "CUS-000000000001" : params[:customer_id] # for no customer id from mobile + end @order = Order.new @order.source = params[:order_source] @order.order_type = params[:order_type] - @order.customer_id = params[:customer_id] == ""? "CUS-000000000001" : params[:customer_id] # for no customer id from mobile + @order.customer_id = customer_id @order.items = items_arr @order.guest = params[:guest_info] @order.table_id = params[:table_id] # this is dining facilities's id diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index d07da974..f3fe9e40 100755 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -16,7 +16,11 @@ <%if current_login_employee.role !="waiter" %> - + <% if current_login_employee.role != "cashier" %> + + <% else %> + + <% end %> <% else %> <%end%> diff --git a/app/views/origami/payments/show.html.erb b/app/views/origami/payments/show.html.erb index c233a63c..8dc9fe02 100755 --- a/app/views/origami/payments/show.html.erb +++ b/app/views/origami/payments/show.html.erb @@ -618,11 +618,11 @@ var customer_name = "<%= @customer.name %>"; // closeOnCancel: false, // allowOutsideClick: false // }, function () { - // // if (cashier_type=="cashier") { - // // window.location.href = '/origami'; - // // }else{ - // // window.location.href = '/origami/quick_service'; - // // } + // if (cashier_type=="cashier") { + // window.location.href = '/origami'; + // }else{ + // window.location.href = '/origami/quick_service'; + // } // }); // }else{ // $('#pay').text("Pay"); @@ -634,11 +634,11 @@ var customer_name = "<%= @customer.name %>"; // closeOnCancel: false, // allowOutsideClick: false // }, function () { - // // if (cashier_type=="cashier") { - // // window.location.href = '/origami'; - // // }else{ - // // window.location.href = '/origami/quick_service'; - // // } + // if (cashier_type=="cashier") { + // window.location.href = '/origami'; + // }else{ + // window.location.href = '/origami/quick_service'; + // } // }); // } }