BUG 12170 Error en la creacion de cases notes SOLVED
- Al agregar una nota si el envio de notificaciones esta activo y hay un error en la configuracion del envio de correos, el mismo no era correctamente capturado y mostrado - Ahora el error se captura correctamente y se muestra, y el listado de notas se refresca normalmente para mostrar la nueva nota agregada.
This commit is contained in:
@@ -105,8 +105,8 @@ class AppNotes extends BaseAppNotes
|
||||
$response['success'] = G::LoadTranslation("ID_FAILURE");
|
||||
$response['message'] = $msg;
|
||||
} else {
|
||||
$response['success'] = "success";
|
||||
$response['message'] = G::LoadTranslation("ID_SAVED");
|
||||
$response['success'] = 'success';
|
||||
$response['message'] = '';
|
||||
}
|
||||
|
||||
if ($notify) {
|
||||
|
||||
@@ -124,7 +124,16 @@ class AppProxy extends HttpProxyController
|
||||
|
||||
//Add note case
|
||||
$appNote = new AppNotes();
|
||||
$response = $appNote->addCaseNote($appUid, $usrUid, $noteContent, intval($httpData->swSendMail));
|
||||
try {
|
||||
$response = $appNote->addCaseNote($appUid, $usrUid, $noteContent, intval($httpData->swSendMail));
|
||||
} catch (Exception $error) {
|
||||
$response = new stdclass();
|
||||
$response->success = 'success';
|
||||
$response->message = G::LoadTranslation('ID_ERROR_SEND_NOTIFICATIONS');
|
||||
$response->message .= '<br /><br />' . $error->getMessage() . '<br /><br />';
|
||||
$response->message .= G::LoadTranslation('ID_CONTACT_ADMIN');
|
||||
die(G::json_encode($response));
|
||||
}
|
||||
|
||||
//Send the response to client
|
||||
@ini_set("implicit_flush", 1);
|
||||
|
||||
@@ -363,8 +363,21 @@ function sendNote()
|
||||
Ext.getCmp('caseNoteText').setDisabled(false);
|
||||
Ext.getCmp('sendBtn').setDisabled(false);
|
||||
Ext.getCmp('addCancelBtn').setDisabled(false);
|
||||
statusBarMessage( _('ID_CASES_NOTE_POST_SUCCESS'), false,true);
|
||||
storeNotes.load();
|
||||
if (data.message != '') {
|
||||
Ext.Msg.show({
|
||||
title : _('ID_CASES_NOTE_POST_ERROR'),
|
||||
msg : data.message,
|
||||
icon : Ext.MessageBox.WARNING,
|
||||
buttons : Ext.Msg.OK,
|
||||
fn : function(btn) {
|
||||
statusBarMessage( _('ID_CASES_NOTE_POST_SUCCESS'), false,true);
|
||||
storeNotes.load();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
statusBarMessage( _('ID_CASES_NOTE_POST_SUCCESS'), false,true);
|
||||
storeNotes.load();
|
||||
}
|
||||
} else if (data.lostSession) {
|
||||
Ext.Msg.show({
|
||||
title : _('ID_CASES_NOTE_POST_ERROR'),
|
||||
|
||||
Reference in New Issue
Block a user