diff --git a/db/migrate/20140831000001_create_object_manager.rb b/db/migrate/20140831000001_create_object_manager.rb index 2d743033c..9ef97dc2d 100644 --- a/db/migrate/20140831000001_create_object_manager.rb +++ b/db/migrate/20140831000001_create_object_manager.rb @@ -21,26 +21,22 @@ class CreateObjectManager < ActiveRecord::Migration t.column :updated_by_id, :integer, :null => false t.timestamps end - add_index :object_manager_attributes, [:name], :unique => true + add_index :object_manager_attributes, [:object_lookup_id, :name], :unique => true add_index :object_manager_attributes, [:object_lookup_id] ObjectManager::Attribute.add( :object => 'Ticket', :name => 'customer_id', :display => 'Customer', - :data_type => 'autocompletion', + :data_type => 'user_autocompletion', :data_option => { - :relation => 'User', :autocapitalize => false, - :multiple => false, - :null => false, - :limit => 200, - :placeholder => 'Enter Person or Organisation/Company', - :help => 'Select the customer of the Ticket or create one.', - :helpLink => '»', - :minLengt => 2, - :translate => false, - :source => '#{@apiPath}/users/search', + :multiple => false, + :null => false, + :limit => 200, + :placeholder => 'Enter Person or Organisation/Company', + :minLengt => 2, + :translate => false, }, :editable => false, :active => true, @@ -58,7 +54,6 @@ class CreateObjectManager < ActiveRecord::Migration :updated_by_id => 1, ) - ObjectManager::Attribute.add( :object => 'Ticket', :name => 'type', @@ -456,9 +451,9 @@ class CreateObjectManager < ActiveRecord::Migration :object => 'TicketArticle', :name => 'body', :display => 'Text', - :data_type => 'textarea', + :data_type => 'richtext', :data_option => { - :type => 'text', + :type => 'textonly', :maxlength => 20000, :upload => true, :rows => 8, @@ -487,525 +482,6 @@ class CreateObjectManager < ActiveRecord::Migration :updated_by_id => 1, ) - ObjectManager::Attribute.add( - :object => 'User', - :name => 'login', - :display => 'Login', - :data_type => 'input', - :data_option => { - :type => 'text', - :maxlength => 100, - :null => true, - :autocapitalize => false, - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => {}, - }, - :pending_migration => false, - :position => 100, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'firstname', - :display => 'Firstname', - :data_type => 'input', - :data_option => { - :type => 'text', - :maxlength => 150, - :null => false, - }, - :editable => false, - :active => true, - :screens => { - :signup => { - '-all-' => { - :null => false, - }, - }, - :invite_agent => { - '-all-' => { - :null => false, - }, - }, - :edit => { - '-all-' => { - :null => false, - }, - }, - }, - :pending_migration => false, - :position => 200, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'lastname', - :display => 'Lastname', - :data_type => 'input', - :data_option => { - :type => 'text', - :maxlength => 150, - :null => false, - }, - :editable => false, - :active => true, - :screens => { - :signup => { - '-all-' => { - :null => false, - }, - }, - :invite_agent => { - '-all-' => { - :null => false, - }, - }, - :edit => { - '-all-' => { - :null => false, - }, - }, - }, - :pending_migration => false, - :position => 300, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'email', - :display => 'Email', - :data_type => 'input', - :data_option => { - :type => 'email', - :maxlength => 150, - :null => false, - }, - :editable => false, - :active => true, - :screens => { - :signup => { - '-all-' => { - :null => false, - }, - }, - :invite_agent => { - '-all-' => { - :null => false, - }, - }, - :edit => { - '-all-' => { - :null => false, - }, - }, - }, - :pending_migration => false, - :position => 400, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'web', - :display => 'Web', - :data_type => 'input', - :data_option => { - :type => 'url', - :maxlength => 250, - :null => true, - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - '-all-' => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 500, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'phone', - :display => 'Phone', - :data_type => 'input', - :data_option => { - :type => 'phone', - :maxlength => 100, - :null => true, - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - '-all-' => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 600, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'mobile', - :display => 'Mobile', - :data_type => 'input', - :data_option => { - :type => 'phone', - :maxlength => 100, - :null => true, - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - '-all-' => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 700, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'fax', - :display => 'Fax', - :data_type => 'input', - :data_option => { - :type => 'phone', - :maxlength => 100, - :null => true, - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - '-all-' => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 800, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'organization_id', - :display => 'Organization', - :data_type => 'select', - :data_option => { - :multiple => false, - :nulloption => true, - :null => true, - :relation => 'Organization', - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - '-all-' => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 900, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'department', - :display => 'Department', - :data_type => 'input', - :data_option => { - :type => 'text', - :maxlength => 200, - :null => true, - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - '-all-' => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 1000, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'street', - :display => 'Street', - :data_type => 'input', - :data_option => { - :type => 'text', - :maxlength => 100, - :null => true, - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - '-all-' => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 1100, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'zip', - :display => 'Zip', - :data_type => 'input', - :data_option => { - :type => 'text', - :maxlength => 100, - :null => true, - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - '-all-' => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 1200, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'city', - :display => 'City', - :data_type => 'input', - :data_option => { - :type => 'text', - :maxlength => 100, - :null => true, - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - '-all-' => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 1300, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'password', - :display => 'Password', - :data_type => 'input', - :data_option => { - :type => 'password', - :maxlength => 100, - :null => true, - :autocomplete => 'off', - }, - :editable => false, - :active => true, - :screens => { - :signup => { - '-all-' => { - :null => true, - }, - }, - :invite_agent => {}, - :edit => { - :Admin => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 1400, - :created_by_id => 1, - :updated_by_id => 1, - ) - - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'note', - :display => 'Note', - :data_type => 'textarea', - :data_option => { - :type => 'text', - :maxlength => 250, - :null => true, - :note => 'Notes are visible to agents only, never to customers.', - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - '-all-' => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 1500, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'role_ids', - :display => 'Roles', - :data_type => 'checkbox', - :data_option => { - :multiple => true, - :null => false, - :relation => 'Role', - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - :Admin => { - :null => false, - }, - }, - }, - :pending_migration => false, - :position => 1600, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'group_ids', - :display => 'Groups', - :data_type => 'checkbox', - :data_option => { - :multiple => true, - :null => true, - :relation => 'Group', - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => { - '-all-' => { - :null => false, - }, - }, - :edit => { - :Admin => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 1700, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'active', - :display => 'Active', - :data_type => 'boolean', - :data_option => { - :maxlength => 250, - :null => true, - :default => true, - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - :Admin => { - :null => false, - }, - }, - }, - :pending_migration => false, - :position => 1800, - :created_by_id => 1, - :updated_by_id => 1, - ) - end def down diff --git a/db/migrate/20140919000001_update_object_manager2.rb b/db/migrate/20140919000001_update_object_manager2.rb deleted file mode 100644 index 6380f05c6..000000000 --- a/db/migrate/20140919000001_update_object_manager2.rb +++ /dev/null @@ -1,38 +0,0 @@ -class UpdateObjectManager2 < ActiveRecord::Migration - def up - - ObjectManager::Attribute.add( - :object => 'Ticket', - :name => 'customer_id', - :display => 'Customer', - :data_type => 'user_autocompletion', - :data_option => { - :autocapitalize => false, - :multiple => false, - :null => false, - :limit => 200, - :placeholder => 'Enter Person or Organisation/Company', - :minLengt => 2, - :translate => false, - }, - :editable => false, - :active => true, - :screens => { - :create_top => { - :Agent => { - :null => false, - }, - }, - :edit => {}, - }, - :pending_migration => false, - :position => 10, - :created_by_id => 1, - :updated_by_id => 1, - ) - - end - - def down - end -end diff --git a/db/migrate/20140925000001_update_object_manager3.rb b/db/migrate/20140925000001_update_object_manager3.rb deleted file mode 100644 index 8f5dfe3bd..000000000 --- a/db/migrate/20140925000001_update_object_manager3.rb +++ /dev/null @@ -1,32 +0,0 @@ -class UpdateObjectManager3 < ActiveRecord::Migration - def up - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'login', - :display => 'Login', - :data_type => 'input', - :data_option => { - :type => 'text', - :maxlength => 100, - :null => true, - :autocapitalize => false, - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => {}, - }, - :pending_migration => false, - :position => 100, - :created_by_id => 1, - :updated_by_id => 1, - ) - - end - - def down - end -end diff --git a/db/migrate/20141002000001_update_object_manager4.rb b/db/migrate/20141002000001_update_object_manager4.rb deleted file mode 100644 index 466fd8f1a..000000000 --- a/db/migrate/20141002000001_update_object_manager4.rb +++ /dev/null @@ -1,43 +0,0 @@ -class UpdateObjectManager4 < ActiveRecord::Migration - def up - - ObjectManager::Attribute.add( - :object => 'TicketArticle', - :name => 'body', - :display => 'Text', - :data_type => 'richtext', - :data_option => { - :type => 'textonly', - :maxlength => 20000, - :upload => true, - :rows => 8, - :null => true, - }, - :editable => false, - :active => true, - :screens => { - :create_top => { - '-all-' => { - :null => false, - }, - }, - :edit => { - :Agent => { - :null => true, - }, - :Customer => { - :null => false, - }, - }, - }, - :pending_migration => false, - :position => 600, - :created_by_id => 1, - :updated_by_id => 1, - ) - - end - - def down - end -end diff --git a/db/migrate/20141009000001_update_object_manager5.rb b/db/migrate/20141009000001_update_object_manager5.rb deleted file mode 100644 index bf0dd82c4..000000000 --- a/db/migrate/20141009000001_update_object_manager5.rb +++ /dev/null @@ -1,540 +0,0 @@ -class UpdateObjectManager5 < ActiveRecord::Migration - def up - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'login', - :display => 'Login', - :data_type => 'input', - :data_option => { - :type => 'text', - :maxlength => 100, - :null => true, - :autocapitalize => false, - :item_class => 'formGroup--halfSize', - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => {}, - }, - :pending_migration => false, - :position => 100, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'firstname', - :display => 'Firstname', - :data_type => 'input', - :data_option => { - :type => 'text', - :maxlength => 150, - :null => false, - :item_class => 'formGroup--halfSize', - }, - :editable => false, - :active => true, - :screens => { - :signup => { - '-all-' => { - :null => false, - }, - }, - :invite_agent => { - '-all-' => { - :null => false, - }, - }, - :edit => { - '-all-' => { - :null => false, - }, - }, - }, - :pending_migration => false, - :position => 200, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'lastname', - :display => 'Lastname', - :data_type => 'input', - :data_option => { - :type => 'text', - :maxlength => 150, - :null => false, - :item_class => 'formGroup--halfSize', - }, - :editable => false, - :active => true, - :screens => { - :signup => { - '-all-' => { - :null => false, - }, - }, - :invite_agent => { - '-all-' => { - :null => false, - }, - }, - :edit => { - '-all-' => { - :null => false, - }, - }, - }, - :pending_migration => false, - :position => 300, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'email', - :display => 'Email', - :data_type => 'input', - :data_option => { - :type => 'email', - :maxlength => 150, - :null => false, - :item_class => 'formGroup--halfSize', - }, - :editable => false, - :active => true, - :screens => { - :signup => { - '-all-' => { - :null => false, - }, - }, - :invite_agent => { - '-all-' => { - :null => false, - }, - }, - :edit => { - '-all-' => { - :null => false, - }, - }, - }, - :pending_migration => false, - :position => 400, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'web', - :display => 'Web', - :data_type => 'input', - :data_option => { - :type => 'url', - :maxlength => 250, - :null => true, - :item_class => 'formGroup--halfSize', - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - '-all-' => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 500, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'phone', - :display => 'Phone', - :data_type => 'input', - :data_option => { - :type => 'phone', - :maxlength => 100, - :null => true, - :item_class => 'formGroup--halfSize', - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - '-all-' => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 600, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'mobile', - :display => 'Mobile', - :data_type => 'input', - :data_option => { - :type => 'phone', - :maxlength => 100, - :null => true, - :item_class => 'formGroup--halfSize', - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - '-all-' => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 700, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'fax', - :display => 'Fax', - :data_type => 'input', - :data_option => { - :type => 'phone', - :maxlength => 100, - :null => true, - :item_class => 'formGroup--halfSize', - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - '-all-' => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 800, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'organization_id', - :display => 'Organization', - :data_type => 'select', - :data_option => { - :multiple => false, - :nulloption => true, - :null => true, - :relation => 'Organization', - :item_class => 'formGroup--halfSize', - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - '-all-' => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 900, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'department', - :display => 'Department', - :data_type => 'input', - :data_option => { - :type => 'text', - :maxlength => 200, - :null => true, - :item_class => 'formGroup--halfSize', - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - '-all-' => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 1000, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'street', - :display => 'Street', - :data_type => 'input', - :data_option => { - :type => 'text', - :maxlength => 100, - :null => true, - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - '-all-' => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 1100, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'zip', - :display => 'Zip', - :data_type => 'input', - :data_option => { - :type => 'text', - :maxlength => 100, - :null => true, - :item_class => 'formGroup--halfSize', - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - '-all-' => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 1200, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'city', - :display => 'City', - :data_type => 'input', - :data_option => { - :type => 'text', - :maxlength => 100, - :null => true, - :item_class => 'formGroup--halfSize', - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - '-all-' => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 1300, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'password', - :display => 'Password', - :data_type => 'input', - :data_option => { - :type => 'password', - :maxlength => 100, - :null => true, - :autocomplete => 'off', - }, - :editable => false, - :active => true, - :screens => { - :signup => { - '-all-' => { - :null => false, - }, - }, - :invite_agent => {}, - :edit => { - :Admin => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 1400, - :created_by_id => 1, - :updated_by_id => 1, - ) - - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'note', - :display => 'Note', - :data_type => 'textarea', - :data_option => { - :type => 'text', - :maxlength => 250, - :null => true, - :note => 'Notes are visible to agents only, never to customers.', - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - '-all-' => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 1500, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'role_ids', - :display => 'Roles', - :data_type => 'checkbox', - :data_option => { - :multiple => true, - :null => false, - :relation => 'Role', - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - :Admin => { - :null => false, - }, - }, - }, - :pending_migration => false, - :position => 1600, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'group_ids', - :display => 'Groups', - :data_type => 'checkbox', - :data_option => { - :multiple => true, - :null => true, - :relation => 'Group', - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => { - '-all-' => { - :null => false, - }, - }, - :edit => { - :Admin => { - :null => true, - }, - }, - }, - :pending_migration => false, - :position => 1700, - :created_by_id => 1, - :updated_by_id => 1, - ) - - ObjectManager::Attribute.add( - :object => 'User', - :name => 'active', - :display => 'Active', - :data_type => 'boolean', - :data_option => { - :maxlength => 250, - :null => true, - :default => true, - }, - :editable => false, - :active => true, - :screens => { - :signup => {}, - :invite_agent => {}, - :edit => { - :Admin => { - :null => false, - }, - }, - }, - :pending_migration => false, - :position => 1800, - :created_by_id => 1, - :updated_by_id => 1, - ) - - end - - def down - drop_table :object_manager_attributes - end -end diff --git a/db/migrate/20141217000001_update_object_manager2.rb b/db/migrate/20141217000001_update_object_manager2.rb new file mode 100644 index 000000000..566ab2ec3 --- /dev/null +++ b/db/migrate/20141217000001_update_object_manager2.rb @@ -0,0 +1,755 @@ +class UpdateObjectManager2 < ActiveRecord::Migration + def up + + remove_index :object_manager_attributes, [:name] + + ObjectManager::Attribute.add( + :object => 'User', + :name => 'login', + :display => 'Login', + :data_type => 'input', + :data_option => { + :type => 'text', + :maxlength => 100, + :null => true, + :autocapitalize => false, + :item_class => 'formGroup--halfSize', + }, + :editable => false, + :active => true, + :screens => { + :signup => {}, + :invite_agent => {}, + :edit => {}, + :view => { + '-all-' => { + :shown => false, + }, + }, + }, + :pending_migration => false, + :position => 100, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'User', + :name => 'firstname', + :display => 'Firstname', + :data_type => 'input', + :data_option => { + :type => 'text', + :maxlength => 150, + :null => false, + :item_class => 'formGroup--halfSize', + }, + :editable => false, + :active => true, + :screens => { + :signup => { + '-all-' => { + :null => false, + }, + }, + :invite_agent => { + '-all-' => { + :null => false, + }, + }, + :edit => { + '-all-' => { + :null => false, + }, + }, + :view => { + '-all-' => { + :shown => true, + }, + }, + }, + :pending_migration => false, + :position => 200, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'User', + :name => 'lastname', + :display => 'Lastname', + :data_type => 'input', + :data_option => { + :type => 'text', + :maxlength => 150, + :null => false, + :item_class => 'formGroup--halfSize', + }, + :editable => false, + :active => true, + :screens => { + :signup => { + '-all-' => { + :null => false, + }, + }, + :invite_agent => { + '-all-' => { + :null => false, + }, + }, + :edit => { + '-all-' => { + :null => false, + }, + }, + :view => { + '-all-' => { + :shown => true, + }, + }, + }, + :pending_migration => false, + :position => 300, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'User', + :name => 'email', + :display => 'Email', + :data_type => 'input', + :data_option => { + :type => 'email', + :maxlength => 150, + :null => false, + :item_class => 'formGroup--halfSize', + }, + :editable => false, + :active => true, + :screens => { + :signup => { + '-all-' => { + :null => false, + }, + }, + :invite_agent => { + '-all-' => { + :null => false, + }, + }, + :edit => { + '-all-' => { + :null => false, + }, + }, + :view => { + '-all-' => { + :shown => true, + }, + }, + }, + :pending_migration => false, + :position => 400, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'User', + :name => 'web', + :display => 'Web', + :data_type => 'input', + :data_option => { + :type => 'url', + :maxlength => 250, + :null => true, + :item_class => 'formGroup--halfSize', + }, + :editable => false, + :active => true, + :screens => { + :signup => {}, + :invite_agent => {}, + :edit => { + '-all-' => { + :null => true, + }, + }, + :view => { + '-all-' => { + :shown => true, + }, + }, + }, + :pending_migration => false, + :position => 500, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'User', + :name => 'phone', + :display => 'Phone', + :data_type => 'input', + :data_option => { + :type => 'phone', + :maxlength => 100, + :null => true, + :item_class => 'formGroup--halfSize', + }, + :editable => false, + :active => true, + :screens => { + :signup => {}, + :invite_agent => {}, + :edit => { + '-all-' => { + :null => true, + }, + }, + :view => { + '-all-' => { + :shown => true, + }, + }, + }, + :pending_migration => false, + :position => 600, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'User', + :name => 'mobile', + :display => 'Mobile', + :data_type => 'input', + :data_option => { + :type => 'phone', + :maxlength => 100, + :null => true, + :item_class => 'formGroup--halfSize', + }, + :editable => false, + :active => true, + :screens => { + :signup => {}, + :invite_agent => {}, + :edit => { + '-all-' => { + :null => true, + }, + }, + :view => { + '-all-' => { + :shown => true, + }, + }, + }, + :pending_migration => false, + :position => 700, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'User', + :name => 'fax', + :display => 'Fax', + :data_type => 'input', + :data_option => { + :type => 'phone', + :maxlength => 100, + :null => true, + :item_class => 'formGroup--halfSize', + }, + :editable => false, + :active => true, + :screens => { + :signup => {}, + :invite_agent => {}, + :edit => { + '-all-' => { + :null => true, + }, + }, + :view => { + '-all-' => { + :shown => true, + }, + }, + }, + :pending_migration => false, + :position => 800, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'User', + :name => 'organization_id', + :display => 'Organization', + :data_type => 'select', + :data_option => { + :multiple => false, + :nulloption => true, + :null => true, + :relation => 'Organization', + :item_class => 'formGroup--halfSize', + }, + :editable => false, + :active => true, + :screens => { + :signup => {}, + :invite_agent => {}, + :edit => { + '-all-' => { + :null => true, + }, + }, + :view => { + '-all-' => { + :shown => true, + }, + }, + }, + :pending_migration => false, + :position => 900, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'User', + :name => 'department', + :display => 'Department', + :data_type => 'input', + :data_option => { + :type => 'text', + :maxlength => 200, + :null => true, + :item_class => 'formGroup--halfSize', + }, + :editable => false, + :active => true, + :screens => { + :signup => {}, + :invite_agent => {}, + :edit => { + '-all-' => { + :null => true, + }, + }, + :view => { + '-all-' => { + :shown => true, + }, + }, + }, + :pending_migration => false, + :position => 1000, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'User', + :name => 'street', + :display => 'Street', + :data_type => 'input', + :data_option => { + :type => 'text', + :maxlength => 100, + :null => true, + }, + :editable => false, + :active => true, + :screens => { + :signup => {}, + :invite_agent => {}, + :edit => { + '-all-' => { + :null => true, + }, + }, + :view => { + '-all-' => { + :shown => true, + }, + }, + }, + :pending_migration => false, + :position => 1100, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'User', + :name => 'zip', + :display => 'Zip', + :data_type => 'input', + :data_option => { + :type => 'text', + :maxlength => 100, + :null => true, + :item_class => 'formGroup--halfSize', + }, + :editable => false, + :active => true, + :screens => { + :signup => {}, + :invite_agent => {}, + :edit => { + '-all-' => { + :null => true, + }, + }, + :view => { + '-all-' => { + :shown => true, + }, + }, + }, + :pending_migration => false, + :position => 1200, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'User', + :name => 'city', + :display => 'City', + :data_type => 'input', + :data_option => { + :type => 'text', + :maxlength => 100, + :null => true, + :item_class => 'formGroup--halfSize', + }, + :editable => false, + :active => true, + :screens => { + :signup => {}, + :invite_agent => {}, + :edit => { + '-all-' => { + :null => true, + }, + }, + :view => { + '-all-' => { + :shown => true, + }, + }, + }, + :pending_migration => false, + :position => 1300, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'User', + :name => 'password', + :display => 'Password', + :data_type => 'input', + :data_option => { + :type => 'password', + :maxlength => 100, + :null => true, + :autocomplete => 'off', + }, + :editable => false, + :active => true, + :screens => { + :signup => { + '-all-' => { + :null => false, + }, + }, + :invite_agent => {}, + :edit => { + :Admin => { + :null => true, + }, + }, + :view => {} + }, + :pending_migration => false, + :position => 1400, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'User', + :name => 'note', + :display => 'Note', + :data_type => 'richtext', + :data_option => { + :type => 'text', + :maxlength => 250, + :null => true, + :note => 'Notes are visible to agents only, never to customers.', + }, + :editable => false, + :active => true, + :screens => { + :signup => {}, + :invite_agent => {}, + :edit => { + '-all-' => { + :null => true, + }, + }, + :view => { + '-all-' => { + :shown => true, + }, + }, + }, + :pending_migration => false, + :position => 1500, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'User', + :name => 'role_ids', + :display => 'Roles', + :data_type => 'checkbox', + :data_option => { + :multiple => true, + :null => false, + :relation => 'Role', + }, + :editable => false, + :active => true, + :screens => { + :signup => {}, + :invite_agent => {}, + :edit => { + :Admin => { + :null => false, + }, + }, + :view => { + '-all-' => { + :shown => false, + }, + }, + }, + :pending_migration => false, + :position => 1600, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'User', + :name => 'group_ids', + :display => 'Groups', + :data_type => 'checkbox', + :data_option => { + :multiple => true, + :null => true, + :relation => 'Group', + }, + :editable => false, + :active => true, + :screens => { + :signup => {}, + :invite_agent => { + '-all-' => { + :null => false, + }, + }, + :edit => { + :Admin => { + :null => true, + }, + }, + :view => { + '-all-' => { + :shown => false, + }, + }, + }, + :pending_migration => false, + :position => 1700, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'User', + :name => 'active', + :display => 'Active', + :data_type => 'boolean', + :data_option => { + :maxlength => 250, + :null => true, + :default => true, + }, + :editable => false, + :active => true, + :screens => { + :signup => {}, + :invite_agent => {}, + :edit => { + :Admin => { + :null => false, + }, + }, + :view => { + '-all-' => { + :shown => false, + }, + }, + }, + :pending_migration => false, + :position => 1800, + :created_by_id => 1, + :updated_by_id => 1, + ) + + + ObjectManager::Attribute.add( + :object => 'Organization', + :name => 'name', + :display => 'Name', + :data_type => 'input', + :data_option => { + :type => 'text', + :maxlength => 150, + :null => false, + :item_class => 'formGroup--halfSize', + }, + :editable => false, + :active => true, + :screens => { + :edit => { + '-all-' => { + :null => false, + }, + }, + :view => { + '-all-' => { + :shown => true, + }, + }, + }, + :pending_migration => false, + :position => 200, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'Organization', + :name => 'shared', + :display => 'Shared organization', + :data_type => 'boolean', + :data_option => { + :maxlength => 250, + :null => true, + :default => true, + :note => 'Customers in the organization can view each other items.', + :item_class => 'formGroup--halfSize', + :options => { + :true => 'Yes', + :false => 'No', + } + }, + :editable => false, + :active => true, + :screens => { + :edit => { + :Admin => { + :null => false, + }, + }, + :view => { + '-all-' => { + :shown => true, + }, + }, + }, + :pending_migration => false, + :position => 1400, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'Organization', + :name => 'note', + :display => 'Note', + :data_type => 'richtext', + :data_option => { + :type => 'text', + :maxlength => 250, + :null => true, + :note => 'Notes are visible to agents only, never to customers.', + }, + :editable => false, + :active => true, + :screens => { + :edit => { + '-all-' => { + :null => true, + }, + }, + :view => { + '-all-' => { + :shown => true, + }, + }, + }, + :pending_migration => false, + :position => 1500, + :created_by_id => 1, + :updated_by_id => 1, + ) + + ObjectManager::Attribute.add( + :object => 'Organization', + :name => 'active', + :display => 'Active', + :data_type => 'boolean', + :data_option => { + :maxlength => 250, + :null => true, + :default => true, + }, + :editable => false, + :active => true, + :screens => { + :edit => { + :Admin => { + :null => false, + }, + }, + :view => { + '-all-' => { + :shown => false, + }, + }, + }, + :pending_migration => false, + :position => 1800, + :created_by_id => 1, + :updated_by_id => 1, + ) + + end + + def down + end +end