|
18 | 18 | // $dg = new C_DataGrid("SELECT id, contact_last, company, phone, email, website, Status, project_type, budget FROM contact", "id", "contact"); |
19 | 19 | $dg = new C_DataGrid("SELECT * FROM contact", "id", "contact"); |
20 | 20 | $dg->set_query_filter(" Status = 2 && sales_rep = 1 "); |
21 | | - |
22 | 21 | $dg->set_col_hidden('id')->set_col_hidden('Status')->set_caption(' '); |
23 | 22 | $dg->set_col_hidden('Date_of_Initial_Contact'); |
24 | 23 | $dg->set_col_hidden('Contact_Title')->set_col_hidden('Contact_Middle')->set_col_hidden('Lead_Referral_Source'); |
25 | 24 | $dg->set_col_hidden('Address')->set_col_hidden('Address_Street_1')->set_col_hidden('Address_Street_2'); |
26 | 25 | $dg->set_col_hidden('Address_City')->set_col_hidden('Address_State')->set_col_hidden('Address_Zip')->set_col_hidden('Address_Country'); |
27 | 26 | $dg->set_col_hidden('LinkedIn_Profile')->set_col_hidden('Background_Info'); |
28 | 27 | $dg->set_col_hidden('Sales_Rep')->set_col_hidden('Project_Description')->set_col_hidden('Proposal_Due_Date')->set_col_hidden('Deliverables'); |
29 | | - |
30 | 28 | $dg->set_col_format("Email", "email"); |
31 | 29 | $dg->set_col_currency('Budget'); |
32 | 30 | $dg -> set_col_link("Website"); |
|
35 | 33 |
|
36 | 34 | $sdg = new C_DataGrid("SELECT * FROM notes", "id", "notes"); |
37 | 35 | $sdg->set_query_filter(" Sales_Rep = 1 "); |
38 | | -$sdg->set_col_hidden('id', false)->set_col_hidden('Contact', false); |
39 | | - |
| 36 | +$sdg->set_col_hidden('id', false)->set_col_hidden('Contact', false)->set_col_hidden('Sales_Rep', false); |
40 | 37 | $sdg->set_col_edittype('Add_Task_or_Meeting', 'select', 'Select id, status From task_status'); |
41 | 38 | $sdg->set_col_edittype('Task_Status', 'select', 'Select id, status From task_status'); |
42 | 39 | $sdg->set_col_edittype('Is_New_Todo', 'select', '0:No;1:Yes'); |
43 | 40 | $sdg->set_col_edittype('Todo_Type_ID', 'select', 'Select id, type From todo_type'); |
44 | 41 | $sdg->set_col_edittype('Todo_Desc_ID', 'select', 'Select id, description From todo_desc'); |
| 42 | +$sdg->set_col_default('Sales_Rep', 1); // TODO: obtain from SESSION |
45 | 43 | $sdg->enable_edit(); |
46 | 44 |
|
47 | 45 |
|
48 | 46 | $dg->set_masterdetail($sdg, 'Contact', 'id'); |
49 | | - |
50 | 47 | $dg -> display(); |
51 | 48 | ?> |
52 | 49 |
|
|
0 commit comments