Save progress
This commit is contained in:
@@ -6,6 +6,7 @@ class Table
|
||||
property :number, type: Fixnum, default: 1
|
||||
property :position_x, type: Float
|
||||
property :position_y, type: Float
|
||||
property :needs_help, type: :boolean
|
||||
|
||||
belongs_to :supplier
|
||||
belongs_to :section
|
||||
@@ -47,9 +48,11 @@ class Table
|
||||
end
|
||||
|
||||
def occupied?
|
||||
return true #testing...
|
||||
return @is_occupied if instance_variable_defined?(:'@is_occupied')
|
||||
@is_occupied = !self.class.database.view(List.active_by_table_id_view(key: id, reduce: true)).zero?
|
||||
end
|
||||
alias occupied occupied?
|
||||
def occupied=(val) end
|
||||
|
||||
def self.enrich_active_list_id(tables)
|
||||
|
||||
Reference in New Issue
Block a user