Files
sx-fc/app/assets/javascripts/channels/check_in_booking.js
2018-05-21 16:57:32 +06:30

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');
}
}
});