/************
*
* Rv.CrmApp.Constants
* Copyright (c) 2008 RavenMultimedia.com
* 
* Date     : 04/15/2008
* Synopsis : Repository for Rv.CrmApp configuration constants.
* 
*************/
Ext.BLANK_IMAGE_URL = '/includes/js/extjs/resources/images/default/s.gif';

Ext.namespace(
	'Rv', 
	'Rv.CrmApp',
	'Rv.CrmApp.westPanel',
	'Rv.CrmApp.centerPanel',		
	'Rv.CrmApp.eastPanel',
	'Rv.CrmApp.loginWindow', 
	'Rv.ActionPanel', 	
	'Rv.CrudView',
	'Rv.Constants.crudViews',
	'Rv.Constants.crudViews.Administrator',
	'Rv.Constants.crudViews.Log',
	'Rv.Constants.crudViews.Company',
	'Rv.Constants.crudViews.Promotion',
	'Rv.Constants.crudViews.Category',
	'Rv.Constants.crudViews.Note',
	'Rv.Constants.crudViews.Subscriber',
	'Rv.Constants.crudViews.Faq',
	'Rv.Constants.crudViews.FormSubmission',
	'Rv.Constants.ServerUrls',
	'Rv.Constants.Data',
	'Rv.Constants.Data.EmployeeRange'
);

/*************************
*       CrmApp           *
*************************/


// URLs
Rv.Constants.ServerUrls.Login = '/_modules/login/_controls/';


Rv.Constants.Data.EmployeeRange = [
	['1', '1 - 5'],
	['2', '6 - 10'],
	['3', '11 - 25'],
	['4', '26 - 50'],
	['5', '51 - 100'],
	['6', '101 - 199'],
	['7', '200+ profitable'],
	['8', '200+ not yet profitable']
];

Rv.Constants.Data.States = [
	['AL', 'Alabama', 'The Heart of Dixie'],
	['AK', 'Alaska', 'The Land of the Midnight Sun'],
	['AZ', 'Arizona', 'The Grand Canyon State'],
	['AR', 'Arkansas', 'The Natural State'],
	['CA', 'California', 'The Golden State'],
	['CO', 'Colorado', 'The Mountain State'],
	['CT', 'Connecticut', 'The Constitution State'],
	['DE', 'Delaware', 'The First State'],
	['DC', 'District of Columbia', "The Nation's Capital"],
	['FL', 'Florida', 'The Sunshine State'],
	['GA', 'Georgia', 'The Peach State'],
	['HI', 'Hawaii', 'The Aloha State'],
	['ID', 'Idaho', 'Famous Potatoes'],
	['IL', 'Illinois', 'The Prairie State'],
	['IN', 'Indiana', 'The Hospitality State'],
	['IA', 'Iowa', 'The Corn State'],
	['KS', 'Kansas', 'The Sunflower State'],
	['KY', 'Kentucky', 'The Bluegrass State'],
	['LA', 'Louisiana', 'The Bayou State'],
	['ME', 'Maine', 'The Pine Tree State'],
	['MD', 'Maryland', 'Chesapeake State'],
	['MA', 'Massachusetts', 'The Spirit of America'],
	['MI', 'Michigan', 'Great Lakes State'],
	['MN', 'Minnesota', 'North Star State'],
	['MS', 'Mississippi', 'Magnolia State'],
	['MO', 'Missouri', 'Show Me State'],
	['MT', 'Montana', 'Big Sky Country'],
	['NE', 'Nebraska', 'Beef State'],
	['NV', 'Nevada', 'Silver State'],
	['NH', 'New Hampshire', 'Granite State'],
	['NJ', 'New Jersey', 'Garden State'],
	['NM', 'New Mexico', 'Land of Enchantment'],
	['NY', 'New York', 'Empire State'],
	['NC', 'North Carolina', 'First in Freedom'],
	['ND', 'North Dakota', 'Peace Garden State'],
	['OH', 'Ohio', 'The Heart of it All'],
	['OK', 'Oklahoma', 'Oklahoma is OK'],
	['OR', 'Oregon', 'Pacific Wonderland'],
	['PA', 'Pennsylvania', 'Keystone State'],
	['RI', 'Rhode Island', 'Ocean State'],
	['SC', 'South Carolina', 'Nothing Could be Finer'],
	['SD', 'South Dakota', 'Great Faces, Great Places'],
	['TN', 'Tennessee', 'Volunteer State'],
	['TX', 'Texas', 'Lone Star State'],
	['UT', 'Utah', 'Salt Lake State'],
	['VT', 'Vermont', 'Green Mountain State'],
	['VA', 'Virginia', 'Mother of States'],
	['WA', 'Washington', 'Green Tree State'],
	['WV', 'West Virginia', 'Mountain State'],
	['WI', 'Wisconsin', "America's Dairyland"],
	['WY', 'Wyoming', 'Like No Place on Earth']
];

