PMCORE-1387

This commit is contained in:
Paula Quispe
2020-05-28 16:16:54 -04:00
parent d58086c496
commit 67dda5a078
7 changed files with 19 additions and 23 deletions

View File

@@ -1416,7 +1416,7 @@ class Derivation
protected function subProcessCreation(array $subProcessInfo, array $appFields, array $currentDelegation, $delIndex, $threadIndex)
{
// Check if is SelfService the task in the SubProcess
$isSelfService = (empty($subProcessInfo['USR_UID'])) ? true : false;
$isSelfService = empty($subProcessInfo['USR_UID']) ? true : false;
// Create the new case in the sub-process
// Set the initial date to null the time its created

View File

@@ -101,8 +101,8 @@ try {
$index = $_SESSION["INDEX"];
$userLogged = $_SESSION["USER_LOGGED"];
//Now we dispatch the derivation of the case through Jobs Laravel.
$closure = function() use($processUid, $application, $postForm, $sStatus, $flagGmail, $tasUid, $index, $userLogged) {
// Now we dispatch the derivation of the case through Jobs Laravel.
$closure = function() use ($processUid, $application, $postForm, $sStatus, $flagGmail, $tasUid, $index, $userLogged) {
$cases = new Cases();
$cases->routeCase($processUid, $application, $postForm, $sStatus, $flagGmail, $tasUid, $index, $userLogged);
};
@@ -114,18 +114,19 @@ try {
$debuggerAvailable = true;
$casesRedirector = 'casesListExtJsRedirector';
if (isset($_SESSION ['user_experience']) && $flagGmail === false) {
$aNextStep ['PAGE'] = $casesRedirector . '?ux=' . $_SESSION ['user_experience'];
$nextStep = [];
if (isset($_SESSION['user_experience']) && $flagGmail === false) {
$nextStep['PAGE'] = $casesRedirector . '?ux=' . $_SESSION['user_experience'];
$debuggerAvailable = false;
} else {
if ($flagGmail === true) {
$aNextStep ['PAGE'] = $casesRedirector . '?gmail=1';
$nextStep['PAGE'] = $casesRedirector . '?gmail=1';
} else {
$aNextStep ['PAGE'] = $casesRedirector;
$nextStep['PAGE'] = $casesRedirector;
}
}
$loc = $aNextStep['PAGE'];
$loc = $nextStep['PAGE'];
//Triggers After
$isIE = Bootstrap::isIE();

View File

@@ -139,27 +139,27 @@ trait CasesTrait
$this->updateCase($application, $appFields);
// Send notifications - Start
$oUser = new Users();
$aUser = $oUser->load($userLogged);
$fromName = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
$user = new Users();
$userInfo = $user->load($userLogged);
$fromName = $userInfo['USR_FIRSTNAME'] . ' ' . $userInfo['USR_LASTNAME'];
$sFromData = $fromName . ($aUser['USR_EMAIL'] != '' ? ' <' . $aUser['USR_EMAIL'] . '>' : '');
$fromData = $fromName . ($userInfo['USR_EMAIL'] != '' ? ' <' . $userInfo['USR_EMAIL'] . '>' : '');
if ($flagGmail === true) {
$appDel = new AppDelegation();
$actualThread = $appDel->Load($application, $index);
$appDelPrev = $appDel->LoadParallel($application);
$Pmgmail = new Pmgmail();
$pmGmail = new Pmgmail();
foreach ($appDelPrev as $app) {
if (($app['DEL_INDEX'] != $index) && ($app['DEL_PREVIOUS'] != $actualThread['DEL_PREVIOUS'])) {
$Pmgmail->gmailsIfSelfServiceValueBased($application, $app['DEL_INDEX'], $postForm['TASKS'], $appFields['APP_DATA']);
$pmGmail->gmailsIfSelfServiceValueBased($application, $app['DEL_INDEX'], $postForm['TASKS'], $appFields['APP_DATA']);
}
}
}
try {
$this->sendNotifications($tasUid, $postForm['TASKS'], $appFields['APP_DATA'], $application, $index, $sFromData);
$this->sendNotifications($tasUid, $postForm['TASKS'], $appFields['APP_DATA'], $application, $index, $fromData);
} catch (Exception $e) {
G::SendTemporalMessage(G::loadTranslation('ID_NOTIFICATION_ERROR') . ' - ' . $e->getMessage(), 'warning', 'string', null, '100%');
}
@@ -263,8 +263,8 @@ trait CasesTrait
$case->updateCase($appUid, $fields);
if (isset($files['form'])) {
if (isset($files["form"]["name"]) && count($files["form"]["name"]) > 0) {
$oInputDocument = new InputDocument();
$oInputDocument->uploadFileCase($files, $case, $fields, $currentUsrUid, $appUid, $delIndex);
$inputDocument = new InputDocument();
$inputDocument->uploadFileCase($files, $case, $fields, $currentUsrUid, $appUid, $delIndex);
}
}
$wsBase = new WsBase();

View File

@@ -20,6 +20,7 @@ class SubApplication extends Model
protected $primaryKey = 'APP_UID';
// The IDs are auto-incrementing
public $incrementing = false;
/**
* The model's default values for attributes.
*