Merged in release/3.6.0 (pull request #7790)

release/3.6.0

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Paula Quispe
2021-01-27 18:47:43 +00:00
committed by Julio Cesar Laura Avendaño
22 changed files with 94 additions and 160 deletions

View File

@@ -142,7 +142,8 @@ export default {
<style>
.debugger-container {
overflow: auto;
overflow-x: hidden;
overflow-y: auto;
max-width: 25%;
min-width: 25%;
padding: 0.1rem;
@@ -173,9 +174,9 @@ export default {
}
}
.tabs-component-tab {
.debugger-container .tabs-component-tab {
color: #999;
font-size: 14px;
font-size: 0.6rem;
font-weight: 600;
margin-right: 0;
list-style: none;
@@ -265,7 +266,7 @@ input[type="radio"] {
}
.debugger-container .VueTables.VueTables--client > * {
font-size: smaller;
font-size: 10px;
}
.debugger-container .VueTables.VueTables--client .table td,
@@ -280,7 +281,7 @@ input[type="radio"] {
width: 100%;
height: 30px;
padding: 0.5rem 0.5rem;
font-size: 1rem;
font-size: 0.6rem;
font-weight: 400;
line-height: 1.5;
color: #495057;
@@ -297,4 +298,11 @@ input[type="radio"] {
padding-right: 0;
padding-left: 0;
}
.debugger-container .btn-group-sm>.btn, .btn-sm {
padding: .25rem .5rem;
font-size: .6rem;
line-height: 1.5;
border-radius: .2rem;
}
</style>

View File

@@ -339,7 +339,7 @@ export default {
tagPrefix: this.$i18n.t('ID_USER'),
items:[
{
id: "userId",
id: "user",
value: "",
options: [],
placeholder: this.$i18n.t('ID_USER_NAME')

View File

@@ -11,7 +11,7 @@
<multiselect
v-model="filter[0].options"
:options="users"
placeholder="Sselect one"
:placeholder="$t('ID_USER_NAME')"
label="USR_FULLNAME"
track-by="USR_ID"
:show-no-results="false"

View File

@@ -6,6 +6,7 @@
variant="info"
:src="item.AVATAR"
size="2em"
v-show="item.UNASSIGNED"
></b-avatar>
</div>
<b-popover
@@ -20,6 +21,7 @@
variant="info"
:src="item.AVATAR"
size="4em"
v-show="item.UNASSIGNED"
></b-avatar>
</b-col>
<b-col md="9">

View File

@@ -270,20 +270,23 @@ export default {
},
formatUser(data) {
var i,
dataFormat = [];
dataFormat = [],
userDataFormat;
for (i = 0; i < data.length; i += 1) {
dataFormat.push({
USERNAME_DISPLAY_FORMAT: utils.userNameDisplayFormat({
userDataFormat = utils.userNameDisplayFormat({
userName: data[i].usr_firstname,
firstName: data[i].usr_lastname,
lastName: data[i].usr_username,
format: window.config.FORMATS.format || null
}),
});
dataFormat.push({
USERNAME_DISPLAY_FORMAT: userDataFormat !== "" ? userDataFormat : this.$i18n.t("ID_UNASSIGNED"),
EMAIL: data[i].user_tooltip.usr_email,
POSITION: data[i].user_tooltip.usr_position,
AVATAR: window.config.SYS_SERVER +
AVATAR: userDataFormat !== "" ? window.config.SYS_SERVER +
window.config.SYS_URI +
`users/users_ViewPhotoGrid?pUID=${data[i].user_id}`
`users/users_ViewPhotoGrid?pUID=${data[i].user_id}` : "",
UNASSIGNED: userDataFormat !== "" ? true : false
});
}
return dataFormat;

View File

@@ -509,7 +509,7 @@ export default {
DEL_INDEX: data.row.DEL_INDEX,
PRO_UID: data.row.PRO_UID,
TAS_UID: data.row.TAS_UID,
ACTION: "todo",
ACTION: this.dataCase.ACTION || "todo"
});
this.$emit("onUpdatePage", "XCase");
},

View File

@@ -252,6 +252,7 @@ export default {
PRO_UID: item.PRO_UID,
TAS_UID: item.TAS_UID,
APP_NUMBER: item.CASE_NUMBER,
ACTION: "draft"
});
that.$emit("onUpdatePage", "case-detail");
});

View File

@@ -207,6 +207,7 @@ export default {
PRO_UID: item.PRO_UID,
TAS_UID: item.TAS_UID,
APP_NUMBER: item.CASE_NUMBER,
ACTION: that.filterHeader === "SUPERVISING" ? "to_revise": "todo"
});
that.$emit("onUpdatePage", "case-detail");
});

View File

@@ -274,6 +274,7 @@ export default {
PRO_UID: item.PRO_UID,
TAS_UID: item.TAS_UID,
APP_NUMBER: item.CASE_NUMBER,
ACTION: "todo"
});
that.$emit("onUpdatePage", "case-detail");
});

