Merged in feature/PMCORE-2314-PQ (pull request #7658)
PMCORE-2314: Observations Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
@@ -542,17 +542,17 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
||||
G::RenderPage('publish', 'raw');
|
||||
break;
|
||||
case 'getCasesInputDocuments':
|
||||
$arrayToTranslation = array(
|
||||
$arrayToTranslation = [
|
||||
"INPUT" => G::LoadTranslation("ID_INPUT_DB"),
|
||||
"OUTPUT" => G::LoadTranslation("ID_OUTPUT_DB"),
|
||||
"ATTACHED" => G::LoadTranslation("ID_ATTACHED_DB")
|
||||
);
|
||||
$oCase = new Cases();
|
||||
$fields = $oCase->loadCase($_POST['appUid']);
|
||||
$sProcessUID = $fields['PRO_UID'];
|
||||
$aProcesses = [];
|
||||
$criteria = $oCase->getAllUploadedDocumentsCriteria(
|
||||
$sProcessUID,
|
||||
];
|
||||
$case = new Cases();
|
||||
$fields = $case->loadCase($_POST['appUid']);
|
||||
$proUid = $fields['PRO_UID'];
|
||||
$processes = [];
|
||||
$criteria = $case->getAllUploadedDocumentsCriteria(
|
||||
$proUid,
|
||||
$_POST['appUid'],
|
||||
'',
|
||||
$_SESSION['USER_LOGGED'],
|
||||
@@ -574,20 +574,20 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
||||
$result = $rs->getRow();
|
||||
$result["TYPE"] = (array_key_exists($result["TYPE"], $arrayToTranslation)) ? $arrayToTranslation[$result["TYPE"]] : $result["TYPE"];
|
||||
$result['CREATE_DATE'] = DateTime::convertUtcToTimeZone($result['CREATE_DATE']);
|
||||
$aProcesses[] = $result;
|
||||
$processes[] = $result;
|
||||
}
|
||||
$r = new stdclass();
|
||||
$r->data = $aProcesses;
|
||||
$r->data = $processes;
|
||||
$r->totalCount = $totalCount;
|
||||
echo Bootstrap::json_encode($r);
|
||||
break;
|
||||
case 'getCasesOutputDocuments':
|
||||
$oCase = new Cases();
|
||||
$fields = $oCase->loadCase($_POST['appUid']);
|
||||
$sProcessUID = $fields['PRO_UID'];
|
||||
$aProcesses = array();
|
||||
$c = $oCase->getAllGeneratedDocumentsCriteria(
|
||||
$sProcessUID,
|
||||
$case = new Cases();
|
||||
$fields = $case->loadCase($_POST['appUid']);
|
||||
$proUid = $fields['PRO_UID'];
|
||||
$processes = [];
|
||||
$c = $case->getAllGeneratedDocumentsCriteria(
|
||||
$proUid,
|
||||
$_POST['appUid'],
|
||||
'',
|
||||
$_SESSION['USER_LOGGED'],
|
||||
@@ -606,7 +606,7 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
||||
$result["FILEPDFEXIST"] = ($result["FILEPDF"]);
|
||||
$result["DELETE_FILE"] = (isset($result['ID_DELETE']) && $result['ID_DELETE'] == 'Delete') ? true : false;
|
||||
$result['CREATE_DATE'] = DateTime::convertUtcToTimeZone($result['CREATE_DATE']);
|
||||
$aProcesses[] = $result;
|
||||
$processes[] = $result;
|
||||
$rs->next();
|
||||
$totalCount++;
|
||||
}
|
||||
@@ -615,7 +615,7 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
||||
try {
|
||||
$globaleneralConfCasesList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '');
|
||||
} catch (Exception $e) {
|
||||
$generalConfCasesList = array();
|
||||
$generalConfCasesList = [];
|
||||
}
|
||||
$dateFormat = "";
|
||||
$varFlag = isset($generalConfCasesList['casesListDateFormat']);
|
||||
@@ -623,7 +623,7 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
||||
$dateFormat = $generalConfCasesList['casesListDateFormat'];
|
||||
}
|
||||
$r = new stdclass();
|
||||
$r->data = $aProcesses;
|
||||
$r->data = $processes;
|
||||
$r->totalCount = $totalCount;
|
||||
$r->dataFormat = $dateFormat;
|
||||
echo Bootstrap::json_encode($r);
|
||||
|
||||
@@ -946,7 +946,6 @@ class AbstractCases implements CasesInterface
|
||||
return $this->dueTo;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set order by column
|
||||
*
|
||||
|
||||
@@ -453,7 +453,6 @@ class Delegation extends Model
|
||||
public function scopeCasesTo($query, int $to)
|
||||
{
|
||||
return $query->where('APP_DELEGATION.APP_NUMBER', '<=', $to);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -969,7 +968,6 @@ class Delegation extends Model
|
||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||
* @param int $userId
|
||||
* @param int $taskId
|
||||
* @param int $caseNumber
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
|
||||
@@ -561,8 +561,6 @@ class Home extends Api
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws Exception
|
||||
*
|
||||
* @access protected
|
||||
* @class AccessControl {@permission PM_CASES}
|
||||
*/
|
||||
@@ -637,25 +635,24 @@ class Home extends Api
|
||||
public function getTasksCounters()
|
||||
{
|
||||
$result = [];
|
||||
|
||||
$usrUid = $this->getUserId();
|
||||
$usrId = User::find($usrUid)->first()->USR_ID;
|
||||
// For inbox
|
||||
$inbox = new Inbox();
|
||||
$inbox->setUserUid($usrUid);
|
||||
$inbox->setUserId($usrId);
|
||||
$result['todo'] = $inbox->getCounter();
|
||||
|
||||
// For draft
|
||||
$draft = new Draft();
|
||||
$draft->setUserUid($usrUid);
|
||||
$draft->setUserId($usrId);
|
||||
$result['draft'] = $draft->getCounter();
|
||||
|
||||
// For Paused
|
||||
$paused = new Paused();
|
||||
$paused->setUserUid($usrUid);
|
||||
$paused->setUserId($usrId);
|
||||
$result['paused'] = $paused->getCounter();
|
||||
|
||||
|
||||
// For Unassigned
|
||||
$unassigned = new Unassigned();
|
||||
$unassigned->setUserUid($usrUid);
|
||||
$unassigned->setUserId($usrId);
|
||||
|
||||
Reference in New Issue
Block a user