Pull from master

This commit is contained in:
San Wai Lwin
2018-05-22 13:26:23 +06:30
parent 574f320dfd
commit f1733d9f06
71 changed files with 1151 additions and 726 deletions

View File

@@ -3,7 +3,12 @@ App.order = App.cable.subscriptions.create('OrderChannel', {
disconnected: function() {},
received: function(data) {
received: function(data) {
var hostname = location.hostname.trim();
console.log(hostname)
console.log(data.from)
if(data.from == "" || hostname == data.from)
{
if (data.type == 'order') {
$('.table_'+data.table.id).removeClass('green');
$('.table_'+data.table.id).addClass('blue');
@@ -14,6 +19,7 @@ App.order = App.cable.subscriptions.create('OrderChannel', {
$('.new_text_'+data.table.id).html('');
$('.new_text_'+data.table.id).removeClass('hide')
}
}
}
});