PMCORE-976

This commit is contained in:
Paula Quispe
2021-03-03 14:03:20 -04:00
parent 1cbb780e76
commit e678760a08
11 changed files with 66 additions and 23 deletions

View File

@@ -395,10 +395,11 @@ class Ajax
} catch (Exception $oError) {
$processData['PRO_AUTHOR'] = '(USER DELETED)';
}
// Apply mask
$dateLabel = applyMaskDateEnvironment($processData['PRO_CREATE_DATE'],'', false);
// Apply the timezone
$processData['PRO_CREATE_DATE'] = DateTime::convertUtcToTimeZone($dateLabel);
$conf = new Configurations();
$conf->getFormats();
$processData['PRO_CREATE_DATE'] = $conf->getSystemDate($processData['PRO_CREATE_DATE']);
print(G::json_encode($processData));
}
@@ -432,6 +433,12 @@ class Ajax
$task = new ModelTask();
$taskData = $task->information($_SESSION['APPLICATION'], $taskUid, $_SESSION['INDEX']);
// Apply mask
$dateInitLabel = applyMaskDateEnvironment($taskData['INIT_DATE'],'', false);
$dateDueLabel = applyMaskDateEnvironment($taskData['DUE_DATE'],'', false);
// Apply the timezone
$taskData['INIT_DATE_LABEL'] = DateTime::convertUtcToTimeZone($dateInitLabel);
$taskData['DUE_DATE_LABEL'] = DateTime::convertUtcToTimeZone($dateDueLabel);
$taskData = DateTime::convertUtcToTimeZone($taskData);
print(G::json_encode($taskData));

View File

@@ -29,6 +29,18 @@ switch ($actionAjax) {
while ($dataSet->next()) {
$result = $dataSet->getRow();
$result['ID_HISTORY'] = $result['PRO_UID'] . '_' . $result['APP_UID'] . '_' . $result['TAS_UID'];
// Apply mask
$dateInitLabel = applyMaskDateEnvironment($result['DEL_INIT_DATE'],'', false);
$dateDelLabel = applyMaskDateEnvironment($result['DEL_DELEGATE_DATE'],'', false);
$dateEndLabel = '-';
// @todo the query for get this '-' needs an update
if ($result['DEL_FINISH_DATE'] != "-") {
$dateEndLabel = applyMaskDateEnvironment($result['DEL_FINISH_DATE'],'', false);
}
// Apply the timezone
$result['DEL_INIT_DATE_LABEL'] = DateTime::convertUtcToTimeZone($dateInitLabel);
$result['DEL_DELEGATE_DATE_LABEL'] = DateTime::convertUtcToTimeZone($dateDelLabel);
$result['DEL_FINISH_DATE_LABEL'] = DateTime::convertUtcToTimeZone($dateEndLabel);
$process[] = $result;
}

View File

@@ -20,6 +20,9 @@ switch ($actionAjax) {
$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : 20;
$dir = isset($_POST['dir']) ? $_POST['dir'] : 'DESC';
$sort = isset($_POST['sort']) ? $_POST['sort'] : '';
if ($sort === 'APP_MSG_DATE_LABEL') {
$sort = 'APP_MSG_DATE';
}
global $G_PUBLISH;
$case = new Cases();
@@ -86,7 +89,10 @@ switch ($actionAjax) {
if ($respMess == 'BLOCK' || $respMess == '') {
$appMessageArray[$index]['APP_MSG_BODY'] = '';
}
$appMessageArray[$index]['APP_MSG_DATE'] = DateTime::convertUtcToTimeZone($appMessageArray[$index]['APP_MSG_DATE']);
// Apply mask
$dateLabel = applyMaskDateEnvironment($appMessageArray[$index]['APP_MSG_DATE'], '', false);
// Apply the timezone
$appMessageArray[$index]['APP_MSG_DATE_LABEL'] = DateTime::convertUtcToTimeZone($dateLabel);
$messageList[] = array_merge($appMessageArray[$index], ['MSGS_HISTORY' => $respMess]);
}
}

View File

@@ -669,7 +669,10 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
while ($rs->next()) {
$result = $rs->getRow();
$result["TYPE"] = (array_key_exists($result["TYPE"], $arrayToTranslation)) ? $arrayToTranslation[$result["TYPE"]] : $result["TYPE"];
$result['CREATE_DATE'] = DateTime::convertUtcToTimeZone($result['CREATE_DATE']);
// Apply mask
$dateLabel = applyMaskDateEnvironment($result['CREATE_DATE'], '', false);
// Apply the timezone
$result['CREATE_DATE_LABEL'] = DateTime::convertUtcToTimeZone($dateLabel);
$aProcesses[] = $result;
}
@@ -711,7 +714,10 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
$result["FILEDOCEXIST"] = ($result["FILEDOC"]);
$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']);
// Apply mask
$dateLabel = applyMaskDateEnvironment($result['CREATE_DATE'],'', false);
// Apply the timezone
$result['CREATE_DATE_LABEL'] = DateTime::convertUtcToTimeZone($dateLabel);
$aProcesses[] = $result;
$rs->next();