Merged release/3.7.0 into feature/PMCORE-3312
This commit is contained in:
@@ -250,8 +250,8 @@ export default {
|
|||||||
* @param {Array} data
|
* @param {Array} data
|
||||||
*/
|
*/
|
||||||
filterDataToExport(data) {
|
filterDataToExport(data) {
|
||||||
var dataExport = [];
|
var dataExport;
|
||||||
dataExport.push({
|
dataExport = {
|
||||||
type: data['type'],
|
type: data['type'],
|
||||||
name: data['name'],
|
name: data['name'],
|
||||||
description: data['description'],
|
description: data['description'],
|
||||||
@@ -264,7 +264,7 @@ export default {
|
|||||||
iconColorScreen: data['iconColorScreen'],
|
iconColorScreen: data['iconColorScreen'],
|
||||||
createDate: data['createDate'],
|
createDate: data['createDate'],
|
||||||
updateDate: data['updateDate']
|
updateDate: data['updateDate']
|
||||||
});
|
};
|
||||||
return dataExport;
|
return dataExport;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
//Color map for ["In Progress", "overdue", "inDraft", "paused", "unnasigned"]
|
//Color map for ["In Progress", "overdue", "inDraft", "paused", "unnasigned"]
|
||||||
colorMap: ["green", "red", "orange", "aqua", "silver"],
|
colorMap: ["green", "red", "orange", "blue", "silver"],
|
||||||
id: "avatar-" + _.random(1000000),
|
id: "avatar-" + _.random(1000000),
|
||||||
statusId: "status-" + _.random(1000000)
|
statusId: "status-" + _.random(1000000)
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,13 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="data.length" class="task-cell">
|
<div v-if="data.length" class="task-cell">
|
||||||
<div v-for="(item, index) in data" class="d-flex mb-3">
|
<div
|
||||||
|
v-for="(item, index) in data"
|
||||||
|
v-bind:key = index
|
||||||
|
class="d-flex mb-3">
|
||||||
<div
|
<div
|
||||||
v-bind:style="{ color: activeColor(item.CODE_COLOR) }"
|
v-bind:style="{ color: activeColor(item.CODE_COLOR) }"
|
||||||
:id="statusId + index"
|
:id="statusId + index"
|
||||||
>
|
>
|
||||||
<i class="fas fa-square"></i>
|
<i class="fas fa-square"></i>
|
||||||
</div>
|
</div>
|
||||||
<b-popover :target="statusId + index" triggers="hover" placement="top">
|
<b-popover
|
||||||
|
v-if="item.DELAYED_TITLE && item.DELAYED_MSG"
|
||||||
|
:target="statusId + index"
|
||||||
|
triggers="hover"
|
||||||
|
placement="top"
|
||||||
|
>
|
||||||
<b> {{ item.DELAYED_TITLE }} </b> {{ item.DELAYED_MSG }}
|
<b> {{ item.DELAYED_TITLE }} </b> {{ item.DELAYED_MSG }}
|
||||||
</b-popover>
|
</b-popover>
|
||||||
<div class="col ellipsis" v-b-popover.hover.top="item.TITLE">
|
<div class="col ellipsis" v-b-popover.hover.top="item.TITLE">
|
||||||
|
|||||||
20
resources/assets/js/home/Home.vue
Normal file → Executable file
20
resources/assets/js/home/Home.vue
Normal file → Executable file
@@ -59,6 +59,7 @@ import CustomCaseList from "./CustomCaseList/CustomCaseList.vue"
|
|||||||
|
|
||||||
import api from "./../api/index";
|
import api from "./../api/index";
|
||||||
import eventBus from './EventBus/eventBus'
|
import eventBus from './EventBus/eventBus'
|
||||||
|
import _ from "lodash";
|
||||||
export default {
|
export default {
|
||||||
name: "Home",
|
name: "Home",
|
||||||
components: {
|
components: {
|
||||||
@@ -158,7 +159,7 @@ export default {
|
|||||||
|
|
||||||
eventer(messageEvent, function(e) {
|
eventer(messageEvent, function(e) {
|
||||||
if ( e.data === "redirect=todo" || e.message === "redirect=todo"){
|
if ( e.data === "redirect=todo" || e.message === "redirect=todo"){
|
||||||
that.page = "inbox";
|
that.OnClickSidebarItem(that.getItemMenuByValue("page","inbox"));
|
||||||
}
|
}
|
||||||
if ( e.data === "update=debugger" || e.message === "update=debugger"){
|
if ( e.data === "update=debugger" || e.message === "update=debugger"){
|
||||||
if(that.$refs["component"].updateView){
|
if(that.$refs["component"].updateView){
|
||||||
@@ -563,6 +564,23 @@ export default {
|
|||||||
console.error(e);
|
console.error(e);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Search in menu Items by value, return the item
|
||||||
|
* @param {string} key - Key for search in object
|
||||||
|
* @param {string} value - value for search in key
|
||||||
|
*/
|
||||||
|
getItemMenuByValue(key, value) {
|
||||||
|
let obj = _.find(this.menu, function(o) {
|
||||||
|
if(o.component){
|
||||||
|
return o.props.item[key] == value;
|
||||||
|
}
|
||||||
|
return o[key] == value;
|
||||||
|
});
|
||||||
|
if(obj.component){
|
||||||
|
return obj.props;
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10145,6 +10145,12 @@ msgstr "Import connection"
|
|||||||
msgid "CSV Import"
|
msgid "CSV Import"
|
||||||
msgstr "CSV Import"
|
msgstr "CSV Import"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_IMPORT_CUSTOM_CASE_LIST
|
||||||
|
#: LABEL/ID_IMPORT_CUSTOM_CASE_LIST
|
||||||
|
msgid "Import Custom Case List"
|
||||||
|
msgstr "Import Custom Case List"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_IMPORT_DATA_CSV
|
# LABEL/ID_IMPORT_DATA_CSV
|
||||||
#: LABEL/ID_IMPORT_DATA_CSV
|
#: LABEL/ID_IMPORT_DATA_CSV
|
||||||
@@ -20153,6 +20159,12 @@ msgstr "New case"
|
|||||||
msgid "% New Cases"
|
msgid "% New Cases"
|
||||||
msgstr "% New Cases"
|
msgstr "% New Cases"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_NEW_CASES_LISTS
|
||||||
|
#: LABEL/ID_NEW_CASES_LISTS
|
||||||
|
msgid "New Case List"
|
||||||
|
msgstr "New Case List"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_NEW_CASE_PANEL
|
# LABEL/ID_NEW_CASE_PANEL
|
||||||
#: LABEL/ID_NEW_CASE_PANEL
|
#: LABEL/ID_NEW_CASE_PANEL
|
||||||
@@ -21587,6 +21599,12 @@ msgstr "The PIN is invalid"
|
|||||||
msgid "please"
|
msgid "please"
|
||||||
msgstr "please"
|
msgstr "please"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_PLEASE_ADD_THE_CUSTOM_LIST_FILE_TO_BE_UPLOADED
|
||||||
|
#: LABEL/ID_PLEASE_ADD_THE_CUSTOM_LIST_FILE_TO_BE_UPLOADED
|
||||||
|
msgid "Please add the Custom List File to be uploaded"
|
||||||
|
msgstr "Please add the Custom List File to be uploaded"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_PLEASE_ADD_THE_FILE_SETTINGS_TO_BE_UPLOADED
|
# LABEL/ID_PLEASE_ADD_THE_FILE_SETTINGS_TO_BE_UPLOADED
|
||||||
#: LABEL/ID_PLEASE_ADD_THE_FILE_SETTINGS_TO_BE_UPLOADED
|
#: LABEL/ID_PLEASE_ADD_THE_FILE_SETTINGS_TO_BE_UPLOADED
|
||||||
|
|||||||
@@ -58548,6 +58548,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
|||||||
( 'LABEL','ID_IMPORT_BPMN','en','Import BPMN','2015-02-20') ,
|
( 'LABEL','ID_IMPORT_BPMN','en','Import BPMN','2015-02-20') ,
|
||||||
( 'LABEL','ID_IMPORT_CONNECTION','en','Import connection','2020-12-10') ,
|
( 'LABEL','ID_IMPORT_CONNECTION','en','Import connection','2020-12-10') ,
|
||||||
( 'LABEL','ID_IMPORT_CSV','en','CSV Import','2014-01-15') ,
|
( 'LABEL','ID_IMPORT_CSV','en','CSV Import','2014-01-15') ,
|
||||||
|
( 'LABEL','ID_IMPORT_CUSTOM_CASE_LIST','en','Import Custom Case List','2021-09-09') ,
|
||||||
( 'LABEL','ID_IMPORT_DATA_CSV','en','Import Data from CSV file','2014-01-15') ,
|
( 'LABEL','ID_IMPORT_DATA_CSV','en','Import Data from CSV file','2014-01-15') ,
|
||||||
( 'LABEL','ID_IMPORT_LICENSE','en','Import license','2014-09-18') ,
|
( 'LABEL','ID_IMPORT_LICENSE','en','Import license','2014-09-18') ,
|
||||||
( 'LABEL','ID_IMPORT_PMT','en','Import PM Table','2014-01-15') ,
|
( 'LABEL','ID_IMPORT_PMT','en','Import PM Table','2014-01-15') ,
|
||||||
@@ -60258,6 +60259,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
|||||||
( 'LABEL','ID_NEW_BPMN_PROJECT','en','New BPMN Project','2015-08-18') ,
|
( 'LABEL','ID_NEW_BPMN_PROJECT','en','New BPMN Project','2015-08-18') ,
|
||||||
( 'LABEL','ID_NEW_CASE','en','New case','2014-01-15') ,
|
( 'LABEL','ID_NEW_CASE','en','New case','2014-01-15') ,
|
||||||
( 'LABEL','ID_NEW_CASES','en','% New Cases','2015-04-06') ,
|
( 'LABEL','ID_NEW_CASES','en','% New Cases','2015-04-06') ,
|
||||||
|
( 'LABEL','ID_NEW_CASES_LISTS','en','New Case List','2021-09-09') ,
|
||||||
( 'LABEL','ID_NEW_CASE_PANEL','en','New Case Panel','2014-01-15') ,
|
( 'LABEL','ID_NEW_CASE_PANEL','en','New Case Panel','2014-01-15') ,
|
||||||
( 'LABEL','ID_NEW_CASE_SCHEDULER','en','New Case Scheduler','2014-01-15') ,
|
( 'LABEL','ID_NEW_CASE_SCHEDULER','en','New Case Scheduler','2014-01-15') ,
|
||||||
( 'LABEL','ID_NEW_CATEGORY','en','Create New Category','2014-01-15') ,
|
( 'LABEL','ID_NEW_CATEGORY','en','Create New Category','2014-01-15') ,
|
||||||
@@ -60506,6 +60508,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
|||||||
( 'LABEL','ID_PIN','en','Pin','2015-05-08') ,
|
( 'LABEL','ID_PIN','en','Pin','2015-05-08') ,
|
||||||
( 'LABEL','ID_PIN_INVALID','en','The PIN is invalid','2014-01-15') ,
|
( 'LABEL','ID_PIN_INVALID','en','The PIN is invalid','2014-01-15') ,
|
||||||
( 'LABEL','ID_PLEASE','en','please','2014-01-15') ,
|
( 'LABEL','ID_PLEASE','en','please','2014-01-15') ,
|
||||||
|
( 'LABEL','ID_PLEASE_ADD_THE_CUSTOM_LIST_FILE_TO_BE_UPLOADED','en','Please add the Custom List File to be uploaded','2021-09-09') ,
|
||||||
( 'LABEL','ID_PLEASE_ADD_THE_FILE_SETTINGS_TO_BE_UPLOADED','en','Please add the file settings to be uploaded','2020-12-10') ,
|
( 'LABEL','ID_PLEASE_ADD_THE_FILE_SETTINGS_TO_BE_UPLOADED','en','Please add the file settings to be uploaded','2020-12-10') ,
|
||||||
( 'LABEL','ID_PLEASE_CHANGE_PASSWORD_POLICY','en','Please change your password to one that complies with these policies.','2014-01-15') ,
|
( 'LABEL','ID_PLEASE_CHANGE_PASSWORD_POLICY','en','Please change your password to one that complies with these policies.','2014-01-15') ,
|
||||||
( 'LABEL','ID_PLEASE_CONFIGURE_ESTIMATED_DURATION_TASK','en','Please, configure the estimated duration of the task.','2014-10-23') ,
|
( 'LABEL','ID_PLEASE_CONFIGURE_ESTIMATED_DURATION_TASK','en','Please, configure the estimated duration of the task.','2014-10-23') ,
|
||||||
|
|||||||
@@ -267,8 +267,9 @@ class Home
|
|||||||
* @param int $id
|
* @param int $id
|
||||||
* @param array $arguments
|
* @param array $arguments
|
||||||
* @param array $defaultColumns
|
* @param array $defaultColumns
|
||||||
|
* @param array $customFilters
|
||||||
*/
|
*/
|
||||||
public function buildCustomCaseList(string $type, int $id, array &$arguments, array &$defaultColumns)
|
public function buildCustomCaseList(string $type, int $id, array &$arguments, array &$defaultColumns, array $customFilters = [])
|
||||||
{
|
{
|
||||||
$caseList = CaseList::where('CAL_TYPE', '=', $type)
|
$caseList = CaseList::where('CAL_TYPE', '=', $type)
|
||||||
->where('CAL_ID', '=', $id)
|
->where('CAL_ID', '=', $id)
|
||||||
@@ -287,22 +288,47 @@ class Home
|
|||||||
$defaultColumns = [];
|
$defaultColumns = [];
|
||||||
}
|
}
|
||||||
$fields = [];
|
$fields = [];
|
||||||
|
$types = [];
|
||||||
foreach ($columns as $value) {
|
foreach ($columns as $value) {
|
||||||
if ($value['set'] === true) {
|
if ($value['set'] === true) {
|
||||||
$defaultColumns[] = $value;
|
$defaultColumns[] = $value;
|
||||||
if ($value['source'] === $tableName) {
|
if ($value['source'] === $tableName) {
|
||||||
$fields[] = $value['field'];
|
$fields[] = $value['field'];
|
||||||
|
$types[$value['field']] = $value['type'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//this modifies the query
|
//this modifies the query
|
||||||
if (!empty($tableName) && !empty($fields)) {
|
if (!empty($tableName) && !empty($fields)) {
|
||||||
$arguments[] = function ($query) use ($tableName, $fields) {
|
$arguments[] = function ($query) use ($tableName, $fields, $customFilters, $types) {
|
||||||
$query->leftJoin($tableName, "{$tableName}.APP_UID", "=", "APP_DELEGATION.APP_UID");
|
$query->leftJoin($tableName, "{$tableName}.APP_UID", "=", "APP_DELEGATION.APP_UID");
|
||||||
foreach ($fields as $value) {
|
foreach ($fields as $value) {
|
||||||
$query->addSelect($value);
|
$query->addSelect($value);
|
||||||
}
|
}
|
||||||
|
//filters for custom case list
|
||||||
|
foreach ($customFilters as $key => $filter) {
|
||||||
|
if (in_array($key, $fields)) {
|
||||||
|
//special case for date range
|
||||||
|
if (isset($types[$key]) && ($types[$key] === "DATETIME" || $types[$key] === "DATE")) {
|
||||||
|
if (strpos($customFilters[$key], ",") !== false) {
|
||||||
|
$explode = explode(",", $customFilters[$key]);
|
||||||
|
$dateFrom = $explode[0];
|
||||||
|
$dateTo = $explode[1];
|
||||||
|
$query->whereBetween($key, [$dateFrom, $dateTo]);
|
||||||
|
if (is_null($filter) || $filter === "") {
|
||||||
|
$subquery->orWhereNull($key);
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//normal filter
|
||||||
|
$subquery = $query->where($key, 'like', "%{$filter}%");
|
||||||
|
if (is_null($filter) || $filter === "") {
|
||||||
|
$subquery->orWhereNull($key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -319,6 +345,7 @@ class Home
|
|||||||
* @param string $caseTitle
|
* @param string $caseTitle
|
||||||
* @param string $filterCases
|
* @param string $filterCases
|
||||||
* @param string $sort
|
* @param string $sort
|
||||||
|
* @param array $customFilters
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getCustomDraft(
|
public function getCustomDraft(
|
||||||
@@ -330,15 +357,30 @@ class Home
|
|||||||
int $offset = 0,
|
int $offset = 0,
|
||||||
string $caseTitle = '',
|
string $caseTitle = '',
|
||||||
string $filterCases = '',
|
string $filterCases = '',
|
||||||
string $sort = 'APP_NUMBER,DESC'
|
string $sort = 'APP_NUMBER,DESC',
|
||||||
|
array $customFilters = []
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
$arguments = func_get_args();
|
$arguments = [
|
||||||
array_shift($arguments);
|
$caseNumber,
|
||||||
|
$process,
|
||||||
|
$task,
|
||||||
|
$limit,
|
||||||
|
$offset,
|
||||||
|
$caseTitle,
|
||||||
|
$filterCases,
|
||||||
|
$sort
|
||||||
|
];
|
||||||
|
|
||||||
|
//clear duplicate indexes
|
||||||
|
$keys = ['caseNumber', 'process', 'task', 'limit', 'offset', 'caseTitle', 'filterCases', 'sort'];
|
||||||
|
foreach ($keys as $value) {
|
||||||
|
unset($customFilters[$value]);
|
||||||
|
}
|
||||||
|
|
||||||
$type = 'draft';
|
$type = 'draft';
|
||||||
$defaultColumns = CaseList::formattingColumns($type, '', []);
|
$defaultColumns = CaseList::formattingColumns($type, '', []);
|
||||||
$this->buildCustomCaseList($type, $id, $arguments, $defaultColumns);
|
$this->buildCustomCaseList($type, $id, $arguments, $defaultColumns, $customFilters);
|
||||||
|
|
||||||
$result = $this->getDraft(...$arguments);
|
$result = $this->getDraft(...$arguments);
|
||||||
$result['columns'] = $defaultColumns;
|
$result['columns'] = $defaultColumns;
|
||||||
@@ -359,6 +401,7 @@ class Home
|
|||||||
* @param string $filterCases
|
* @param string $filterCases
|
||||||
* @param string $sort
|
* @param string $sort
|
||||||
* @param string $sendBy
|
* @param string $sendBy
|
||||||
|
* @param array $customFilters
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getCustomInbox(
|
public function getCustomInbox(
|
||||||
@@ -373,15 +416,33 @@ class Home
|
|||||||
string $delegateTo = '',
|
string $delegateTo = '',
|
||||||
string $filterCases = '',
|
string $filterCases = '',
|
||||||
string $sort = 'APP_NUMBER,DESC',
|
string $sort = 'APP_NUMBER,DESC',
|
||||||
string $sendBy = ''
|
string $sendBy = '',
|
||||||
|
array $customFilters = []
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
$arguments = func_get_args();
|
$arguments = [
|
||||||
array_shift($arguments);
|
$caseNumber,
|
||||||
|
$process,
|
||||||
|
$task,
|
||||||
|
$limit,
|
||||||
|
$offset,
|
||||||
|
$caseTitle,
|
||||||
|
$delegateFrom,
|
||||||
|
$delegateTo,
|
||||||
|
$filterCases,
|
||||||
|
$sort,
|
||||||
|
$sendBy
|
||||||
|
];
|
||||||
|
|
||||||
|
//clear duplicate indexes
|
||||||
|
$keys = ['caseNumber', 'process', 'task', 'limit', 'offset', 'caseTitle', 'delegateFrom', 'delegateTo', 'filterCases', 'sort', 'sendBy'];
|
||||||
|
foreach ($keys as $value) {
|
||||||
|
unset($customFilters[$value]);
|
||||||
|
}
|
||||||
|
|
||||||
$type = 'inbox';
|
$type = 'inbox';
|
||||||
$defaultColumns = CaseList::formattingColumns($type, '', []);
|
$defaultColumns = CaseList::formattingColumns($type, '', []);
|
||||||
$this->buildCustomCaseList($type, $id, $arguments, $defaultColumns);
|
$this->buildCustomCaseList($type, $id, $arguments, $defaultColumns, $customFilters);
|
||||||
|
|
||||||
$result = $this->getInbox(...$arguments);
|
$result = $this->getInbox(...$arguments);
|
||||||
$result['columns'] = $defaultColumns;
|
$result['columns'] = $defaultColumns;
|
||||||
@@ -402,6 +463,7 @@ class Home
|
|||||||
* @param string $filterCases
|
* @param string $filterCases
|
||||||
* @param string $sort
|
* @param string $sort
|
||||||
* @param string $sendBy
|
* @param string $sendBy
|
||||||
|
* @param array $customFilters
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getCustomUnassigned(
|
public function getCustomUnassigned(
|
||||||
@@ -416,15 +478,33 @@ class Home
|
|||||||
string $delegateTo = '',
|
string $delegateTo = '',
|
||||||
string $filterCases = '',
|
string $filterCases = '',
|
||||||
string $sort = 'APP_NUMBER,DESC',
|
string $sort = 'APP_NUMBER,DESC',
|
||||||
string $sendBy = ''
|
string $sendBy = '',
|
||||||
|
array $customFilters = []
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
$arguments = func_get_args();
|
$arguments = [
|
||||||
array_shift($arguments);
|
$caseNumber,
|
||||||
|
$process,
|
||||||
|
$task,
|
||||||
|
$limit,
|
||||||
|
$offset,
|
||||||
|
$caseTitle,
|
||||||
|
$delegateFrom,
|
||||||
|
$delegateTo,
|
||||||
|
$filterCases,
|
||||||
|
$sort,
|
||||||
|
$sendBy
|
||||||
|
];
|
||||||
|
|
||||||
|
//clear duplicate indexes
|
||||||
|
$keys = ['caseNumber', 'process', 'task', 'limit', 'offset', 'caseTitle', 'delegateFrom', 'delegateTo', 'filterCases', 'sort', 'sendBy'];
|
||||||
|
foreach ($keys as $value) {
|
||||||
|
unset($customFilters[$value]);
|
||||||
|
}
|
||||||
|
|
||||||
$type = 'unassigned';
|
$type = 'unassigned';
|
||||||
$defaultColumns = CaseList::formattingColumns($type, '', []);
|
$defaultColumns = CaseList::formattingColumns($type, '', []);
|
||||||
$this->buildCustomCaseList($type, $id, $arguments, $defaultColumns);
|
$this->buildCustomCaseList($type, $id, $arguments, $defaultColumns, $customFilters);
|
||||||
|
|
||||||
$result = $this->getUnassigned(...$arguments);
|
$result = $this->getUnassigned(...$arguments);
|
||||||
$result['columns'] = $defaultColumns;
|
$result['columns'] = $defaultColumns;
|
||||||
@@ -445,6 +525,7 @@ class Home
|
|||||||
* @param string $filterCases
|
* @param string $filterCases
|
||||||
* @param string $sort
|
* @param string $sort
|
||||||
* @param string $sendBy
|
* @param string $sendBy
|
||||||
|
* @param array $customFilters
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getCustomPaused(
|
public function getCustomPaused(
|
||||||
@@ -459,15 +540,33 @@ class Home
|
|||||||
string $delegateTo = '',
|
string $delegateTo = '',
|
||||||
string $filterCases = '',
|
string $filterCases = '',
|
||||||
string $sort = 'APP_NUMBER,DESC',
|
string $sort = 'APP_NUMBER,DESC',
|
||||||
string $sendBy = ''
|
string $sendBy = '',
|
||||||
|
array $customFilters = []
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
$arguments = func_get_args();
|
$arguments = [
|
||||||
array_shift($arguments);
|
$caseNumber,
|
||||||
|
$process,
|
||||||
|
$task,
|
||||||
|
$limit,
|
||||||
|
$offset,
|
||||||
|
$caseTitle,
|
||||||
|
$delegateFrom,
|
||||||
|
$delegateTo,
|
||||||
|
$filterCases,
|
||||||
|
$sort,
|
||||||
|
$sendBy
|
||||||
|
];
|
||||||
|
|
||||||
|
//clear duplicate indexes
|
||||||
|
$keys = ['caseNumber', 'process', 'task', 'limit', 'offset', 'caseTitle', 'delegateFrom', 'delegateTo', 'filterCases', 'sort', 'sendBy'];
|
||||||
|
foreach ($keys as $value) {
|
||||||
|
unset($customFilters[$value]);
|
||||||
|
}
|
||||||
|
|
||||||
$type = 'paused';
|
$type = 'paused';
|
||||||
$defaultColumns = CaseList::formattingColumns($type, '', []);
|
$defaultColumns = CaseList::formattingColumns($type, '', []);
|
||||||
$this->buildCustomCaseList($type, $id, $arguments, $defaultColumns);
|
$this->buildCustomCaseList($type, $id, $arguments, $defaultColumns, $customFilters);
|
||||||
|
|
||||||
$result = $this->getPaused(...$arguments);
|
$result = $this->getPaused(...$arguments);
|
||||||
$result['columns'] = $defaultColumns;
|
$result['columns'] = $defaultColumns;
|
||||||
|
|||||||
@@ -79,7 +79,16 @@ class Home extends Api
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$bmHome = new BMHome($this->getUserId());
|
$bmHome = new BMHome($this->getUserId());
|
||||||
return $bmHome->getDraft(...func_get_args());
|
return $bmHome->getDraft(
|
||||||
|
$caseNumber,
|
||||||
|
$process,
|
||||||
|
$task,
|
||||||
|
$limit,
|
||||||
|
$offset,
|
||||||
|
$caseTitle,
|
||||||
|
$filterCases,
|
||||||
|
$sort
|
||||||
|
);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
}
|
}
|
||||||
@@ -126,7 +135,19 @@ class Home extends Api
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$bmHome = new BMHome($this->getUserId());
|
$bmHome = new BMHome($this->getUserId());
|
||||||
return $bmHome->getInbox(...func_get_args());
|
return $bmHome->getInbox(
|
||||||
|
$caseNumber,
|
||||||
|
$process,
|
||||||
|
$task,
|
||||||
|
$limit,
|
||||||
|
$offset,
|
||||||
|
$caseTitle,
|
||||||
|
$delegateFrom,
|
||||||
|
$delegateTo,
|
||||||
|
$filterCases,
|
||||||
|
$sort,
|
||||||
|
$sendBy
|
||||||
|
);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
}
|
}
|
||||||
@@ -172,7 +193,19 @@ class Home extends Api
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$bmHome = new BMHome($this->getUserId());
|
$bmHome = new BMHome($this->getUserId());
|
||||||
return $bmHome->getUnassigned(...func_get_args());
|
return $bmHome->getUnassigned(
|
||||||
|
$caseNumber,
|
||||||
|
$process,
|
||||||
|
$task,
|
||||||
|
$limit,
|
||||||
|
$offset,
|
||||||
|
$caseTitle,
|
||||||
|
$delegateFrom,
|
||||||
|
$delegateTo,
|
||||||
|
$filterCases,
|
||||||
|
$sort,
|
||||||
|
$sendBy
|
||||||
|
);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
}
|
}
|
||||||
@@ -218,7 +251,19 @@ class Home extends Api
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$bmHome = new BMHome($this->getUserId());
|
$bmHome = new BMHome($this->getUserId());
|
||||||
return $bmHome->getPaused(...func_get_args());
|
return $bmHome->getPaused(
|
||||||
|
$caseNumber,
|
||||||
|
$process,
|
||||||
|
$task,
|
||||||
|
$limit,
|
||||||
|
$offset,
|
||||||
|
$caseTitle,
|
||||||
|
$delegateFrom,
|
||||||
|
$delegateTo,
|
||||||
|
$filterCases,
|
||||||
|
$sort,
|
||||||
|
$sendBy
|
||||||
|
);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
}
|
}
|
||||||
@@ -226,7 +271,7 @@ class Home extends Api
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the custom draft cases.
|
* Get the custom draft cases.
|
||||||
* @url GET /draft/:id
|
* @url POST /draft/:id
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @param int $caseNumber
|
* @param int $caseNumber
|
||||||
* @param int $process
|
* @param int $process
|
||||||
@@ -236,6 +281,7 @@ class Home extends Api
|
|||||||
* @param string $caseTitle
|
* @param string $caseTitle
|
||||||
* @param string $filterCases
|
* @param string $filterCases
|
||||||
* @param string $sort
|
* @param string $sort
|
||||||
|
* @param array $request_data
|
||||||
* @return array
|
* @return array
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
* @access protected
|
* @access protected
|
||||||
@@ -250,12 +296,24 @@ class Home extends Api
|
|||||||
int $offset = 0,
|
int $offset = 0,
|
||||||
string $caseTitle = '',
|
string $caseTitle = '',
|
||||||
string $filterCases = '',
|
string $filterCases = '',
|
||||||
string $sort = 'APP_NUMBER,DESC'
|
string $sort = 'APP_NUMBER,DESC',
|
||||||
|
array $request_data = []
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$bmHome = new BMHome($this->getUserId());
|
$bmHome = new BMHome($this->getUserId());
|
||||||
return $bmHome->getCustomDraft(...func_get_args());
|
return $bmHome->getCustomDraft(
|
||||||
|
$id,
|
||||||
|
$caseNumber,
|
||||||
|
$process,
|
||||||
|
$task,
|
||||||
|
$limit,
|
||||||
|
$offset,
|
||||||
|
$caseTitle,
|
||||||
|
$filterCases,
|
||||||
|
$sort,
|
||||||
|
$request_data
|
||||||
|
);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
}
|
}
|
||||||
@@ -263,7 +321,7 @@ class Home extends Api
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the custom inbox cases.
|
* Get the custom inbox cases.
|
||||||
* @url GET /inbox/:id
|
* @url POST /inbox/:id
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @param int $caseNumber
|
* @param int $caseNumber
|
||||||
* @param int $process
|
* @param int $process
|
||||||
@@ -276,12 +334,13 @@ class Home extends Api
|
|||||||
* @param string $filterCases
|
* @param string $filterCases
|
||||||
* @param string $sort
|
* @param string $sort
|
||||||
* @param string $sendBy
|
* @param string $sendBy
|
||||||
|
* @param array $request_data
|
||||||
* @return array
|
* @return array
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
* @access protected
|
* @access protected
|
||||||
* @class AccessControl {@permission PM_CASES}
|
* @class AccessControl {@permission PM_CASES}
|
||||||
*/
|
*/
|
||||||
public function doGetCustomTodoCases(
|
public function doGetCustomInboxCases(
|
||||||
int $id,
|
int $id,
|
||||||
int $caseNumber = 0,
|
int $caseNumber = 0,
|
||||||
int $process = 0,
|
int $process = 0,
|
||||||
@@ -293,12 +352,27 @@ class Home extends Api
|
|||||||
string $delegateTo = '',
|
string $delegateTo = '',
|
||||||
string $filterCases = '',
|
string $filterCases = '',
|
||||||
string $sort = 'APP_NUMBER,DESC',
|
string $sort = 'APP_NUMBER,DESC',
|
||||||
string $sendBy = ''
|
string $sendBy = '',
|
||||||
|
array $request_data = []
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$bmHome = new BMHome($this->getUserId());
|
$bmHome = new BMHome($this->getUserId());
|
||||||
return $bmHome->getCustomInbox(...func_get_args());
|
return $bmHome->getCustomInbox(
|
||||||
|
$id,
|
||||||
|
$caseNumber,
|
||||||
|
$process,
|
||||||
|
$task,
|
||||||
|
$limit,
|
||||||
|
$offset,
|
||||||
|
$caseTitle,
|
||||||
|
$delegateFrom,
|
||||||
|
$delegateTo,
|
||||||
|
$filterCases,
|
||||||
|
$sort,
|
||||||
|
$sendBy,
|
||||||
|
$request_data
|
||||||
|
);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
}
|
}
|
||||||
@@ -306,7 +380,7 @@ class Home extends Api
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the custom unassigned cases.
|
* Get the custom unassigned cases.
|
||||||
* @url GET /unassigned/:id
|
* @url POST /unassigned/:id
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @param int $caseNumber
|
* @param int $caseNumber
|
||||||
* @param int $process
|
* @param int $process
|
||||||
@@ -319,6 +393,7 @@ class Home extends Api
|
|||||||
* @param string $filterCases
|
* @param string $filterCases
|
||||||
* @param string $sort
|
* @param string $sort
|
||||||
* @param string $sendBy
|
* @param string $sendBy
|
||||||
|
* @param array $request_data
|
||||||
* @return array
|
* @return array
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
* @access protected
|
* @access protected
|
||||||
@@ -336,12 +411,27 @@ class Home extends Api
|
|||||||
string $delegateTo = '',
|
string $delegateTo = '',
|
||||||
string $filterCases = '',
|
string $filterCases = '',
|
||||||
string $sort = 'APP_NUMBER,DESC',
|
string $sort = 'APP_NUMBER,DESC',
|
||||||
string $sendBy = ''
|
string $sendBy = '',
|
||||||
|
array $request_data = []
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$bmHome = new BMHome($this->getUserId());
|
$bmHome = new BMHome($this->getUserId());
|
||||||
return $bmHome->getCustomUnassigned(...func_get_args());
|
return $bmHome->getCustomUnassigned(
|
||||||
|
$id,
|
||||||
|
$caseNumber,
|
||||||
|
$process,
|
||||||
|
$task,
|
||||||
|
$limit,
|
||||||
|
$offset,
|
||||||
|
$caseTitle,
|
||||||
|
$delegateFrom,
|
||||||
|
$delegateTo,
|
||||||
|
$filterCases,
|
||||||
|
$sort,
|
||||||
|
$sendBy,
|
||||||
|
$request_data
|
||||||
|
);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
}
|
}
|
||||||
@@ -349,7 +439,7 @@ class Home extends Api
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the custom paused cases.
|
* Get the custom paused cases.
|
||||||
* @url GET /paused/:id
|
* @url POST /paused/:id
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @param int $caseNumber
|
* @param int $caseNumber
|
||||||
* @param int $process
|
* @param int $process
|
||||||
@@ -362,6 +452,7 @@ class Home extends Api
|
|||||||
* @param string $filterCases
|
* @param string $filterCases
|
||||||
* @param string $sort
|
* @param string $sort
|
||||||
* @param string $sendBy
|
* @param string $sendBy
|
||||||
|
* @param array $request_data
|
||||||
* @return array
|
* @return array
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
* @access protected
|
* @access protected
|
||||||
@@ -379,12 +470,27 @@ class Home extends Api
|
|||||||
string $delegateTo = '',
|
string $delegateTo = '',
|
||||||
string $filterCases = '',
|
string $filterCases = '',
|
||||||
string $sort = 'APP_NUMBER,DESC',
|
string $sort = 'APP_NUMBER,DESC',
|
||||||
string $sendBy = ''
|
string $sendBy = '',
|
||||||
|
array $request_data = []
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$bmHome = new BMHome($this->getUserId());
|
$bmHome = new BMHome($this->getUserId());
|
||||||
return $bmHome->getCustomPaused(...func_get_args());
|
return $bmHome->getCustomPaused(
|
||||||
|
$id,
|
||||||
|
$caseNumber,
|
||||||
|
$process,
|
||||||
|
$task,
|
||||||
|
$limit,
|
||||||
|
$offset,
|
||||||
|
$caseTitle,
|
||||||
|
$delegateFrom,
|
||||||
|
$delegateTo,
|
||||||
|
$filterCases,
|
||||||
|
$sort,
|
||||||
|
$sendBy,
|
||||||
|
$request_data
|
||||||
|
);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user