// Administrator CRUD
Rv.Constants.crudViews.Administrator.url = '/_modules/administrator/_controls/?a=list';
Rv.Constants.crudViews.Administrator.ds = [
	{name: 'Id'},
	{name: 'Username'},
	{name: 'LastName'},
	{name: 'FirstName'}
];
Rv.Constants.crudViews.Administrator.cm = [
	{
		header: "Id",
		dataIndex: 'Id',
		width: 50,
		hidden: true
	},{
		header: "Username", 
		width: 100, 
		dataIndex: 'Username',
		sortable: true
	},{
		header: "Last Name", 
		width: 100, 
		dataIndex: 'LastName',
		sortable: true
	},{
		header: "First Name", 
		width: 100, 
		dataIndex: 'FirstName',
		sortable: true
	}
];



// Account CRUD
Rv.Constants.crudViews.Company.url = '/_modules/company/_controls/?a=list';
Rv.Constants.crudViews.Company.defaultSort = 'Title';
Rv.Constants.crudViews.Company.ds = [
	{name: 'Id'},
	{name: 'Title'},
	{name: 'WebAddress'},
	{name: 'Phone'},
	{name: 'Email'},
	{name: 'City'},
	{name: 'State'},
	{name: 'LeadSource'},
	{name: 'DateCreated'},
	{name: 'Logo'},
	{name: 'Affiliations'}
];
Rv.Constants.crudViews.Company.cm = [
	{
		header: "Id",
		dataIndex: 'Id',
		width: 50,
		hidden: true
	},{
		header: "Company Name", 
		width: 100, 
		dataIndex: 'Title',
		sortable: true
	},{
		header: "Email", 
		width: 100, 
		dataIndex: 'Email',
		sortable: true
	},{
		header: "Date Created", 
		width: 100, 
		dataIndex: 'DateCreated',
		sortable: true
	},{
		header: "Web Address", 
		width: 100, 
		dataIndex: 'WebAddress',
		hidden: true,
		sortable: true
	},{
		header: "Phone", 
		width: 100, 
		dataIndex: 'Phone',
		hidden: true,
		sortable: true
	},{
		header: "City", 
		width: 100, 
		dataIndex: 'City',
		hidden: true,
		sortable: true
	},{
		header: "State", 
		width: 100, 
		dataIndex: 'State',
		hidden: true,
		sortable: true
	},{
		header: "LeadSource", 
		width: 100, 
		dataIndex: 'LeadSource',
		hidden: true,
		sortable: true
	},{
		header: "Logo", 
		width: 100, 
		dataIndex: 'Logo',
		hidden: true,
		sortable: true
	},{
		header: "Affiliations", 
		width: 100, 
		dataIndex: 'Affiliations',
		hidden: true,
		sortable: true
	}
];

Rv.Constants.crudViews.Promotion.url = '/_modules/promotion/_controls/?a=list';
Rv.Constants.crudViews.Promotion.defaultSort = 'Title';
Rv.Constants.crudViews.Promotion.ds = [
	{name: 'Id'},
	{name: 'Title'},
	{name: 'CompanyTitle'},
	{name: 'CategoryTitle'},
	{name: 'StartDate'},
	{name: 'ExpireDate'},
	{name: 'Tags'},
	{name: 'Type'}
];
Rv.Constants.crudViews.Promotion.cm = [
	{
		header: "Id",
		dataIndex: 'Id',
		width: 50,
		hidden: true
	},{
		header: "Title", 
		width: 100, 
		dataIndex: 'Title',
		sortable: true
	},{
		header: "Company", 
		width: 100, 
		dataIndex: 'CompanyTitle',
		sortable: true
	},{
		header: "Category", 
		width: 100, 
		dataIndex: 'CategoryTitle',
		sortable: false
	},{
		header: "StartDate", 
		width: 100, 
		dataIndex: 'StartDate',
		hidden: true,
		sortable: true
	},{
		header: "ExpireDate", 
		width: 100, 
		dataIndex: 'ExpireDate',
		hidden: true,
		sortable: true
	},{
		header: "Tags", 
		width: 100, 
		dataIndex: 'Tags',
		hidden: true,
		sortable: true
	},{
		header: "Type", 
		width: 100, 
		dataIndex: 'Type',
		hidden: true,
		sortable: true
	}
];

