NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Ext.ns('dms.slimfast.autoMatchingConfig');
Ext.ns('highradius.training.conditions');
//Ext.ns('dms.slimfast.autoMatchingAgent');


highradius.training.conditions.attachmentsTypeDatatypeId = 45038;

highradius.training.conditions.attachmentsTypeMenuId = 45038;

dms.slimfast.autoMatchingConfig.dataTypeId = 45035;

dms.slimfast.autoMatchingConfig.menuId = 45044;


//////////////////////////////////////////
var store = Ext.create('Ext.data.Store', {
storeId: 'configId',
fields: ['link'],
data: [{
link: '1. Eligibility criteria',
},
{
link: '2. Auto-matching rules',
},
{
link: '3. Rollup-configuration',
},
{
link: '4. Auto-matching conditions',
},
{
link: '5. Setup Agent'
}
]

});

dms.slimfast.autoMatchingConfig.tabPanel = function () {
var autoMatchingConfigGrid = dms.slimfast.autoMatchingConfig.autoMatchingConfigStepsGrid();
var dmsAutoConfigTabPanel = new Ext.tab.Panel({
itemId: 'dmsAutoConfigTabPanelView',
activeTab: 0,
bodyCssClass: true,
border: false,
autoDestroy: true,
items: [{
title: 'Manage Trade Auto-match Configs',
layout: 'fit',
itemId: 'dmsAutoConfigTabPanelViewItemsId',
// tabIdentifier: masterAutoMatchingConfigureId != null ? dms.common.accountIdNRoleId + ":" + masterAutoMatchingConfigureId : undefined,
items: [autoMatchingConfigGrid]
}]
});
return dmsAutoConfigTabPanel;
}

dms.slimfast.autoMatchingConfig.autoMatchingConfigStepsGrid = function () {
var autoMatchingConfigStepsGridPanel = Ext.create('Ext.grid.Panel', {

title: 'Steps',
itemId: 'dmsAutoConfigGridPanel',
store: Ext.data.StoreManager.lookup('configId'),
hideHeaders: true,
columns: [{

dataIndex: 'link',
flex: 1,


}],
height: '100%',
width: '100%',


});
autoMatchingConfigStepsGridPanel.setListeners("rowclick", function (grid, rowIndex, e) {
var step = grid.getSelectionModel().getSelection()[0].data.link;


console.log(step);
dms.slimfast.autoMatchingConfig.addTabByStep(step);
});
return autoMatchingConfigStepsGridPanel;
}


