erp_orders 3.1.1 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +7 -0
  2. data/app/models/order_line_item.rb +6 -0
  3. data/app/models/order_line_item_pty_role.rb +1 -1
  4. data/app/models/order_txn.rb +6 -3
  5. data/config/routes.rb +0 -10
  6. data/db/migrate/20131005232344_update_order_line_pty_role_indexes.erp_orders.rb +19 -0
  7. data/db/migrate/20131005232611_remove_order_line_specific_rtype.rb +32 -0
  8. data/db/migrate/20140129200040_add_uom_to_order_line_item.rb +13 -0
  9. data/db/migrate/20140930152140_add_custom_fields_to_order_txn.rb +12 -0
  10. data/lib/erp_orders/engine.rb +2 -1
  11. data/lib/erp_orders/extensions/active_record/acts_as_order_line_item.rb +71 -0
  12. data/lib/erp_orders/extensions/active_record/acts_as_order_txn.rb +62 -61
  13. data/lib/erp_orders/extensions.rb +2 -1
  14. data/lib/erp_orders/version.rb +7 -3
  15. metadata +33 -144
  16. data/app/assets/javascripts/erp_orders/application.js +0 -9
  17. data/app/assets/stylesheets/erp_orders/application.css +0 -7
  18. data/app/controllers/erp_orders/erp_app/desktop/order_manager/base_controller.rb +0 -147
  19. data/app/controllers/erp_orders/erp_app/organizer/order_management/base_controller.rb +0 -19
  20. data/app/helpers/erp_orders/application_helper.rb +0 -4
  21. data/app/models/line_item_role_type.rb +0 -6
  22. data/app/views/layouts/erp_orders/application.html.erb +0 -14
  23. data/db/data_migrations/20110728201731_create_desktop_app_order_manager.rb +0 -25
  24. data/db/data_migrations/20110728201732_create_organizer_app_order_management.rb +0 -14
  25. data/db/data_migrations/20120229174343_add_orders_widget.rb +0 -28
  26. data/public/javascripts/erp_app/desktop/applications/order_manager/line_items_grid_panel.js +0 -100
  27. data/public/javascripts/erp_app/desktop/applications/order_manager/module.js +0 -85
  28. data/public/javascripts/erp_app/desktop/applications/order_manager/orders_grid_panel.js +0 -162
  29. data/public/javascripts/erp_app/desktop/applications/order_manager/payments_grid_panel.js +0 -109
  30. data/public/javascripts/erp_app/organizer/applications/order_management/base.js +0 -124
  31. data/public/javascripts/erp_app/organizer/applications/order_management/extensions.js +0 -113
  32. data/public/javascripts/erp_app/organizer/applications/order_management/line_items_grid_panel.js +0 -99
  33. data/public/javascripts/erp_app/organizer/applications/order_management/orders_grid_panel.1.js +0 -209
  34. data/public/javascripts/erp_app/organizer/applications/order_management/payments_grid_panel.js +0 -93
  35. data/spec/dummy/db/data_migrations/20101011152441_payment_gateway_actions.erp_commerce.rb +0 -28
  36. data/spec/dummy/db/data_migrations/20101014142230_financial_txn_types.erp_txns_and_accts.rb +0 -16
  37. data/spec/dummy/db/data_migrations/20110109173616_create_capability_scope_types.erp_tech_svcs.rb +0 -15
  38. data/spec/dummy/db/data_migrations/20110324010232_product_role_types.erp_products.rb +0 -24
  39. data/spec/dummy/db/data_migrations/20110525001935_add_usd_currency.erp_base_erp_svcs.rb +0 -12
  40. data/spec/dummy/db/data_migrations/20110527160807_add_default_prod_avail_types.erp_products.rb +0 -27
  41. data/spec/dummy/db/data_migrations/20110605231556_create_order_party_roles.erp_orders.rb +0 -24
  42. data/spec/dummy/db/data_migrations/20110609150135_add_iso_codes.erp_base_erp_svcs.rb +0 -19
  43. data/spec/dummy/db/data_migrations/20110728201729_erp_app_setup.erp_app.rb +0 -252
  44. data/spec/dummy/db/data_migrations/20110728201730_create_desktop_app_product_manager.erp_products.rb +0 -26
  45. data/spec/dummy/db/data_migrations/20110728201731_create_desktop_app_order_manager.erp_orders.rb +0 -26
  46. data/spec/dummy/db/data_migrations/20110728201732_create_organizer_app_order_management.erp_orders.rb +0 -15
  47. data/spec/dummy/db/data_migrations/20110728201733_update_preferences.erp_app.rb +0 -53
  48. data/spec/dummy/db/data_migrations/20110802200222_schedule_delete_expired_sessions_job.erp_tech_svcs.rb +0 -16
  49. data/spec/dummy/db/data_migrations/20110816161238_create_desktop_app_audit_log_viewer.erp_app.rb +0 -21
  50. data/spec/dummy/db/data_migrations/20110817160743_add_file_manager_application.erp_app.rb +0 -32
  51. data/spec/dummy/db/data_migrations/20110913145838_setup_compass_ae_instance.erp_base_erp_svcs.rb +0 -12
  52. data/spec/dummy/db/data_migrations/20111108183739_add_default_capabilities.erp_app.rb +0 -23
  53. data/spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb +0 -42
  54. data/spec/dummy/db/data_migrations/20111111144706_setup_audit_log_types.erp_tech_svcs.rb +0 -22
  55. data/spec/dummy/db/data_migrations/20120229160222_add_userinfo_widget.erp_app.rb +0 -29
  56. data/spec/dummy/db/data_migrations/20120229174343_add_orders_widget.erp_orders.rb +0 -29
  57. data/spec/dummy/db/data_migrations/20120405193721_create_party_and_role_type_for_communication_events.erp_app.rb +0 -11
  58. data/spec/dummy/db/data_migrations/20120411180756_create_user_management_mobile_application.erp_app.rb +0 -19
  59. data/spec/dummy/db/data_migrations/20120418164215_create_configuration_management_desktop_application.erp_app.rb +0 -23
  60. data/spec/dummy/db/data_migrations/20121116155018_create_group_relationship_and_role_types.erp_tech_svcs.rb +0 -20
  61. data/spec/dummy/db/data_migrations/20121130201859_upgrade_remove_system_mgmt_app.erp_app.rb +0 -16
  62. data/spec/dummy/db/data_migrations/20121130212146_note_capabilities.erp_tech_svcs.rb +0 -24
  63. data/spec/dummy/db/data_migrations/20121218175028_create_security_management_desktop_application.erp_app.rb +0 -23
  64. data/spec/dummy/db/migrate/20130107205931_base_erp_services.erp_base_erp_svcs.rb +0 -461
  65. data/spec/dummy/db/migrate/20130107205932_base_orders.erp_orders.rb +0 -178
  66. data/spec/dummy/db/migrate/20130107205933_base_tech_services.erp_tech_svcs.rb +0 -271
  67. data/spec/dummy/db/migrate/20130107205934_create_has_attribute_tables.erp_tech_svcs.rb +0 -39
  68. data/spec/dummy/db/migrate/20130107205935_create_groups.erp_tech_svcs.rb +0 -19
  69. data/spec/dummy/db/migrate/20130107205936_upgrade_security.erp_tech_svcs.rb +0 -54
  70. data/spec/dummy/db/migrate/20130107205937_upgrade_security2.erp_tech_svcs.rb +0 -270
  71. data/spec/dummy/db/migrate/20130107205938_base_products.erp_products.rb +0 -234
  72. data/spec/dummy/db/migrate/20130107205939_base_products_indexes.erp_products.rb +0 -59
  73. data/spec/dummy/db/migrate/20130107205940_base_txns_and_accts.erp_txns_and_accts.rb +0 -364
  74. data/spec/dummy/db/migrate/20130107205941_agreements_services.erp_agreements.rb +0 -160
  75. data/spec/dummy/db/migrate/20130107205942_agreements_services_indexes.erp_agreements.rb +0 -52
  76. data/spec/dummy/db/migrate/20130107205943_base_app_framework.erp_app.rb +0 -276
  77. data/spec/dummy/db/migrate/20130107205944_erp_commerce_base.erp_commerce.rb +0 -442
  78. data/spec/dummy/db/schema.rb +0 -1821
  79. data/spec/dummy/db/spec.sqlite3 +0 -0
