Merged in bugfix/PMCORE-3222 (pull request #8067)
PMCORE-3222 Service - Get custom case list schema and data Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -84,10 +84,10 @@ class Draft extends AbstractCases
|
||||
|
||||
/**
|
||||
* Get data self-services cases by user
|
||||
*
|
||||
* @param callable $callback
|
||||
* @return array
|
||||
*/
|
||||
public function getData()
|
||||
public function getData(callable $callback = null)
|
||||
{
|
||||
$query = Delegation::query()->select($this->getColumnsView());
|
||||
// Join with process
|
||||
@@ -105,6 +105,9 @@ class Draft extends AbstractCases
|
||||
}
|
||||
// Add pagination to the query
|
||||
$query->offset($this->getOffset())->limit($this->getLimit());
|
||||
if (is_callable($callback)) {
|
||||
$callback($query);
|
||||
}
|
||||
// Get the data
|
||||
$results = $query->get();
|
||||
// Prepare the result
|
||||
|
||||
461
workflow/engine/src/ProcessMaker/BusinessModel/Cases/Home.php
Normal file
461
workflow/engine/src/ProcessMaker/BusinessModel/Cases/Home.php
Normal file
File diff suppressed because it is too large
Load Diff
@@ -96,10 +96,10 @@ class Inbox extends AbstractCases
|
||||
|
||||
/**
|
||||
* Get the data corresponding to List Inbox
|
||||
*
|
||||
* @param callable $callback
|
||||
* @return array
|
||||
*/
|
||||
public function getData()
|
||||
public function getData(callable $callback = null)
|
||||
{
|
||||
// Start the query for get the cases related to the user
|
||||
$query = Delegation::query()->select($this->getColumnsView());
|
||||
@@ -120,6 +120,9 @@ class Inbox extends AbstractCases
|
||||
}
|
||||
// The limit by clause
|
||||
$query->offset($this->getOffset())->limit($this->getLimit());
|
||||
if (is_callable($callback)) {
|
||||
$callback($query);
|
||||
}
|
||||
// Execute the query
|
||||
$results = $query->get();
|
||||
// Prepare the result
|
||||
|
||||
@@ -95,10 +95,10 @@ class Paused extends AbstractCases
|
||||
|
||||
/**
|
||||
* Gets the data for the paused cases list
|
||||
*
|
||||
* @param callable $callback
|
||||
* @return array
|
||||
*/
|
||||
public function getData()
|
||||
public function getData(callable $callback = null)
|
||||
{
|
||||
$query = Delegation::query()->select($this->getColumnsView());
|
||||
// Join with process
|
||||
@@ -114,6 +114,9 @@ class Paused extends AbstractCases
|
||||
$query->orderBy($this->getOrderByColumn(), $this->getOrderDirection());
|
||||
// Add pagination to the query
|
||||
$query->offset($this->getOffset())->limit($this->getLimit());
|
||||
if (is_callable($callback)) {
|
||||
$callback($query);
|
||||
}
|
||||
//Execute the query
|
||||
$results = $query->get();
|
||||
// Prepare the result
|
||||
|
||||
@@ -96,10 +96,10 @@ class Unassigned extends AbstractCases
|
||||
|
||||
/**
|
||||
* Get data self-services cases by user
|
||||
*
|
||||
* @param callable $callback
|
||||
* @return array
|
||||
*/
|
||||
public function getData()
|
||||
public function getData(callable $callback = null)
|
||||
{
|
||||
$query = Delegation::query()->select($this->getColumnsView());
|
||||
// Join with process
|
||||
@@ -122,6 +122,9 @@ class Unassigned extends AbstractCases
|
||||
}
|
||||
// Add pagination to the query
|
||||
$query->offset($this->getOffset())->limit($this->getLimit());
|
||||
if (is_callable($callback)) {
|
||||
$callback($query);
|
||||
}
|
||||
// Get the data
|
||||
$results = $query->get();
|
||||
// Prepare the result
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user