Style upgrades and emberified supplier lists
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
class SupplierListSerializer < Qwaiter::Serializer
|
||||
# user ids for facebook pictures
|
||||
self.root = :list
|
||||
embed :ids, include: true
|
||||
attributes :extended_version, :state, :needs_help, :needs_payment, :user_requests_closing, :is_paid, :price,
|
||||
:table_id, :table_number, :section_id, :user_ids, :supplier_id, :closed_at
|
||||
has_many :orders
|
||||
#has_many :product_categories
|
||||
has_one :table, serializer: SupplierTableSerializer
|
||||
has_many :join_requests
|
||||
has_many :users, serializer: SupplierUserSerializer
|
||||
|
||||
#def has_active_orders
|
||||
#object.has_active_orders?
|
||||
#end
|
||||
def extended_version
|
||||
true
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user