validate foodcourt origami cashier
This commit is contained in:
@@ -7,7 +7,8 @@ class Foodcourt::FoodCourtController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def index
|
||||
def index
|
||||
if !ShiftSale.current_shift.nil?
|
||||
if params[:sale_id].present?
|
||||
sale =Sale.find(params[:sale_id])
|
||||
if sale
|
||||
@@ -50,6 +51,13 @@ class Foodcourt::FoodCourtController < ApplicationController
|
||||
.joins("JOIN customers ON orders.customer_id=customers.customer_id")
|
||||
.where("bookings.booking_status !=? and sales.sale_status =? and sales.payment_status =? and orders.source='app' and DATE(bookings.created_at)=?",'completed','completed','paid',Date.today).order("bookings.created_at desc").uniq.length
|
||||
render "foodcourt/addorders/detail"
|
||||
else
|
||||
if current_user.role == 'administrator' || current_user.role == 'manager'
|
||||
redirect_to origami_dashboard_path
|
||||
else
|
||||
redirect_to new_foodcourt_shift_path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def get_menu_category ()
|
||||
|
||||
@@ -1,269 +1,296 @@
|
||||
<div class="container-fluid">
|
||||
<div id="loading_wrapper" style="display:none;">
|
||||
<div id="loading"></div>
|
||||
</div>
|
||||
<div class="block-header">
|
||||
<!-- <h2><%= t :dashboard %></h2> -->
|
||||
<h2><%= t :date_time %> : <%= Time.zone.now.utc.getlocal.strftime("%Y-%m-%d %I:%M %p") %></h2>
|
||||
</div>
|
||||
|
||||
<!-- Widgets -->
|
||||
<div class="row clearfix">
|
||||
<% if @quick_service == '1' %>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-10 qs_view">
|
||||
<div class="info-box bg-purple">
|
||||
<div class="icon" >
|
||||
<i class="material-icons">arrow_forward</i>
|
||||
</div>
|
||||
<div class="text font-20 m-l-5" style="line-height: 80px;"><%= t :quick_service %></div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @food_court == '1' %>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-10 fc_view">
|
||||
<div class="info-box bg-pink">
|
||||
<div class="icon" >
|
||||
<i class="material-icons">arrow_forward</i>
|
||||
</div>
|
||||
<div class="text font-20 m-l-5" style="line-height: 80px;"><%= @food_court_name %></div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @dinein_cashier == '1' %>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-10 cashier_view">
|
||||
<div class="info-box bg-green">
|
||||
<div class="icon" >
|
||||
<i class="material-icons">arrow_forward</i>
|
||||
</div>
|
||||
<div class="text font-20 m-l-5" style="line-height: 80px;"><%= t :dine_in_cashier %></div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @reservation == '1' %>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-10 reservation">
|
||||
<div class="info-box bg-orange">
|
||||
<div class="icon" >
|
||||
<i class="material-icons">arrow_forward</i>
|
||||
</div>
|
||||
<div class="text font-20 m-l-5" style="line-height: 80px;"><%= t :reservation %></div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @order_reservation == '1' %>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-10 order_reservation">
|
||||
<div class="info-box bg-blue">
|
||||
<div class="icon" >
|
||||
<i class="material-icons">arrow_forward</i>
|
||||
</div>
|
||||
<div class="text font-20 m-l-5" style="line-height: 80px;"><%= t :order_reservation %></div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="container-fluid">
|
||||
<div id="loading_wrapper" style="display:none;">
|
||||
<div id="loading"></div>
|
||||
</div>
|
||||
<div class="block-header">
|
||||
<!-- <h2><%= t :dashboard %></h2> -->
|
||||
<h2><%= t :date_time %> : <%= Time.zone.now.utc.getlocal.strftime("%Y-%m-%d %I:%M %p") %></h2>
|
||||
</div>
|
||||
<!-- #END# Widgets -->
|
||||
<% if !@current_user.nil? && @current_user.role != 'waiter' && @setting_flag %>
|
||||
<!-- CPU Usage -->
|
||||
<div class="row clearfix">
|
||||
|
||||
<% if !@summ_sale.nil? %>
|
||||
<!-- Widgets -->
|
||||
<div class="row clearfix">
|
||||
<% if @quick_service == '1' %>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-10 qs_view origami_cashier">
|
||||
<div class="info-box bg-purple">
|
||||
<div class="icon" >
|
||||
<i class="material-icons">arrow_forward</i>
|
||||
</div>
|
||||
<div class="text font-20 m-l-5" style="line-height: 80px;"><%= t :quick_service %></div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @food_court == '1' %>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-10 fc_view origami_cashier">
|
||||
<div class="info-box bg-pink">
|
||||
<div class="icon" >
|
||||
<i class="material-icons">arrow_forward</i>
|
||||
</div>
|
||||
<div class="text font-20 m-l-5" style="line-height: 80px;"><%= @food_court_name %></div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @dinein_cashier == '1' %>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-10 cashier_view origami_cashier">
|
||||
<div class="info-box bg-green">
|
||||
<div class="icon" >
|
||||
<i class="material-icons">arrow_forward</i>
|
||||
</div>
|
||||
<div class="text font-20 m-l-5" style="line-height: 80px;"><%= t :dine_in_cashier %></div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @reservation == '1' %>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-10 reservation origami_cashier">
|
||||
<div class="info-box bg-orange">
|
||||
<div class="icon" >
|
||||
<i class="material-icons">arrow_forward</i>
|
||||
</div>
|
||||
<div class="text font-20 m-l-5" style="line-height: 80px;"><%= t :reservation %></div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @order_reservation == '1' %>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-10 order_reservation origami_cashier">
|
||||
<div class="info-box bg-blue">
|
||||
<div class="icon" >
|
||||
<i class="material-icons">arrow_forward</i>
|
||||
</div>
|
||||
<div class="text font-20 m-l-5" style="line-height: 80px;"><%= t :order_reservation %></div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<!-- #END# Widgets -->
|
||||
<% if !@current_user.nil? && @current_user.role != 'waiter' && @setting_flag %>
|
||||
<!-- CPU Usage -->
|
||||
<div class="row clearfix">
|
||||
|
||||
<% if !@summ_sale.nil? %>
|
||||
|
||||
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h6><%= t :sale %></h6>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.receipt") %> : </td>
|
||||
<td align="right"><%= @summ_sale.total_receipt %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<% revenue = @summ_sale.total_amount - @summ_sale.total_discount%>
|
||||
<td><%= t("views.right_panel.detail.sale") %> <%= t :revenue %> : </td>
|
||||
<td align="right"><%= number_format( revenue, precision: precision.to_i ,delimiter: delimiter) %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.discount") %> : </td>
|
||||
<td align="right"><%= number_format( @summ_sale.total_discount, precision: precision.to_i ,delimiter: delimiter) %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.tax") %> : </td>
|
||||
<td align="right"><%= number_format( @summ_sale.total_tax , precision: precision.to_i ,delimiter: delimiter)%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= t("views.right_panel.detail.total") %> <%= t :sale %> : </td>
|
||||
<td align="right"><%= number_format( @summ_sale.grand_total , precision: precision.to_i ,delimiter: delimiter)%></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="table">
|
||||
<% if !(@total_payment_methods.nil?) %>
|
||||
<% @total_payment_methods.each do |payment| %>
|
||||
<% if !@sale_data[0].empty? %>
|
||||
<% if payment.payment_method != 'mpu' && payment.payment_method != 'visa' && payment.payment_method != 'master' && payment.payment_method != 'jcb' %>
|
||||
<tr>
|
||||
<% if payment.payment_method == 'paypar' %>
|
||||
<td>Redeem Sale : </td>
|
||||
<% else %>
|
||||
<td><%= payment.payment_method.to_s.capitalize %> Sale : </td>
|
||||
<% end %>
|
||||
<td align="right">
|
||||
<% @sale_data.each do |data| %>
|
||||
<% pay_mth = payment.payment_method %>
|
||||
<%= data[""+pay_mth+""] %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% total_card = @sale_data.select { |hash| hash["card"]!=nil }.first %>
|
||||
<% if !total_card.nil? %>
|
||||
<tr>
|
||||
<td><%= t("views.right_panel.detail.other_payment") %> : </td>
|
||||
<td align="right">
|
||||
<%= total_card["card"].to_f %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h6><%= t :sale %></h6>
|
||||
<h6><%= t :customer %></h6>
|
||||
<table class="table">
|
||||
<% if !@total_customer.nil? %>
|
||||
<tr>
|
||||
<td><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.receipt") %> : </td>
|
||||
<td align="right"><%= @summ_sale.total_receipt %></td>
|
||||
<td><%= t("views.right_panel.detail.total") %> <%= t :customer %> : </td>
|
||||
<td align="right"><%= @total_customer %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<% revenue = @summ_sale.total_amount - @summ_sale.total_discount%>
|
||||
<td><%= t("views.right_panel.detail.sale") %> <%= t :revenue %> : </td>
|
||||
<td align="right"><%= number_format( revenue, precision: precision.to_i ,delimiter: delimiter) %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.discount") %> : </td>
|
||||
<td align="right"><%= number_format( @summ_sale.total_discount, precision: precision.to_i ,delimiter: delimiter) %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.tax") %> : </td>
|
||||
<td align="right"><%= number_format( @summ_sale.total_tax , precision: precision.to_i ,delimiter: delimiter)%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= t("views.right_panel.detail.total") %> <%= t :sale %> : </td>
|
||||
<td align="right"><%= number_format( @summ_sale.grand_total , precision: precision.to_i ,delimiter: delimiter)%></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="table">
|
||||
<% if !(@total_payment_methods.nil?) %>
|
||||
<% @total_payment_methods.each do |payment| %>
|
||||
<% if !@sale_data[0].empty? %>
|
||||
<% if payment.payment_method != 'mpu' && payment.payment_method != 'visa' && payment.payment_method != 'master' && payment.payment_method != 'jcb' %>
|
||||
<tr>
|
||||
<% if payment.payment_method == 'paypar' %>
|
||||
<td>Redeem Sale : </td>
|
||||
<% else %>
|
||||
<td><%= payment.payment_method.to_s.capitalize %> Sale : </td>
|
||||
<% end %>
|
||||
<td align="right">
|
||||
<% @sale_data.each do |data| %>
|
||||
<% pay_mth = payment.payment_method %>
|
||||
<%= data[""+pay_mth+""] %>
|
||||
<% if !@total_dinein.nil? %>
|
||||
<tr>
|
||||
<td><%= t("views.right_panel.detail.dine_in") %> : </td>
|
||||
<td align="right"><%= @total_dinein %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if !@total_takeaway.nil? %>
|
||||
<tr>
|
||||
<td><%= t("views.right_panel.detail.takeaway") %> : </td>
|
||||
<td align="right"><%= @total_takeaway %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<!-- <% if !@total_other_customer.nil? %>
|
||||
<tr>
|
||||
<td><%= t :customer %> : </td>
|
||||
<td align="right"><%= @total_other_customer.total_cus %></td>
|
||||
</tr>
|
||||
<% end %> -->
|
||||
<% if !@total_membership.nil? %>
|
||||
<tr>
|
||||
<td><%= t("views.right_panel.detail.membership") %> : </td>
|
||||
<td align="right"><%= @total_membership %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h6><%= t("views.right_panel.detail.order") %></h6>
|
||||
<table class="table">
|
||||
<% if !@total_order.nil? %>
|
||||
<tr>
|
||||
<td width="40px"><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.order") %> : </td>
|
||||
<td align="right" width="60px"><%= @total_order.total_order %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
<% if !@total_accounts.nil? %>
|
||||
<% @total_accounts.each do |account| %>
|
||||
<tr>
|
||||
<td width="40px"><%= account.title %> (Account) : </td>
|
||||
<td align="right" width="60px">
|
||||
<% @account_data.each do |data| %>
|
||||
<% acc = account.title %>
|
||||
<%= data[""+acc+""] %> <% if !data[''+acc+''].nil? %> ( <%= data[''+acc+'_amount'] %> ) <% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% total_card = @sale_data.select { |hash| hash["card"]!=nil }.first %>
|
||||
<% if !total_card.nil? %>
|
||||
<% if !@top_items.nil? %>
|
||||
<tr>
|
||||
<td><%= t("views.right_panel.detail.other_payment") %> : </td>
|
||||
<td align="right">
|
||||
<%= total_card["card"].to_f %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h6><%= t :customer %></h6>
|
||||
<table class="table">
|
||||
<% if !@total_customer.nil? %>
|
||||
<tr>
|
||||
<td><%= t("views.right_panel.detail.total") %> <%= t :customer %> : </td>
|
||||
<td align="right"><%= @total_customer %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if !@total_dinein.nil? %>
|
||||
<tr>
|
||||
<td><%= t("views.right_panel.detail.dine_in") %> : </td>
|
||||
<td align="right"><%= @total_dinein %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if !@total_takeaway.nil? %>
|
||||
<tr>
|
||||
<td><%= t("views.right_panel.detail.takeaway") %> : </td>
|
||||
<td align="right"><%= @total_takeaway %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<!-- <% if !@total_other_customer.nil? %>
|
||||
<tr>
|
||||
<td><%= t :customer %> : </td>
|
||||
<td align="right"><%= @total_other_customer.total_cus %></td>
|
||||
</tr>
|
||||
<% end %> -->
|
||||
<% if !@total_membership.nil? %>
|
||||
<tr>
|
||||
<td><%= t("views.right_panel.detail.membership") %> : </td>
|
||||
<td align="right"><%= @total_membership %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h6><%= t("views.right_panel.detail.order") %></h6>
|
||||
<table class="table">
|
||||
<% if !@total_order.nil? %>
|
||||
<tr>
|
||||
<td width="40px"><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.order") %> : </td>
|
||||
<td align="right" width="60px"><%= @total_order.total_order %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
<% if !@total_accounts.nil? %>
|
||||
<% @total_accounts.each do |account| %>
|
||||
<tr>
|
||||
<td width="40px"><%= account.title %> (Account) : </td>
|
||||
<td align="right" width="60px">
|
||||
<% @account_data.each do |data| %>
|
||||
<% acc = account.title %>
|
||||
<%= data[""+acc+""] %> <% if !data[''+acc+''].nil? %> ( <%= data[''+acc+'_amount'] %> ) <% end %>
|
||||
<td width="40px"><%= t :top %> <%= t("views.right_panel.detail.item") %> : </td>
|
||||
<td align="right" width="60px"><%= @top_items.item_name %>
|
||||
<br>(<%= @top_items.item_total_price %>)</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if !@top_items.nil? %>
|
||||
<tr>
|
||||
<td width="40px"><%= t :top %> <%= t("views.right_panel.detail.item") %> : </td>
|
||||
<td align="right" width="60px"><%= @top_items.item_name %>
|
||||
<br>(<%= @top_items.item_total_price %>)</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if !@total_foc_items.nil? %>
|
||||
<tr>
|
||||
<td width="40px"><%= t("views.right_panel.detail.total") %> <%= t("views.btn.foc") %> <%= t("views.right_panel.detail.item") %> : </td>
|
||||
<td align="right" width="60px"><%= @total_foc_items.to_int %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
<% if !@total_foc_items.nil? %>
|
||||
<tr>
|
||||
<td width="40px"><%= t("views.right_panel.detail.total") %> <%= t("views.btn.foc") %> <%= t("views.right_panel.detail.item") %> : </td>
|
||||
<td align="right" width="60px"><%= @total_foc_items.to_int %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<button type="button" data-href="<%=origami_second_display_index_path%>" target="_blank" id="second_view" class="btn action-btn bg-blue waves-effect second_view hidden" style="height: 45px">Customer View</button>
|
||||
<input type="hidden" name="server_mode" value="<%=ENV["SERVER_MODE"]%>" id="server_mode">
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("#loading_wrapper").show();
|
||||
getAllMenu();
|
||||
|
||||
$(".cashier_view").on('click', function() {
|
||||
window.location.href = '/origami';
|
||||
});
|
||||
|
||||
$(".qs_view").on('click', function() {
|
||||
var display_type = '<%= @display_type %>';
|
||||
if (display_type.length>0) {
|
||||
display_type = '<%= @display_type %>';
|
||||
}else{
|
||||
display_type = null;
|
||||
}
|
||||
if ($('#server_mode').val() != "cloud" && display_type == 2) {
|
||||
document.getElementById('second_view').click();
|
||||
}
|
||||
window.location.href = '/origami/quick_service';
|
||||
});
|
||||
|
||||
$(".fc_view").on('click', function() {
|
||||
var display_type = '<%= @display_type %>';
|
||||
if (display_type.length>0) {
|
||||
display_type = '<%= @display_type %>';
|
||||
}else{
|
||||
display_type = null;
|
||||
}
|
||||
if ($('#server_mode').val() != "cloud" && display_type == 2) {
|
||||
document.getElementById('second_view').click();
|
||||
}
|
||||
window.location.href = '/foodcourt/food_court#';
|
||||
});
|
||||
|
||||
$(".order_reservation").on('click', function() {
|
||||
window.location.href = '/origami/order_reservation';
|
||||
});
|
||||
|
||||
$("#second_view").on('click', function () {
|
||||
var url = $(this).attr("data-href");
|
||||
window.open(url,'_blank');
|
||||
});
|
||||
|
||||
$(".reservation").on("click", function(){
|
||||
window.location.href = '/origami/reservation';
|
||||
});
|
||||
var role = '<%= @current_user.role %>';
|
||||
var current_shift = '<%= ShiftSale.current_shift %>'
|
||||
var food_court = '<%= @food_court %>'
|
||||
|
||||
if ((role == 'administrator' || role == 'manager') && current_shift === "") {
|
||||
$(".origami_cashier").on('click', function() {
|
||||
swal({
|
||||
title: "There is no current open shift!",
|
||||
text: "",
|
||||
type: "warning",
|
||||
showCancelButton: false,
|
||||
confirmButtonClass: "btn-info",
|
||||
confirmButtonText: "OK",
|
||||
closeOnConfirm: true
|
||||
});
|
||||
});
|
||||
} else if (role == 'cashier' && current_shift === "") {
|
||||
if (food_court == 1){
|
||||
window.location.href = '/foodcourt/shifts/new'
|
||||
}else {
|
||||
window.location.href = '/origami/shifts/new'
|
||||
}
|
||||
|
||||
} else {
|
||||
$(".fc_view").on('click', function() {
|
||||
var display_type = '<%= @display_type %>';
|
||||
if (display_type.length>0) {
|
||||
display_type = '<%= @display_type %>';
|
||||
}else{
|
||||
display_type = null;
|
||||
}
|
||||
if ($('#server_mode').val() != "cloud" && display_type == 2) {
|
||||
document.getElementById('second_view').click();
|
||||
}
|
||||
window.location.href = '/foodcourt/food_court#';
|
||||
});
|
||||
|
||||
$(".order_reservation").on('click', function() {
|
||||
window.location.href = '/origami/order_reservation';
|
||||
});
|
||||
|
||||
$(".reservation").on("click", function(){
|
||||
window.location.href = '/origami/reservation';
|
||||
});
|
||||
|
||||
$(".qs_view").on('click', function() {
|
||||
var display_type = '<%= @display_type %>';
|
||||
if (display_type.length>0) {
|
||||
display_type = '<%= @display_type %>';
|
||||
}else{
|
||||
display_type = null;
|
||||
}
|
||||
if ($('#server_mode').val() != "cloud" && display_type == 2) {
|
||||
document.getElementById('second_view').click();
|
||||
}
|
||||
window.location.href = '/origami/quick_service';
|
||||
});
|
||||
|
||||
$(".cashier_view").on('click', function() {
|
||||
window.location.href = '/origami';
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user