-
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
|
||||
<% type = request.path_info.include?('quick_service') || request.path_info.include?('food_court')%>
|
||||
<% modify_order = request.path_info.include?('modify_order')%>
|
||||
|
||||
<div class="container-fluid " style="padding:0px 3px 0px 3px;">
|
||||
<div id="oqs_loading_wrapper" style="display:none;">
|
||||
<div id="oqs_loading"></div>
|
||||
@@ -166,15 +165,15 @@
|
||||
Back
|
||||
</button>
|
||||
|
||||
<% if @quick_service_only %>
|
||||
<button type="button" class="btn btn-lg btn-primary waves-effect col-md-9" id='pending_order' style="padding: .5rem 0.15rem !important;">Pending Order
|
||||
</button>
|
||||
<% else %>
|
||||
<%# <% if @quick_service_only %>
|
||||
<!-- <button type="button" class="btn btn-lg btn-primary waves-effect col-md-9" id='pending_order' style="padding: .5rem 0.15rem !important;">Pending Order
|
||||
</button> -->
|
||||
<%# <% else %>
|
||||
<button type="button" class="btn btn-lg btn-primary waves-effect col-md-6" id='pending_order' style="padding: .5rem 0.15rem !important;">Pending Order
|
||||
</button>
|
||||
<a class="btn btn-lg bg-blue waves-effect select_table col-md-3" data-toggle="modal" data-target="#TableModal" style=" padding: .5rem 0.15rem !important;">Select</a>
|
||||
<input type="hidden" name="table_id" value="" id="table_id">
|
||||
<% end %>
|
||||
<%# <% end %>
|
||||
<%else%>
|
||||
<button type="button" class="btn btn-lg btn-block btn-default waves-effect" id='back'>
|
||||
<i class="material-icons">reply</i>Back
|
||||
@@ -282,7 +281,7 @@
|
||||
<button type="button" class="btn btn-primary action-btn create col-md-7" id="create_order" disabled="disabled" style="padding-top:15px !important;padding-bottom:15px !important;">Add Order</button>
|
||||
<% end %>
|
||||
<%end%>
|
||||
<% if !@quick_service_only && current_user.role == "waiter"%>
|
||||
<% if @quick_service_only && current_user.role == "waiter"%>
|
||||
<button type="button" class="btn btn-primary action-btn create col-md-7" id="create_order" disabled="disabled" style="padding-top:15px !important;padding-bottom:15px !important;">Add Order</button>
|
||||
<%end%>
|
||||
<%else%>
|
||||
|
||||
@@ -47,16 +47,16 @@
|
||||
<% @tables.each do |table| %>
|
||||
<% if table.status == 'occupied' %>
|
||||
<% if table.get_booking.nil? %>
|
||||
<% if table.get_checkout_booking.nil? %>
|
||||
<div class="card tables red text-white" data-id="<%= table.id %>">
|
||||
<% else %>
|
||||
<div class="card tables orange text-white" data-id="<%= table.id %>">
|
||||
<% end %>
|
||||
<div class="card-block">
|
||||
Table <%= table.name %> ( <%= table.seater %> Seat ) <br>
|
||||
<%= table.zone.name %>
|
||||
</div>
|
||||
</div>
|
||||
<% if table.get_checkout_booking.nil? %>
|
||||
<div class="card tables red text-white" data-id="<%= table.id %>">
|
||||
<% else %>
|
||||
<div class="card tables orange text-white" data-id="<%= table.id %>">
|
||||
<% end %>
|
||||
<div class="card-block">
|
||||
Table <%= table.name %> ( <%= table.seater %> Seat ) <br>
|
||||
<%= table.zone.name %>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<% if table.get_checkout_booking.nil? %>
|
||||
<div class="card tables blue text-white" data-id="<%= table.id %>">
|
||||
@@ -219,6 +219,7 @@
|
||||
getCreditSales("","","cashier"); //credit sales script data binding
|
||||
|
||||
$(".tables").on('click', function(){
|
||||
localStorage.setItem('dinning_type','table');
|
||||
var dining_id = $(this).attr("data-id");
|
||||
window.location.href = '/origami/table/' + dining_id;
|
||||
});
|
||||
@@ -229,6 +230,7 @@
|
||||
});
|
||||
|
||||
$(".rooms").on('click', function(){
|
||||
localStorage.setItem('dinning_type','room');
|
||||
var dining_id = $(this).attr("data-id");
|
||||
window.location.href = '/origami/room/' + dining_id;
|
||||
});
|
||||
|
||||
@@ -796,6 +796,7 @@
|
||||
<script>
|
||||
var cashier_type = "cashier";
|
||||
$(document).ready(function () {
|
||||
// alert(localStorage.getItem("current_checkin_count"));
|
||||
localStorage.removeItem("trans_flag");
|
||||
/* check webview loaded*/
|
||||
var webview = <%= @webview %>;
|
||||
@@ -825,8 +826,9 @@
|
||||
window.location.href = '/origami/table/' + dining_id + "/table_invoice/" + sale_id;
|
||||
})
|
||||
$(".tables").on('click', function () {
|
||||
|
||||
localStorage.setItem('dinning_type','table');
|
||||
var customer_id = $(".customer-id").text();
|
||||
localStorage.setItem('customer_id',customer_id);
|
||||
show_customer_details(customer_id);
|
||||
|
||||
var dining_id = $(this).attr("data-id");
|
||||
@@ -843,8 +845,9 @@
|
||||
});
|
||||
|
||||
$(".rooms").on('click', function () {
|
||||
|
||||
localStorage.setItem('dinning_type','room');
|
||||
var customer_id = $(".customer-id").text();
|
||||
localStorage.setItem('customer_id',customer_id);
|
||||
show_customer_details(customer_id);
|
||||
|
||||
var dining_id = $(this).attr("data-id");
|
||||
@@ -1074,6 +1077,8 @@
|
||||
var order_id = $('#save_order_id').attr('data-order');
|
||||
var ajax_url = "/origami/" + order_id + "/request_bills";
|
||||
localStorage.setItem("tax_type", "all");
|
||||
var current_checkin_induties_count =localStorage.getItem("current_checkin_induties_count");
|
||||
localStorage.removeItem("current_checkin_induties_count");
|
||||
if(order_id!=undefined && order_id!=null && order_id!=""){
|
||||
if($('#request_bills').is(":visible")) {
|
||||
$('#request_bills').prop("disabled",true);
|
||||
@@ -1081,7 +1086,7 @@
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: ajax_url,
|
||||
// data: 'order_id='+ order_id,
|
||||
data: {current_checkin_induties_count: current_checkin_induties_count},
|
||||
success: function (result) {
|
||||
if (!result.status) {
|
||||
swal({
|
||||
@@ -1207,9 +1212,10 @@
|
||||
});
|
||||
|
||||
$('#in_duties').on('click', function () {
|
||||
localStorage.setItem('dinning_id',<%= @dining.id %>);
|
||||
var dining_id = "<%= @dining.id %>";
|
||||
var booking_id = "<%= @booking.booking_id rescue "" %>";
|
||||
window.location.href = '/origami/assign_in_duty/'+ booking_id;
|
||||
window.location.href = '/induties/'+ booking_id +'/assign';
|
||||
});
|
||||
|
||||
$('#void').on('click', function () {
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-8">
|
||||
|
||||
<br/>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<label>Dining Name:</label>
|
||||
|
||||
@@ -29,9 +29,17 @@
|
||||
%>
|
||||
<!-- end count function -->
|
||||
<input type="hidden" id="server_mode" value="<%= ENV["SERVER_MODE"] %>">
|
||||
<div class="row m-t--10">
|
||||
<% if request.user_agent.include? "Mobile" %>
|
||||
<div class="row m-t-10" style="margin-left: 0.2rem">
|
||||
<% else %>
|
||||
<div class="row m-t-10">
|
||||
<% end %>
|
||||
<div class="col-lg-5 col-md-5 col-sm-5 div_order_margin">
|
||||
<% if !request.user_agent.include? "Mobile" %>
|
||||
<ul class="nav nav-tabs tab-col-teal <%= @shop.shop_code ? @shop.shop_code : '' %>" role="tablist">
|
||||
<% else %>
|
||||
<ul class="nav nav-tabs tab-col-teal mobile_tab-col-teal <%= @shop.shop_code ? @shop.shop_code : '' %>" role="tablist">
|
||||
<% end %>
|
||||
<li class="nav-item red m-b-5" data-color="#F44336" data-type="pending">
|
||||
<a class="nav-link" data-toggle="tab" href="#pending" role="tab">
|
||||
<p class="num p-t-5">
|
||||
@@ -50,6 +58,7 @@
|
||||
<%= delivered_count %>
|
||||
</p> <%= t :delivering %></a>
|
||||
</li>
|
||||
<% if !request.user_agent.include? "Mobile" %>
|
||||
<li class="nav-item m-b-5" data-color="#03A9F4" data-type="completed" style="background-color: #03A9F4;">
|
||||
<a class="nav-link" data-toggle="tab" href="#completed" role="tab">
|
||||
<p class="num p-t-5">
|
||||
@@ -62,6 +71,7 @@
|
||||
<%= processed_count %>
|
||||
</p> <%= t :processed %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content m-t--10">
|
||||
@@ -334,7 +344,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 div_card_order">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 div_card_order" id="div_card_order">
|
||||
<div class="card m-b-5 p-t-5">
|
||||
<div class="card-header custom-card-header">
|
||||
<table class="table">
|
||||
@@ -355,6 +365,11 @@
|
||||
</div>
|
||||
<div class="card-block custom-card-block">
|
||||
<div id="order-detail-slimscroll" data-height="110">
|
||||
<% if request.user_agent.include? "Mobile" %>
|
||||
<input type="hidden" name="summary_items_mobile" value="true">
|
||||
<%else %>
|
||||
<input type="hidden" name="summary_items_mobile" value="false">
|
||||
<%end %>
|
||||
<table class="table summary-items">
|
||||
<tbody>
|
||||
<!-- <tr>
|
||||
@@ -406,8 +421,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if request.user_agent.include? "Mobile" %>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3" style="margin-right: 0.5rem">
|
||||
<% else %>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3">
|
||||
<% end %>
|
||||
|
||||
<div class="card m-b-5 p-t-5" style="background-color: #E8EAF6">
|
||||
<div class="card-header custom-card-header" style="background-color: #E8EAF6">
|
||||
<table class="table">
|
||||
|
||||
@@ -914,6 +914,8 @@ $(document).ready(function(){
|
||||
show_customer_details(customer_id);
|
||||
|
||||
var dining_id = $(this).attr("data-id");
|
||||
localStorage.setItem('dinning_type','table');
|
||||
localStorage.setItem('customer_id',customer_id);
|
||||
window.location.href = '/origami/table/' + dining_id;
|
||||
});
|
||||
|
||||
@@ -932,6 +934,8 @@ $(document).ready(function(){
|
||||
show_customer_details(customer_id);
|
||||
|
||||
var dining_id = $(this).attr("data-id");
|
||||
localStorage.setItem('dinning_type','room');
|
||||
localStorage.setItem('customer_id',customer_id);
|
||||
window.location.href = '/origami/room/' + dining_id;
|
||||
});
|
||||
|
||||
@@ -1146,6 +1150,8 @@ $('#pay').on('click',function() {
|
||||
});
|
||||
// Bill Request
|
||||
$('#request_bills').click(function() {
|
||||
var current_checkin_induties_count =localStorage.getItem("current_checkin_induties_count");
|
||||
localStorage.removeItem("current_checkin_induties_count");
|
||||
var order_id = $('#save_order_id').attr('data-order');
|
||||
var ajax_url = "/origami/" + order_id + "/request_bills";
|
||||
if(order_id!=undefined && order_id!=null && order_id!=""){
|
||||
@@ -1156,7 +1162,7 @@ $('#request_bills').click(function() {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: ajax_url,
|
||||
// data: 'order_id='+ order_id,
|
||||
data: {current_checkin_induties_count: current_checkin_induties_count},
|
||||
success: function (result) {
|
||||
if (!result.status) {
|
||||
swal({
|
||||
@@ -1367,9 +1373,10 @@ $('#add_invoice').on('click',function(){
|
||||
});
|
||||
|
||||
$('#in_duties').on('click', function () {
|
||||
localStorage.setItem('dinning_id',<%= @room.id %>);
|
||||
var dining_id = "<%= @room.id %>";
|
||||
var booking_id = "<%= @booking.booking_id rescue "" %>";
|
||||
window.location.href = '/origami/assign_in_duty/'+ booking_id;
|
||||
window.location.href = '/induties/'+ booking_id +'/assign';
|
||||
});
|
||||
|
||||
// Ordering
|
||||
|
||||
Reference in New Issue
Block a user