@@ -1,100 +0,0 @@
1
- Ext.define("Compass.ErpApp.Desktop.Applications.OrderManager.OrderLineItemsGridPanel",{
2
- extend:"Ext.grid.Panel",
3
- alias:'widget.desktopordermanagement_orderlineitemsgridpanel',
4
- initComponent : function(){
5
- this.bbar = new Ext.PagingToolbar({
6
- pageSize: 10,
7
- store:this.store,
8
- displayInfo: true,
9
- displayMsg: '{0} - {1} of {2}',
10
- emptyMsg: "Empty"
11
- });
12
-
13
- Compass.ErpApp.Desktop.Applications.OrderManager.OrderLineItemsGridPanel.superclass.initComponent.call(this, arguments);
14
- },
15
-
16
- constructor : function(config) {
17
- var store = Ext.create("Ext.data.Store",{
18
- proxy:{
19
- type:'ajax',
20
- url: '/erp_orders/erp_app/desktop/order_manager/line_items',
21
- reader:{
22
- type:'json',
23
- root: 'lineItems',
24
- idProperty:'id'
25
- }
26
- },
27
- totalProperty: 'totalCount',
28
- extraParams:{
29
- order_id:null
30
- },
31
- fields:[
32
- 'product',
33
- 'quantity',
34
- 'sku',
35
- {
36
- name:'price',
37
- type:'float'
38
- },
39
- 'currency_display',
40
- 'id'
41
- ]
42
- });
43
-
44
- config = Ext.apply({
45
- layout:'fit',
46
- columns: [
47
- {
48
- header:'Product',
49
- sortable: true,
50
- dataIndex: 'product'
51
- },
52
- {
53
- header:'SKU',
54
- sortable: true,
55
- dataIndex: 'sku'
56
- },
57
- {
58
- header:'Quantity',
59
- sortable: true,
60
- dataIndex: 'quantity'
61
- },
62
- {
63
- header:'Price',
64
- sortable: true,
65
- dataIndex: 'price',
66
- renderer:function(v){
67
- return v.toFixed(2);
68
- }
69
-
70
- },
71
- {
72
- header: 'Currency',
73
- width: 75,
74
- sortable: true,
75
- dataIndex: 'currency_display'
76
-
77
- }
78
- ],
79
- loadMask: true,
80
- autoScroll:true,
81
- stripeRows: true,
82
- store:store,
83
- viewConfig:{
84
- forceFit:true
85
- },
86
- listeners:{
87
- activate:function(grid){
88
- var layout = grid.findParentByType('organizer_orderslayout');
89
- if(!Compass.ErpApp.Utility.isBlank(layout.orderId)){
90
- var store = grid.getStore();
91
- store.proxy.extraParams.order_id = layout.orderId;
92
- store.load();
93
- }
94
- }
95
- }
96
- }, config);
97
-
98
- Compass.ErpApp.Desktop.Applications.OrderManager.OrderLineItemsGridPanel.superclass.constructor.call(this, config);
99
- }
100
- });
@@ -1,85 +0,0 @@
1
- Ext.define("Compass.ErpApp.Desktop.Applications.OrderManager",{
2
- extend:"Ext.ux.desktop.Module",
3
- id:'order_manager-win',
4
- init : function(){
5
- this.launcher = {
6
- text: 'Orders',
7
- iconCls:'icon-package',
8
- handler : this.createWindow,
9
- scope: this
10
- }
11
- },
12
- createWindow : function(){
13
- var desktop = this.app.getDesktop();
14
- var win = desktop.getWindow('order_manager');
15
- if(!win){
16
- var tabPanel = Ext.create("Ext.tab.Panel",{
17
- region:'south',
18
- height:250,
19
- collapsible:true,
20
- border:false,
21
- items:[{
22
- xtype:'desktopordermanagement_orderlineitemsgridpanel',
23
- title:'Line Items',
24
- listeners:{
25
- activate:function(grid){
26
- if(!Compass.ErpApp.Utility.isBlank(Compass.ErpApp.Desktop.Applications.OrderManager.orderId)){
27
- var store = grid.getStore();
28
- store.proxy.extraParams.order_id = Compass.ErpApp.Desktop.Applications.OrderManager.orderId;
29
- store.load();
30
- }
31
- }
32
- }
33
- },{
34
- xtype:'desktopordermanagement_paymentsgridpanel',
35
- title:'Payments',
36
- listeners:{
37
- activate:function(grid){
38
- if(!Compass.ErpApp.Utility.isBlank(Compass.ErpApp.Desktop.Applications.OrderManager.orderId)){
39
- var store = grid.getStore();
40
- store.proxy.extraParams.order_id = Compass.ErpApp.Desktop.Applications.OrderManager.orderId;
41
- store.load();
42
- }
43
- }
44
- }
45
- }]
46
- });
47
-
48
- var layout = Ext.create("Ext.panel.Panel",{
49
- id:'orders_layout',
50
- layout:'border',
51
- frame: false,
52
- autoScroll:true,
53
- items:[{
54
- region:'center',
55
- xtype:'ordermanager_ordersgridpanel',
56
- listeners:{
57
- 'itemclick':function(view, record, item, index, e, options){
58
- var orderId = record.get("id");
59
- Compass.ErpApp.Desktop.Applications.OrderManager.orderId = orderId;
60
- tabPanel.query('desktopordermanagement_orderlineitemsgridpanel')[0].getStore().load({params:{order_id:orderId}});
61
- tabPanel.setActiveTab(0);
62
- }
63
- }
64
- },
65
- tabPanel
66
- ]
67
- });
68
-
69
- win = desktop.createWindow({
70
- id: 'order_manager',
71
- title:'Orders',
72
- width:1050,
73
- height:550,
74
- iconCls: 'icon-package',
75
- shim:false,
76
- animCollapse:false,
77
- constrainHeader:true,
78
- layout: 'fit',
79
- items:[layout]
80
- });
81
- }
82
- win.show();
83
- }
84
- });
85
-
@@ -1,162 +0,0 @@
1
- Ext.define("Compass.ErpApp.Desktop.Applications.OrderManager.OrdersGridPanel",{
2
- extend:"Ext.grid.Panel",
3
- alias:'widget.ordermanager_ordersgridpanel',
4
- deleteOrder : function(rec){
5
- var self = this;
6
- Ext.MessageBox.confirm('Confirm', 'Are you sure you want to delete this order?', function(btn){
7
- if(btn == 'no'){
8
- return false;
9
- }
10
- else
11
- {
12
- Ext.Ajax.request({
13
- url: './order_manager/delete/'+rec.get('id'),
14
- success: function(response) {
15
- var obj = Ext.decode(response.responseText);
16
- if(obj.success){
17
- self.getStore().load();
18
- }
19
- else{
20
- Ext.Msg.alert('Error', 'Error deleting order.');
21
- }
22
- },
23
- failure: function(response) {
24
- Ext.Msg.alert('Error', 'Error deleting order.');
25
- }
26
- });
27
- }
28
- });
29
- },
30
-
31
- initComponent : function(){
32
- this.bbar = Ext.create("Ext.PagingToolbar",{
33
- pageSize: this.initialConfig['pageSize'] || 50,
34
- store:this.store,
35
- displayInfo: true,
36
- displayMsg: '{0} - {1} of {2}',
37
- emptyMsg: "Empty"
38
- });
39
-
40
- Compass.ErpApp.Desktop.Applications.OrderManager.OrdersGridPanel.superclass.initComponent.call(this, arguments);
41
- },
42
-
43
- constructor : function(config) {
44
- var store = Ext.create("Ext.data.Store",{
45
- autoLoad: true,
46
- proxy:{
47
- type:'ajax',
48
- url: '/erp_orders/erp_app/desktop/order_manager',
49
- reader:{
50
- type:'json',
51
- root: 'orders'
52
- }
53
- },
54
- extraParams:{
55
- order_number:null
56
- },
57
- totalProperty: 'totalCount',
58
- fields:['total_price','order_number', 'status', 'first_name', 'last_name', 'email','phone','id','created_at']
59
- });
60
-
61
- config = Ext.apply({
62
- layout:'fit',
63
- columns: [
64
- {
65
- header:'Order Number',
66
- sortable: true,
67
- dataIndex: 'order_number'
68
- },
69
- {
70
- header:'Status',
71
- sortable: true,
72
- dataIndex: 'status'
73
- },
74
- {
75
- header:'Total Price',
76
- sortable: true,
77
- dataIndex: 'total_price'
78
- },
79
- {
80
- header:'First Name',
81
- sortable: true,
82
- width:150,
83
- dataIndex: 'first_name'
84
- },
85
- {
86
- header:'Last Name',
87
- sortable: true,
88
- width:150,
89
- dataIndex: 'last_name'
90
- },
91
- {
92
- header:'Email',
93
- sortable: true,
94
- dataIndex: 'email'
95
- },
96
- {
97
- header:'Phone',
98
- sortable: true,
99
- dataIndex: 'phone'
100
- },
101
- {
102
- header:'Created At',
103
- sortable: true,
104
- dataIndex: 'created_at',
105
- width:150,
106
- renderer: Ext.util.Format.dateRenderer('m/d/Y H:i:s')
107
- },
108
- {
109
- menuDisabled:true,
110
- resizable:false,
111
- xtype:'actioncolumn',
112
- header:'Delete',
113
- align:'center',
114
- width:60,
115
- items:[{
116
- icon:'/images/icons/delete/delete_16x16.png',
117
- tooltip:'Delete',
118
- handler :function(grid, rowIndex, colIndex){
119
- var rec = grid.getStore().getAt(rowIndex);
120
- grid.deleteOrder(rec);
121
- }
122
- }]
123
- }
124
- ],
125
- store:store,
126
- loadMask: true,
127
- autoScroll:true,
128
- stripeRows: true,
129
- tbar:{
130
- items:[
131
- '<span class="x-btn-inner">Order Number:</span>',
132
- {
133
- xtype:'numberfield',
134
- hideLabel:true,
135
- id:'orderNumberSearchTextField'
136
- },
137
- {
138
- text:'Search',
139
- iconCls:'icon-search',
140
- handler:function(btn){
141
- var orderNumber = Ext.getCmp('orderNumberSearchTextField').getValue();
142
- btn.findParentByType('ordermanager_ordersgridpanel').store.proxy.extraParams.order_number = orderNumber;
143
- btn.findParentByType('ordermanager_ordersgridpanel').store.load();
144
- }
145
- },
146
- '|',
147
- {
148
- text: 'All',
149
- xtype:'button',
150
- iconCls: 'icon-eye',
151
- handler: function(btn) {
152
- btn.findParentByType('ordermanager_ordersgridpanel').store.proxy.extraParams.order_number = null;
153
- btn.findParentByType('ordermanager_ordersgridpanel').store.load();
154
- }
155
- },
156
- ]
157
- }
158
- }, config);
159
-
160
- Compass.ErpApp.Desktop.Applications.OrderManager.OrdersGridPanel.superclass.constructor.call(this, config);
161
- }
162
- });
@@ -1,109 +0,0 @@
1
- Ext.define("Compass.ErpApp.Desktop.Applications.OrderManager.PaymentsGridPanel",{
2
- extend:"Ext.grid.Panel",
3
- alias:'widget.desktopordermanagement_paymentsgridpanel',
4
-
5
- initComponent : function(){
6
- this.bbar = new Ext.PagingToolbar({
7
- pageSize: 10,
8
- store:this.store,
9
- displayInfo: true,
10
- displayMsg: '{0} - {1} of {2}',
11
- emptyMsg: "Empty"
12
- });
13
-
14
- Compass.ErpApp.Desktop.Applications.OrderManager.PaymentsGridPanel.superclass.initComponent.call(this, arguments);
15
- },
16
-
17
- constructor : function(config) {
18
- var store = Ext.create("Ext.data.Store",{
19
- proxy:{
20
- type:'ajax',
21
- url: '/erp_orders/erp_app/desktop/order_manager/payments',
22
- reader:{
23
- type:'json',
24
- root: 'payments',
25
- idProperty:'id'
26
- }
27
- },
28
- totalProperty: 'totalCount',
29
- fields:[
30
- 'authorization',
31
- 'status',
32
- 'created_at',
33
- {
34
- name:'amount',
35
- type:'float'
36
- },
37
- 'currency_display',
38
- 'id',
39
- 'success'
40
- ],
41
- extraParams:{
42
- order_id:null
43
- }
44
- });
45
-
46
- config = Ext.apply({
47
- layout:'fit',
48
- columns: [
49
- {
50
- header:'Authorization #',
51
- sortable: true,
52
- dataIndex: 'authorization'
53
- },
54
- {
55
- header:'Status',
56
- sortable: true,
57
- dataIndex: 'status'
58
- },
59
- {
60
- header:'Successful',
61
- sortable: true,
62
- dataIndex: 'success'
63
- },
64
- {
65
- header:'Amount',
66
- sortable: true,
67
- dataIndex: 'amount',
68
- renderer:function(v){
69
- return v.toFixed(2);
70
- }
71
-
72
- },
73
- {
74
- header: 'Currency',
75
- width: 75,
76
- sortable: true,
77
- dataIndex: 'currency_display'
78
-
79
- },
80
- {
81
- header: 'Created At',
82
- sortable: true,
83
- width:150,
84
- dataIndex: 'created_at',
85
- renderer: Ext.util.Format.dateRenderer('m/d/Y H:i:s')
86
- }
87
- ],
88
- autoScroll:true,
89
- stripeRows: true,
90
- store:store,
91
- viewConfig:{
92
- loadMask:false,
93
- forceFit:true
94
- },
95
- listeners:{
96
- activate:function(grid){
97
- var layout = grid.findParentByType('organizer_orderslayout');
98
- if(!Compass.ErpApp.Utility.isBlank(layout.orderId)){
99
- var store = grid.getStore();
100
- store.proxy.extraParams.order_id = layout.orderId;
101
- store.load();
102
- }
103
- }
104
- }
105
- }, config);
106
-
107
- Compass.ErpApp.Desktop.Applications.OrderManager.PaymentsGridPanel.superclass.constructor.call(this, config);
108
- }
109
- });
@@ -1,124 +0,0 @@
1
- Ext.define("Compass.ErpApp.Organizer.Applications.OrderManagement.Layout",{
2
- extend:"Ext.panel.Panel",
3
- alias:'widget.organizer_orderslayout',
4
- //private member orderId
5
- orderId:null,
6
- constructor : function(config) {
7
- var southPanel = Ext.create("Ext.panel.Panel",{
8
- layout:'fit',
9
- region:'south',
10
- height:300,
11
- collapsible:true,
12
- border:false,
13
- items:[config['southComponent']]
14
- });
15
-
16
- var centerPanel = Ext.create("Ext.panel.Panel",{
17
- layout:'fit',
18
- region:'center',
19
- autoScroll:true,
20
- items:[config['centerComponent']]
21
- })
22
-
23
- config = Ext.apply({
24
- layout:'border',
25
- frame: false,
26
- autoScroll:true,
27
- region:'center',
28
- items:[
29
- centerPanel,
30
- southPanel
31
- ]
32
-
33
- }, config);
34
- Compass.ErpApp.Organizer.Applications.OrderManagement.Layout.superclass.constructor.call(this, config);
35
- },
36
-
37
- /**
38
- * set the private member orderId
39
- * @param {Integer} orderId
40
- */
41
- setOrderId : function(orderId){
42
- this.orderId = orderId;
43
- },
44
-
45
-
46
- loadOrderDetails : function(orderId){
47
- if(orderId == null){
48
- Ext.Msg.alert('Error', 'Order must be selected.');
49
- }
50
- else{
51
- this.orderId = orderId;
52
- var tabPanel = this.query('tabpanel')[0];
53
-
54
- var orderLineItemsGrid = tabPanel.query('organizerordermanagement_orderlineitemsgridpanel')[0];
55
- orderLineItemsGrid.getStore().load({
56
- params:{
57
- order_id:this.orderId
58
- }
59
- });
60
-
61
- tabPanel.setActiveTab(0);
62
- }
63
- },
64
-
65
- loadRemoteData:function(){
66
- this.orderId = null;
67
- var ordersGridPanel = this.query('ordermanager_ordersgridpanel')[0]
68
- ordersGridPanel.getStore().load();
69
- }
70
-
71
- });
72
-
73
- Compass.ErpApp.Organizer.Applications.OrderManagement.Base = function(config){
74
-
75
- var treeMenuStore = Ext.create('Compass.ErpApp.Organizer.DefaultMenuTreeStore', {
76
- url:'/erp_orders/erp_app/organizer/order_management/menu',
77
- rootText:'Menu',
78
- rootIconCls:'icon-content'
79
- });
80
-
81
- var menuTreePanel = {
82
- xtype:'defaultmenutree',
83
- title:'Order Management',
84
- store:treeMenuStore
85
- };
86
-
87
- var southTabPanel = {
88
- xtype:'tabpanel',
89
- items:[{
90
- xtype:'organizerordermanagement_orderlineitemsgridpanel',
91
- title:'Line Items'
92
- },{
93
- xtype:'organizerordermanagement_paymentsgridpanel',
94
- title:'Payments'
95
- }]
96
- };
97
-
98
- var layout = {
99
- id:'orders_layout',
100
- xtype:'organizer_orderslayout',
101
- centerComponent:{
102
- id:'orders_grid',
103
- xtype:'ordermanager_ordersgridpanel',
104
- listeners:{
105
- 'itemclick':function(view, record, item, index, e, options){
106
- var id = record.get("id");
107
- var layout = view.findParentByType('organizer_orderslayout');
108
- layout.loadOrderDetails(id);
109
- }
110
- }
111
- },
112
- southComponent:southTabPanel
113
- };
114
-
115
- this.setup = function(){
116
- config['organizerLayout'].addApplication(menuTreePanel,[layout]);
117
- };
118
-
119
- this.loadRemoteData = function(){
120
-
121
- };
122
-
123
- };
124
-
@@ -1,113 +0,0 @@
1
- Ext.define("Compass.ErpApp.Organizer.Applications.OrderManagement.PartyOrdersTab",{
2
- extend:"Compass.ErpApp.Organizer.Applications.OrderManagement.OrdersGridPanel",
3
- alias:'widget.partyorderstab',
4
- title:'Orders',
5
- columns: [
6
- {
7
- header:'Order Number',
8
- sortable: true,
9
- dataIndex: 'order_number'
10
- },
11
- {
12
- header:'Status',
13
- sortable: true,
14
- width:150,
15
- dataIndex: 'status'
16
- },
17
- {
18
- header:'Total Price',
19
- sortable: true,
20
- dataIndex: 'total_price'
21
- },
22
- {
23
- header:'First Name',
24
- sortable: true,
25
- width:150,
26
- dataIndex: 'first_name'
27
- },
28
- {
29
- header:'Last Name',
30
- sortable: true,
31
- width:150,
32
- dataIndex: 'last_name'
33
- },
34
- {
35
- header:'Email',
36
- sortable: true,
37
- dataIndex: 'email'
38
- },
39
- {
40
- header:'Phone',
41
- sortable: true,
42
- dataIndex: 'phone'
43
- },
44
- {
45
- header:'Created At',
46
- sortable: true,
47
- dataIndex: 'created_at',
48
- width:150,
49
- renderer: Ext.util.Format.dateRenderer('m/d/Y H:i:s')
50
- },
51
- {
52
- menuDisabled:true,
53
- resizable:false,
54
- xtype:'actioncolumn',
55
- header:'Order Details',
56
- align:'center',
57
- width:100,
58
- items:[{
59
- icon:'/images/icons/about/about_16x16.png',
60
- tooltip:'View Order Details',
61
- handler :function(grid, rowIndex, colIndex){
62
- var rec = grid.getStore().getAt(rowIndex);
63
- var orderId = rec.get('id');
64
-
65
- var ordersLayout = Ext.getCmp('orders_layout');
66
- ordersLayout.loadOrderDetails(orderId);
67
- var ordersGridPanel = ordersLayout.query('ordermanager_ordersgridpanel')[0];
68
- ordersGridPanel.getStore().load({
69
- params:{
70
- order_id:orderId,
71
- start:1,
72
- limit:1
73
- }
74
- })
75
-
76
- Compass.ErpApp.Organizer.Layout.setActiveCenterItem('orders_layout', false);
77
- }
78
- }]
79
- },
80
- {
81
- menuDisabled:true,
82
- resizable:false,
83
- xtype:'actioncolumn',
84
- header:'Delete',
85
- align:'center',
86
- width:60,
87
- items:[{
88
- icon:'/images/icons/delete/delete_16x16.png',
89
- tooltip:'Delete',
90
- handler :function(grid, rowIndex, colIndex){
91
- var rec = grid.getStore().getAt(rowIndex);
92
- grid.deleteOrder(rec);
93
- }
94
- }]
95
- }
96
- ],
97
- listeners:{
98
- activate:function(grid){
99
- var contactsLayout = grid.findParentByType('contactslayout');
100
- if(!Compass.ErpApp.Utility.isBlank(contactsLayout.partyId)){
101
- var store = grid.getStore();
102
- store.proxy.extraParams.party_id = contactsLayout.partyId;
103
- store.load({
104
- params:{
105
- start:0,
106
- limit:10
107
- }
108
- })
109
- }
110
- }
111
- }
112
-
113
- });