20 lines
575 B
JavaScript
20 lines
575 B
JavaScript
App.checkin = App.cable.subscriptions.create('CheckInBookingChannel', {
|
|
// App.messages = App.cable.subscriptions.create('MessagesChannel', {
|
|
|
|
connected: function() {},
|
|
|
|
disconnected: function() {},
|
|
|
|
received: function(data) {
|
|
var hostname = location.hostname.trim();
|
|
if(data.from == "" || hostname == data.from){
|
|
if($('.table_'+data.table.id).hasClass('green')){
|
|
$('.table_'+data.table.id).removeClass('green');
|
|
$('.table_'+data.table.id).addClass('blue');
|
|
}
|
|
$('.new_text_'+data.table.id).removeClass('hide');
|
|
}
|
|
}
|
|
});
|
|
|