Implement waiter ordering and improvements

This commit is contained in:
2014-03-24 10:02:57 +01:00
parent 474d5f88c6
commit 6c2427e082
24 changed files with 128 additions and 48 deletions
+1 -1
View File
@@ -8,11 +8,11 @@ class Order
belongs_to :user
belongs_to :supplier
belongs_to :section
belongs_to :employee
has_many :product_orders, dependent: :destroy
#has_many :products, through: :product_orders
validates :supplier_id, presence: true
validates :user_id, presence: true
view :active_for_supplier_view, type: :custom, map_function: %[function(doc){
if(doc.ruby_class == 'Order' && (doc.state == 'placed' || doc.state == 'active')){