Setup for extra facebook info in table extra info view
This commit is contained in:
@@ -8,6 +8,7 @@ Qsupplier.App.List = DS.Model.extend
|
|||||||
price: attr 'number'
|
price: attr 'number'
|
||||||
table_number: attr 'number'
|
table_number: attr 'number'
|
||||||
table: DS.belongsTo('table', inverse: 'active_list')
|
table: DS.belongsTo('table', inverse: 'active_list')
|
||||||
|
#users: DS.hasMany('user', inverse: 'active_list')
|
||||||
orders: DS.hasMany('order')
|
orders: DS.hasMany('order')
|
||||||
section: DS.belongsTo('section')
|
section: DS.belongsTo('section')
|
||||||
section_id: attr('string')
|
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'}}
|
button{ action closeList table.active_list } class="btn btn-warning btn-small close-list" {{t 'list.close_list'}}
|
||||||
/.table-action-row
|
/.table-action-row
|
||||||
a href="suppliers_table_path(@table)" {{t 'section.tables_view.table_actions.got_to_table'}}
|
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
|
.table-settings
|
||||||
select
|
select
|
||||||
option Round
|
option Round
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
class ListSerializer < Qwaiter::Serializer
|
class ListSerializer < Qwaiter::Serializer
|
||||||
|
# user ids for facebook pictures
|
||||||
embed :ids
|
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
|
def has_active_orders
|
||||||
object.has_active_orders?
|
object.has_active_orders?
|
||||||
|
|||||||
Reference in New Issue
Block a user