HOR-2680
This commit is contained in:
@@ -126,9 +126,16 @@ class Applications
|
|||||||
$totalCount = $aRow['TOTAL'];
|
$totalCount = $aRow['TOTAL'];
|
||||||
|
|
||||||
//Filters
|
//Filters
|
||||||
if (!empty($sort)) {
|
if (!empty($sort)) {error_log($sort);
|
||||||
if ($sort === 'APP_NUMBER' || $sort === 'APPLICATION.APP_NUMBER') {
|
switch ($sort) {
|
||||||
|
case 'APP_NUMBER':
|
||||||
|
//The order by APP_DELEGATION.APP_NUMBER is must be fast than APPLICATION.APP_NUMBER
|
||||||
$sort = 'APP_DELEGATION.APP_NUMBER';
|
$sort = 'APP_DELEGATION.APP_NUMBER';
|
||||||
|
break;
|
||||||
|
case 'APP_CURRENT_USER':
|
||||||
|
//The column APP_CURRENT_USER is concat those fields
|
||||||
|
$sort = 'USR_LASTNAME, USR_FIRSTNAME';
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
$sqlWhere .= " ORDER BY " . $sort;
|
$sqlWhere .= " ORDER BY " . $sort;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,10 @@ $_SESSION['USER_LOGGED'] = $filter->xssFilterHard($_SESSION['USER_LOGGED']);
|
|||||||
|
|
||||||
//Getting the extJs parameters
|
//Getting the extJs parameters
|
||||||
$callback = isset( $_REQUEST["callback"] ) ? $_REQUEST["callback"] : "stcCallback1001";
|
$callback = isset( $_REQUEST["callback"] ) ? $_REQUEST["callback"] : "stcCallback1001";
|
||||||
|
//This default value was defined in casesList.js
|
||||||
$dir = isset( $_REQUEST["dir"] ) ? $_REQUEST["dir"] : "DESC";
|
$dir = isset( $_REQUEST["dir"] ) ? $_REQUEST["dir"] : "DESC";
|
||||||
$sort = isset( $_REQUEST["sort"] ) ? $_REQUEST["sort"] : "";
|
//This default value was defined in casesList.js
|
||||||
|
$sort = isset( $_REQUEST["sort"] ) ? $_REQUEST["sort"] : "APP_NUMBER";
|
||||||
$start = isset( $_REQUEST["start"] ) ? $_REQUEST["start"] : "0";
|
$start = isset( $_REQUEST["start"] ) ? $_REQUEST["start"] : "0";
|
||||||
$limit = isset( $_REQUEST["limit"] ) ? $_REQUEST["limit"] : "25";
|
$limit = isset( $_REQUEST["limit"] ) ? $_REQUEST["limit"] : "25";
|
||||||
$filter = isset( $_REQUEST["filter"] ) ? $_REQUEST["filter"] : "";
|
$filter = isset( $_REQUEST["filter"] ) ? $_REQUEST["filter"] : "";
|
||||||
@@ -107,10 +109,6 @@ try {
|
|||||||
$sort,
|
$sort,
|
||||||
$category
|
$category
|
||||||
);
|
);
|
||||||
|
|
||||||
$data['data'] = \ProcessMaker\Util\DateTime::convertUtcToTimeZone($data['data']);
|
|
||||||
|
|
||||||
$result = G::json_encode($data);
|
|
||||||
} else {
|
} else {
|
||||||
G::LoadClass("applications");
|
G::LoadClass("applications");
|
||||||
|
|
||||||
@@ -123,17 +121,14 @@ try {
|
|||||||
$process,
|
$process,
|
||||||
$filterStatus,
|
$filterStatus,
|
||||||
$dir,
|
$dir,
|
||||||
(strpos($sort, ".") !== false)? $sort : "APPLICATION." . $sort,
|
$sort,
|
||||||
$category,
|
$category,
|
||||||
$dateFrom,
|
$dateFrom,
|
||||||
$dateTo
|
$dateTo
|
||||||
);
|
);
|
||||||
|
|
||||||
$data['data'] = \ProcessMaker\Util\DateTime::convertUtcToTimeZone($data['data']);
|
|
||||||
|
|
||||||
$result = G::json_encode($data);
|
|
||||||
}
|
}
|
||||||
|
$data['data'] = \ProcessMaker\Util\DateTime::convertUtcToTimeZone($data['data']);
|
||||||
|
$result = G::json_encode($data);
|
||||||
echo $result;
|
echo $result;
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$msg = array("error" => $e->getMessage());
|
$msg = array("error" => $e->getMessage());
|
||||||
|
|||||||
@@ -843,7 +843,7 @@ Ext.onReady ( function() {
|
|||||||
reader: readerCasesList,
|
reader: readerCasesList,
|
||||||
writer: writerCasesList, // <-- plug a DataWriter into the store just as you would a Reader
|
writer: writerCasesList, // <-- plug a DataWriter into the store just as you would a Reader
|
||||||
autoSave: true, // <-- false would delay executing create, update, destroy requests until specifically told to do so with some [save] buton.
|
autoSave: true, // <-- false would delay executing create, update, destroy requests until specifically told to do so with some [save] buton.
|
||||||
sortInfo:{field: 'APPLICATION.APP_NUMBER', direction: "DESC"},
|
sortInfo:{field: 'APP_NUMBER', direction: "DESC"},
|
||||||
listeners: {
|
listeners: {
|
||||||
beforeload: function (store, options)
|
beforeload: function (store, options)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user