BUG 8457 Problems reassigning cases to other users under HOME>Reassign SOLVED

- We found some loose details in the reassignment.
- It was added a note for the correct use of the reassignment and also a warning before continuing doing reassignment.
This commit is contained in:
Marco Antonio Nina
2012-06-21 17:48:08 -04:00
parent 203f2ea51b
commit 097f50f31f
2 changed files with 88 additions and 65 deletions

View File

@@ -486,16 +486,12 @@ Ext.onReady ( function() {
}
});
var btnExecReassignSelected = new Ext.Button ({
text: _('ID_REASSIGN'),
// text: 'Reassign',
// text: TRANSLATIONS.LABEL_SELECT_ALL,
handler: function(){
var ExecReassign = function () {
newPopUp.hide();
var rs = storeReassignCases.getModifiedRecords();
var sv = [];
for(var i = 0; i <= rs.length-1; i++){
//sv[i]= rs[i].data['name'];
sv[i]= rs[i].data;
}
var gridData = storeReassignCases.getModifiedRecords();
@@ -527,16 +523,9 @@ Ext.onReady ( function() {
},
params: { APP_UIDS:ids, data:Ext.util.JSON.encode(sv), selected:true }
});
/*storeReassignCases.setBaseParam('selected', true);
var result = storeReassignCases.save();
//storeCases.load({params:{process: filterProcess, start : 0 , limit : pageSize}});
newPopUp.hide();
storeCases.reload();
//storeReassignCases.reload();
*/
}
});
// Create HttpProxy instance, all CRUD requests will be directed to single proxy url.
var proxyCasesList = new Ext.data.HttpProxy({
@@ -1532,6 +1521,7 @@ Ext.onReady ( function() {
listeners: {
rowdblclick: openCase,
render: function(){
//this.loadMask = new Ext.LoadMask(this.body, {msg:TRANSLATIONS.LABEL_GRID_LOADING});
//this.ownerCt.doLayout();
}
@@ -1580,12 +1570,27 @@ Ext.onReady ( function() {
region: 'center',
store: storeReassignCases,
cm: reassignCm,
autoHeight: true,
viewConfig: {
forceFit:true
}
});
var btnExecReassignSelected = new Ext.Button ({
text: _('ID_REASSIGN'),
handler: function(){
var rs = storeReassignCases.getModifiedRecords();
if (rs.length < storeReassignCases.totalLength) {
Ext.Msg.confirm( _('ID_CONFIRM'), _('ID_CONFIRM_TO_REASSIGN'), function (btn, text) {
if ( btn == 'yes' ) {
ExecReassign();
}
})
}
}
});
var gridForm = new Ext.FormPanel({
id: 'reassign-form',
@@ -1594,6 +1599,8 @@ var gridForm = new Ext.FormPanel({
//title: 'Company data',
bodyStyle:'padding:5px',
width: 750,
layout: 'column', // Specifies that the items will now be arranged in columns
items: [{
id : 'tasksGrid',
@@ -1618,9 +1625,11 @@ var gridForm = new Ext.FormPanel({
border : true,
listeners: {
click: function() {
rows = this.getSelectionModel().getSelections();
var application = '';
comboUsersToReassign.disable();
if( rows.length > 0 ) {
comboUsersToReassign.enable();
var ids = '';
@@ -1629,13 +1638,13 @@ var gridForm = new Ext.FormPanel({
application = rows[i].get('APP_UID');
}
} else {
comboUsersToReassign.disable();
}
comboUsersToReassign.clearValue();
storeUsersToReassign.removeAll();
storeUsersToReassign.setBaseParam('application',application);
//storeUsersToReassign.load();
storeUsersToReassign.load();
//alert(record.USERS);
} // Allow rows to be rendered.
@@ -1646,16 +1655,27 @@ var gridForm = new Ext.FormPanel({
xtype: 'fieldset',
labelWidth: 50,
title: _('ID_USER_LIST'),
defaults: {width: 170, border:false}, // Default config options for child items
defaults: {width: 200, border:false}, // Default config options for child items
defaultType: 'textfield',
autoHeight: true,
bodyStyle: Ext.isIE ? 'text-align: right;padding:0 0 5px 15px;' : 'text-align: right; padding:10px 15px;',
bodyStyle: Ext.isIE ? 'text-align: left;padding:0 0 5px 15px;' : 'text-align: left; padding:10px 5px;',
border: false,
style: {
"margin-left": "10px", // when you add custom margin in IE 6...
"margin-right": Ext.isIE6 ? (Ext.isStrict ? "-10px" : "-13px") : "0" // you have to adjust for it somewhere else
},
items: comboUsersToReassign
//style: {
// "margin-left": "10px", // when you add custom margin in IE 6...
// "margin-right": Ext.isIE6 ? (Ext.isStrict ? "-10px" : "-13px") : "0" // you have to adjust for it somewhere else
//},
items:
[
comboUsersToReassign,
{
xtype: 'fieldset',
border : true,
defaultType: 'textfield',
title: _('ID_INSTRUCTIONS'),
autoHeight:true,
html: _('ID_INSTRUCTIONS_TEXT')
}
]
}]
//renderTo: bd
});
@@ -1781,9 +1801,11 @@ var gridForm = new Ext.FormPanel({
function reassign(){
storeReassignCases.removeAll();
var rows = grid.getSelectionModel().getSelections();
storeReassignCases.rejectChanges();
var tasks = [];
var sw = 0;
if( rows.length > 0 ) {
ids = '';
for(i=0; i<rows.length; i++) {
@@ -1794,6 +1816,7 @@ function reassign(){
}
storeReassignCases.setBaseParam( 'APP_UIDS', ids);
storeReassignCases.load();
newPopUp.show();
comboUsersToReassign.disable();

View File

@@ -32,6 +32,7 @@
var storeUsersToReassign = new Ext.data.Store({
remoteSort: false,
autoLoad:true,
proxy : proxyUsersToReassignList,
reader: readerUsersToReassignList,
writer: writerUsersToReassignList, // <-- plug a DataWriter into the store just as you would a Reader
@@ -63,11 +64,10 @@
valueField : 'userId',
displayField : 'userFullname',
selectOnFocus : true,
typeAhead : true,
typeAhead : false,
autocomplete : true,
hideTrigger : Boolean,
alignTo : 'right',
selectOnFocus:true,
mode : 'remote',
triggerAction : 'all',
emptyText : _('ID_ENTER_SEARCH_TERM'),