dms.slimfast.autoMatchingConfig.eligibilityCriteria = function () {
console.log("eligibility");

}
// for autoMatchingRules
dms.slimfast.autoMatchingConfig.autoMatchingRules = function () {
console.log("autoMatchingRules")
var autoMatchingConfig =
{
menuId: 1000506,
dataTypeId: 40144,
orgText: "ruleCategoryGroupName=Promotions and Commitments Auto-matching",
config: "ruleCategoryGroupName=Promotions and Commitments Auto-matching",
}
return dms.admin.genericrules.renderRuleCategoryGroupDetails(autoMatchingConfig);
}
// for rollupConfiguration
dms.slimfast.autoMatchingConfig.rollupConfiguration = function () {
console.log("rollupConfiguration")
return dms.admin.mappings.rollupConfig.createRollUpGrid(40145, 2185);
}
dms.slimfast.autoMatchingConfig.autoMatchingConditions = function () {
console.log("autoMatchingConditions");
//>>>>>>>>>>>>>>>>>>>>>>>>>>>





highradius.training.conditions.createAttachmentsTypeGrid = function () {

highradius.training.conditions.AttachmentsTypeFieldsArray = dms.common.getFields(1, highradius.training.conditions.attachmentsTypeDatatypeId, undefined, true);


console.log(highradius.training.conditions.AttachmentsTypeFieldsArray);
highradius.training.conditions.AttachmentsTypeLayoutsList = dms.common.getLayoutsList(highradius.training.conditions.attachmentsTypeDatatypeId, true);




highradius.training.conditions.AttachmentsTypeHeaderArray = highradius.training.conditions.AttachmentsTypeLayoutsList[1].split(",");



console.log(highradius.training.conditions.AttachmentsTypeLayoutsList[1].split(","));
/*var rs = new Array();
rs['createTime'] = 'rendererForDate';
rs['updateTime'] = 'rendererForDate';*/

var tooltipIndex = -1;
var tooltipArr = [];

var filterMap = {};

var gridConfig = {
filters: filterMap,
singleSelect: true,
//renderers : rs
};

var extraFields = [];// [ 'pkDeductionInvalidRootCauseId' ];

var headerMap = {};
for (var j = 0; j < highradius.training.conditions.AttachmentsTypeHeaderArray.length; j++) {
for (var i = 0; i < highradius.training.conditions.AttachmentsTypeFieldsArray.length; i++) {






var iArray = highradius.training.conditions.AttachmentsTypeFieldsArray[i];
if (highradius.training.conditions.AttachmentsTypeHeaderArray[j] == iArray[0]) {
headerMap[iArray[0]] = iArray[1];
}
}
}

highradius.training.conditions.AttachmentsTypeStore = dms.common.createStore('AttachmentsType', '/RRDMSProject/training/getTrnInvoice.do',
highradius.training.conditions.AttachmentsTypeFieldsArray, extraFields, null, null, null, true);




highradius.training.conditions.AttachmentsTypeGrid = dms.special.component.createPickListGrid('AttachmentsTypeGrid', headerMap,



highradius.training.conditions.AttachmentsTypeStore, gridConfig, null, null, highradius.training.conditions.attachmentsTypeDatatypeId,
'AttachmentsTypeGrid');
console.log(headerMap);


highradius.training.conditions.AttachmentsTypeGrid.setHeight(screen.height * .4);
highradius.training.conditions.AttachmentsTypeGrid.getDockedComponent('bottomtoolbar').removeAll();





highradius.training.conditions.AttachmentsTypeGrid.getDockedComponent('toptoolbar').insert(7, '-');
highradius.training.conditions.AttachmentsTypeGrid.getDockedComponent('toptoolbar').insert(8, new Ext.Button(addAutomatching));


highradius.training.conditions.AttachmentsTypeGrid.getDockedComponent('toptoolbar').insert(9, '-');
highradius.training.conditions.AttachmentsTypeGrid.getDockedComponent('toptoolbar').insert(10, new Ext.Button(editAutomatching));


highradius.training.conditions.AttachmentsTypeGrid.getDockedComponent('toptoolbar').insert(11, '-');
highradius.training.conditions.AttachmentsTypeGrid.getDockedComponent('toptoolbar').insert(12, new Ext.Button(deleteAutomatching));



var autoMtachingConfigStepsGridPanel = function () {
var secondaryGrid = new Ext.create('Ext.grid.Panel', {

title: 'Steps',
itemId: 'dmsAutoConfigGridPanel',
store: Ext.data.StoreManager.lookup('configId'),
hideHeaders: true,
columns: [{

dataIndex: 'link',
flex: 1,


}],

height: 400,
width: '100%',


})
secondaryGrid.setListeners("rowclick", function (grid, rowIndex, e) {
var step = grid.getSelectionModel().getSelection()[0].data.link;


console.log(step);
dms.slimfast.autoMatchingConfig.addTabByStep(step);
});
return secondaryGrid
};
highradius.training.conditions.dmsAutoConfigTabPanel = function () {
return new Ext.tab.Panel({
itemId: 'dmsAutoConfigTabPanelView',
activeTab: 0,
bodyCssClass: true,
border: false,
items: [{
title: 'Manage Trade Auto-match Configs',
layout: 'fit',
itemId: 'dmsAutoConfigTabPanelViewItemsId',
// tabIdentifier: masterAutoMatchingConfigureId != null ? dms.common.accountIdNRoleId + ":" + masterAutoMatchingConfigureId : undefined,
items: [autoMtachingConfigStepsGridPanel()]
}]
});
}
highradius.training.conditions.AttachmentsTypeGrid.on("select", function (grid, rowIndex, e) {

var rowsCount = highradius.training.conditions.AttachmentsTypeGrid.getSelectionModel().getCount();
if (rowsCount == 1) {
Ext.ComponentQuery.query("#editAutomatchingConditions")[Ext.ComponentQuery.query("#editAutomatchingConditions").length - 1].enable();

Ext.ComponentQuery.query("#deleteAutomatchingCondition")[Ext.ComponentQuery.query("#deleteAutomatchingCondition").length - 1].enable();
}

// dms.slimfast.admin.deduction.dmsFeatures.eligibilityCriteria.derivedAttributesPanel.remove(dms.slimfast.admin.deduction.dmsFeatures.eligibilityCriteria.dataPanel);


filterPanel.add(highradius.training.conditions.dmsAutoConfigTabPanel());
filterPanel.updateLayout();
});
highradius.training.conditions.AttachmentsTypeGrid.on("deselect", function (grid, rowIndex, e) {

var rowsCount = highradius.training.conditions.AttachmentsTypeGrid.getSelectionModel().getCount();
if (rowsCount == 0) {
Ext.ComponentQuery.query("#deleteAutomatchingCondition")[Ext.ComponentQuery.query("#deleteAutomatchingCondition").length - 1].disable();
Ext.ComponentQuery.query("#editAutomatchingConditions")[Ext.ComponentQuery.query("#editAutomatchingConditions").length - 1].disable();



Ext.ComponentQuery.query("#dmsAutoConfigTabPanelView")[Ext.ComponentQuery.query("#dmsAutoConfigTabPanelView").length - 1].destroy();
}


//filterPanel.remove(Ext.ComponentQuery.query("#dmsAutoConfigTabPanelView")[Ext.ComponentQuery.query("#dmsAutoConfigTabPanelView").length - 1]);
//highradius.training.conditions.dmsAutoConfigTabPanel().destroy();

filterPanel.updateLayout();
});
var filterPanel = new Ext.create('Ext.panel.Panel', {
layout: "anchor",
defaults: { anchor: "100% 100%" },
frame: false,
border: false,
autoWidth: true,
autoscroll: true,
items: [highradius.training.conditions.AttachmentsTypeGrid],
});
dms.slimfast.autoMatchingConfig.addTabByStep = function (step) {
tab = Ext.ComponentQuery.query('#dmsAutoConfigTabPanelView')[0].add({
title: 'New Tab',
closable: true,
itemId: 'Config-eligibilityCriteria',
layout: 'fit',
items: []
});
}


return filterPanel;
};
/////////////////////////////////////////
highradius.training.conditions.addorEditAutoMatchingWindow = function (isEdit) {

highradius.training.conditions.ruleCategoriesStore = '';
//highradius.training.conditions.ruleCategoriesStore.load();
///////////////////////////////////////
var addPriority = new Ext.form.field.ComboBox({
plugins: [dms.common.createToolTipPlugin()],
fieldLabel: 'Priority' + '<span style="color:red;" ext:qtip="This field is required"> * </span>',
width: screen.width * .32,
labelWidth: screen.width * .09,
border: false,
itemId: 'addRuleCategory',
displayField: 'displayName',
store: highradius.training.conditions.ruleCategoriesStore,
valueField: 'value',
prevRawValue: '',
currRawValue: '',
prevValue: '',
currValue: '',
count: 0,
selectCount: 0,
typeAhead: false,
queryMode: 'remote',
plugins: 'remotetolocalcombo',
triggerAction: 'all',
allowBlank: true,
selectOnFocus: true,
forceSelection: true,
listeners: {
select: function (combo, record, eOpts) {
parentPanel.fireEvent("fieldvaliditychange", parentPanel, combo, combo.validate());
}
}

});
var filterLabelField = new Ext.form.TextField({
itemId: 'filterLabelField',
//name:'label',
fieldLabel: 'Rule Name' + '<span style="color:red;" ext:qtip="This field is required"> * </span>',
allowBlank: false,
labelWidth: screen.width * .09,
listeners: {
change: function (field, record, v) {
parentPanel.fireEvent("fieldvaliditychange", parentPanel, field, field.validate());
}

}
});
var CustomerNameField = new Ext.form.TextField({
itemId: 'customerNameField',
//name:'label',
fieldLabel: 'Customer Name' + '<span style="color:red;" ext:qtip="This field is required"> * </span>',

labelWidth: screen.width * .09,
listeners: {
change: function (field, record, v) {
parentPanel.fireEvent("fieldvaliditychange", parentPanel, field, field.validate());
}

}
});


var filterRuleTopPanel = new Ext.panel.Panel({
itemId: 'filterRuleTopPanel',
layout: 'anchor',
defaults: { anchor: '100%' },
border: false,
frame: false,
items: [filterLabelField, CustomerNameField, addPriority]
});
var filterRuleComboPanel = new Ext.Panel({
itemId: 'filterRuleComboPanel',
border: false,
title: 'Conditions',
frame: false,
layout: 'form',
defaults: { anchor: '100%' },
bodyStyle: 'padding:5px'
});

var moreFilterRuleConditionsPanel = new Ext.Panel({
itemId: 'moreFilterRuleConditions',
autoSize: true,
border: false,
disabled: true,
layout: 'column',
buttonAlign: 'left',
/* items: [{
itemId: 'moreFilterRuleConditionsField',
border: false,
columnWidth: .6,
items: addMoreConditions
}, {
itemId: 'moreFilterRuleConditionsButton',
border: false,
items: addMoreFilterRuleConditionsButton
}]*/
});


//////////////add button///////////////
var saveFilterButton = new Ext.button.Button({
text: 'Save',
cls: 'hrc-btn-primary',
itemId: 'saveFilterButton',
//actionIdentifier : dataTypeId + ":" + itemMappingsMenuId +":add",
disabled: true,
handler: function () {

if (filterRuleComboPanel && filterRuleComboPanel.items) {
var flag = 1;
var packageId = -1;
var filterLabel = Ext.ComponentQuery.query('#filterLabelField')[0].getValue();
var ruleCategory = Ext.ComponentQuery.query('#addRuleCategory')[0].getValue();

if (isEdit) {
var getData = dms.slimfast.admin.deduction.dmsFeatures.eligibilityCriteria.TopPanelGrid.getSelectionModel().getSelected().items[0];
packageId = getData.data.pkRuleCatGroupEligibilityCriteriaId;

}
var jsonObjectArray = new Array();
for (var i = 0; i < filterRuleComboPanel.items.length; i++) {
if (filterRuleComboPanel.items.items[i].items.items[0]) {
var filterRuleComboPanelField = filterRuleComboPanel.items.items[i].items.items[0].items.items[0];
var filterRuleComboPanelRemoveButton = filterRuleComboPanel.items.items[i].items.items[1].items.items[0];
if (filterRuleComboPanelField) {
var jsonObject = {};
jsonObject['conditionField'] = filterRuleComboPanelRemoveButton.cid;
jsonObject['conditionValue'] = filterRuleComboPanelField.getRawValue();
}
}
jsonObjectArray.push(jsonObject);
}
var conditionFieldAndconditionValues = {};
conditionFieldAndconditionValues['data'] = jsonObjectArray;
conditionFieldAndconditionValues = JSON.stringify(conditionFieldAndconditionValues);
var msg = Ext.MessageBox.wait('Saving Changes..');

if (!isEdit) {
Ext.Ajax.request({
url: '',
method: 'POST',
params: {
packageId: packageId,
conditionFieldAndconditionValues: conditionFieldAndconditionValues,
label: filterLabel,
ruleCategory: ruleCategory
},
success: function (result, request) {
msg.hide();
if (result.responseText.includes("success")) {

Ext.ComponentQuery.query('#addEditFilterRuleWindow')[0].destroy();
Ext.example.msg('', 'Eligibility Criteria created successfully');
dms.slimfast.admin.deduction.dmsFeatures.eligibilityCriteria.TopPanelGrid.store.reload();

} else {
Ext.ComponentQuery.query('#addEditFilterRuleWindow')[0].destroy();
Ext.example.msg('', 'Failed to create Eligibility Criteria');
}

},
failure: function (name, request) {
msg.hide();

Ext.ComponentQuery.query('#addEditFilterRuleWindow')[0].destroy();
Ext.example.msg('', 'Failed to create Eligibility Criteria');

}
});
} else {
Ext.Ajax.request({
url: '',
method: 'POST',
params: {
packageId: packageId,
conditionFieldAndconditionValues: conditionFieldAndconditionValues,
label: filterLabel,
ruleCategory: ruleCategory
},
success: function (result, request) {
msg.hide();
if (result.responseText.includes("success")) {

Ext.ComponentQuery.query('#addEditFilterRuleWindow')[0].destroy();
Ext.example.msg('', 'Eligibility Criteria Updated successfully');
dms.slimfast.admin.deduction.dmsFeatures.eligibilityCriteria.TopPanelGrid.store.reload();

} else {

Ext.ComponentQuery.query('#addEditFilterRuleWindow')[0].destroy();
Ext.example.msg('', 'Failed to Update Eligibility Criteria');

}

},
failure: function (name, request) {
msg.hide();

Ext.ComponentQuery.query('#addEditFilterRuleWindow')[0].destroy();
Ext.example.msg('', 'Failed to Update Eligibility Criteria');
}
});
}

}

}
});
//////////////save btn2///////////////
var saveButton2 = new Ext.button.Button({
text: 'Save',
cls: 'hrc-btn-primary',
itemId: 'saveButton2',
//actionIdentifier : dataTypeId + ":" + itemMappingsMenuId +":add",
disabled: true,
});


//////////////cancel button///////////
var cancelFilterButton = new Ext.button.Button({
text: 'Cancel',
cls: 'hrc-btn-tertiary hrc-btn-float-right',
itemId: 'cancelFilterButton',
//actionIdentifier : dataTypeId + ":" + itemMappingsMenuId +":add",
handler: function () {
Ext.ComponentQuery.query('#addEditFilterRuleWindow')[0].destroy();
}
});
/////////////////new small window////////////////////

var add2 = Ext.create('Ext.form.Panel', {

itemId: 'addEditFilterRuleWindow',
width: screen.width * .3,
height: screen.height * .2,
minWidth: screen.width * .3,
minHeight: screen.height * .1,
maxWidth: screen.width * .33,
maxHeight: screen.height * .3,
closable: true,
border: true,
// modal: true,
constrain: true,
// layout: 'fit',
autoDestroy: false,
buttonAlign: 'center',
items: [saveButton2],

});


//////////////////////////////////////////////////

var parentPanel = new Ext.form.Panel({
frame: false,
itemId: 'criteriaSetParentPanelID',
id: 'dmsSlimfastCriteriaParentPanelID',
header: false,
monitorValid: true,
//labelWidth: 200,
frame: false,
header: false,
layout: 'anchor',
scrollable: 'y',
defaults: { anchor: '100%' },
bodyStyle: 'padding:20px',
buttonAlign: 'center',
buttons: [cancelFilterButton, saveFilterButton],
items: [filterRuleTopPanel, filterRuleComboPanel, moreFilterRuleConditionsPanel, add2],
/* listeners: {
fieldvaliditychange: function (form, field, valid) {
if (Ext.ComponentQuery.query('#filterLabelField')[0] != undefined && Ext.ComponentQuery.query('#filterLabelField')[0].value != "" && Ext.ComponentQuery.query('#addRuleCategory')[0] != undefined && Ext.ComponentQuery.query('#addRuleCategory')[0].getValue() != undefined && Ext.ComponentQuery.query('#addRuleCategory')[0].getValue() != "") {
Ext.ComponentQuery.query('#moreFilterRuleConditions')[0].setDisabled(false);
var count = filterRuleComboPanel.items.length;
if (count > 0) {
for (var i = 0; i < count; i++) {
var filterItems = filterRuleComboPanel.items.items[i].items.items;
if (filterItems[0].items.items[0].value != null && filterItems[0].items.items[0].value != "") {
Ext.ComponentQuery.query('#saveFilterButton')[0].setDisabled(false);
}
else {
Ext.ComponentQuery.query('#saveFilterButton')[0].setDisabled(true);
}
}
}
}
else {
Ext.ComponentQuery.query('#moreFilterRuleConditions')[0].setDisabled(true);
Ext.ComponentQuery.query('#saveFilterButton')[0].setDisabled(true);
}

}
}*/
});



var heading = '';
if (isEdit)
heading = 'Edit';
else
heading = 'Add';
var win;
if (!win) {
win = Ext.create('Ext.window.Window', {
title: heading,
itemId: 'addEditFilterRuleWindow',
width: screen.width * .68,
height: screen.height * .65,
minWidth: screen.width * .65,
minHeight: screen.height * .3,
maxWidth: screen.width * .8,
maxHeight: screen.height * .75,
modal: true,
constrain: true,
layout: 'fit',
autoDestroy: false,
buttonAlign: 'center',
items: [parentPanel],
/* listeners: {
afterrender: function () {
if (isEdit) {
var getData = dms.slimfast.admin.deduction.dmsFeatures.eligibilityCriteria.TopPanelGrid.getSelectionModel().getSelected().items[0];
var label = getData.data.label;
var ruleCategory = getData.data.luRuleCategory;
var packageId = getData.data.pkRuleCatGroupEligibilityCriteriaId;
Ext.ComponentQuery.query('#addRuleCategory')[0].store.on('load', function () {
Ext.ComponentQuery.query('#filterLabelField')[0].setValue(label);
Ext.ComponentQuery.query('#addRuleCategory')[0].setValue(ruleCategory);
});

var jsonData = makeSynchAJAXCall('/DMS/slimfast/getConditionsById.do?packageId=' + packageId, 'POST');
jsonData = JSON.parse(jsonData);

for (i = 0; i < jsonData.rows.length; i++) {
var jsonConditionData = jsonData.rows[i];
if (jsonConditionData != null && jsonConditionData != undefined && jsonConditionData != '') {
dms.slimfast.admin.deduction.dmsFeatures.eligibilityCriteria.createEligibilityCriteriaConditionComponent(jsonConditionData, filterRuleComboPanel, addMoreConditions, lvl1Fields, lvl2Fields, lvl3Fields, lvl5Fields, lvl9Fields, lvl13Fields);
}
}
}


}
}*/
});
}
win.show();

}
////////////Add AutoMatching//////////////////////
var addAutomatching = new Ext.Action({
text: 'Add',
tooltip: 'Add AutoMatching',
itemId: 'addAutomatchingConditions',
iconCls: 'add',
// actionIdentifier: dms.slimfast.admin.deduction.dmsFeatures.eligibilityCriteria.EligibilityCriteriaDatatypeId + ":" + eligibilityCriteriaMenuId + ":addCriteria",
handler: function () {
var isEdit = false;
highradius.training.conditions.addorEditAutoMatchingWindow(isEdit);

}
});
///////////edit//////////////////////////////////
var editAutomatching = new Ext.Action({
text: 'Edit',
tooltip: 'Edit Automatching',
itemId: 'editAutomatchingConditions',
iconCls: 'editded',
disabled: true,

//actionIdentifier: dms.slimfast.admin.deduction.dmsFeatures.eligibilityCriteria.EligibilityCriteriaDatatypeId + ":" + eligibilityCriteriaMenuId + ":editCriteria",
handler: function () {
var isEdit = true;
var selectedRows = highradius.training.conditions.AttachmentsTypeGrid.getSelectionModel().getSelection();
if (selectedRows.length == 1) {
var getData = highradius.training.conditions.AttachmentsTypeGrid.getSelectionModel().getSelected().items[0];
console.log(getData);
// var packageId = getData.data.pkRuleCatGroupEligibilityCriteriaId;

highradius.training.conditions.addorEditAutoMatchingWindow(isEdit);
}
else {
Ext.MessageBox.alert('Edit AutoMatching Set', 'Please select only one record');
}
}
});
//////////////////delete////////

highradius.training.conditions.removeCriteria = function (selectedRows) {
var pkRuleCatGroupEligibilityCriteriaIds = '';
for (var i = 0; i < selectedRows.length; i++) {
//pkRuleCatGroupEligibilityCriteriaIds += selectedRows[i].get('pkRuleCatGroupEligibilityCriteriaId') + ',';
}
// pkRuleCatGroupEligibilityCriteriaIds = pkRuleCatGroupEligibilityCriteriaIds.substr(0, pkRuleCatGroupEligibilityCriteriaIds.length - 1);
Ext.Ajax.request({
url: '',
method: 'POST',
params: {
//pkRuleCatGroupEligibilityCriteriaIds: pkRuleCatGroupEligibilityCriteriaIds
},
success: function (result, request) {
Ext.example.msg(name, 'Successfully deleted the Eligibility Criteria(s)');
// dms.slimfast.admin.deduction.dmsFeatures.eligibilityCriteria.derivedAttributesPanel.remove(dms.slimfast.admin.deduction.dmsFeatures.eligibilityCriteria.dataPanel);
// dms.slimfast.admin.deduction.dmsFeatures.eligibilityCriteria.TopPanelGrid.store.reload();
},
failure: function (name, request) {
Ext.example.msg(name, 'Failed to Delete Eligibility Criteria(s)');
}
});
};

var deleteAutomatching = new Ext.Action({
text: 'Delete',
tooltip: 'Delete Selected Rule Criteria(s)',
itemId: 'deleteAutomatchingCondition',
iconCls: 'delete',
disabled: true,

//actionIdentifier: dms.slimfast.admin.deduction.dmsFeatures.eligibilityCriteria.EligibilityCriteriaDatatypeId + ":" + eligibilityCriteriaMenuId + ":deleteCriteria",
handler: function () {
var selectedRows = highradius.training.conditions.AttachmentsTypeGrid.getSelectionModel().getSelection();

if (selectedRows.length == 0) {
Ext.MessageBox.alert('Delete', 'Please select at least one record');
} else {
Ext.Msg.confirm('Delete', 'Would you like to delete the selected criteria(s) ?', function (buttonText) {
if (buttonText == "no") {
return false;
}
if (buttonText == "yes") {
highradius.training.conditions.removeCriteria(selectedRows);
Ext.ComponentQuery.query("#deleteEligibilityCriteria")[Ext.ComponentQuery.query("#deleteEligibilityCriteria").length - 1].disable();
}
});
}
}
});

return highradius.training.conditions.createAttachmentsTypeGrid();




//>>>>>>>>>>>>>>>>....

}
dms.slimfast.autoMatchingConfig.setupAgent = function () {
console.log("setupAgent");


//>>>>>>>>>>>>>>>>>>>>>
dms.slimfast.autoMatchingConfig.agentCall = function () {
console.log('Inside Agent Call');
var agentTabPanel = new Ext.tab.Panel({
items: [{
title: 'Agent Setup',
items: [agentPanel]
}]
});

return agentTabPanel;
}
var intervalStore = Ext.create('Ext.data.Store', {
fields: ['abbr', 'name'],
data: [{
"abbr": "03",
"name": "03"
}, {
"abbr": "04",
"name": "04"
}, {
"abbr": "05",
"name": "05"
}]
});

var agentPanel = Ext.create('Ext.form.Panel', {

width: '100%',

fullscreen: true,
bodyPadding: 10,
fullscreen: true,
frame: false,
// renderTo: Ext.getBody(),
items: [{

html: '<span style="font-weight: bold;color:black;">Setup DMS AutoMatchingErrorReportAgent</span>',
margin: '8 0 12 0'
}, {
xtype: 'combobox',
name: 'agentNumber',
fieldLabel: 'Agent Number:',
emptyText: 'Select Agent Number',
width: '30%'

}, {
xtype: 'combobox',
name: 'clusterGroup',
fieldLabel: 'Cluster Group:',
emptyText: 'Select Cluster Group',
width: '30%'

}, {

xtype: 'combo',
name: 'timeInterval',
fieldLabel: 'Time Interval',
emptyText: 'mm',
allowBlank: false,
queryMode: 'local',
store: intervalStore,
displayField: 'name',
valueField: 'abbr',
listeners: {
select: function (combo, record) {

Ext.getCmp('saveButton').setDisabled(false);
}
}


}, {

xtype: 'button',
text: 'Cancel',
margin: '20 0 0 500',
width: '80px',
padding: '10px',
handler: function () {
agentPanel.getForm().reset();
}

},

{
xtype: 'button',
margin: '20 0 0 10',
id: 'saveButton',
text: 'Save',
width: '80px',
padding: '10px',
disabled: true,

}

]
});
agentPanel.setHeight(screen.height * .55);

return dms.slimfast.autoMatchingConfig.agentCall();

//>>>>>>>>>>>>>>>>>>>>>>>>>>
}

