food court cashier
This commit is contained in:
@@ -1041,7 +1041,7 @@ $(function() {
|
|||||||
}else if(result.data == 'OK'){
|
}else if(result.data == 'OK'){
|
||||||
window.location.href = '/origami/'+type+'/pending_order/' + $('#sale_id').text();
|
window.location.href = '/origami/'+type+'/pending_order/' + $('#sale_id').text();
|
||||||
}else{
|
}else{
|
||||||
if(result.current_user_role == 'foodcourt_cashier'){
|
if(result.current_user_role == 'cashier'){
|
||||||
window.location.href = "/foodcourt/sale/"+result.data["sale_id"]+"/"+type+"/payment";
|
window.location.href = "/foodcourt/sale/"+result.data["sale_id"]+"/"+type+"/payment";
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|||||||
@@ -199,14 +199,23 @@ class HomeController < ApplicationController
|
|||||||
redirect_to dashboard_path
|
redirect_to dashboard_path
|
||||||
end
|
end
|
||||||
elsif employee.role == "cashier"
|
elsif employee.role == "cashier"
|
||||||
|
food_court = Lookup.find_by_lookup_type_and_value("food_court", "1")
|
||||||
#check if cashier has existing open cashier
|
#check if cashier has existing open cashier
|
||||||
shift = ShiftSale.current_open_shift(employee)
|
shift = ShiftSale.current_open_shift(employee)
|
||||||
|
if food_court
|
||||||
|
if !shift.nil?
|
||||||
|
redirect_to foodcourt_food_court_path
|
||||||
|
else
|
||||||
|
redirect_to new_foodcourt_shift_path
|
||||||
|
end
|
||||||
|
else
|
||||||
if !shift.nil?
|
if !shift.nil?
|
||||||
redirect_to origami_dashboard_path
|
redirect_to origami_dashboard_path
|
||||||
# redirect_to origami_root_path
|
# redirect_to origami_root_path
|
||||||
else
|
else
|
||||||
redirect_to new_origami_shift_path
|
redirect_to new_origami_shift_path
|
||||||
end
|
end
|
||||||
|
end
|
||||||
elsif employee.role == "manager"
|
elsif employee.role == "manager"
|
||||||
redirect_to dashboard_path
|
redirect_to dashboard_path
|
||||||
elsif employee.role == "waiter"
|
elsif employee.role == "waiter"
|
||||||
|
|||||||
@@ -37,7 +37,8 @@
|
|||||||
<!-- #END# Overlay For Sidebars -->
|
<!-- #END# Overlay For Sidebars -->
|
||||||
<%= render 'layouts/header' %>
|
<%= render 'layouts/header' %>
|
||||||
<section>
|
<section>
|
||||||
<%if current_login_employee.role == "foodcourt_cashier" %>
|
<%food_court = Lookup.find_by_lookup_type_and_value("food_court", "1")%>
|
||||||
|
<% if food_court %>
|
||||||
<%= render 'layouts/foodcourt_left_sidebar' %>
|
<%= render 'layouts/foodcourt_left_sidebar' %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= render 'layouts/left_sidebar' %>
|
<%= render 'layouts/left_sidebar' %>
|
||||||
|
|||||||
@@ -23,7 +23,12 @@
|
|||||||
<a class="navbar-brand mbl_view" href="<%=origami_dashboard_path%>" style="margin-left: 20px;">
|
<a class="navbar-brand mbl_view" href="<%=origami_dashboard_path%>" style="margin-left: 20px;">
|
||||||
<% elsif current_login_employee.role == "cashier" || current_login_employee.role == "waiter"%>
|
<% elsif current_login_employee.role == "cashier" || current_login_employee.role == "waiter"%>
|
||||||
<%if ShiftSale.current_open_shift(current_login_employee) %>
|
<%if ShiftSale.current_open_shift(current_login_employee) %>
|
||||||
|
<%food_court = Lookup.find_by_lookup_type_and_value("food_court", "1")%>
|
||||||
|
<%if current_login_employee.role == "cashier" && food_court %>
|
||||||
|
<a class="navbar-brand mbl_view" href="<%=foodcourt_food_court_path%>" style="margin-left: 20px;">
|
||||||
|
<%else%>
|
||||||
<a class="navbar-brand mbl_view" href="<%=origami_dashboard_path%>" style="margin-left: 20px;">
|
<a class="navbar-brand mbl_view" href="<%=origami_dashboard_path%>" style="margin-left: 20px;">
|
||||||
|
<%end%>
|
||||||
<%else%>
|
<%else%>
|
||||||
<a class="navbar-brand mbl_view" href="" style="margin-left: 20px;">
|
<a class="navbar-brand mbl_view" href="" style="margin-left: 20px;">
|
||||||
<%end%>
|
<%end%>
|
||||||
@@ -46,7 +51,8 @@
|
|||||||
<span class="navbar-brand navbar-brand-txt"><%= current_shop.name %></span>
|
<span class="navbar-brand navbar-brand-txt"><%= current_shop.name %></span>
|
||||||
</div>
|
</div>
|
||||||
<!-- End Shop Info -->
|
<!-- End Shop Info -->
|
||||||
<% if current_login_employee.role !='foodcourt_cashier' %>
|
<%food_court = Lookup.find_by_lookup_type_and_value("food_court", "1")%>
|
||||||
|
<% if !food_court %>
|
||||||
<div class="navbar-right m-auto">
|
<div class="navbar-right m-auto">
|
||||||
<% if order_reservation %>
|
<% if order_reservation %>
|
||||||
<div class="online_order">
|
<div class="online_order">
|
||||||
@@ -156,15 +162,8 @@
|
|||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%if current_login_employee.role =="foodcourt_cashier" %>
|
<%food_court = Lookup.find_by_lookup_type_and_value("food_court", "1")%>
|
||||||
<li>
|
<% if food_court %>
|
||||||
<p class="waves-effect waves-block p-l-30 m-b-5">
|
|
||||||
<a href="/foodcourt/second_display" onclick="window.open('/foodcourt/second_display', 'newwindow', 'width=700,height=500'); return false;" style="text-decoration: none;">
|
|
||||||
<i class="material-icons font-7 logout_icon shopinfo">info</i>
|
|
||||||
<span class="font-15 shopinfo" >Second Display</span>
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<p class="waves-effect waves-block p-l-30 m-b-5 close_cashier">
|
<p class="waves-effect waves-block p-l-30 m-b-5 close_cashier">
|
||||||
<i class="material-icons font-7 logout_icon">close</i>
|
<i class="material-icons font-7 logout_icon">close</i>
|
||||||
|
|||||||
@@ -38,7 +38,8 @@
|
|||||||
<!-- #END# Overlay For Sidebars -->
|
<!-- #END# Overlay For Sidebars -->
|
||||||
<%= render 'layouts/header' %>
|
<%= render 'layouts/header' %>
|
||||||
<section>
|
<section>
|
||||||
<%if current_login_employee.role == "foodcourt_cashier" %>
|
<%food_court = Lookup.find_by_lookup_type_and_value("food_court", "1")%>
|
||||||
|
<% if food_court %>
|
||||||
<%= render 'layouts/foodcourt_left_sidebar' %>
|
<%= render 'layouts/foodcourt_left_sidebar' %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= render 'layouts/left_sidebar' %>
|
<%= render 'layouts/left_sidebar' %>
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t :booking %></li>
|
<li class="breadcrumb-item active"><%= t :booking %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
<%if current_login_employee.role == "foodcourt_cashier" %>
|
<%food_court = Lookup.find_by_lookup_type_and_value("food_court", "1")%>
|
||||||
|
<% if food_court %>
|
||||||
<%= link_to 'Back', foodcourt_food_court_path %>
|
<%= link_to 'Back', foodcourt_food_court_path %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to 'Back', dashboard_path %>
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.order") %></li>
|
<li class="breadcrumb-item active"><%= t("views.right_panel.detail.order") %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
<%if current_login_employee.role == "foodcourt_cashier" %>
|
<%food_court = Lookup.find_by_lookup_type_and_value("food_court", "1")%>
|
||||||
|
<% if food_court %>
|
||||||
<%= link_to 'Back', foodcourt_food_court_path %>
|
<%= link_to 'Back', foodcourt_food_court_path %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to 'Back', dashboard_path %>
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
<li class="breadcrumb-item"><a href="<%= dashboard_path %>"><%= t("views.right_panel.button.home") %></a></li>
|
||||||
<li class="breadcrumb-item active"><%= t :sale %></li>
|
<li class="breadcrumb-item active"><%= t :sale %></li>
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
<%if current_login_employee.role == "foodcourt_cashier" %>
|
<%food_court = Lookup.find_by_lookup_type_and_value("food_court", "1")%>
|
||||||
|
<% if food_court %>
|
||||||
<%= link_to 'Back', transactions_bookings_path %>
|
<%= link_to 'Back', transactions_bookings_path %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to 'Back', dashboard_path %>
|
<%= link_to 'Back', dashboard_path %>
|
||||||
|
|||||||
Reference in New Issue
Block a user