change action cable issue for quick service

This commit is contained in:
phyusin
2018-05-31 10:29:38 +06:30
parent 6472dbeacb
commit c1961720c8
7 changed files with 73 additions and 33 deletions

View File

@@ -33,7 +33,10 @@
</div>
<div class="row p-l-5 p-r-5">
<div class="col-lg-6 col-md-6 col-sm-6"><strong>Customer :</strong> <span id="customer_name"> <%= @sale_data.customer.name%></span> <span class="hidden" id="membership_id"><%= @sale_data.customer.membership_id%></span>
<div class="col-lg-6 col-md-6 col-sm-6">
<strong>Customer :</strong>
<button type="button" class="btn bg-info waves-effect" id='customer_name'><%= @sale_data.customer.name%></button>
<span class="hidden" id="membership_id"><%= @sale_data.customer.membership_id%></span>
<span class="hidden" id="member_discount"><%= @member_discount%></span></div>
<div class="col-lg-6 col-md-6 col-sm-6 text-left"><strong>Checkin Time : </strong> <%if !@checkin_time.nil?%><%= @checkin_time.utc.getlocal.strftime("%I:%M %p") %>
<%end%></div>
@@ -624,12 +627,6 @@ var customer_id = "<%= @customer.id %>";
var customer_name = "<%= @customer.name %>";
$(document).ready(function(){
setHeaderBreadCrumb(_PAYMENTS_);
//start customer modal popup
if((cashier_type=='quick_service') && (customer_id!=undefined) && (customer_id!=null) && (customer_id!="")){
// if((customer_id == 'CUS-000000000001') && (customer_name == 'WALK-IN')){
$("#is_memberModal").modal({show : true, backdrop: false, keyboard : false});
// }
}
/* start check first bill or not*/
var member_id = $('#membership_id').text();
@@ -1489,4 +1486,14 @@ var customer_name = "<%= @customer.name %>";
$(".change_tax").hide();
}
}
/* customer light-box */
$("#customer_name").on("click",function(){
//start customer modal popup
if((cashier_type=='quick_service') && (customer_id!=undefined) && (customer_id!=null) && (customer_id!="")){
// if((customer_id == 'CUS-000000000001') && (customer_name == 'WALK-IN')){
$("#is_memberModal").modal({show : true, backdrop: false, keyboard : false});
// }
}
});
</script>

View File

@@ -237,7 +237,7 @@ $(document).ready(function(){
swal("Information!", result.error_message);
}
else {
window.location.href = '/origami/quick_service/pending_order';
window.location.href = '/origami/sale/'+result.data+'/quick_service/payment';
}
}
});