update action cable and other bugs

This commit is contained in:
Aung Myo
2018-05-21 13:00:55 +06:30
parent e722ab88e9
commit 7e8b69aa7c
26 changed files with 749 additions and 537 deletions

View File

@@ -6,6 +6,9 @@ App.order = App.cable.subscriptions.create('CheckinChannel', {
disconnected: function() {},
received: function(data) {
var hostname = location.hostname.trim();
if(data.from == "" || hostname == data.from)
{
$.each(data.table,function(key,value){
if($('.table_'+value.table_id).hasClass('blue')){
$('.table_'+value.table_id).removeClass('blue');
@@ -22,5 +25,6 @@ App.order = App.cable.subscriptions.create('CheckinChannel', {
$('.new_text_'+value.table_id).removeClass('hide');
});
}
}
});