Skip to content

Commit 1005b80

Browse files
committed
Initial commit
Stable version 1.0 excluding user login component.
0 parents  commit 1005b80

15 files changed

+953
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.DS_Store
2+
composer.phar
3+
vendor/
4+
phpGrid/

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"require": {
3+
"ptejada/uflex": "1.*"
4+
}
5+
}

composer.lock

Lines changed: 66 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

db/db-custom-crm.sql

Lines changed: 320 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,320 @@
1+
# ************************************************************
2+
# Sequel Pro SQL dump
3+
# Version 4541
4+
#
5+
# http://www.sequelpro.com/
6+
# https://github.com/sequelpro/sequelpro
7+
#
8+
# Host: localhost (MySQL 5.5.5-10.1.9-MariaDB-log)
9+
# Database: phpgrid_custom_crm
10+
# Generation Time: 2017-01-13 06:33:07 +0000
11+
# ************************************************************
12+
13+
14+
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
15+
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
16+
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
17+
/*!40101 SET NAMES utf8 */;
18+
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
19+
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
20+
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
21+
22+
23+
# Dump of table contact
24+
# ------------------------------------------------------------
25+
26+
DROP TABLE IF EXISTS `contact`;
27+
28+
CREATE TABLE `contact` (
29+
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
30+
`Contact_Title` varchar(30) DEFAULT NULL,
31+
`Contact_First` varchar(5) NOT NULL,
32+
`Contact_Middle` varchar(30) DEFAULT NULL,
33+
`Contact_Last` varchar(8) NOT NULL,
34+
`Lead_Referral_Source` varchar(23) NOT NULL,
35+
`Date_of_Initial_Contact` date NOT NULL,
36+
`Title` varchar(20) NOT NULL,
37+
`Company` varchar(16) NOT NULL,
38+
`Industry` varchar(12) NOT NULL,
39+
`Address` varchar(38) NOT NULL,
40+
`Address_Street_1` varchar(17) NOT NULL,
41+
`Address_Street_2` varchar(30) DEFAULT NULL,
42+
`Address_City` varchar(12) NOT NULL,
43+
`Address_State` char(2) NOT NULL DEFAULT '',
44+
`Address_Zip` int(11) NOT NULL,
45+
`Address_Country` varchar(30) DEFAULT NULL,
46+
`Phone` varchar(14) NOT NULL,
47+
`Email` varchar(20) NOT NULL,
48+
`Status` int(11) unsigned NOT NULL,
49+
`Website` varchar(23) NOT NULL,
50+
`LinkedIn_Profile` varchar(21) NOT NULL,
51+
`Background_Info` varchar(62) NOT NULL,
52+
`Sales_Rep` int(11) unsigned NOT NULL,
53+
`Rating` decimal(4,2) NOT NULL,
54+
`Project_Type` varchar(35) DEFAULT NULL,
55+
`Project_Description` tinytext,
56+
`Proposal_Due_Date` date DEFAULT NULL,
57+
`Budget` decimal(10,2) DEFAULT NULL,
58+
`Deliverables` varchar(30) DEFAULT NULL,
59+
PRIMARY KEY (`id`),
60+
KEY `FK_SALES_REP` (`Sales_Rep`),
61+
KEY `FK_STATUS` (`Status`),
62+
CONSTRAINT `FK_SALES_REP` FOREIGN KEY (`Sales_Rep`) REFERENCES `users` (`id`),
63+
CONSTRAINT `FK_STATUS` FOREIGN KEY (`Status`) REFERENCES `contact_status` (`id`)
64+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
65+
66+
LOCK TABLES `contact` WRITE;
67+
/*!40000 ALTER TABLE `contact` DISABLE KEYS */;
68+
69+
INSERT INTO `contact` (`id`, `Contact_Title`, `Contact_First`, `Contact_Middle`, `Contact_Last`, `Lead_Referral_Source`, `Date_of_Initial_Contact`, `Title`, `Company`, `Industry`, `Address`, `Address_Street_1`, `Address_Street_2`, `Address_City`, `Address_State`, `Address_Zip`, `Address_Country`, `Phone`, `Email`, `Status`, `Website`, `LinkedIn_Profile`, `Background_Info`, `Sales_Rep`, `Rating`, `Project_Type`, `Project_Description`, `Proposal_Due_Date`, `Budget`, `Deliverables`)
70+
VALUES
71+
(1,NULL,'Amir',NULL,'Kahnzz','www.google .com','2014-05-09','PR Director','Barnes and Wells','PR','52 Broadway New York, NY 12345','52 Broadway',NULL,'New York','NY',12345,NULL,'(234) 432-2234','[email protected]',1,'www.pr.com','www.sample.com','4 years as PR Dir. Knows the biz and has wide network.',1,4.00,NULL,NULL,NULL,NULL,NULL),
72+
(2,NULL,'Dave',NULL,'Myers','Mack Truck Partner Site','2014-02-11','DEF Sales','DEF Fluids','Auto','456 Diesel St Philadelphia, PA 19308','456 Diesel St',NULL,'Philadelphia','PA',19308,NULL,'(765) 765-7755','[email protected]',2,'www.def.com','www.sample.com','19 years in biz',2,2.50,NULL,NULL,NULL,NULL,NULL),
73+
(3,NULL,'Jason',NULL,'Wright','salesforce associate','2014-09-12','Marketing Director','Ben and Jerry\'s','Food','123 Ice Cream Way Burlington, VT 12345','123 Ice Cream Way',NULL,'Burlington','VT',12345,NULL,'(123) 432-1223','[email protected]',1,'www.benandjerrys.com','http://www.sample.com','Amazing ice creme company from Vermont. Sustainable practices.',1,4.00,NULL,NULL,NULL,NULL,NULL),
74+
(4,NULL,'Linda',NULL,'DeCastro','Conference','2014-01-19','Regional Sales Mgr','Pillsbury','Retail Foods','44 Reading Rd Flourtown, NJ 39485','44 Reading Rd',NULL,'Flourtown','NJ',39485,NULL,'(555) 555-5555','[email protected]',3,'www.pillsbury.com','www.sample.com','New territory MGR',1,3.00,'New Packaging for Cookie products','Design new cookie packaging for new line of Sugar Free cookies.','2014-11-01',45000.00,'6 Proofs, multiple assets'),
75+
(5,NULL,'Sally',NULL,'Jane','CES Conference','2014-07-01','COO','Facetech','Tech','123 Tech Blvd Menlo Park, CA 12345','123 Tech Blvd',NULL,'Menlo Park','CA',12345,NULL,'(321) 321-1122','[email protected]',1,'http://www.facetech.com','www.sample.com','Great contact, has a really great roadmap.',1,5.00,NULL,NULL,NULL,30000.00,NULL),
76+
(6,NULL,'Tim',NULL,'Smith','www.google.com','2014-10-10','Supply Chain Manager','Levis','Apparel','1 Blue Jean St. Corduroy, CO 12345','1 Blue Jean St.',NULL,'Corduroy','CO',12345,NULL,'(321) 321-4321','[email protected]',2,'www.levis.com','www.sample.com','Jeans and apparel for eastern U.S.<br />',1,3.50,'Shelf talkers; kiosk style displays','Set up shelf talkers for stock shelves with an end of aisle kiosk detailing the history of Levis.','2014-11-05',333000.00,'10k shelf talkers, 1500 kiosks');
77+
78+
/*!40000 ALTER TABLE `contact` ENABLE KEYS */;
79+
UNLOCK TABLES;
80+
81+
82+
# Dump of table contact_status
83+
# ------------------------------------------------------------
84+
85+
DROP TABLE IF EXISTS `contact_status`;
86+
87+
CREATE TABLE `contact_status` (
88+
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
89+
`status` varchar(64) NOT NULL DEFAULT '',
90+
PRIMARY KEY (`id`)
91+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
92+
93+
LOCK TABLES `contact_status` WRITE;
94+
/*!40000 ALTER TABLE `contact_status` DISABLE KEYS */;
95+
96+
INSERT INTO `contact_status` (`id`, `status`)
97+
VALUES
98+
(1,'lead'),
99+
(2,'proposal'),
100+
(3,'customer/won'),
101+
(4,'archive');
102+
103+
/*!40000 ALTER TABLE `contact_status` ENABLE KEYS */;
104+
UNLOCK TABLES;
105+
106+
107+
# Dump of table notes
108+
# ------------------------------------------------------------
109+
110+
DROP TABLE IF EXISTS `notes`;
111+
112+
CREATE TABLE `notes` (
113+
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
114+
`Date` date DEFAULT NULL,
115+
`Notes` tinytext,
116+
`Is_New_Todo` int(11) unsigned NOT NULL,
117+
`Todo_Type_ID` int(11) unsigned NOT NULL,
118+
`Todo_Desc_ID` int(11) unsigned NOT NULL,
119+
`Todo_Due_Date` varchar(29) DEFAULT NULL,
120+
`Contact` int(11) unsigned NOT NULL,
121+
`Task_Status` int(11) unsigned NOT NULL,
122+
`Task_Update` varchar(51) DEFAULT NULL,
123+
`Sales_Rep` int(11) unsigned NOT NULL,
124+
PRIMARY KEY (`id`),
125+
KEY `FK_EVENT_NAME` (`Todo_Type_ID`),
126+
KEY `FK_EVENT_TYPE` (`Todo_Desc_ID`),
127+
KEY `FK_CONTACT_ID` (`Contact`),
128+
KEY `FK_SALES_ID` (`Sales_Rep`),
129+
KEY `FK_TASK_STATUS` (`Task_Status`),
130+
CONSTRAINT `FK_CONTACT_ID` FOREIGN KEY (`Contact`) REFERENCES `contact` (`id`),
131+
CONSTRAINT `FK_EVENT_NAME` FOREIGN KEY (`Todo_Type_ID`) REFERENCES `todo_type` (`id`),
132+
CONSTRAINT `FK_EVENT_TYPE` FOREIGN KEY (`Todo_Desc_ID`) REFERENCES `todo_desc` (`id`),
133+
CONSTRAINT `FK_SALES_ID` FOREIGN KEY (`Sales_Rep`) REFERENCES `users` (`id`),
134+
CONSTRAINT `FK_TASK_STATUS` FOREIGN KEY (`Task_Status`) REFERENCES `task_status` (`id`)
135+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
136+
137+
LOCK TABLES `notes` WRITE;
138+
/*!40000 ALTER TABLE `notes` DISABLE KEYS */;
139+
140+
INSERT INTO `notes` (`id`, `Date`, `Notes`, `Is_New_Todo`, `Todo_Type_ID`, `Todo_Desc_ID`, `Todo_Due_Date`, `Contact`, `Task_Status`, `Task_Update`, `Sales_Rep`)
141+
VALUES
142+
(1,'2014-07-11','ddddd',1,1,1,'07/23/2014 6:00pm to 8:00pm',1,1,'',1),
143+
(2,'2015-10-10','Sample Note',0,1,1,NULL,2,1,NULL,2),
144+
(3,'2015-05-21','sx',1,1,2,'07/31/2014',3,1,'',1),
145+
(4,'2014-06-01','Want to be sure to communicate weekly.',1,2,3,'07/04/2014 10:00am to 10:30am',4,1,'Ongoing',1),
146+
(5,'2014-01-31','Was introduced at textile conference.zzz',1,1,1,'04/09/2014 3:45pm to 4:45pm',5,2,'Great demo. All they needed to seal the deal.<br>',1),
147+
(6,'2014-11-11','Great to have this customer on board!',0,1,4,NULL,6,1,NULL,1),
148+
(7,'2017-01-27','test',0,1,2,'',3,1,'',1),
149+
(8,'2017-01-11','test123',0,1,5,NULL,6,1,NULL,1);
150+
151+
/*!40000 ALTER TABLE `notes` ENABLE KEYS */;
152+
UNLOCK TABLES;
153+
154+
155+
# Dump of table roles
156+
# ------------------------------------------------------------
157+
158+
DROP TABLE IF EXISTS `roles`;
159+
160+
CREATE TABLE `roles` (
161+
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
162+
`role` varchar(64) NOT NULL DEFAULT '',
163+
PRIMARY KEY (`id`)
164+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
165+
166+
LOCK TABLES `roles` WRITE;
167+
/*!40000 ALTER TABLE `roles` DISABLE KEYS */;
168+
169+
INSERT INTO `roles` (`id`, `role`)
170+
VALUES
171+
(1,'Sales Rep'),
172+
(2,'Sales Manager'),
173+
(3,'Admin');
174+
175+
/*!40000 ALTER TABLE `roles` ENABLE KEYS */;
176+
UNLOCK TABLES;
177+
178+
179+
# Dump of table task_status
180+
# ------------------------------------------------------------
181+
182+
DROP TABLE IF EXISTS `task_status`;
183+
184+
CREATE TABLE `task_status` (
185+
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
186+
`status` varchar(64) NOT NULL DEFAULT '',
187+
PRIMARY KEY (`id`)
188+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
189+
190+
LOCK TABLES `task_status` WRITE;
191+
/*!40000 ALTER TABLE `task_status` DISABLE KEYS */;
192+
193+
INSERT INTO `task_status` (`id`, `status`)
194+
VALUES
195+
(1,'pending'),
196+
(2,'completed');
197+
198+
/*!40000 ALTER TABLE `task_status` ENABLE KEYS */;
199+
UNLOCK TABLES;
200+
201+
202+
# Dump of table todo_desc
203+
# ------------------------------------------------------------
204+
205+
DROP TABLE IF EXISTS `todo_desc`;
206+
207+
CREATE TABLE `todo_desc` (
208+
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
209+
`description` varchar(64) NOT NULL DEFAULT '',
210+
PRIMARY KEY (`id`)
211+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
212+
213+
LOCK TABLES `todo_desc` WRITE;
214+
/*!40000 ALTER TABLE `todo_desc` DISABLE KEYS */;
215+
216+
INSERT INTO `todo_desc` (`id`, `description`)
217+
VALUES
218+
(1,'Follow Up Email'),
219+
(2,'Phone Call'),
220+
(3,'Lunch Meeting'),
221+
(4,'Tech Demo'),
222+
(5,'Meetup'),
223+
(6,'Conference'),
224+
(7,'Others');
225+
226+
/*!40000 ALTER TABLE `todo_desc` ENABLE KEYS */;
227+
UNLOCK TABLES;
228+
229+
230+
# Dump of table todo_type
231+
# ------------------------------------------------------------
232+
233+
DROP TABLE IF EXISTS `todo_type`;
234+
235+
CREATE TABLE `todo_type` (
236+
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
237+
`type` varchar(64) NOT NULL DEFAULT '',
238+
PRIMARY KEY (`id`)
239+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
240+
241+
LOCK TABLES `todo_type` WRITE;
242+
/*!40000 ALTER TABLE `todo_type` DISABLE KEYS */;
243+
244+
INSERT INTO `todo_type` (`id`, `type`)
245+
VALUES
246+
(1,'task'),
247+
(2,'meeting');
248+
249+
/*!40000 ALTER TABLE `todo_type` ENABLE KEYS */;
250+
UNLOCK TABLES;
251+
252+
253+
# Dump of table user_status
254+
# ------------------------------------------------------------
255+
256+
DROP TABLE IF EXISTS `user_status`;
257+
258+
CREATE TABLE `user_status` (
259+
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
260+
`status` varchar(64) NOT NULL DEFAULT '',
261+
PRIMARY KEY (`id`)
262+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
263+
264+
LOCK TABLES `user_status` WRITE;
265+
/*!40000 ALTER TABLE `user_status` DISABLE KEYS */;
266+
267+
INSERT INTO `user_status` (`id`, `status`)
268+
VALUES
269+
(1,'active'),
270+
(2,'inactive'),
271+
(3,'pending approval');
272+
273+
/*!40000 ALTER TABLE `user_status` ENABLE KEYS */;
274+
UNLOCK TABLES;
275+
276+
277+
# Dump of table users
278+
# ------------------------------------------------------------
279+
280+
DROP TABLE IF EXISTS `users`;
281+
282+
CREATE TABLE `users` (
283+
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
284+
`Name_Title` varchar(30) DEFAULT NULL,
285+
`Name_First` varchar(6) NOT NULL,
286+
`Name_Middle` varchar(30) DEFAULT NULL,
287+
`Name_Last` varchar(8) NOT NULL,
288+
`Email` varchar(16) NOT NULL,
289+
`Password` varchar(9) NOT NULL,
290+
`User_Roles` int(11) unsigned NOT NULL,
291+
`User_Status` int(11) unsigned NOT NULL,
292+
PRIMARY KEY (`id`),
293+
KEY `FK_USER_STATUS` (`User_Status`),
294+
KEY `FK_ROLE` (`User_Roles`),
295+
CONSTRAINT `FK_ROLE` FOREIGN KEY (`User_Roles`) REFERENCES `roles` (`id`),
296+
CONSTRAINT `FK_USER_STATUS` FOREIGN KEY (`User_Status`) REFERENCES `user_status` (`id`)
297+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
298+
299+
LOCK TABLES `users` WRITE;
300+
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
301+
302+
INSERT INTO `users` (`id`, `Name_Title`, `Name_First`, `Name_Middle`, `Name_Last`, `Email`, `Password`, `User_Roles`, `User_Status`)
303+
VALUES
304+
(1,NULL,'Johnny',NULL,'Rep','[email protected]','123456',1,1),
305+
(2,NULL,'Mary',NULL,'Rep','[email protected]','123456',1,1),
306+
(3,NULL,'Suzy',NULL,'Manager','[email protected]','123456',2,1),
307+
(4,NULL,'Sales',NULL,'Manager1','[email protected]','123456',2,1),
308+
(5,NULL,'Rich',NULL,'C','[email protected]','123456',1,1);
309+
310+
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
311+
UNLOCK TABLES;
312+
313+
314+
315+
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
316+
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
317+
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
318+
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
319+
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
320+
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

0 commit comments

Comments
 (0)