Merge branch 'adminbsb_ui_changes' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
phyusin
2018-03-09 14:27:11 +06:30
3 changed files with 21 additions and 12 deletions

View File

@@ -103,10 +103,15 @@ class Origami::AddordersController < ApplicationController#BaseOrigamiController
} }
# begin # 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 = Order.new
@order.source = params[:order_source] @order.source = params[:order_source]
@order.order_type = params[:order_type] @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.items = items_arr
@order.guest = params[:guest_info] @order.guest = params[:guest_info]
@order.table_id = params[:table_id] # this is dining facilities's id @order.table_id = params[:table_id] # this is dining facilities's id

View File

@@ -16,7 +16,11 @@
<!-- <a href="javascript:void(0);" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false"></a> --> <!-- <a href="javascript:void(0);" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false"></a> -->
<%if current_login_employee.role !="waiter" %> <%if current_login_employee.role !="waiter" %>
<a href="javascript:void(0);" class="bars"></a> <a href="javascript:void(0);" class="bars"></a>
<% if current_login_employee.role != "cashier" %>
<a class="navbar-brand" href="<%=dashboard_path%>" style="margin-left: 20px;"> <a class="navbar-brand" href="<%=dashboard_path%>" style="margin-left: 20px;">
<% else %>
<a class="navbar-brand" href="<%=origami_dashboard_path%>" style="margin-left: 20px;">
<% end %>
<% else %> <% else %>
<a class="navbar-brand m-0" href="<%= origami_dashboard_path%>"> <a class="navbar-brand m-0" href="<%= origami_dashboard_path%>">
<%end%> <%end%>

View File

@@ -618,11 +618,11 @@ var customer_name = "<%= @customer.name %>";
// closeOnCancel: false, // closeOnCancel: false,
// allowOutsideClick: false // allowOutsideClick: false
// }, function () { // }, function () {
// // if (cashier_type=="cashier") { // if (cashier_type=="cashier") {
// // window.location.href = '/origami'; // window.location.href = '/origami';
// // }else{ // }else{
// // window.location.href = '/origami/quick_service'; // window.location.href = '/origami/quick_service';
// // } // }
// }); // });
// }else{ // }else{
// $('#pay').text("Pay"); // $('#pay').text("Pay");
@@ -634,11 +634,11 @@ var customer_name = "<%= @customer.name %>";
// closeOnCancel: false, // closeOnCancel: false,
// allowOutsideClick: false // allowOutsideClick: false
// }, function () { // }, function () {
// // if (cashier_type=="cashier") { // if (cashier_type=="cashier") {
// // window.location.href = '/origami'; // window.location.href = '/origami';
// // }else{ // }else{
// // window.location.href = '/origami/quick_service'; // window.location.href = '/origami/quick_service';
// // } // }
// }); // });
// } // }
} }