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:
Roly Gutierrez
2021-08-25 20:14:13 +00:00
committed by Julio Cesar Laura Avendaño
7 changed files with 1196 additions and 113 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -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

File diff suppressed because it is too large Load Diff

View File

@@ -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

View File

@@ -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

View File

@@ -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