Setup for extra facebook info in table extra info view

This commit is contained in:
2014-03-17 11:52:39 +01:00
parent 90316d5b25
commit db37c95e72
4 changed files with 10 additions and 2 deletions
@@ -8,6 +8,7 @@ Qsupplier.App.List = DS.Model.extend
price: attr 'number'
table_number: attr 'number'
table: DS.belongsTo('table', inverse: 'active_list')
#users: DS.hasMany('user', inverse: 'active_list')
orders: DS.hasMany('order')
section: DS.belongsTo('section')
section_id: attr('string')
@@ -0,0 +1,4 @@
attr = DS.attr
Qsupplier.App.User= DS.Model.extend
uid: attr 'string'
#active_list: DS.belongsTo('list')
@@ -13,7 +13,9 @@ div class="table-actions table-actions-#{unbound table.id}"
button{ action closeList table.active_list } class="btn btn-warning btn-small close-list" {{t 'list.close_list'}}
/.table-action-row
a href="suppliers_table_path(@table)" {{t 'section.tables_view.table_actions.got_to_table'}}
if editmode
each user in table.active_list.users
img src="http://graph.facebook.com/#{user.uid}/picture?type=square"
if editmode_beta
.table-settings
select
option Round
+2 -1
View File
@@ -1,6 +1,7 @@
class ListSerializer < Qwaiter::Serializer
# user ids for facebook pictures
embed :ids
attributes :state, :needs_help, :needs_payment, :is_paid, :price, :table_id, :table_number, :section_id, :has_active_orders
attributes :state, :needs_help, :needs_payment, :is_paid, :price, :table_id, :table_number, :section_id, :has_active_orders, :user_ids
def has_active_orders
object.has_active_orders?