var task = '';
dms.slimfast.autoMatchingConfig.addTabByStep = function (step) {
switch (step) {
case '1. Eligibility criteria':
tab = Ext.ComponentQuery.query('#dmsAutoConfigTabPanelView')[0].add({
title: step,
closable: true,
itemId: 'Config-EligibilityCriteria',
layout: 'fit',
items: [dms.slimfast.autoMatchingConfig.eligibilityCriteria()]
});
Ext.ComponentQuery.query('#dmsAutoConfigTabPanelView')[0].setActiveTab(tab);
console.log('after eligibility criteria');
break;

case '2. Auto-matching rules':
tab = Ext.ComponentQuery.query('#dmsAutoConfigTabPanelView')[0].add({
title: step,
closable: true,
itemId: 'Config-AutoMatchingRules',
layout: 'fit',
items: [dms.slimfast.autoMatchingConfig.autoMatchingRules()]
});
Ext.ComponentQuery.query('#dmsAutoConfigTabPanelView')[0].setActiveTab(tab);
break;
case '3. Rollup-configuration':
tab = Ext.ComponentQuery.query('#dmsAutoConfigTabPanelView')[0].add({
title: step,
closable: true,
itemId: 'Config-RollupConfiguration',
layout: 'fit',
items: [dms.slimfast.autoMatchingConfig.rollupConfiguration()]
});
Ext.ComponentQuery.query('#dmsAutoConfigTabPanelView')[0].setActiveTab(tab);
break;
case '4. Auto-matching conditions':
tab = Ext.ComponentQuery.query('#dmsAutoConfigTabPanelView')[0].add({
title: step,
closable: true,
itemId: 'Config-AutoMatchingConditions',
layout: 'fit',
items: [dms.slimfast.autoMatchingConfig.autoMatchingConditions()]
});
Ext.ComponentQuery.query('#dmsAutoConfigTabPanelView')[0].setActiveTab(tab);
break;

case '5. Setup Agent':
tab = Ext.ComponentQuery.query('#dmsAutoConfigTabPanelView')[0].add({
title: step,
closable: true,
itemId: 'Config-SetupAgent',
layout: 'fit',
items: [dms.slimfast.autoMatchingConfig.setupAgent()]
});
Ext.ComponentQuery.query('#dmsAutoConfigTabPanelView')[0].setActiveTab(tab);
break;
}
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.