Rv.Constants.crudViews.Category.url = '/_modules/category/_controls/?a=list';
Rv.Constants.crudViews.Category.defaultSort = 'Title';
Rv.Constants.crudViews.Category.ds = [
	{name: 'Id'},
	{name: 'Title'},
	{name: 'CategoryTitle'}
];
Rv.Constants.crudViews.Category.cm = [
	{
		header: "Id",
		dataIndex: 'Id',
		width: 50,
		hidden: true
	},{
		header: "Title", 
		width: 100, 
		dataIndex: 'Title',
		sortable: true
	},{
		header: "Parent Category", 
		width: 100, 
		dataIndex: 'CategoryTitle',
		sortable: true
	}
];

// Note CRUD
Rv.Constants.crudViews.Note.url = '/_modules/note/_controls/?a=list_note';
Rv.Constants.crudViews.Note.ds = [
	{name: 'Id'},
	{name: 'Title'},
	{name: 'DateCreated'},
	{name: 'LastModified'},
	{name: 'CreatedBy'},
	{name: 'ModifiedBy'}
];
Rv.Constants.crudViews.Note.cm = [
	{
		header: "Id",
		dataIndex: 'Id',
		width: 50,
		hidden: true
	},{
		header: "Title", 
		width: 100, 
		dataIndex: 'Title',
		sortable: true
	/*},{
		header: "Date Created", 
		width: 100, 
		dataIndex: 'DateCreated',
		sortable: true
	},{
		header: "Last Modified", 
		width: 100, 
		dataIndex: 'LastModified',
		sortable: true
	},{
		header: "Created By", 
		width: 100, 
		dataIndex: 'CreatedBy',
		sortable: true
	},{
		header: "Modified By", 
		width: 100, 
		dataIndex: 'ModifiedBy',
		sortable: true*/
	}
];

// Subscriber CRUD
Rv.Constants.crudViews.Subscriber.url = '/_modules/subscriber/_controls/?a=list_subscriber';
Rv.Constants.crudViews.Subscriber.ds = [
	{name: 'Id'},
	{name: 'Email'},
	{name: 'DateTime'}
];
Rv.Constants.crudViews.Subscriber.cm = [
	{
		header: "Id",
		dataIndex: 'Id',
		width: 50,
		hidden: true
	},{
		header: "Email", 
		width: 100, 
		dataIndex: 'Email',
		sortable: true
	},{
		header: "Date Submitted", 
		width: 100, 
		dataIndex: 'DateTime',
		sortable: true
	}
];

// Faq CRUD
Rv.Constants.crudViews.Faq.url = '/_modules/faq/_controls/?a=list_faq';
Rv.Constants.crudViews.Faq.ds = [
	{name: 'Id'},
	{name: 'Question'}
];
Rv.Constants.crudViews.Faq.cm = [
	{
		header: "Id",
		dataIndex: 'Id',
		width: 50,
		hidden: true
	},{
		header: "Question", 
		width: 100, 
		dataIndex: 'Question',
		sortable: true
	}
];

// Faq CRUD
Rv.Constants.crudViews.FormSubmission.url = '/_modules/formsubmission/_controls/?a=list_submission';
Rv.Constants.crudViews.FormSubmission.ds = [
	{name: 'Id'},
	{name: 'Date'}
];
Rv.Constants.crudViews.FormSubmission.cm = [
	{
		header: "Id",
		dataIndex: 'Id',
		width: 50,
		hidden: true
	},{
		header: "Date", 
		width: 100, 
		dataIndex: 'Date',
		sortable: true
	}
];

// Log CRUD
Rv.Constants.crudViews.Log.url = '/_modules/log/_controls/?a=list';
Rv.Constants.crudViews.Log.ds = [
	{name: 'Id'},
	{name: 'Date'},
	{name: 'Administrator'},
	{name: 'Module'},
	{name: 'Action'},
	{name: 'Content'}
];
Rv.Constants.crudViews.Log.cm = [
	{
		header: "Id",
		dataIndex: 'Id',
		width: 50,
		hidden: true
	},{
		header: "Date", 
		width: 100, 
		dataIndex: 'Date',
		sortable: true
	},{
		header: "Administrator", 
		width: 100, 
		dataIndex: 'Administrator',
		sortable: true
	},{
		id: "Module", 
		header: "Module", 
		width: 100, 
		dataIndex: 'Module',
		sortable: true
	},{
		id: "Action", 
		header: "Action", 
		width: 150, 
		dataIndex: 'Action',
		sortable: true
	}
];




