menu ui update

This commit is contained in:
Yan
2017-08-16 18:26:30 +06:30
parent e791ce8809
commit 0eee1fd0af
19 changed files with 260 additions and 96 deletions

View File

@@ -3,14 +3,14 @@ class MenuItem < ApplicationRecord
belongs_to :menu_category, :optional => true
has_many :menu_item_instances
belongs_to :parent, :class_name => "MenuItem", foreign_key: "menu_item_id", :optional => true
has_many :children, :class_name => "MenuItem", foreign_key: "menu_item_id"
# belongs_to :parent, :class_name => "MenuItem", foreign_key: "menu_item_id", :optional => true
# has_many :children, :class_name => "MenuItem", foreign_key: "menu_item_id"
belongs_to :account
has_many :menu_item_sets
has_many :item_sets, through: :menu_item_sets
validates_presence_of :name, :type, :min_qty, :taxable, :min_selectable_item, :max_selectable_item
validates_presence_of :name, :type, :min_qty, :taxable
default_scope { order('item_code asc') }