View File

@@ -37,7 +37,7 @@ export default {
this.path =
window.config.SYS_SERVER +
window.config.SYS_URI +
`cases/open?APP_UID=${this.dataCase.APP_UID}&DEL_INDEX=${this.dataCase.DEL_INDEX}&action=${this.dataCase.ACTION}`;
`cases/open?APP_UID=${this.dataCase.APP_UID}&DEL_INDEX=${this.dataCase.DEL_INDEX}&TAS_UID=${this.dataCase.TAS_UID}&action=${this.dataCase.ACTION}`;
}
setTimeout(() => {

View File

@@ -17,7 +17,7 @@ export default {
aux = aux.replace('@userName',defaultValues.userName);
aux = aux.replace('@firstName',defaultValues.firstName);
aux = aux.replace('@lastName',defaultValues.lastName);
return aux;
return aux.trim();
},
/**
* Parse an url string and prepare an object of the parameters

View File

@@ -2353,6 +2353,12 @@ msgstr "Body"
msgid "App Uid"
msgstr "App Uid"
# TRANSLATION
# LABEL/ID_ARE_YOU_SURE_CLAIM_TASK
#: LABEL/ID_ARE_YOU_SURE_CLAIM_TASK
msgid "Are you sure want to claim the task?"
msgstr "Are you sure want to claim the task?"
# TRANSLATION
# LABEL/ID_ARE_YOU_SURE_RESEND
#: LABEL/ID_ARE_YOU_SURE_RESEND
@@ -2371,6 +2377,12 @@ msgstr "Are you sure to delete the matched attribute \"{0}\", please confirm?"
msgid "Are you sure to delete the connection \"{0}\", please confirm?"
msgstr "Are you sure to delete the connection \"{0}\", please confirm?"
# TRANSLATION
# LABEL/ID_ARE_YOU_SURE_UNPAUSE_TASK
#: LABEL/ID_ARE_YOU_SURE_UNPAUSE_TASK
msgid "Are you sure want to unpause the task?"
msgstr "Are you sure want to unpause the task?"
# TRANSLATION
# LABEL/ID_ARRAY_VARIABLES_EMPTY
#: LABEL/ID_ARRAY_VARIABLES_EMPTY
@@ -19406,8 +19418,8 @@ msgstr "More Info"
# TRANSLATION
# LABEL/ID_MORE_INFORMATION
#: LABEL/ID_MORE_INFORMATION
msgid "more information"
msgstr "more information"
msgid "More Information"
msgstr "More Information"
# TRANSLATION
# LABEL/ID_MORE_THAN
@@ -52713,21 +52725,8 @@ msgstr "Pending Tasks"
msgid "Send email to participants"
msgstr "Send email to participants"
# TRANSLATION
# LABEL/ID_TRYING_CANCEL
#: LABEL/ID_TRYING_CANCEL
msgid "You are tying to cancel the current case. Please be aware this action cannot be undone"
msgstr "You are tying to cancel the current case. Please be aware this action cannot be undone"
# TRANSLATION
# LABEL/ID_ARE_YOU_SURE_UNPAUSE_TASK
#: LABEL/ID_ARE_YOU_SURE_UNPAUSE_TASK
msgid "Are you sure want to unpause the task?"
msgstr "Are you sure want to unpause the task?"
# TRANSLATION
# LABEL/ID_ARE_YOU_SURE_CLAIM_TASK
#: LABEL/ID_ARE_YOU_SURE_CLAIM_TASK
msgid "Are you sure want to claim the task?"
msgstr "Are you sure want to claim the task?"

View File

@@ -57195,11 +57195,11 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_APPLY_CHANGES','en','Apply changes','2014-01-15') ,
( 'LABEL','ID_APP_MSG_BODY','en','Body','2014-01-15') ,
( 'LABEL','ID_APP_UID','en','App Uid','2015-09-15') ,
( 'LABEL','ID_ARE_YOU_SURE_CLAIM_TASK','en','Are you sure want to claim the task?','2021-01-26') ,
( 'LABEL','ID_ARE_YOU_SURE_RESEND','en','Are you sure that you want to resend this message','2014-01-15') ,
( 'LABEL','ID_ARE_YOU_SURE_UNPAUSE_TASK','en','Are you sure want to unpause the task?','2020-12-01') ,
( 'LABEL','ID_ARE_YOU_SURE_CLAIM_TASK','en','Are you sure want to claim the task?','2020-12-01') ,
( 'LABEL','ID_ARE_YOU_SURE_TO_DELETE_ATTRIBUTE_PLEASE_CONFIRM','en','Are you sure to delete the matched attribute "{0}", please confirm?','2020-12-10') ,
( 'LABEL','ID_ARE_YOU_SURE_TO_DELETE_CONNECTION_PLEASE_CONFIRM','en','Are you sure to delete the connection "{0}", please confirm?','2020-12-10') ,
( 'LABEL','ID_ARE_YOU_SURE_UNPAUSE_TASK','en','Are you sure want to unpause the task?','2021-01-26') ,
( 'LABEL','ID_ARRAY_VARIABLES_EMPTY','en','Array of variables is empty','2014-01-15') ,
( 'LABEL','ID_ASSIGN','en','Assign','2014-01-15') ,
( 'LABEL','ID_ASSIGNED_FIEDS','en','ASSIGNED FIELDS','2014-01-15') ,
@@ -60122,7 +60122,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_MONTH_ABB_8','en','Aug','2014-01-15') ,
( 'LABEL','ID_MONTH_ABB_9','en','Sep','2014-01-15') ,
( 'LABEL','ID_MORE_INFO','en','More Info','2014-01-15') ,
( 'LABEL','ID_MORE_INFORMATION','en','more information','2014-01-15') ,
( 'LABEL','ID_MORE_INFORMATION','en','More Information','2021-01-26') ,
( 'LABEL','ID_MORE_THAN','en','more than','2015-03-23') ,
( 'LABEL','ID_MOST_AT_LEAST_3_DAY','en','You must define at least 3 Working Days!','2014-01-15') ,
( 'LABEL','ID_MOVE','en','Move','2015-09-17') ,

View File

@@ -327,8 +327,13 @@ switch ($function) {
}
$aData['USR_AUTH_USER_DN'] = $aUser['sDN'];
$usrRole = 'PROCESSMAKER_OPERATOR';
if (!empty($aFields['AUTH_SOURCE_DATA']['USR_ROLE'])) {
$usrRole = $aFields['AUTH_SOURCE_DATA']['USR_ROLE'];
}
try {
$sUserUID = $RBAC->createUser($aData, 'PROCESSMAKER_OPERATOR', $aFields['AUTH_SOURCE_NAME']);
$sUserUID = $RBAC->createUser($aData, $usrRole, $aFields['AUTH_SOURCE_NAME']);
$usersCreated .= $aData['USR_USERNAME'] . ' ';
$countUsers++;
} catch (Exception $oError) {
@@ -340,10 +345,7 @@ switch ($function) {
$aData['USR_STATUS'] = (isset($aUser['USR_STATUS'])) ? $aUser['USR_STATUS'] : 'ACTIVE';
$aData['USR_UID'] = $sUserUID;
$aData['USR_ROLE'] = 'PROCESSMAKER_OPERATOR';
if (isset($aFields['AUTH_SOURCE_DATA']['USR_ROLE'])) {
$aData['USR_ROLE'] = $aFields['AUTH_SOURCE_DATA']['USR_ROLE'];
}
$aData['USR_ROLE'] = $usrRole;
$calendarObj = new Calendar();
$calendarObj->assignCalendarTo($sUserUID, '00000000000000000000000000000001', 'USER');

View File

@@ -577,7 +577,7 @@ class Ajax
$noteContent = addslashes($_POST['NOTE_REASON']);
// Define the Case for register a case note
$cases = new BmCases();
$response = $cases->addNote($appUid, $usrUid, $noteContent);
$response = $cases->addNote($appUid, $usrUid, $noteContent, $_POST['NOTIFY_CANCEL']);
}
} else {
$result->status = false;

View File

@@ -1,58 +1,8 @@
<?php
/**
* cases_Scheduler_Log_Detail.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2010 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
try {
global $RBAC;
/*
switch ($RBAC->userCanAccess('PM_FACTORY'))
{
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
*/
/*
$aFields['MESSAGE0'] = str_replace("\r\n","<br>",G::LoadTranslation('ID_USER_REGISTERED')) . '!';
$aFields['MESSAGE1'] = str_replace("\r\n","<br>",G::LoadTranslation('ID_MSG_ERROR_USR_USERNAME'));
$aFields['MESSAGE2'] = str_replace("\r\n","<br>",G::LoadTranslation('ID_MSG_ERROR_DUE_DATE'));
$aFields['MESSAGE3'] = str_replace("\r\n","<br>",G::LoadTranslation('ID_NEW_PASS_SAME_OLD_PASS'));
$aFields['MESSAGE4'] = str_replace("\r\n","<br>",G::LoadTranslation('ID_MSG_ERROR_USR_FIRSTNAME'));
$aFields['MESSAGE5'] = str_replace("\r\n","<br>",G::LoadTranslation('ID_MSG_ERROR_USR_LASTNAME'));
// the default role variable sets the value that will be showed as the default for the role field.
$aFields['DEFAULT_ROLE'] = 'PROCESSMAKER_OPERATOR';
$aFields['START_DATE'] = date('Y-m-d');
$aFields['END_DATE'] = date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y') + 5));
$aFields['USR_DUE_DATE']= date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y') + 1));
*/
if (! class_exists( 'LogCasesSchedulerPeer' )) {
require_once ('classes/model/LogCasesScheduler.php');
}

View File

@@ -1,58 +1,8 @@
<?php
/**
* cases_SchedulerNew.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2010 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
try {
global $RBAC;
/*
switch ($RBAC->userCanAccess('PM_FACTORY'))
{
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
*/
/*
$aFields['MESSAGE0'] = str_replace("\r\n","<br>",G::LoadTranslation('ID_USER_REGISTERED')) . '!';
$aFields['MESSAGE1'] = str_replace("\r\n","<br>",G::LoadTranslation('ID_MSG_ERROR_USR_USERNAME'));
$aFields['MESSAGE2'] = str_replace("\r\n","<br>",G::LoadTranslation('ID_MSG_ERROR_DUE_DATE'));
$aFields['MESSAGE3'] = str_replace("\r\n","<br>",G::LoadTranslation('ID_NEW_PASS_SAME_OLD_PASS'));
$aFields['MESSAGE4'] = str_replace("\r\n","<br>",G::LoadTranslation('ID_MSG_ERROR_USR_FIRSTNAME'));
$aFields['MESSAGE5'] = str_replace("\r\n","<br>",G::LoadTranslation('ID_MSG_ERROR_USR_LASTNAME'));
// the default role variable sets the value that will be showed as the default for the role field.
$aFields['DEFAULT_ROLE'] = 'PROCESSMAKER_OPERATOR';
$aFields['START_DATE'] = date('Y-m-d');
$aFields['END_DATE'] = date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y') + 5));
$aFields['USR_DUE_DATE']= date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y') + 1));
*/
require_once 'classes/model/CaseScheduler.php';
require_once 'classes/model/Process.php';
require_once 'classes/model/Task.php';

View File

@@ -1065,12 +1065,13 @@ class AbstractCases implements CasesInterface
*
* @param string $dueDate
* @param string $statusThread
* @param string $dateToCompare
*
* @return int
*/
public function getTaskColor(string $dueDate, string $statusThread = '')
public function getTaskColor(string $dueDate, string $statusThread = '', $dateToCompare = 'now')
{
$currentDate = new DateTime('now');
$currentDate = new DateTime($dateToCompare);
$dueDate = new DateTime($dueDate);
if ($currentDate > $dueDate) {
// Overdue: When the current date is mayor to the due date of the case
@@ -1097,10 +1098,12 @@ class AbstractCases implements CasesInterface
*
* @param string $pendingJson
* @param bool $onlyTask
* @param string $statusThread
* @param string $dateToCompare
*
* @return int
*/
public function prepareTaskPending($pendingJson, $onlyTask = true)
public function prepareTaskPending($pendingJson, $onlyTask = true, $statusThread = '', $dateToCompare = '')
{
$taskPending = json_decode($pendingJson, true);
$result = [];
@@ -1117,9 +1120,11 @@ class AbstractCases implements CasesInterface
}
if ($key === 'due_date') {
$threadTasks[$i][$key] = $row;
$threadTasks[$i]['delay'] = getDiffBetweenDates($row, date("Y-m-d H:i:s"));
// Get the end date for calculate the delay
$endDate = ($dateToCompare !== 'now') ? $endDate = $dateToCompare : date("Y-m-d H:i:s");
$threadTasks[$i]['delay'] = getDiffBetweenDates($row, $endDate);
// Get task color label
$threadTasks[$i]['tas_color'] = (!empty($row)) ? $this->getTaskColor($row) : '';
$threadTasks[$i]['tas_color'] = (!empty($row)) ? $this->getTaskColor($row, $statusThread, $dateToCompare) : '';
$threadTasks[$i]['tas_color_label'] = (!empty($row)) ? self::TASK_COLORS[$threadTasks[$i]['tas_color']] : '';
$threadTasks[$i]['tas_status'] = self::TASK_STATUS[$threadTasks[$i]['tas_color']];
}
@@ -1170,6 +1175,8 @@ class AbstractCases implements CasesInterface
{
$result = [];
$status = '';
$finishDate = 'now';
$dateToCompare = date("Y-m-d H:i:s");
// Define the task status
if ($thread['TAS_ASSIGN_TYPE'] === 'SELF_SERVICE') {
$status = 'UNASSIGNED';
@@ -1177,12 +1184,16 @@ class AbstractCases implements CasesInterface
if ($thread['APP_STATUS'] === 'DRAFT') {
$status = 'DRAFT';
}
if ($thread['APP_STATUS'] === 'COMPLETED') {
$finishDate = $thread['APP_FINISH_DATE'];
$dateToCompare = $finishDate;
}
// Define the thread information
$result['tas_title'] = $thread['TAS_TITLE'];
$result['user_id'] = $thread['USR_ID'];
$result['due_date'] = $thread['DEL_TASK_DUE_DATE'];
$result['delay'] = getDiffBetweenDates($thread['DEL_TASK_DUE_DATE'], date("Y-m-d H:i:s"));
$result['tas_color'] = (!empty($thread['DEL_TASK_DUE_DATE'])) ? $this->getTaskColor($thread['DEL_TASK_DUE_DATE'], $status) : '';
$result['delay'] = getDiffBetweenDates($thread['DEL_TASK_DUE_DATE'], $dateToCompare);
$result['tas_color'] = (!empty($thread['DEL_TASK_DUE_DATE'])) ? $this->getTaskColor($thread['DEL_TASK_DUE_DATE'], $status, $finishDate) : '';
$result['tas_color_label'] = (!empty($result['tas_color'])) ? self::TASK_COLORS[$result['tas_color']] : '';
$result['tas_status'] = self::TASK_STATUS[$result['tas_color']];
$result['unassigned'] = ($status === 'UNASSIGNED' ? true : false);

View File

@@ -156,6 +156,7 @@ class Participated extends AbstractCases
$thread['TAS_TITLE'] = $item['TAS_TITLE'];
$thread['USR_ID'] = $item['USR_ID'];
$thread['DEL_TASK_DUE_DATE'] = $item['DEL_TASK_DUE_DATE'];
$thread['APP_FINISH_DATE'] = $item['APP_FINISH_DATE'];
$thread['TAS_ASSIGN_TYPE'] = $item['TAS_ASSIGN_TYPE'];
$thread['APP_STATUS'] = $item['APP_STATUS'];
// Define data according to the filters

View File

@@ -181,12 +181,13 @@ class Search extends AbstractCases
// Calculate duration
$startDate = (string)$item['APP_CREATE_DATE'];
$endDate = !empty($item['APP_FINISH_DATE']) ? $item['APP_FINISH_DATE'] : date("Y-m-d H:i:s");
$dateToCompare = !empty($item['APP_FINISH_DATE']) ? $item['APP_FINISH_DATE'] : 'now';
$item['DURATION'] = getDiffBetweenDates($startDate, $endDate);
// Get total case notes
$item['CASE_NOTES_COUNT'] = AppNotes::total($item['APP_NUMBER']);
// Get the detail related to the open thread
if (!empty($item['THREADS'])) {
$result = $this->prepareTaskPending($item['THREADS'], false);
$result = $this->prepareTaskPending($item['THREADS'], false, $item['APP_STATUS'], $dateToCompare);
$item['THREAD_TASKS'] = !empty($result['THREAD_TASKS']) ? $result['THREAD_TASKS'] : [];
$item['THREAD_USERS'] = !empty($result['THREAD_USERS']) ? $result['THREAD_USERS'] : [];
$item['THREAD_TITLES'] = !empty($result['THREAD_TITLES']) ? $result['THREAD_TITLES'] : [];

View File

@@ -375,8 +375,11 @@ class Process extends Model
// Apply the date format defined in environment
if (!empty($mask)) {
$item['PRO_CREATE_DATE_LABEL'] = $item['PRO_CREATE_DATE']->format($mask);
$item['PRO_UPDATE_DATE_LABEL'] = $item['PRO_UPDATE_DATE']->format($mask);
$item['PRO_CREATE_DATE_LABEL'] = !empty($item['PRO_CREATE_DATE']) ? $item['PRO_CREATE_DATE']->format($mask) : '';
$item['PRO_UPDATE_DATE_LABEL'] = !empty($item['PRO_UPDATE_DATE']) ? $item['PRO_UPDATE_DATE']->format($mask) : '';
} else {
$item['PRO_CREATE_DATE_LABEL'] = !empty($item['PRO_CREATE_DATE']) ? $item['PRO_CREATE_DATE']->format('Y-m-d H:i:s') : '';
$item['PRO_UPDATE_DATE_LABEL'] = !empty($item['PRO_UPDATE_DATE']) ? $item['PRO_UPDATE_DATE']->format('Y-m-d H:i:s') : '';
}
return $item;

View File

@@ -19,6 +19,7 @@ use ProcessMaker\Model\Process;
use ProcessMaker\Model\User;
use ProcessMaker\Model\Task;
use ProcessMaker\Services\Api;
use ProcessMaker\Util\DateTime;
use RBAC;
use stdClass;
@@ -86,7 +87,7 @@ class Home extends Api
$properties['dir'] = $sort[1];
$list->setProperties($properties);
$result = [];
$result['data'] = $list->getData();
$result['data'] = DateTime::convertUtcToTimeZone($list->getData());
$result['total'] = $list->getPagingCounters();
return $result;
} catch (Exception $e) {
@@ -141,7 +142,7 @@ class Home extends Api
$properties['dir'] = $sort[1];
$list->setProperties($properties);
$result = [];
$result['data'] = $list->getData();
$result['data'] = DateTime::convertUtcToTimeZone($list->getData());
$result['total'] = $list->getPagingCounters();
return $result;
} catch (Exception $e) {
@@ -198,7 +199,7 @@ class Home extends Api
$list->setUserUid($usrUid);
$list->setProperties($properties);
$result = [];
$result['data'] = $list->getData();
$result['data'] = DateTime::convertUtcToTimeZone($list->getData());
$result['total'] = $list->getPagingCounters();
return $result;
} catch (Exception $e) {
@@ -253,7 +254,7 @@ class Home extends Api
$properties['dir'] = $sort[1];
$list->setProperties($properties);
$result = [];
$result['data'] = $list->getData();
$result['data'] = DateTime::convertUtcToTimeZone($list->getData());
$result['total'] = $list->getPagingCounters();
return $result;
} catch (Exception $e) {
@@ -334,7 +335,7 @@ class Home extends Api
$list->setUserUid($usrUid);
$list->setParticipatedStatus($filter);
$list->setProperties($properties);
$result['data'] = $list->getData();
$result['data'] = DateTime::convertUtcToTimeZone($list->getData());
$result['total'] = $list->getPagingCounters();
break;
case 'SUPERVISING':
@@ -343,7 +344,7 @@ class Home extends Api
// todo: some queries related to the PROCESS_USER are using the USR_UID
$list->setUserUid($usrUid);
$list->setProperties($properties);
$result['data'] = $list->getData();
$result['data'] = DateTime::convertUtcToTimeZone($list->getData());
$result['total'] = $list->getPagingCounters();
break;
}
@@ -483,7 +484,7 @@ class Home extends Api
$properties['dir'] = $sort[1];
$list->setProperties($properties);
$result = [];
$result['data'] = $list->getData();
$result['data'] = DateTime::convertUtcToTimeZone($list->getData());
// We will to enable always the pagination
$result['total'] = $list->getCounter();
return $result;