Upgrades and fixes, maintenance

This commit is contained in:
2014-06-09 19:07:46 +02:00
parent 78a894759b
commit 0e4993e8a6
23 changed files with 87 additions and 57 deletions
+3 -3
View File
@@ -200,7 +200,7 @@ class List
def move_to_table! to_table
UserTableMove.create list: self, from_table_id: table_id, to_table: to_table
from_table = self.table_id.try(:dup)
from_table_id = self.table_id.try(:dup)
self.table = to_table
self.section_id = to_table.section_id
if save
@@ -210,8 +210,8 @@ class List
order.save
end
# user performs a client side refresh
broadcast_users 'list_changed_table', list_id: id #, from_table_id: from_table, to_table_id: to_table.id
broadcast_supplier supplier_id, 'list_changed_table', ListSerializer.new(list).as_json
broadcast_users 'list_changed_table', list_id: id, from_table_id: from_table_id, to_table_id: to_table.id
broadcast_supplier supplier_id, 'list_changed_table', ListSerializer.new(self).as_json
end
end
+1 -1
View File
@@ -119,7 +119,7 @@ class Supplier
end
def self.reset_counters!
# Set all known counters to zero
Qwaiter::Couchbase.design_doc('supplier').counters(reduce: false).each{|counter| Qwaiter::Counter.set counter.key, 0}
spec = Order.by_supplier_id_and_state(reduce: true, group_level: 2)