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

@@ -1,4 +1,3 @@
class CreateMenuItems < ActiveRecord::Migration[5.1]
def change
create_table :menu_items do |t|
@@ -10,12 +9,16 @@ class CreateMenuItems < ActiveRecord::Migration[5.1]
t.string :information
t.string :type, :null => false, :default => "SimpleMenuItem"
t.references :menu_category, foreign_key: true
t.references :menu_item, foreign_key: true
t.json :item_attributes
t.json :item_options
# t.references :menu_item, foreign_key: true
t.references :account, foreign_key: true
t.integer :min_qty, :null => false, :default => 1
t.boolean :taxable, :null => false, :default => true
t.integer :min_selectable_item, :null => false, :default => 1
t.integer :max_selectable_item, :null => false, :default => 1
t.boolean :is_sub_item, :null => false, :default => false
t.boolean :is_available, :null => false, :default => true
# t.integer :min_selectable_item, :null => false, :default => 1
# t.integer :max_selectable_item, :null => false, :default => 1
t.string :created_by
t.timestamps

View File

@@ -3,11 +3,7 @@ class CreatePrintSettings < ActiveRecord::Migration[5.1]
create_table :print_settings do |t|
t.string :name, :null => false
t.string :unique_code, :null => false
t.string :template
t.string :db_name
t.string :db_type
t.string :db_username
t.string :db_password
t.string :template
t.string :printer_name, :null => false
t.string :api_settings
t.decimal :page_width, :null => false, :default => 200

View File

@@ -1,8 +0,0 @@
class RemoveDBcolsFromPrintSettings < ActiveRecord::Migration[5.1]
def change
remove_column :print_settings, :db_name, :string
remove_column :print_settings, :db_type, :string
remove_column :print_settings, :db_username, :string
remove_column :print_settings, :db_password, :string
end
end