add audio for order reservation

This commit is contained in:
phyusin
2018-06-01 17:38:59 +06:30
parent 7c35fa48e0
commit 9f24c56e61
4 changed files with 13 additions and 6 deletions

View File

@@ -8,6 +8,7 @@ App.order_reservation = App.cable.subscriptions.create('OrderReservationChannel'
if(data.from == "" || hostname == data.from){
var shop_code = data.shop_code;
var order = data.data;
var audio = data.audio;
if(order.length > 0){
$('.custom-table.'+shop_code+'_order_reserve_cable tbody').html("");
$("."+shop_code+" > .nav-item.red > a > p.num").text(order.length);
@@ -16,7 +17,7 @@ App.order_reservation = App.cable.subscriptions.create('OrderReservationChannel'
if(key==0){
active_class = "tr-active";
if (typeof audioPlayBackground !== 'undefined' && $.isFunction(audioPlayBackground)) {
audioPlayBackground(shop_code);
audioPlayBackground(shop_code,audio);
}
if (typeof showNewOrderAlert !== 'undefined' && $.isFunction(showNewOrderAlert)) {
showNewOrderAlert(order[key],shop_code);