Pull from master
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
<span class="main_menu" id="main_menu menu_name" >
|
||||
<%if @menu.present? %>
|
||||
<%=menu[0].name%>
|
||||
<%=@menus[0].name%>
|
||||
<% end%>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<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>
|
||||
@@ -208,23 +211,32 @@
|
||||
<input type="hidden" name="server_mode" value="<%=ENV["SERVER_MODE"]%>" id="server_mode">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#loading_wrapper").show();
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: 'get_all_menu',
|
||||
data: {},
|
||||
success:function(result){
|
||||
localStorage.setItem("menus", JSON.stringify(result));
|
||||
|
||||
var menu = localStorage.getItem("menus");
|
||||
|
||||
if (menu != null ) {
|
||||
$( "#loading_wrapper").hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(".cashier_view").on('click', function() {
|
||||
window.location.href = '/origami';
|
||||
});
|
||||
|
||||
$(".qs_view").on('click', function() {
|
||||
if ($('#server_mode').val() != "cloud") {
|
||||
if ($('#server_mode').val() != "cloud") {
|
||||
document.getElementById('second_view').click();
|
||||
}
|
||||
}
|
||||
window.location.href = '/origami/quick_service';
|
||||
});
|
||||
|
||||
|
||||
@@ -1010,7 +1010,13 @@
|
||||
|
||||
$('#add_order').on('click', function () {
|
||||
var dining_id = "<%= @dining.id %>";
|
||||
|
||||
var menus = JSON.parse(localStorage.getItem("menus"));
|
||||
// if (menus != null) {
|
||||
// console.log("menu");
|
||||
// menu_cache_append(menus);
|
||||
// }else{
|
||||
// $("#menu_data").removeClass("hidden");
|
||||
// }
|
||||
window.location.href = '/origami/addorders/' + dining_id;
|
||||
});
|
||||
|
||||
|
||||
@@ -463,11 +463,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="<%= @shop.shop_code ? @shop.shop_code : '' %>_doemal_new_order"></div>
|
||||
<!-- <div id="<%= @shop.shop_code ? @shop.shop_code : '' %>_doemal_new_order"></div>
|
||||
<div id="<%= @shop.shop_code ? @shop.shop_code : '' %>_notify_new_order"></div>
|
||||
<div id="<%= @shop.shop_code ? @shop.shop_code : '' %>_notify_order_send_to_kitchen"></div>
|
||||
<div id="<%= @shop.shop_code ? @shop.shop_code : '' %>_notify_order_ready_to_delivery"></div>
|
||||
<div id="<%= @shop.shop_code ? @shop.shop_code : '' %>_notify_order_ready_to_delivery"></div> -->
|
||||
</div>
|
||||
|
||||
<p id="ref_no" class="hidden"></p>
|
||||
@@ -584,7 +583,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="modal fade text-center" id="<%= @shop.shop_code ? @shop.shop_code : '' %>_doemal_new_order" tabindex="-1" role="dialog">
|
||||
<div class="modal fade text-center" id="<%= @shop.shop_code ? @shop.shop_code : '' %>_doemal_new_order" tabindex="-1" role="dialog">
|
||||
>>>>>>> 8fda04372d3c2d7255bbd4c14ed3b3c8d9f5937e
|
||||
<div class="modal-dialog modal-md" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
@@ -598,7 +598,7 @@
|
||||
<div class="modal-footer ">
|
||||
<div class="row p-r-20">
|
||||
<div class="col-md-5">
|
||||
<button type="button" class="btn btn-link p-t-5 p-b-5 bg-blue waves-effect new_order_close" data-value="<%= @shop.shop_code ? @shop.shop_code : '' %>" data-dismiss="modal">CLOSE</button>
|
||||
<button type="button" class="btn btn-link p-t-5 p-b-5 bg-blue new_order_close" data-value="<%= @shop.shop_code ? @shop.shop_code : '' %>"data-dismiss="modal">CLOSE</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -620,7 +620,7 @@
|
||||
<div class="modal-footer ">
|
||||
<div class="row p-r-20">
|
||||
<div class="col-md-5">
|
||||
<button type="button" class="btn btn-link p-t-5 p-b-5 bg-blue waves-effect" data-dismiss="modal">CLOSE</button>
|
||||
<button type="button" class="btn btn-link p-t-5 p-b-5 bg-blue" data-dismiss="modal">CLOSE</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -642,7 +642,7 @@
|
||||
<div class="modal-footer ">
|
||||
<div class="row p-r-20">
|
||||
<div class="col-md-5">
|
||||
<button type="button" class="btn btn-link p-t-5 p-b-5 bg-blue waves-effect" data-dismiss="modal">CLOSE</button>
|
||||
<button type="button" class="btn btn-link p-t-5 p-b-5 bg-blue" data-dismiss="modal">CLOSE</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -664,11 +664,11 @@
|
||||
<div class="modal-footer ">
|
||||
<div class="row p-r-20">
|
||||
<div class="col-md-5">
|
||||
<button type="button" class="btn btn-link p-t-5 p-b-5 bg-blue waves-effect" data-dismiss="modal">CLOSE</button>
|
||||
<button type="button" class="btn btn-link p-t-5 p-b-5 bg-blue" data-dismiss="modal">CLOSE</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
@@ -633,33 +633,33 @@ var customer_name = "<%= @customer.name %>";
|
||||
|
||||
$('#pay').click(function() {
|
||||
sub_total = $('#sub-total').text();
|
||||
if (payment_type == 'MPU' && $('.mpu').text() == 0 && sub_total != 0.0) {
|
||||
if (parseInt(jQuery.inArray("MPU", payment_type)) != -1 && $('.mpu').text() == 0 && sub_total != 0.0) {
|
||||
swal("Oops","Please Pay with MPU Payment","warning");
|
||||
}else if(payment_type == "Redeem" && $('#ppamount').text()==0 && sub_total != 0.0){
|
||||
}else if(parseInt(jQuery.inArray("Redeem", payment_type)) != -1 && $('#ppamount').text()==0 && sub_total != 0.0){
|
||||
swal("Oops","Please Pay with Redeem Payment","warning");
|
||||
}else if(payment_type == "VISA" && $('#visacount').text()==0 && sub_total != 0.0){
|
||||
}else if(parseInt(jQuery.inArray("VISA", payment_type)) != -1 && $('#visacount').text()==0 && sub_total != 0.0){
|
||||
swal("Oops","Please Pay with Visa Payment","warning");
|
||||
|
||||
}else if(payment_type == "JCB" && $('#jcbcount').text()==0 && sub_total != 0.0){
|
||||
}else if(parseInt(jQuery.inArray("JCB", payment_type)) != -1 && $('#jcbcount').text()==0 && sub_total != 0.0){
|
||||
swal("Oops","Please Pay with jcb Payment","warning");
|
||||
}
|
||||
else if(payment_type == "Master" && $('#mastercount').text()==0 && sub_total != 0.0){
|
||||
else if(parseInt(jQuery.inArray("Master", payment_type)) != -1 && $('#mastercount').text()==0 && sub_total != 0.0){
|
||||
swal("Oops","Please Pay with Master Payment","warning");
|
||||
}
|
||||
else if(payment_type == "UNIONPAY" && $('#unionpaycount').text()==0 && sub_total != 0.0){
|
||||
swal("Oops","Please Pay with UNIONPAY Payment","warning");
|
||||
}
|
||||
else if(payment_type == "Alipay" && $('#alipaycount').text()==0 && sub_total != 0.0){
|
||||
else if(parseInt(jQuery.inArray("Alipay", payment_type)) != -1 && $('#alipaycount').text()==0 && sub_total != 0.0){
|
||||
swal("Oops","Please Pay with Alipay Payment","warning");
|
||||
}
|
||||
else if(payment_type == "JUNCTIONPAY" && $('#junctionpaycount').text()==0 && sub_total != 0.0){
|
||||
else if(parseInt(jQuery.inArray("JUNCTIONPAY", payment_type)) != -1 != -1 && $('#junctionpaycount').text()==0 && sub_total != 0.0){
|
||||
swal("Oops","Please Pay with JUNCTIONPAY Payment","warning");
|
||||
}
|
||||
else if(payment_type == "Credit" && $('#credit').text()==0 && sub_total != 0.0){
|
||||
swal("Oops","Please Pay with Credit Payment","warning");
|
||||
}else if(payment_type == "PAYMAL" && $('#paymalcount').text()==0 && sub_total != 0.0){
|
||||
}else if(parseInt(jQuery.inArray("PAYMAL", payment_type)) != -1 && $('#paymalcount').text()==0 && sub_total != 0.0){
|
||||
swal("Oops","Please Pay with Paymal Payment","warning");
|
||||
}else if(payment_type == "DINGA" && $('#dingacount').text()==0 && sub_total != 0.0){
|
||||
}else if(parseInt(jQuery.inArray("DINGA", payment_type)) != -1 && $('#dingacount').text()==0 && sub_total != 0.0){
|
||||
swal("Oops","Please Pay with Dinga Payment","warning");
|
||||
}else{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user