update today issue
This commit is contained in:
@@ -880,13 +880,24 @@ $(function() {
|
||||
dataType: "json",
|
||||
success:function(result){
|
||||
if (result.status) {
|
||||
console.log(result)
|
||||
if (result.data == null){
|
||||
window.location.href = '/origami/quick_service/pending_order/' + $('#sale_id').text();
|
||||
swal({
|
||||
title: "Please Open Shift !",
|
||||
text: result.status,
|
||||
type: "warning",
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: "Ok",
|
||||
closeOnConfirm: false
|
||||
}, function () {
|
||||
window.location.href = '/origami/quick_service/pending_order/' + $('#sale_id').text();
|
||||
});
|
||||
|
||||
}else{
|
||||
window.location.href = "/origami/sale/"+result.data["sale_id"]+"/"+type+"/payment"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
</div> -->
|
||||
<!-- #END# Search Bar -->
|
||||
<!-- Top Bar -->
|
||||
<%if !request.path_info.include?('second_display') %>
|
||||
<nav class="navbar">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
@@ -81,7 +82,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<%end%>
|
||||
<script type="text/javascript">
|
||||
if((document.getElementById("otherPayment")!=undefined) && (document.getElementById("otherPayment")!=null) && (document.getElementById("otherPayment")!="")){
|
||||
var otherPayment = location.href.split('/')[location.href.split('/').length -1 ];
|
||||
|
||||
@@ -482,6 +482,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<style type="text/css">
|
||||
.fadeInRight{
|
||||
-webkit-animation-duration: 350ms !important;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
jQuery(function(){
|
||||
id = "<%=@menu[0].id%>";
|
||||
|
||||
@@ -189,15 +189,24 @@
|
||||
</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>
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
$(".cashier_view").on('click', function() {
|
||||
window.location.href = '/origami';
|
||||
});
|
||||
|
||||
$(".qs_view").on('click', function() {
|
||||
window.location.href = '/origami/quick_service';
|
||||
document.getElementById('second_view').click();
|
||||
window.location.href = '/origami/quick_service';
|
||||
|
||||
});
|
||||
|
||||
$("#second_view").on('click', function () {
|
||||
var url = $(this).attr("data-href");
|
||||
window.open(url,'_blank');
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -134,7 +134,7 @@
|
||||
<div class="tab-pane dining" id="orders" role="tabpanel">
|
||||
<div class="card-columns">
|
||||
<% @orders.each do |order| %>
|
||||
<div class="card orders red text-white" data-id="<%= order.order_id %>">
|
||||
<div class="card orders <%=(order.status=="new") ? 'blue' : 'red'%> text-white" data-id="<%= order.order_id %>">
|
||||
<div class="card-block">
|
||||
<%
|
||||
order_status = ""
|
||||
@@ -424,7 +424,7 @@
|
||||
<i class="material-icons">reply</i>
|
||||
<%= t("views.btn.back") %>
|
||||
</button>
|
||||
<a href="<%=origami_second_display_index_path%>" target="_blank" id="second_view" class="btn action-btn bg-blue waves-effect" style="height: 45px">Customer View</a>
|
||||
<!-- <a href="<%=origami_second_display_index_path%>" target="_blank" id="second_view" class="btn action-btn bg-blue waves-effect" style="height: 45px">Customer View</a> -->
|
||||
<button type="button" id="add_order" class="btn btn-block bg-blue waves-effect"><%= t("views.btn.add") %> <%= t("views.right_panel.detail.order") %></button>
|
||||
<button type="button" id="survey" class="btn btn-block bg-blue waves-effect"><%= t("views.right_panel.detail.survey") %></button>
|
||||
<% if @dining.status != "available" %>
|
||||
@@ -491,11 +491,11 @@
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="paymentModalLabel">Choose Payment</h4>
|
||||
<h4 class="modal-title" id="paymentModalLabel">Choose Payment Method</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<select class="form-control show-tick payment_method" multiple="true" id="payment_method" >
|
||||
<option value="Cash">Cash</option>
|
||||
<!-- <option value="Cash">Cash</option> -->
|
||||
<option value="Credit">Credit</option>
|
||||
<% @payment_methods.each do |pay| %>
|
||||
<option value="<%= pay.payment_method %>">
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
<div class="tab-pane active" id="orders" role="tabpanel" style="">
|
||||
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
||||
<% @orders.each do |order| %>
|
||||
<div class="card orders red text-white" data-id = "<%= order.order_id %>">
|
||||
<div class="card orders <%=(order.status=="new") ? 'blue' : 'red'%> text-white" data-id = "<%= order.order_id %>">
|
||||
<div class="card-block">
|
||||
<%
|
||||
order_status = ""
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="card">
|
||||
<div class="card-block">
|
||||
<div class="card-text" >
|
||||
<div id="order-detail-slimscroll" data-height="150">
|
||||
<div id="order-detail-slimscroll" data-height="160">
|
||||
<table class="table table-striped second_display_items" id="order-items-table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid" style="margin-top:-65px;">
|
||||
<button type="button" class="hidden" id="s_reload">Reload</button>
|
||||
<div class="slider" id="second_display_slider">
|
||||
<%= render 'slider' %>
|
||||
|
||||
Reference in New Issue
Block a user