erp_app 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/controllers/erp_app/organizer/crm/base_controller.rb +1 -1
- data/lib/erp_app/version.rb +1 -1
- data/public/javascripts/erp_app/organizer/applications/crm/base.js +18 -414
- data/public/javascripts/erp_app/organizer/applications/crm/individual_windows.js +237 -0
- data/public/javascripts/erp_app/organizer/applications/crm/organization_windows.js +167 -0
- data/public/javascripts/erp_app/shared/profile_management_panel.js +1 -1
- data/public/stylesheets/sencha_touch/resources/themes/vendor/compass-recipes/compass-recipes-0.3.0.alpha.1.gem +0 -0
- metadata +4 -7
@@ -84,7 +84,7 @@ module ErpApp
|
|
84
84
|
business_party_data[:current_passport_expire_date] = Date.strptime(business_party_data[:current_passport_expire_date], @@date_format) unless business_party_data[:current_passport_expire_date].blank?
|
85
85
|
|
86
86
|
klass = party_type.constantize
|
87
|
-
business_party = klass.find(
|
87
|
+
business_party = klass.find(business_party_id)
|
88
88
|
|
89
89
|
business_party_data.each do |key,value|
|
90
90
|
key = key.gsub("business_party.", "")
|
data/lib/erp_app/version.rb
CHANGED
@@ -156,15 +156,15 @@ Compass.ErpApp.Organizer.Applications.Crm.Base = function (config) {
|
|
156
156
|
'postaladdressgrid',
|
157
157
|
'shared_notesgrid'
|
158
158
|
];
|
159
|
-
|
159
|
+
|
160
|
+
for (i = 0; i < xtypes.length; i += 1) {
|
161
|
+
panelSouthItems.push({
|
162
|
+
xtype:xtypes[i],
|
163
|
+
partyId:partyId
|
164
|
+
});
|
165
|
+
}
|
166
|
+
|
160
167
|
if (party_type == 'Individual') {
|
161
|
-
for (i = 0; i < xtypes.length; i += 1) {
|
162
|
-
panelSouthItems.push({
|
163
|
-
xtype:xtypes[i],
|
164
|
-
partyId:partyId
|
165
|
-
});
|
166
|
-
}
|
167
|
-
|
168
168
|
var current_passport_expire_date = party.get('current_passport_expire_date');
|
169
169
|
if (!Compass.ErpApp.Utility.isBlank(current_passport_expire_date)) {
|
170
170
|
current_passport_expire_date = Ext.Date.format(current_passport_expire_date, 'm/d/Y');
|
@@ -173,12 +173,6 @@ Compass.ErpApp.Organizer.Applications.Crm.Base = function (config) {
|
|
173
173
|
tabtitle = party.get('current_first_name') + ' ' + party.get('current_last_name');
|
174
174
|
}
|
175
175
|
else {
|
176
|
-
for (i = 0; i < xtypes.length; i += 1) {
|
177
|
-
panelSouthItems.push({
|
178
|
-
xtype:xtypes[i]
|
179
|
-
});
|
180
|
-
}
|
181
|
-
|
182
176
|
tabtitle = party.get('description');
|
183
177
|
}
|
184
178
|
|
@@ -198,397 +192,6 @@ Compass.ErpApp.Organizer.Applications.Crm.Base = function (config) {
|
|
198
192
|
loadPartyDetails(partyId);
|
199
193
|
};
|
200
194
|
|
201
|
-
var individualFormFields = [
|
202
|
-
{
|
203
|
-
xtype:'textfield',
|
204
|
-
fieldLabel:'Enterprise Identifier',
|
205
|
-
allowBlank:true,
|
206
|
-
name:'enterprise_identifier'
|
207
|
-
},
|
208
|
-
{
|
209
|
-
xtype:'textfield',
|
210
|
-
fieldLabel:'Title',
|
211
|
-
allowBlank:true,
|
212
|
-
name:'current_personal_title'
|
213
|
-
},
|
214
|
-
{
|
215
|
-
xtype:'textfield',
|
216
|
-
fieldLabel:'First Name',
|
217
|
-
allowBlank:false,
|
218
|
-
name:'current_first_name'
|
219
|
-
},
|
220
|
-
{
|
221
|
-
xtype:'textfield',
|
222
|
-
fieldLabel:'Middle Name',
|
223
|
-
allowBlank:true,
|
224
|
-
name:'current_middle_name'
|
225
|
-
},
|
226
|
-
{
|
227
|
-
xtype:'textfield',
|
228
|
-
fieldLabel:'Last Name',
|
229
|
-
allowBlank:false,
|
230
|
-
name:'current_last_name'
|
231
|
-
},
|
232
|
-
{
|
233
|
-
xtype:'textfield',
|
234
|
-
fieldLabel:'Suffix',
|
235
|
-
allowBlank:true,
|
236
|
-
name:'current_suffix'
|
237
|
-
},
|
238
|
-
{
|
239
|
-
xtype:'textfield',
|
240
|
-
fieldLabel:'Nickname',
|
241
|
-
allowBlank:true,
|
242
|
-
name:'current_nickname'
|
243
|
-
},
|
244
|
-
{
|
245
|
-
xtype:'textfield',
|
246
|
-
fieldLabel:'Passport Number',
|
247
|
-
allowBlank:true,
|
248
|
-
name:'current_passport_number'
|
249
|
-
},
|
250
|
-
{
|
251
|
-
xtype:'datefield',
|
252
|
-
fieldLabel:'Passport Expiration Date',
|
253
|
-
allowBlank:true,
|
254
|
-
name:'current_passport_expire_date'
|
255
|
-
},
|
256
|
-
{
|
257
|
-
xtype:'datefield',
|
258
|
-
fieldLabel:'DOB',
|
259
|
-
allowBlank:false,
|
260
|
-
name:'birth_date'
|
261
|
-
},
|
262
|
-
{
|
263
|
-
xtype:'combobox',
|
264
|
-
fieldLabel:'Gender',
|
265
|
-
store:Ext.create('Ext.data.Store', {
|
266
|
-
fields:['v', 'k'],
|
267
|
-
data:[
|
268
|
-
{"v":"m", "k":"Male"},
|
269
|
-
{"v":"f", "k":"Female"}
|
270
|
-
]
|
271
|
-
}),
|
272
|
-
displayField:'k',
|
273
|
-
valueField:'v',
|
274
|
-
name:'gender'
|
275
|
-
},
|
276
|
-
{
|
277
|
-
xtype:'textfield',
|
278
|
-
fieldLabel:'Total Yrs Work Exp',
|
279
|
-
allowBlank:true,
|
280
|
-
name:'total_years_work_experience'
|
281
|
-
},
|
282
|
-
{
|
283
|
-
xtype:'textfield',
|
284
|
-
fieldLabel:'Marital Status',
|
285
|
-
allowBlank:true,
|
286
|
-
name:'marital_status'
|
287
|
-
},
|
288
|
-
{
|
289
|
-
xtype:'textfield',
|
290
|
-
fieldLabel:'Social Security Number',
|
291
|
-
allowBlank:true,
|
292
|
-
name:'social_security_number'
|
293
|
-
}
|
294
|
-
];
|
295
|
-
|
296
|
-
var editIndividualFormFields = [
|
297
|
-
{
|
298
|
-
xtype:'hiddenfield',
|
299
|
-
name:'id'
|
300
|
-
},
|
301
|
-
{
|
302
|
-
xtype:'hiddenfield',
|
303
|
-
name:'business_party_id'
|
304
|
-
}
|
305
|
-
];
|
306
|
-
|
307
|
-
var addIndividualWindow = Ext.create("Ext.window.Window", {
|
308
|
-
layout:'fit',
|
309
|
-
width:375,
|
310
|
-
title:'New Individual',
|
311
|
-
height:500,
|
312
|
-
buttonAlign:'center',
|
313
|
-
items:new Ext.FormPanel({
|
314
|
-
labelWidth:110,
|
315
|
-
frame:false,
|
316
|
-
bodyStyle:'padding:5px 5px 0',
|
317
|
-
width:425,
|
318
|
-
url:'/erp_app/organizer/crm/create_party',
|
319
|
-
defaults:{
|
320
|
-
width:225
|
321
|
-
},
|
322
|
-
items:[ individualFormFields ]
|
323
|
-
}),
|
324
|
-
buttons:[
|
325
|
-
{
|
326
|
-
text:'Submit',
|
327
|
-
listeners:{
|
328
|
-
'click':function (button) {
|
329
|
-
var window = button.findParentByType('window');
|
330
|
-
var formPanel = window.query('form')[0];
|
331
|
-
formPanel.getForm().submit({
|
332
|
-
reset:true,
|
333
|
-
params:{
|
334
|
-
party_type:'Individual'
|
335
|
-
},
|
336
|
-
waitMsg:'Creating Individual',
|
337
|
-
success:function (form, action) {
|
338
|
-
var response = Ext.decode(action.response.responseText);
|
339
|
-
Ext.Msg.alert("Status", response.message);
|
340
|
-
if (response.success) {
|
341
|
-
var individualName = response.individualName;
|
342
|
-
addIndividualWindow.hide();
|
343
|
-
var individualsSearchGrid = Ext.ComponentMgr.get('individualSearchGrid');
|
344
|
-
individualsSearchGrid.store.proxy.extraParams.party_name = individualName;
|
345
|
-
individualsSearchGrid.store.load();
|
346
|
-
}
|
347
|
-
},
|
348
|
-
failure:function (form, action) {
|
349
|
-
var message = 'Error adding individual';
|
350
|
-
if (action.response != null) {
|
351
|
-
var response = Ext.decode(action.response.responseText);
|
352
|
-
message = response.message;
|
353
|
-
}
|
354
|
-
Ext.Msg.alert("Status", message);
|
355
|
-
}
|
356
|
-
});
|
357
|
-
}
|
358
|
-
}
|
359
|
-
},
|
360
|
-
{
|
361
|
-
text:'Close',
|
362
|
-
handler:function () {
|
363
|
-
addIndividualWindow.hide();
|
364
|
-
}
|
365
|
-
}
|
366
|
-
]
|
367
|
-
});
|
368
|
-
|
369
|
-
var editIndividualWindow = Ext.create("Ext.window.Window", {
|
370
|
-
layout:'fit',
|
371
|
-
width:375,
|
372
|
-
title:'Edit Individual',
|
373
|
-
height:500,
|
374
|
-
buttonAlign:'center',
|
375
|
-
items:new Ext.FormPanel({
|
376
|
-
id:'editIndividualFormPanel',
|
377
|
-
labelWidth:110,
|
378
|
-
frame:false,
|
379
|
-
bodyStyle:'padding:5px 5px 0',
|
380
|
-
width:425,
|
381
|
-
url:'/erp_app/organizer/crm/update_party',
|
382
|
-
defaults:{
|
383
|
-
width:225
|
384
|
-
},
|
385
|
-
items:[ individualFormFields.concat(editIndividualFormFields) ]
|
386
|
-
}),
|
387
|
-
buttons:[
|
388
|
-
{
|
389
|
-
text:'Submit',
|
390
|
-
listeners:{
|
391
|
-
'click':function (button) {
|
392
|
-
partyId = Ext.getCmp('editIndividualFormPanel').getForm().findField('id').getValue();
|
393
|
-
|
394
|
-
var window = button.findParentByType('window');
|
395
|
-
var formPanel = window.query('form')[0];
|
396
|
-
formPanel.getForm().submit({
|
397
|
-
reset:true,
|
398
|
-
params:{
|
399
|
-
party_type:'Individual'
|
400
|
-
},
|
401
|
-
waitMsg:'Updating Individual',
|
402
|
-
success:function (form, action) {
|
403
|
-
var response = Ext.decode(action.response.responseText);
|
404
|
-
Ext.Msg.alert("Status", response.message);
|
405
|
-
if (response.success) {
|
406
|
-
updatePartyDetails(partyId);
|
407
|
-
editIndividualWindow.hide();
|
408
|
-
Ext.getCmp('individualSearchGrid').store.load();
|
409
|
-
}
|
410
|
-
},
|
411
|
-
failure:function (form, action) {
|
412
|
-
var message = 'Error updating individual';
|
413
|
-
if (action.response != null) {
|
414
|
-
var response = Ext.decode(action.response.responseText);
|
415
|
-
message = response.message;
|
416
|
-
}
|
417
|
-
Ext.Msg.alert("Status", message);
|
418
|
-
}
|
419
|
-
});
|
420
|
-
}
|
421
|
-
}
|
422
|
-
},
|
423
|
-
{
|
424
|
-
text:'Close',
|
425
|
-
handler:function () {
|
426
|
-
editIndividualWindow.hide();
|
427
|
-
}
|
428
|
-
}
|
429
|
-
]
|
430
|
-
});
|
431
|
-
|
432
|
-
var organizationFormFields = [
|
433
|
-
{
|
434
|
-
xtype:'textfield',
|
435
|
-
fieldLabel:'Enterprise Identifier',
|
436
|
-
allowBlank:true,
|
437
|
-
name:'enterprise_identifier'
|
438
|
-
},
|
439
|
-
{
|
440
|
-
xtype:'textfield',
|
441
|
-
fieldLabel:'Tax ID',
|
442
|
-
allowBlank:true,
|
443
|
-
name:'tax_id_number'
|
444
|
-
},
|
445
|
-
{
|
446
|
-
xtype:'textfield',
|
447
|
-
fieldLabel:'Description',
|
448
|
-
allowBlank:true,
|
449
|
-
name:'description'
|
450
|
-
}
|
451
|
-
];
|
452
|
-
|
453
|
-
var editOrganizationFormFields = [
|
454
|
-
{
|
455
|
-
xtype:'hiddenfield',
|
456
|
-
name:'id'
|
457
|
-
},
|
458
|
-
{
|
459
|
-
xtype:'hiddenfield',
|
460
|
-
name:'business_party_id'
|
461
|
-
}
|
462
|
-
];
|
463
|
-
|
464
|
-
var addOrganizationWindow = Ext.create("Ext.window.Window", {
|
465
|
-
layout:'fit',
|
466
|
-
width:375,
|
467
|
-
title:'New Organization',
|
468
|
-
height:160,
|
469
|
-
buttonAlign:'center',
|
470
|
-
items:new Ext.FormPanel({
|
471
|
-
labelWidth:110,
|
472
|
-
frame:false,
|
473
|
-
bodyStyle:'padding:5px 5px 0',
|
474
|
-
width:425,
|
475
|
-
url:'/erp_app/organizer/crm/create_party',
|
476
|
-
defaults:{
|
477
|
-
width:225
|
478
|
-
},
|
479
|
-
items:[ organizationFormFields ]
|
480
|
-
}),
|
481
|
-
buttons:[
|
482
|
-
{
|
483
|
-
text:'Submit',
|
484
|
-
listeners:{
|
485
|
-
'click':function (button) {
|
486
|
-
var window = button.findParentByType('window');
|
487
|
-
var formPanel = window.query('form')[0];
|
488
|
-
formPanel.getForm().submit({
|
489
|
-
reset:true,
|
490
|
-
waitMsg:'Creating Organization',
|
491
|
-
params:{
|
492
|
-
party_type:'Organization'
|
493
|
-
},
|
494
|
-
success:function (form, action) {
|
495
|
-
var response = Ext.decode(action.response.responseText);
|
496
|
-
Ext.Msg.alert("Status", response.message);
|
497
|
-
if (response.success) {
|
498
|
-
var organizationName = response.organizationName;
|
499
|
-
addOrganizationWindow.hide();
|
500
|
-
var organizationSearchGrid = Ext.ComponentMgr.get('organizationSearchGrid');
|
501
|
-
organizationSearchGrid.store.proxy.extraParams.party_name = organizationName;
|
502
|
-
organizationSearchGrid.store.load();
|
503
|
-
}
|
504
|
-
},
|
505
|
-
failure:function (form, action) {
|
506
|
-
var message = "Error adding organization";
|
507
|
-
if (action.response != null) {
|
508
|
-
var response = Ext.decode(action.response.responseText);
|
509
|
-
message = response.message;
|
510
|
-
}
|
511
|
-
Ext.Msg.alert("Status", message);
|
512
|
-
}
|
513
|
-
});
|
514
|
-
}
|
515
|
-
}
|
516
|
-
},
|
517
|
-
{
|
518
|
-
text:'Close',
|
519
|
-
handler:function () {
|
520
|
-
addOrganizationWindow.hide();
|
521
|
-
}
|
522
|
-
}
|
523
|
-
]
|
524
|
-
});
|
525
|
-
|
526
|
-
var editOrganizationWindow = Ext.create("Ext.window.Window", {
|
527
|
-
layout:'fit',
|
528
|
-
width:375,
|
529
|
-
title:'Edit Organization',
|
530
|
-
height:160,
|
531
|
-
buttonAlign:'center',
|
532
|
-
items:new Ext.FormPanel({
|
533
|
-
id:'editOrganizationFormPanel',
|
534
|
-
labelWidth:110,
|
535
|
-
frame:false,
|
536
|
-
bodyStyle:'padding:5px 5px 0',
|
537
|
-
width:425,
|
538
|
-
url:'/erp_app/organizer/crm/update_party',
|
539
|
-
defaults:{
|
540
|
-
width:225
|
541
|
-
},
|
542
|
-
items:[ organizationFormFields.concat(editOrganizationFormFields) ]
|
543
|
-
}),
|
544
|
-
buttons:[
|
545
|
-
{
|
546
|
-
text:'Submit',
|
547
|
-
listeners:{
|
548
|
-
'click':function (button) {
|
549
|
-
partyId = Ext.getCmp('editOrganizationFormPanel').getForm().findField('id').getValue();
|
550
|
-
|
551
|
-
var window = button.findParentByType('window');
|
552
|
-
var formPanel = window.query('form')[0];
|
553
|
-
formPanel.getForm().submit({
|
554
|
-
reset:true,
|
555
|
-
waitMsg:'Updating Organization',
|
556
|
-
params:{
|
557
|
-
party_type:'Organization'
|
558
|
-
},
|
559
|
-
success:function (form, action) {
|
560
|
-
var response = Ext.decode(action.response.responseText);
|
561
|
-
Ext.Msg.alert("Status", response.message);
|
562
|
-
if (response.success) {
|
563
|
-
updatePartyDetails(partyId);
|
564
|
-
var organizationName = response.organizationName;
|
565
|
-
editOrganizationWindow.hide();
|
566
|
-
var organizationSearchGrid = Ext.ComponentMgr.get('organizationSearchGrid');
|
567
|
-
organizationSearchGrid.store.proxy.extraParams.party_name = organizationName;
|
568
|
-
organizationSearchGrid.store.load();
|
569
|
-
}
|
570
|
-
},
|
571
|
-
failure:function (form, action) {
|
572
|
-
var message = "Error adding organization";
|
573
|
-
if (action.response != null) {
|
574
|
-
var response = Ext.decode(action.response.responseText);
|
575
|
-
message = response.message;
|
576
|
-
}
|
577
|
-
Ext.Msg.alert("Status", message);
|
578
|
-
}
|
579
|
-
});
|
580
|
-
}
|
581
|
-
}
|
582
|
-
},
|
583
|
-
{
|
584
|
-
text:'Close',
|
585
|
-
handler:function () {
|
586
|
-
editOrganizationWindow.hide();
|
587
|
-
}
|
588
|
-
}
|
589
|
-
]
|
590
|
-
});
|
591
|
-
|
592
195
|
var treeMenuStore = Ext.create('Compass.ErpApp.Organizer.DefaultMenuTreeStore', {
|
593
196
|
url:'/erp_app/organizer/crm/menu',
|
594
197
|
rootText:'Customers',
|
@@ -618,7 +221,7 @@ Compass.ErpApp.Organizer.Applications.Crm.Base = function (config) {
|
|
618
221
|
iconCls:'icon-add',
|
619
222
|
listeners:{
|
620
223
|
'click':function () {
|
621
|
-
|
224
|
+
Ext.create("Compass.ErpApp.Organizer.Applications.Crm.AddIndividualWindow").show();
|
622
225
|
}
|
623
226
|
}
|
624
227
|
}
|
@@ -633,7 +236,7 @@ Compass.ErpApp.Organizer.Applications.Crm.Base = function (config) {
|
|
633
236
|
iconCls:'icon-add',
|
634
237
|
listeners:{
|
635
238
|
'click':function () {
|
636
|
-
|
239
|
+
Ext.create("Compass.ErpApp.Organizer.Applications.Crm.AddOrganizationWindow").show();
|
637
240
|
}
|
638
241
|
}
|
639
242
|
}
|
@@ -653,13 +256,13 @@ Compass.ErpApp.Organizer.Applications.Crm.Base = function (config) {
|
|
653
256
|
partyType:'Individual',
|
654
257
|
listeners:{
|
655
258
|
'addpartybtnclick':function (btn, grid) {
|
656
|
-
|
259
|
+
Ext.create("Compass.ErpApp.Organizer.Applications.Crm.AddIndividualWindow").show();
|
657
260
|
},
|
658
261
|
'editpartybtnclick':function (btn, rec) {
|
659
|
-
//rec = grid.getSelectionModel().getSelection()[0];
|
660
262
|
if (rec) {
|
661
|
-
|
662
|
-
|
263
|
+
var editIndividualWindow = Ext.create("Compass.ErpApp.Organizer.Applications.Crm.EditIndividualWindow");
|
264
|
+
editIndividualWindow.show();
|
265
|
+
editIndividualWindow.down('form').getForm().loadRecord(rec);
|
663
266
|
}
|
664
267
|
else {
|
665
268
|
Ext.Msg.alert('Please select a record to edit.');
|
@@ -685,13 +288,14 @@ Compass.ErpApp.Organizer.Applications.Crm.Base = function (config) {
|
|
685
288
|
partyType:'Organization',
|
686
289
|
listeners:{
|
687
290
|
'addpartybtnclick':function (btn, grid) {
|
688
|
-
|
291
|
+
Ext.create("Compass.ErpApp.Organizer.Applications.Crm.AddOrganizationWindow").show();
|
689
292
|
},
|
690
293
|
'editpartybtnclick':function (btn, rec) {
|
691
294
|
//rec = grid.getSelectionModel().getSelection()[0];
|
692
295
|
if (rec) {
|
693
|
-
Ext.
|
694
|
-
|
296
|
+
var editIndividualWindow = Ext.create("Compass.ErpApp.Organizer.Applications.Crm.EditOrganizationWindow");
|
297
|
+
editIndividualWindow.show();
|
298
|
+
editIndividualWindow.down('form').getForm().loadRecord(rec);
|
695
299
|
}
|
696
300
|
else {
|
697
301
|
Ext.Msg.alert('Please select a record to edit.');
|
@@ -0,0 +1,237 @@
|
|
1
|
+
var individualFormFields = [
|
2
|
+
{
|
3
|
+
xtype:'textfield',
|
4
|
+
fieldLabel:'Enterprise Identifier',
|
5
|
+
allowBlank:true,
|
6
|
+
name:'enterprise_identifier'
|
7
|
+
},
|
8
|
+
{
|
9
|
+
xtype:'textfield',
|
10
|
+
fieldLabel:'Title',
|
11
|
+
allowBlank:true,
|
12
|
+
name:'current_personal_title'
|
13
|
+
},
|
14
|
+
{
|
15
|
+
xtype:'textfield',
|
16
|
+
fieldLabel:'First Name',
|
17
|
+
allowBlank:false,
|
18
|
+
name:'current_first_name'
|
19
|
+
},
|
20
|
+
{
|
21
|
+
xtype:'textfield',
|
22
|
+
fieldLabel:'Middle Name',
|
23
|
+
allowBlank:true,
|
24
|
+
name:'current_middle_name'
|
25
|
+
},
|
26
|
+
{
|
27
|
+
xtype:'textfield',
|
28
|
+
fieldLabel:'Last Name',
|
29
|
+
allowBlank:false,
|
30
|
+
name:'current_last_name'
|
31
|
+
},
|
32
|
+
{
|
33
|
+
xtype:'textfield',
|
34
|
+
fieldLabel:'Suffix',
|
35
|
+
allowBlank:true,
|
36
|
+
name:'current_suffix'
|
37
|
+
},
|
38
|
+
{
|
39
|
+
xtype:'textfield',
|
40
|
+
fieldLabel:'Nickname',
|
41
|
+
allowBlank:true,
|
42
|
+
name:'current_nickname'
|
43
|
+
},
|
44
|
+
{
|
45
|
+
xtype:'textfield',
|
46
|
+
fieldLabel:'Passport Number',
|
47
|
+
allowBlank:true,
|
48
|
+
name:'current_passport_number'
|
49
|
+
},
|
50
|
+
{
|
51
|
+
xtype:'datefield',
|
52
|
+
fieldLabel:'Passport Expiration Date',
|
53
|
+
allowBlank:true,
|
54
|
+
name:'current_passport_expire_date'
|
55
|
+
},
|
56
|
+
{
|
57
|
+
xtype:'datefield',
|
58
|
+
fieldLabel:'DOB',
|
59
|
+
allowBlank:false,
|
60
|
+
name:'birth_date'
|
61
|
+
},
|
62
|
+
{
|
63
|
+
xtype:'combobox',
|
64
|
+
fieldLabel:'Gender',
|
65
|
+
store:Ext.create('Ext.data.Store', {
|
66
|
+
fields:['v', 'k'],
|
67
|
+
data:[
|
68
|
+
{"v":"m", "k":"Male"},
|
69
|
+
{"v":"f", "k":"Female"}
|
70
|
+
]
|
71
|
+
}),
|
72
|
+
displayField:'k',
|
73
|
+
valueField:'v',
|
74
|
+
name:'gender'
|
75
|
+
},
|
76
|
+
{
|
77
|
+
xtype:'textfield',
|
78
|
+
fieldLabel:'Total Yrs Work Exp',
|
79
|
+
allowBlank:true,
|
80
|
+
name:'total_years_work_experience'
|
81
|
+
},
|
82
|
+
{
|
83
|
+
xtype:'textfield',
|
84
|
+
fieldLabel:'Marital Status',
|
85
|
+
allowBlank:true,
|
86
|
+
name:'marital_status'
|
87
|
+
},
|
88
|
+
{
|
89
|
+
xtype:'textfield',
|
90
|
+
fieldLabel:'Social Security Number',
|
91
|
+
allowBlank:true,
|
92
|
+
name:'social_security_number'
|
93
|
+
}
|
94
|
+
];
|
95
|
+
|
96
|
+
Ext.define("Compass.ErpApp.Organizer.Applications.Crm.AddIndividualWindow", {
|
97
|
+
extend:"Ext.window.Window",
|
98
|
+
alias:'widget.crm-addindividualwindow',
|
99
|
+
title:'New Individual',
|
100
|
+
layout:'fit',
|
101
|
+
buttonAlign:'center',
|
102
|
+
initComponent: function () {
|
103
|
+
Ext.apply(this, {
|
104
|
+
items: Ext.create('Ext.form.Panel', {
|
105
|
+
items:individualFormFields,
|
106
|
+
labelWidth:110,
|
107
|
+
closeAction:'hide',
|
108
|
+
bodyStyle:'padding:5px 5px 0',
|
109
|
+
url:'/erp_app/organizer/crm/create_party',
|
110
|
+
defaults:{
|
111
|
+
width:225
|
112
|
+
}
|
113
|
+
})
|
114
|
+
});
|
115
|
+
this.callParent(arguments);
|
116
|
+
},
|
117
|
+
buttons:[
|
118
|
+
{
|
119
|
+
text:'Submit',
|
120
|
+
listeners:{
|
121
|
+
'click':function (button) {
|
122
|
+
var window = button.up('crm-addindividualwindow');
|
123
|
+
var formPanel = window.down('form');
|
124
|
+
formPanel.getForm().submit({
|
125
|
+
reset:true,
|
126
|
+
params:{
|
127
|
+
party_type:'Individual'
|
128
|
+
},
|
129
|
+
waitMsg:'Creating Individual',
|
130
|
+
success:function (form, action) {
|
131
|
+
var response = Ext.decode(action.response.responseText);
|
132
|
+
Ext.Msg.alert("Status", response.message);
|
133
|
+
if (response.success) {
|
134
|
+
var individualName = response.individualName;
|
135
|
+
addIndividualWindow.hide();
|
136
|
+
var individualsSearchGrid = Ext.ComponentMgr.get('individualSearchGrid');
|
137
|
+
individualsSearchGrid.store.proxy.extraParams.party_name = individualName;
|
138
|
+
individualsSearchGrid.store.load();
|
139
|
+
}
|
140
|
+
},
|
141
|
+
failure:function (form, action) {
|
142
|
+
var message = 'Error adding individual';
|
143
|
+
if (action.response != null) {
|
144
|
+
var response = Ext.decode(action.response.responseText);
|
145
|
+
message = response.message;
|
146
|
+
}
|
147
|
+
Ext.Msg.alert("Status", message);
|
148
|
+
}
|
149
|
+
});
|
150
|
+
}
|
151
|
+
}
|
152
|
+
},
|
153
|
+
{
|
154
|
+
text:'Close',
|
155
|
+
handler:function (btn) {
|
156
|
+
btn.up('crm-addindividualwindow').close();
|
157
|
+
}
|
158
|
+
}
|
159
|
+
]
|
160
|
+
});
|
161
|
+
|
162
|
+
var editIndividualFormFields = [
|
163
|
+
{
|
164
|
+
xtype:'hiddenfield',
|
165
|
+
name:'id'
|
166
|
+
},
|
167
|
+
{
|
168
|
+
xtype:'hiddenfield',
|
169
|
+
name:'business_party_id'
|
170
|
+
}
|
171
|
+
];
|
172
|
+
|
173
|
+
|
174
|
+
Ext.define("Compass.ErpApp.Organizer.Applications.Crm.EditIndividualWindow", {
|
175
|
+
extend:"Ext.window.Window",
|
176
|
+
alias:'widget.crm-editindividualwindow',
|
177
|
+
layout:'fit',
|
178
|
+
title:'Edit Individual',
|
179
|
+
buttonAlign:'center',
|
180
|
+
initComponent: function () {
|
181
|
+
Ext.apply(this, {
|
182
|
+
items: Ext.create('Ext.form.Panel', {
|
183
|
+
items:individualFormFields.concat(editIndividualFormFields),
|
184
|
+
labelWidth:110,
|
185
|
+
frame:false,
|
186
|
+
bodyStyle:'padding:5px 5px 0',
|
187
|
+
url:'/erp_app/organizer/crm/update_party',
|
188
|
+
defaults:{
|
189
|
+
width:225
|
190
|
+
}
|
191
|
+
})
|
192
|
+
});
|
193
|
+
this.callParent(arguments);
|
194
|
+
},
|
195
|
+
buttons:[
|
196
|
+
{
|
197
|
+
text:'Submit',
|
198
|
+
listeners:{
|
199
|
+
'click':function (button) {
|
200
|
+
var window = button.up('crm-editindividualwindow');
|
201
|
+
var formPanel = window.down('form');
|
202
|
+
var partyId = formPanel.getForm().findField('id').getValue();
|
203
|
+
formPanel.getForm().submit({
|
204
|
+
reset:false,
|
205
|
+
params:{
|
206
|
+
party_type:'Individual'
|
207
|
+
},
|
208
|
+
waitMsg:'Updating Individual',
|
209
|
+
success:function (form, action) {
|
210
|
+
var response = Ext.decode(action.response.responseText);
|
211
|
+
Ext.Msg.alert("Status", response.message);
|
212
|
+
if (response.success) {
|
213
|
+
updatePartyDetails(partyId);
|
214
|
+
editIndividualWindow.hide();
|
215
|
+
Ext.getCmp('individualSearchGrid').store.load();
|
216
|
+
}
|
217
|
+
},
|
218
|
+
failure:function (form, action) {
|
219
|
+
var message = 'Error updating individual';
|
220
|
+
if (action.response != null) {
|
221
|
+
var response = Ext.decode(action.response.responseText);
|
222
|
+
message = response.message;
|
223
|
+
}
|
224
|
+
Ext.Msg.alert("Status", message);
|
225
|
+
}
|
226
|
+
});
|
227
|
+
}
|
228
|
+
}
|
229
|
+
},
|
230
|
+
{
|
231
|
+
text:'Close',
|
232
|
+
handler:function (btn) {
|
233
|
+
btn.up('crm-editindividualwindow').close();
|
234
|
+
}
|
235
|
+
}
|
236
|
+
]
|
237
|
+
});
|
@@ -0,0 +1,167 @@
|
|
1
|
+
var organizationFormFields = [
|
2
|
+
{
|
3
|
+
xtype:'textfield',
|
4
|
+
fieldLabel:'Enterprise Identifier',
|
5
|
+
allowBlank:true,
|
6
|
+
name:'enterprise_identifier'
|
7
|
+
},
|
8
|
+
{
|
9
|
+
xtype:'textfield',
|
10
|
+
fieldLabel:'Tax ID',
|
11
|
+
allowBlank:true,
|
12
|
+
name:'tax_id_number'
|
13
|
+
},
|
14
|
+
{
|
15
|
+
xtype:'textfield',
|
16
|
+
fieldLabel:'Description',
|
17
|
+
allowBlank:true,
|
18
|
+
name:'description'
|
19
|
+
}
|
20
|
+
];
|
21
|
+
|
22
|
+
var editOrganizationFormFields = [
|
23
|
+
{
|
24
|
+
xtype:'hiddenfield',
|
25
|
+
name:'id'
|
26
|
+
},
|
27
|
+
{
|
28
|
+
xtype:'hiddenfield',
|
29
|
+
name:'business_party_id'
|
30
|
+
}
|
31
|
+
];
|
32
|
+
|
33
|
+
Ext.define("Compass.ErpApp.Organizer.Applications.Crm.AddOrganizationWindow", {
|
34
|
+
extend:"Ext.window.Window",
|
35
|
+
alias:'widget.crm-addorganizationwindow',
|
36
|
+
layout:'fit',
|
37
|
+
title:'New Organization',
|
38
|
+
buttonAlign:'center',
|
39
|
+
initComponent: function () {
|
40
|
+
Ext.apply(this, {
|
41
|
+
items: Ext.create('Ext.form.Panel', {
|
42
|
+
items:organizationFormFields,
|
43
|
+
labelWidth:110,
|
44
|
+
frame:false,
|
45
|
+
bodyStyle:'padding:5px 5px 0',
|
46
|
+
url:'/erp_app/organizer/crm/create_party',
|
47
|
+
defaults:{
|
48
|
+
width:225
|
49
|
+
}
|
50
|
+
})
|
51
|
+
});
|
52
|
+
this.callParent(arguments);
|
53
|
+
},
|
54
|
+
buttons:[
|
55
|
+
{
|
56
|
+
text:'Submit',
|
57
|
+
listeners:{
|
58
|
+
'click':function (button) {
|
59
|
+
var window = button.up('crm-editorganizationwindow');
|
60
|
+
var formPanel = window.down('form');
|
61
|
+
formPanel.getForm().submit({
|
62
|
+
reset:true,
|
63
|
+
waitMsg:'Creating Organization',
|
64
|
+
params:{
|
65
|
+
party_type:'Organization'
|
66
|
+
},
|
67
|
+
success:function (form, action) {
|
68
|
+
var response = Ext.decode(action.response.responseText);
|
69
|
+
Ext.Msg.alert("Status", response.message);
|
70
|
+
if (response.success) {
|
71
|
+
var organizationName = response.organizationName;
|
72
|
+
addOrganizationWindow.hide();
|
73
|
+
var organizationSearchGrid = Ext.ComponentMgr.get('organizationSearchGrid');
|
74
|
+
organizationSearchGrid.store.proxy.extraParams.party_name = organizationName;
|
75
|
+
organizationSearchGrid.store.load();
|
76
|
+
}
|
77
|
+
},
|
78
|
+
failure:function (form, action) {
|
79
|
+
var message = "Error adding organization";
|
80
|
+
if (action.response != null) {
|
81
|
+
var response = Ext.decode(action.response.responseText);
|
82
|
+
message = response.message;
|
83
|
+
}
|
84
|
+
Ext.Msg.alert("Status", message);
|
85
|
+
}
|
86
|
+
});
|
87
|
+
}
|
88
|
+
}
|
89
|
+
},
|
90
|
+
{
|
91
|
+
text:'Close',
|
92
|
+
handler:function (btn) {
|
93
|
+
btn.up('crm-addorganizationwindow').close();
|
94
|
+
}
|
95
|
+
}
|
96
|
+
]
|
97
|
+
});
|
98
|
+
|
99
|
+
Ext.define("Compass.ErpApp.Organizer.Applications.Crm.EditOrganizationWindow", {
|
100
|
+
extend:"Ext.window.Window",
|
101
|
+
alias:'widget.crm-editorganizationwindow',
|
102
|
+
layout:'fit',
|
103
|
+
title:'Edit Organization',
|
104
|
+
buttonAlign:'center',
|
105
|
+
initComponent: function () {
|
106
|
+
Ext.apply(this, {
|
107
|
+
items: Ext.create('Ext.form.Panel', {
|
108
|
+
items:organizationFormFields.concat(editOrganizationFormFields),
|
109
|
+
id:'editOrganizationFormPanel',
|
110
|
+
labelWidth:110,
|
111
|
+
frame:false,
|
112
|
+
bodyStyle:'padding:5px 5px 0',
|
113
|
+
url:'/erp_app/organizer/crm/update_party',
|
114
|
+
defaults:{
|
115
|
+
width:225
|
116
|
+
}
|
117
|
+
})
|
118
|
+
});
|
119
|
+
this.callParent(arguments);
|
120
|
+
},
|
121
|
+
buttons:[
|
122
|
+
{
|
123
|
+
text:'Submit',
|
124
|
+
listeners:{
|
125
|
+
'click':function (button) {
|
126
|
+
partyId = Ext.getCmp('editOrganizationFormPanel').getForm().findField('id').getValue();
|
127
|
+
|
128
|
+
var window = button.up('crm-editorganizationwindow');
|
129
|
+
var formPanel = window.down('form');
|
130
|
+
formPanel.getForm().submit({
|
131
|
+
reset:true,
|
132
|
+
waitMsg:'Updating Organization',
|
133
|
+
params:{
|
134
|
+
party_type:'Organization'
|
135
|
+
},
|
136
|
+
success:function (form, action) {
|
137
|
+
var response = Ext.decode(action.response.responseText);
|
138
|
+
Ext.Msg.alert("Status", response.message);
|
139
|
+
if (response.success) {
|
140
|
+
updatePartyDetails(partyId);
|
141
|
+
var organizationName = response.organizationName;
|
142
|
+
editOrganizationWindow.hide();
|
143
|
+
var organizationSearchGrid = Ext.ComponentMgr.get('organizationSearchGrid');
|
144
|
+
organizationSearchGrid.store.proxy.extraParams.party_name = organizationName;
|
145
|
+
organizationSearchGrid.store.load();
|
146
|
+
}
|
147
|
+
},
|
148
|
+
failure:function (form, action) {
|
149
|
+
var message = "Error adding organization";
|
150
|
+
if (action.response != null) {
|
151
|
+
var response = Ext.decode(action.response.responseText);
|
152
|
+
message = response.message;
|
153
|
+
}
|
154
|
+
Ext.Msg.alert("Status", message);
|
155
|
+
}
|
156
|
+
});
|
157
|
+
}
|
158
|
+
}
|
159
|
+
},
|
160
|
+
{
|
161
|
+
text:'Close',
|
162
|
+
handler:function(btn){
|
163
|
+
btn.up('crm-editorganizationwindow').close();
|
164
|
+
}
|
165
|
+
}
|
166
|
+
]
|
167
|
+
});
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: erp_app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -1652,6 +1652,8 @@ files:
|
|
1652
1652
|
- public/javascripts/erp_app/mobile/mobile_base.js
|
1653
1653
|
- public/javascripts/erp_app/organizer/applications/crm/base.js
|
1654
1654
|
- public/javascripts/erp_app/organizer/applications/crm/contact_mechanism_grid.js
|
1655
|
+
- public/javascripts/erp_app/organizer/applications/crm/individual_windows.js
|
1656
|
+
- public/javascripts/erp_app/organizer/applications/crm/organization_windows.js
|
1655
1657
|
- public/javascripts/erp_app/organizer/applications/crm/party_grid.js
|
1656
1658
|
- public/javascripts/erp_app/organizer/applications/crm/relationship_grid.js
|
1657
1659
|
- public/javascripts/erp_app/organizer/applications/crm/userinfo.js
|
@@ -6605,6 +6607,7 @@ files:
|
|
6605
6607
|
- public/stylesheets/sencha_touch/resources/themes/stylesheets/sencha-touch/default/widgets/_toolbar.scss
|
6606
6608
|
- public/stylesheets/sencha_touch/resources/themes/templates/project/manifest.rb
|
6607
6609
|
- public/stylesheets/sencha_touch/resources/themes/templates/project/sencha-touch.scss
|
6610
|
+
- public/stylesheets/sencha_touch/resources/themes/vendor/compass-recipes/compass-recipes-0.3.0.alpha.1.gem
|
6608
6611
|
- public/stylesheets/sencha_touch/resources/themes/vendor/compass-recipes/compass-recipes.gemspec
|
6609
6612
|
- public/stylesheets/sencha_touch/resources/themes/vendor/compass-recipes/config.rb
|
6610
6613
|
- public/stylesheets/sencha_touch/resources/themes/vendor/compass-recipes/fonts/heydings/heydings_icons.ttf
|
@@ -7050,18 +7053,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
7050
7053
|
- - ! '>='
|
7051
7054
|
- !ruby/object:Gem::Version
|
7052
7055
|
version: '0'
|
7053
|
-
segments:
|
7054
|
-
- 0
|
7055
|
-
hash: 4057907889958183206
|
7056
7056
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
7057
7057
|
none: false
|
7058
7058
|
requirements:
|
7059
7059
|
- - ! '>='
|
7060
7060
|
- !ruby/object:Gem::Version
|
7061
7061
|
version: '0'
|
7062
|
-
segments:
|
7063
|
-
- 0
|
7064
|
-
hash: 4057907889958183206
|
7065
7062
|
requirements: []
|
7066
7063
|
rubyforge_project:
|
7067
7064
|
rubygems_version: 1.8.24
|