Ember temp commit
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
class ListSerializer < Qwaiter::Serializer
|
||||
embed :ids
|
||||
attributes :state, :needs_help, :needs_payment, :is_paid, :price, :table_id, :table_number
|
||||
end
|
||||
@@ -0,0 +1,4 @@
|
||||
class OrderSerializer < Qwaiter::Serializer
|
||||
embed :ids
|
||||
attributes :state, :list_id
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class SectionSerializer < Qwaiter::Serializer
|
||||
embed :ids, include: true
|
||||
attributes *%i[title path width height]
|
||||
has_many :tables
|
||||
end
|
||||
@@ -0,0 +1,7 @@
|
||||
class TableSerializer < Qwaiter::Serializer
|
||||
attributes(*%i[number width height position_x position_y section_id occupied active_list_id])
|
||||
|
||||
def occupied
|
||||
object.active_list_id.present?
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user