better broadcasting for user
This commit is contained in:
@@ -30,6 +30,15 @@ root.Qsupplier=
|
||||
$('#order-in-process-button-'+e.data.id).hide()
|
||||
else if e.event == 'order_being_delivered'
|
||||
$('#order-row-'+e.data.id).remove()
|
||||
else if e.event == 'list_changed_table'
|
||||
list_row = $('#list-row-'+e.data.list_id)
|
||||
list_row.find('.table_number').text(e.data.table.number).addClass('changed')
|
||||
list_row.find('.section_title').text(e.data.section_title)
|
||||
order_rows = $('.of-list-'+e.data.list_id)
|
||||
order_rows.find('.table_number').text(e.data.table.number).addClass('changed')
|
||||
order_rows.find('.section_title').text(e.data.section_title)
|
||||
|
||||
|
||||
console.log(e)
|
||||
false
|
||||
move_table_to_active_section: (table_id)->
|
||||
|
||||
@@ -52,7 +52,7 @@ var $translations = {
|
||||
content: 'Request a waiter to your table'
|
||||
},
|
||||
list_needs_payment: {
|
||||
payment_already_requested: 'You already asked for the check',
|
||||
payment_already_requested: 'You already asked for the bill',
|
||||
title: 'Ask for the check',
|
||||
content: 'Do you want to pay?'
|
||||
},
|
||||
|
||||
@@ -22,6 +22,16 @@ class Quser
|
||||
$('#order-row-'+e.data.id).addClass('active')
|
||||
if(e.event == 'order_being_delivered')
|
||||
$('#order-row-'+e.data.id).addClass('delivered')
|
||||
if(e.event == 'list_changed_table')
|
||||
$('.table-number').text(e.data.table.number)
|
||||
if(e.event == 'list_needs_help')
|
||||
window.active_list.needs_help = true
|
||||
@list_needs_help_default_action()
|
||||
if(e.event == 'list_needs_payment')
|
||||
window.active_list.needs_payment = true
|
||||
@list_needs_payment_default_action()
|
||||
|
||||
console.log(e)
|
||||
false
|
||||
home_loader: ->
|
||||
$.getJSON(data_host + '/user/list_info.json?' + authentication_string, (res) => @handle_active_list_default_actions(res))
|
||||
|
||||
Reference in New Issue
Block a user