COnflicts
This commit is contained in:
@@ -6,6 +6,9 @@ use Exception;
|
|||||||
use G;
|
use G;
|
||||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||||
use ProcessMaker\BusinessModel\Cases\AbstractCases;
|
use ProcessMaker\BusinessModel\Cases\AbstractCases;
|
||||||
|
use ProcessMaker\BusinessModel\Cases\Draft;
|
||||||
|
use ProcessMaker\BusinessModel\Cases\Paused;
|
||||||
|
use ProcessMaker\BusinessModel\Cases\Unassigned;
|
||||||
use ProcessMaker\Model\Application;
|
use ProcessMaker\Model\Application;
|
||||||
use ProcessMaker\Model\Delegation;
|
use ProcessMaker\Model\Delegation;
|
||||||
use ProcessMaker\Model\Process;
|
use ProcessMaker\Model\Process;
|
||||||
@@ -738,6 +741,8 @@ class AbstractCasesTest extends TestCase
|
|||||||
$absCases = new AbstractCases();
|
$absCases = new AbstractCases();
|
||||||
$properties = [];
|
$properties = [];
|
||||||
$absCases->setProperties($properties);
|
$absCases->setProperties($properties);
|
||||||
|
$actual = $absCases->getCategoryId();
|
||||||
|
$this->assertEquals(0, $actual);
|
||||||
$actual = $absCases->getProcessId();
|
$actual = $absCases->getProcessId();
|
||||||
$this->assertEquals(0, $actual);
|
$this->assertEquals(0, $actual);
|
||||||
$actual = $absCases->getTaskId();
|
$actual = $absCases->getTaskId();
|
||||||
@@ -784,6 +789,7 @@ class AbstractCasesTest extends TestCase
|
|||||||
* This check the setter related all the properties
|
* This check the setter related all the properties
|
||||||
*
|
*
|
||||||
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setProperties()
|
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setProperties()
|
||||||
|
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setCategoryId()
|
||||||
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setProcessId()
|
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setProcessId()
|
||||||
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setTaskId()
|
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setTaskId()
|
||||||
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setUserId()
|
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setUserId()
|
||||||
@@ -799,6 +805,7 @@ class AbstractCasesTest extends TestCase
|
|||||||
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setOffset()
|
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setOffset()
|
||||||
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setLimit()
|
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setLimit()
|
||||||
*
|
*
|
||||||
|
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getCategoryId()
|
||||||
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getProcessId()
|
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getProcessId()
|
||||||
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getTaskId()
|
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getTaskId()
|
||||||
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getUserId()
|
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getUserId()
|
||||||
@@ -820,6 +827,7 @@ class AbstractCasesTest extends TestCase
|
|||||||
$absCases = new AbstractCases();
|
$absCases = new AbstractCases();
|
||||||
$properties = [
|
$properties = [
|
||||||
// Filters that works for all list
|
// Filters that works for all list
|
||||||
|
'category' => rand(),
|
||||||
'process' => rand(),
|
'process' => rand(),
|
||||||
'task' => rand(),
|
'task' => rand(),
|
||||||
'user' => rand(),
|
'user' => rand(),
|
||||||
@@ -836,6 +844,8 @@ class AbstractCasesTest extends TestCase
|
|||||||
];
|
];
|
||||||
$absCases->setProperties($properties);
|
$absCases->setProperties($properties);
|
||||||
// Tasks - Cases
|
// Tasks - Cases
|
||||||
|
$actual = $absCases->getCategoryId();
|
||||||
|
$this->assertEquals($properties['category'], $actual);
|
||||||
$actual = $absCases->getProcessId();
|
$actual = $absCases->getProcessId();
|
||||||
$this->assertEquals($properties['process'], $actual);
|
$this->assertEquals($properties['process'], $actual);
|
||||||
$actual = $absCases->getTaskId();
|
$actual = $absCases->getTaskId();
|
||||||
@@ -887,6 +897,33 @@ class AbstractCasesTest extends TestCase
|
|||||||
$this->assertNotEmpty($result);
|
$this->assertNotEmpty($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This check the get task color
|
||||||
|
*
|
||||||
|
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getTaskColor()
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
public function it_return_task_color_class()
|
||||||
|
{
|
||||||
|
$absCases = new Draft();
|
||||||
|
$dueDate = date('Y-m-d');
|
||||||
|
// Review on-time
|
||||||
|
$result = $absCases->getTaskColor($dueDate,'DRAFT' ,'2000-01-01');
|
||||||
|
$this->assertNotEmpty($result);
|
||||||
|
|
||||||
|
$absCases = new Paused();
|
||||||
|
$dueDate = date('Y-m-d');
|
||||||
|
// Review on-time
|
||||||
|
$result = $absCases->getTaskColor($dueDate,'PAUSED' ,'2000-01-01');
|
||||||
|
$this->assertNotEmpty($result);
|
||||||
|
|
||||||
|
$absCases = new Unassigned();
|
||||||
|
$dueDate = date('Y-m-d');
|
||||||
|
// Review on-time
|
||||||
|
$result = $absCases->getTaskColor($dueDate,'UNASSIGNED' ,'2000-01-01');
|
||||||
|
$this->assertNotEmpty($result);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This check task color according the due date
|
* This check task color according the due date
|
||||||
*
|
*
|
||||||
@@ -925,5 +962,31 @@ class AbstractCasesTest extends TestCase
|
|||||||
$result = $absCases->threadInformation($thread, true, true);
|
$result = $absCases->threadInformation($thread, true, true);
|
||||||
$this->assertNotEmpty($result);
|
$this->assertNotEmpty($result);
|
||||||
}
|
}
|
||||||
|
// APP_STATUS = DRAFT
|
||||||
|
foreach ($taskPending as $thread) {
|
||||||
|
$thread['APP_STATUS'] = 'DRAFT';
|
||||||
|
$result = $absCases->threadInformation($thread, true, true);
|
||||||
|
$this->assertNotEmpty($result);
|
||||||
|
}
|
||||||
|
// APP_STATUS = COMPLETED
|
||||||
|
foreach ($taskPending as $thread) {
|
||||||
|
$thread['APP_STATUS'] = 'COMPLETED';
|
||||||
|
$result = $absCases->threadInformation($thread, true, true);
|
||||||
|
$this->assertNotEmpty($result);
|
||||||
|
}
|
||||||
|
// DEL_THREAD_STATUS = PAUSED
|
||||||
|
foreach ($taskPending as $thread) {
|
||||||
|
$thread['APP_STATUS'] = 'TO_DO';
|
||||||
|
$thread['DEL_THREAD_STATUS'] = 'PAUSED';
|
||||||
|
$result = $absCases->threadInformation($thread, true, true);
|
||||||
|
$this->assertNotEmpty($result);
|
||||||
|
}
|
||||||
|
// TAS_ASSIGN_TYPE = SELF_SERVICE
|
||||||
|
foreach ($taskPending as $thread) {
|
||||||
|
$thread['APP_STATUS'] = 'TO_DO';
|
||||||
|
$thread['TAS_ASSIGN_TYPE'] = 'SELF_SERVICE';
|
||||||
|
$result = $absCases->threadInformation($thread, true, true);
|
||||||
|
$this->assertNotEmpty($result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -788,7 +788,7 @@ class DraftTest extends TestCase
|
|||||||
'APP_INIT_USER' => $user->USR_UID,
|
'APP_INIT_USER' => $user->USR_UID,
|
||||||
'APP_CUR_USER' => $user->USR_UID,
|
'APP_CUR_USER' => $user->USR_UID,
|
||||||
]);
|
]);
|
||||||
factory(Delegation::class)->states('foreign_keys')->create([
|
$del = factory(Delegation::class)->states('foreign_keys')->create([
|
||||||
'DEL_THREAD_STATUS' => 'OPEN',
|
'DEL_THREAD_STATUS' => 'OPEN',
|
||||||
'DEL_INDEX' => 1,
|
'DEL_INDEX' => 1,
|
||||||
'USR_UID' => $application[0]->APP_INIT_USER,
|
'USR_UID' => $application[0]->APP_INIT_USER,
|
||||||
@@ -804,7 +804,7 @@ class DraftTest extends TestCase
|
|||||||
$draft = new Draft();
|
$draft = new Draft();
|
||||||
$draft->setUserId($user->USR_ID);
|
$draft->setUserId($user->USR_ID);
|
||||||
$draft->setUserUid($user->USR_ID);
|
$draft->setUserUid($user->USR_ID);
|
||||||
$res = $draft->getCasesRisk($process->PRO_ID);
|
$res = $draft->getCasesRisk($process->PRO_ID, $currentDate, $currentDate, 'ON_TIME', 10);
|
||||||
$this->assertCount(1, $res);
|
$this->assertCount(1, $res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -291,7 +291,7 @@ class HomeTest extends TestCase
|
|||||||
'CAL_COLUMNS' => '[{"field":"case_number","enableFilter":false,"set":true},{"field":"case_title","enableFilter":false,"set":true},{"field":"process_name","enableFilter":false,"set":true},{"field":"task","enableFilter":false,"set":true},{"field":"send_by","enableFilter":false,"set":true},{"field":"due_date","enableFilter":false,"set":true},{"field":"delegation_date","enableFilter":false,"set":true},{"field":"priority","enableFilter":false,"set":true},{"field":"VAR1","enableFilter":false,"set":true},{"field":"VAR2","enableFilter":false,"set":true},{"field":"VAR3","enableFilter":false,"set":false}]',
|
'CAL_COLUMNS' => '[{"field":"case_number","enableFilter":false,"set":true},{"field":"case_title","enableFilter":false,"set":true},{"field":"process_name","enableFilter":false,"set":true},{"field":"task","enableFilter":false,"set":true},{"field":"send_by","enableFilter":false,"set":true},{"field":"due_date","enableFilter":false,"set":true},{"field":"delegation_date","enableFilter":false,"set":true},{"field":"priority","enableFilter":false,"set":true},{"field":"VAR1","enableFilter":false,"set":true},{"field":"VAR2","enableFilter":false,"set":true},{"field":"VAR3","enableFilter":false,"set":false}]',
|
||||||
'ADD_TAB_UID' => $additionalTables->ADD_TAB_UID
|
'ADD_TAB_UID' => $additionalTables->ADD_TAB_UID
|
||||||
]);
|
]);
|
||||||
$arguments = [$caseList->CAL_ID, 0, 0, 0, 15, 0, '', '', 'APP_NUMBER,DESC'];
|
$arguments = [$caseList->CAL_ID, 0, 0, 0, 0, 15, 0, '', '', 'APP_NUMBER,DESC'];
|
||||||
|
|
||||||
$home = new Home($application->APP_INIT_USER);
|
$home = new Home($application->APP_INIT_USER);
|
||||||
$result = $home->getCustomDraft(...$arguments);
|
$result = $home->getCustomDraft(...$arguments);
|
||||||
@@ -344,7 +344,7 @@ class HomeTest extends TestCase
|
|||||||
'CAL_COLUMNS' => '[{"field":"case_number","enableFilter":false,"set":true},{"field":"case_title","enableFilter":false,"set":true},{"field":"process_name","enableFilter":false,"set":true},{"field":"task","enableFilter":false,"set":true},{"field":"send_by","enableFilter":false,"set":true},{"field":"due_date","enableFilter":false,"set":true},{"field":"delegation_date","enableFilter":false,"set":true},{"field":"priority","enableFilter":false,"set":true},{"field":"VAR1","enableFilter":false,"set":true},{"field":"VAR2","enableFilter":false,"set":true},{"field":"VAR3","enableFilter":false,"set":false}]',
|
'CAL_COLUMNS' => '[{"field":"case_number","enableFilter":false,"set":true},{"field":"case_title","enableFilter":false,"set":true},{"field":"process_name","enableFilter":false,"set":true},{"field":"task","enableFilter":false,"set":true},{"field":"send_by","enableFilter":false,"set":true},{"field":"due_date","enableFilter":false,"set":true},{"field":"delegation_date","enableFilter":false,"set":true},{"field":"priority","enableFilter":false,"set":true},{"field":"VAR1","enableFilter":false,"set":true},{"field":"VAR2","enableFilter":false,"set":true},{"field":"VAR3","enableFilter":false,"set":false}]',
|
||||||
'ADD_TAB_UID' => $additionalTables->ADD_TAB_UID
|
'ADD_TAB_UID' => $additionalTables->ADD_TAB_UID
|
||||||
]);
|
]);
|
||||||
$arguments = [$caseList->CAL_ID, 0, 0, 0, 15, 0, '', '', 'APP_NUMBER,DESC'];
|
$arguments = [$caseList->CAL_ID, 0, 0, 0, 0, 15, 0, '', '', 'APP_NUMBER,DESC'];
|
||||||
|
|
||||||
$home = new Home($application->APP_INIT_USER);
|
$home = new Home($application->APP_INIT_USER);
|
||||||
$result = $home->getCustomDraft(...$arguments);
|
$result = $home->getCustomDraft(...$arguments);
|
||||||
@@ -423,7 +423,7 @@ class HomeTest extends TestCase
|
|||||||
'CAL_COLUMNS' => '[{"field":"case_number","enableFilter":false,"set":true},{"field":"case_title","enableFilter":false,"set":true},{"field":"process_name","enableFilter":false,"set":true},{"field":"task","enableFilter":false,"set":true},{"field":"send_by","enableFilter":false,"set":true},{"field":"due_date","enableFilter":false,"set":true},{"field":"delegation_date","enableFilter":false,"set":true},{"field":"priority","enableFilter":false,"set":true},{"field":"VAR1","enableFilter":false,"set":true},{"field":"VAR2","enableFilter":false,"set":true},{"field":"VAR3","enableFilter":false,"set":false}]',
|
'CAL_COLUMNS' => '[{"field":"case_number","enableFilter":false,"set":true},{"field":"case_title","enableFilter":false,"set":true},{"field":"process_name","enableFilter":false,"set":true},{"field":"task","enableFilter":false,"set":true},{"field":"send_by","enableFilter":false,"set":true},{"field":"due_date","enableFilter":false,"set":true},{"field":"delegation_date","enableFilter":false,"set":true},{"field":"priority","enableFilter":false,"set":true},{"field":"VAR1","enableFilter":false,"set":true},{"field":"VAR2","enableFilter":false,"set":true},{"field":"VAR3","enableFilter":false,"set":false}]',
|
||||||
'ADD_TAB_UID' => $additionalTables->ADD_TAB_UID
|
'ADD_TAB_UID' => $additionalTables->ADD_TAB_UID
|
||||||
]);
|
]);
|
||||||
$arguments = [$caseList->CAL_ID, 0, 0, 0, 15, 0, '', '', 'APP_NUMBER,DESC'];
|
$arguments = [$caseList->CAL_ID, 0, 0, 0, 0, 15, 0, '', '', 'APP_NUMBER,DESC'];
|
||||||
|
|
||||||
$home = new Home($application->APP_INIT_USER);
|
$home = new Home($application->APP_INIT_USER);
|
||||||
$result = $home->getCustomDraft(...$arguments);
|
$result = $home->getCustomDraft(...$arguments);
|
||||||
@@ -522,7 +522,7 @@ class HomeTest extends TestCase
|
|||||||
'CAL_COLUMNS' => '[{"field":"case_number","enableFilter":false,"set":true},{"field":"case_title","enableFilter":false,"set":true},{"field":"process_name","enableFilter":false,"set":true},{"field":"task","enableFilter":false,"set":true},{"field":"send_by","enableFilter":false,"set":true},{"field":"due_date","enableFilter":false,"set":true},{"field":"delegation_date","enableFilter":false,"set":true},{"field":"priority","enableFilter":false,"set":true},{"field":"VAR1","enableFilter":false,"set":true},{"field":"VAR2","enableFilter":false,"set":true},{"field":"VAR3","enableFilter":false,"set":false}]',
|
'CAL_COLUMNS' => '[{"field":"case_number","enableFilter":false,"set":true},{"field":"case_title","enableFilter":false,"set":true},{"field":"process_name","enableFilter":false,"set":true},{"field":"task","enableFilter":false,"set":true},{"field":"send_by","enableFilter":false,"set":true},{"field":"due_date","enableFilter":false,"set":true},{"field":"delegation_date","enableFilter":false,"set":true},{"field":"priority","enableFilter":false,"set":true},{"field":"VAR1","enableFilter":false,"set":true},{"field":"VAR2","enableFilter":false,"set":true},{"field":"VAR3","enableFilter":false,"set":false}]',
|
||||||
'ADD_TAB_UID' => $additionalTables->ADD_TAB_UID
|
'ADD_TAB_UID' => $additionalTables->ADD_TAB_UID
|
||||||
]);
|
]);
|
||||||
$arguments = [$caseList->CAL_ID, 0, 0, 0, 15, 0, '', '', 'APP_NUMBER,DESC'];
|
$arguments = [$caseList->CAL_ID, 0, 0, 0, 0, 15, 0, '', '', 'APP_NUMBER,DESC'];
|
||||||
|
|
||||||
$home = new Home($application1->APP_INIT_USER);
|
$home = new Home($application1->APP_INIT_USER);
|
||||||
$result = $home->getCustomDraft(...$arguments);
|
$result = $home->getCustomDraft(...$arguments);
|
||||||
|
|||||||
@@ -1343,6 +1343,10 @@ class AbstractCases implements CasesInterface
|
|||||||
*/
|
*/
|
||||||
public function setProperties(array $properties)
|
public function setProperties(array $properties)
|
||||||
{
|
{
|
||||||
|
// Filter by category
|
||||||
|
if (!empty($properties['category'])) {
|
||||||
|
$this->setCategoryId($properties['category']);
|
||||||
|
}
|
||||||
// Filter by process
|
// Filter by process
|
||||||
if (!empty($properties['process'])) {
|
if (!empty($properties['process'])) {
|
||||||
$this->setProcessId($properties['process']);
|
$this->setProcessId($properties['process']);
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ use ProcessMaker\Model\Application;
|
|||||||
use ProcessMaker\Model\CaseList;
|
use ProcessMaker\Model\CaseList;
|
||||||
use ProcessMaker\Model\Delegation;
|
use ProcessMaker\Model\Delegation;
|
||||||
use ProcessMaker\Model\Task;
|
use ProcessMaker\Model\Task;
|
||||||
|
use ProcessMaker\Model\ProcessCategory;
|
||||||
use ProcessMaker\Model\User;
|
use ProcessMaker\Model\User;
|
||||||
|
|
||||||
class Draft extends AbstractCases
|
class Draft extends AbstractCases
|
||||||
@@ -16,6 +17,7 @@ class Draft extends AbstractCases
|
|||||||
// Columns view in the cases list
|
// Columns view in the cases list
|
||||||
'APP_DELEGATION.APP_NUMBER', // Case #
|
'APP_DELEGATION.APP_NUMBER', // Case #
|
||||||
'APP_DELEGATION.DEL_TITLE', // Case Title
|
'APP_DELEGATION.DEL_TITLE', // Case Title
|
||||||
|
'PROCESS.CATEGORY_ID', // Category
|
||||||
'PROCESS.PRO_TITLE', // Process
|
'PROCESS.PRO_TITLE', // Process
|
||||||
'TASK.TAS_TITLE', // Task
|
'TASK.TAS_TITLE', // Task
|
||||||
'APP_DELEGATION.DEL_TASK_DUE_DATE', // Due Date
|
'APP_DELEGATION.DEL_TASK_DUE_DATE', // Due Date
|
||||||
@@ -67,6 +69,10 @@ class Draft extends AbstractCases
|
|||||||
if (!empty($this->getCaseTitle())) {
|
if (!empty($this->getCaseTitle())) {
|
||||||
$query->title($this->getCaseTitle());
|
$query->title($this->getCaseTitle());
|
||||||
}
|
}
|
||||||
|
// Specific category
|
||||||
|
if ($this->getCategoryId()) {
|
||||||
|
$query->categoryId($this->getCategoryId());
|
||||||
|
}
|
||||||
// Specific process
|
// Specific process
|
||||||
if ($this->getProcessId()) {
|
if ($this->getProcessId()) {
|
||||||
$query->processId($this->getProcessId());
|
$query->processId($this->getProcessId());
|
||||||
@@ -113,6 +119,9 @@ class Draft extends AbstractCases
|
|||||||
$results = $query->get();
|
$results = $query->get();
|
||||||
// Prepare the result
|
// Prepare the result
|
||||||
$results->transform(function ($item, $key) {
|
$results->transform(function ($item, $key) {
|
||||||
|
// Get the category
|
||||||
|
$category = !empty($item['CATEGORY_ID']) ? ProcessCategory::getCategory($item['CATEGORY_ID']) : '';
|
||||||
|
$item['CATEGORY'] = !empty($category) ? $category : G::LoadTranslation('ID_PROCESS_NONE_CATEGORY');
|
||||||
// Get priority label
|
// Get priority label
|
||||||
$priorityLabel = self::PRIORITIES[$item['DEL_PRIORITY']];
|
$priorityLabel = self::PRIORITIES[$item['DEL_PRIORITY']];
|
||||||
$item['DEL_PRIORITY_LABEL'] = G::LoadTranslation("ID_PRIORITY_{$priorityLabel}");
|
$item['DEL_PRIORITY_LABEL'] = G::LoadTranslation("ID_PRIORITY_{$priorityLabel}");
|
||||||
@@ -199,6 +208,11 @@ class Draft extends AbstractCases
|
|||||||
$query = Delegation::query()->select();
|
$query = Delegation::query()->select();
|
||||||
// Add the initial scope for draft cases
|
// Add the initial scope for draft cases
|
||||||
$query->draft($this->getUserId());
|
$query->draft($this->getUserId());
|
||||||
|
// Check if the category was defined
|
||||||
|
if ($this->getCategoryId()) {
|
||||||
|
// Join with process if the filter with category exist
|
||||||
|
$query->joinProcess();
|
||||||
|
}
|
||||||
// Apply filters
|
// Apply filters
|
||||||
$this->filters($query);
|
$this->filters($query);
|
||||||
// Return the number of rows
|
// Return the number of rows
|
||||||
|
|||||||
@@ -38,7 +38,9 @@ class Home
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the draft cases.
|
* Get the draft cases.
|
||||||
|
*
|
||||||
* @param int $caseNumber
|
* @param int $caseNumber
|
||||||
|
* @param int $category
|
||||||
* @param int $process
|
* @param int $process
|
||||||
* @param int $task
|
* @param int $task
|
||||||
* @param int $limit
|
* @param int $limit
|
||||||
@@ -47,10 +49,12 @@ class Home
|
|||||||
* @param string $filterCases
|
* @param string $filterCases
|
||||||
* @param string $sort
|
* @param string $sort
|
||||||
* @param callable $callback
|
* @param callable $callback
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getDraft(
|
public function getDraft(
|
||||||
int $caseNumber = 0,
|
int $caseNumber = 0,
|
||||||
|
int $category = 0,
|
||||||
int $process = 0,
|
int $process = 0,
|
||||||
int $task = 0,
|
int $task = 0,
|
||||||
int $limit = 15,
|
int $limit = 15,
|
||||||
@@ -67,6 +71,7 @@ class Home
|
|||||||
$properties['caseNumber'] = $caseNumber;
|
$properties['caseNumber'] = $caseNumber;
|
||||||
$properties['caseTitle'] = $caseTitle;
|
$properties['caseTitle'] = $caseTitle;
|
||||||
$properties['filterCases'] = $filterCases;
|
$properties['filterCases'] = $filterCases;
|
||||||
|
$properties['category'] = $category;
|
||||||
$properties['process'] = $process;
|
$properties['process'] = $process;
|
||||||
$properties['task'] = $task;
|
$properties['task'] = $task;
|
||||||
// Get the user that access to the API
|
// Get the user that access to the API
|
||||||
@@ -87,7 +92,9 @@ class Home
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the inbox cases.
|
* Get the inbox cases.
|
||||||
|
*
|
||||||
* @param int $caseNumber
|
* @param int $caseNumber
|
||||||
|
* @param int $category
|
||||||
* @param int $process
|
* @param int $process
|
||||||
* @param int $task
|
* @param int $task
|
||||||
* @param int $limit
|
* @param int $limit
|
||||||
@@ -99,10 +106,12 @@ class Home
|
|||||||
* @param string $sort
|
* @param string $sort
|
||||||
* @param string $sendBy
|
* @param string $sendBy
|
||||||
* @param callable $callback
|
* @param callable $callback
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getInbox(
|
public function getInbox(
|
||||||
int $caseNumber = 0,
|
int $caseNumber = 0,
|
||||||
|
int $category = 0,
|
||||||
int $process = 0,
|
int $process = 0,
|
||||||
int $task = 0,
|
int $task = 0,
|
||||||
int $limit = 15,
|
int $limit = 15,
|
||||||
@@ -124,6 +133,7 @@ class Home
|
|||||||
$properties['delegateFrom'] = $delegateFrom;
|
$properties['delegateFrom'] = $delegateFrom;
|
||||||
$properties['delegateTo'] = $delegateTo;
|
$properties['delegateTo'] = $delegateTo;
|
||||||
$properties['filterCases'] = $filterCases;
|
$properties['filterCases'] = $filterCases;
|
||||||
|
$properties['category'] = $category;
|
||||||
$properties['process'] = $process;
|
$properties['process'] = $process;
|
||||||
$properties['task'] = $task;
|
$properties['task'] = $task;
|
||||||
// Get the user that access to the API
|
// Get the user that access to the API
|
||||||
@@ -145,7 +155,9 @@ class Home
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the unassigned cases.
|
* Get the unassigned cases.
|
||||||
|
*
|
||||||
* @param int $caseNumber
|
* @param int $caseNumber
|
||||||
|
* @param int $category
|
||||||
* @param int $process
|
* @param int $process
|
||||||
* @param int $task
|
* @param int $task
|
||||||
* @param int $limit
|
* @param int $limit
|
||||||
@@ -157,10 +169,12 @@ class Home
|
|||||||
* @param string $sort
|
* @param string $sort
|
||||||
* @param string $sendBy
|
* @param string $sendBy
|
||||||
* @param callable $callback
|
* @param callable $callback
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getUnassigned(
|
public function getUnassigned(
|
||||||
int $caseNumber = 0,
|
int $caseNumber = 0,
|
||||||
|
int $category = 0,
|
||||||
int $process = 0,
|
int $process = 0,
|
||||||
int $task = 0,
|
int $task = 0,
|
||||||
int $limit = 15,
|
int $limit = 15,
|
||||||
@@ -182,6 +196,7 @@ class Home
|
|||||||
$properties['delegateFrom'] = $delegateFrom;
|
$properties['delegateFrom'] = $delegateFrom;
|
||||||
$properties['delegateTo'] = $delegateTo;
|
$properties['delegateTo'] = $delegateTo;
|
||||||
$properties['filterCases'] = $filterCases;
|
$properties['filterCases'] = $filterCases;
|
||||||
|
$properties['category'] = $category;
|
||||||
$properties['process'] = $process;
|
$properties['process'] = $process;
|
||||||
$properties['task'] = $task;
|
$properties['task'] = $task;
|
||||||
// Get the user that access to the API
|
// Get the user that access to the API
|
||||||
@@ -205,7 +220,9 @@ class Home
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the paused cases.
|
* Get the paused cases.
|
||||||
|
*
|
||||||
* @param int $caseNumber
|
* @param int $caseNumber
|
||||||
|
* @param int $category
|
||||||
* @param int $process
|
* @param int $process
|
||||||
* @param int $task
|
* @param int $task
|
||||||
* @param int $limit
|
* @param int $limit
|
||||||
@@ -217,10 +234,12 @@ class Home
|
|||||||
* @param string $sort
|
* @param string $sort
|
||||||
* @param string $sendBy
|
* @param string $sendBy
|
||||||
* @param callable $callback
|
* @param callable $callback
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getPaused(
|
public function getPaused(
|
||||||
int $caseNumber = 0,
|
int $caseNumber = 0,
|
||||||
|
int $category = 0,
|
||||||
int $process = 0,
|
int $process = 0,
|
||||||
int $task = 0,
|
int $task = 0,
|
||||||
int $limit = 15,
|
int $limit = 15,
|
||||||
@@ -242,6 +261,7 @@ class Home
|
|||||||
$properties['delegateFrom'] = $delegateFrom;
|
$properties['delegateFrom'] = $delegateFrom;
|
||||||
$properties['delegateTo'] = $delegateTo;
|
$properties['delegateTo'] = $delegateTo;
|
||||||
$properties['filterCases'] = $filterCases;
|
$properties['filterCases'] = $filterCases;
|
||||||
|
$properties['category'] = $category;
|
||||||
$properties['process'] = $process;
|
$properties['process'] = $process;
|
||||||
$properties['task'] = $task;
|
$properties['task'] = $task;
|
||||||
// Get the user that access to the API
|
// Get the user that access to the API
|
||||||
@@ -263,6 +283,7 @@ class Home
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Build the columns and data from the custom list.
|
* Build the columns and data from the custom list.
|
||||||
|
*
|
||||||
* @param string $type
|
* @param string $type
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @param array $arguments
|
* @param array $arguments
|
||||||
@@ -345,8 +366,10 @@ class Home
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the custom draft cases.
|
* Get the custom draft cases.
|
||||||
|
*
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @param int $caseNumber
|
* @param int $caseNumber
|
||||||
|
* @param int $category
|
||||||
* @param int $process
|
* @param int $process
|
||||||
* @param int $task
|
* @param int $task
|
||||||
* @param int $limit
|
* @param int $limit
|
||||||
@@ -355,11 +378,13 @@ class Home
|
|||||||
* @param string $filterCases
|
* @param string $filterCases
|
||||||
* @param string $sort
|
* @param string $sort
|
||||||
* @param array $customFilters
|
* @param array $customFilters
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getCustomDraft(
|
public function getCustomDraft(
|
||||||
int $id,
|
int $id,
|
||||||
int $caseNumber = 0,
|
int $caseNumber = 0,
|
||||||
|
int $category = 0,
|
||||||
int $process = 0,
|
int $process = 0,
|
||||||
int $task = 0,
|
int $task = 0,
|
||||||
int $limit = 15,
|
int $limit = 15,
|
||||||
@@ -372,6 +397,7 @@ class Home
|
|||||||
{
|
{
|
||||||
$arguments = [
|
$arguments = [
|
||||||
$caseNumber,
|
$caseNumber,
|
||||||
|
$category,
|
||||||
$process,
|
$process,
|
||||||
$task,
|
$task,
|
||||||
$limit,
|
$limit,
|
||||||
@@ -382,7 +408,7 @@ class Home
|
|||||||
];
|
];
|
||||||
|
|
||||||
//clear duplicate indexes
|
//clear duplicate indexes
|
||||||
$keys = ['caseNumber', 'process', 'task', 'limit', 'offset', 'caseTitle', 'filterCases', 'sort'];
|
$keys = ['caseNumber', 'category', 'process', 'task', 'limit', 'offset', 'caseTitle', 'filterCases', 'sort'];
|
||||||
foreach ($keys as $value) {
|
foreach ($keys as $value) {
|
||||||
unset($customFilters[$value]);
|
unset($customFilters[$value]);
|
||||||
}
|
}
|
||||||
@@ -398,8 +424,10 @@ class Home
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the custom inbox cases.
|
* Get the custom inbox cases.
|
||||||
|
*
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @param int $caseNumber
|
* @param int $caseNumber
|
||||||
|
* @param int $category
|
||||||
* @param int $process
|
* @param int $process
|
||||||
* @param int $task
|
* @param int $task
|
||||||
* @param int $limit
|
* @param int $limit
|
||||||
@@ -411,11 +439,13 @@ class Home
|
|||||||
* @param string $sort
|
* @param string $sort
|
||||||
* @param string $sendBy
|
* @param string $sendBy
|
||||||
* @param array $customFilters
|
* @param array $customFilters
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getCustomInbox(
|
public function getCustomInbox(
|
||||||
int $id,
|
int $id,
|
||||||
int $caseNumber = 0,
|
int $caseNumber = 0,
|
||||||
|
int $category = 0,
|
||||||
int $process = 0,
|
int $process = 0,
|
||||||
int $task = 0,
|
int $task = 0,
|
||||||
int $limit = 15,
|
int $limit = 15,
|
||||||
@@ -431,6 +461,7 @@ class Home
|
|||||||
{
|
{
|
||||||
$arguments = [
|
$arguments = [
|
||||||
$caseNumber,
|
$caseNumber,
|
||||||
|
$category,
|
||||||
$process,
|
$process,
|
||||||
$task,
|
$task,
|
||||||
$limit,
|
$limit,
|
||||||
@@ -444,7 +475,7 @@ class Home
|
|||||||
];
|
];
|
||||||
|
|
||||||
//clear duplicate indexes
|
//clear duplicate indexes
|
||||||
$keys = ['caseNumber', 'process', 'task', 'limit', 'offset', 'caseTitle', 'delegateFrom', 'delegateTo', 'filterCases', 'sort', 'sendBy'];
|
$keys = ['caseNumber', 'category', 'process', 'task', 'limit', 'offset', 'caseTitle', 'delegateFrom', 'delegateTo', 'filterCases', 'sort', 'sendBy'];
|
||||||
foreach ($keys as $value) {
|
foreach ($keys as $value) {
|
||||||
unset($customFilters[$value]);
|
unset($customFilters[$value]);
|
||||||
}
|
}
|
||||||
@@ -460,8 +491,10 @@ class Home
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the custom unassigned cases.
|
* Get the custom unassigned cases.
|
||||||
|
*
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @param int $caseNumber
|
* @param int $caseNumber
|
||||||
|
* @param int $category
|
||||||
* @param int $process
|
* @param int $process
|
||||||
* @param int $task
|
* @param int $task
|
||||||
* @param int $limit
|
* @param int $limit
|
||||||
@@ -473,11 +506,13 @@ class Home
|
|||||||
* @param string $sort
|
* @param string $sort
|
||||||
* @param string $sendBy
|
* @param string $sendBy
|
||||||
* @param array $customFilters
|
* @param array $customFilters
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getCustomUnassigned(
|
public function getCustomUnassigned(
|
||||||
int $id,
|
int $id,
|
||||||
int $caseNumber = 0,
|
int $caseNumber = 0,
|
||||||
|
int $category = 0,
|
||||||
int $process = 0,
|
int $process = 0,
|
||||||
int $task = 0,
|
int $task = 0,
|
||||||
int $limit = 15,
|
int $limit = 15,
|
||||||
@@ -493,6 +528,7 @@ class Home
|
|||||||
{
|
{
|
||||||
$arguments = [
|
$arguments = [
|
||||||
$caseNumber,
|
$caseNumber,
|
||||||
|
$category,
|
||||||
$process,
|
$process,
|
||||||
$task,
|
$task,
|
||||||
$limit,
|
$limit,
|
||||||
@@ -506,7 +542,7 @@ class Home
|
|||||||
];
|
];
|
||||||
|
|
||||||
//clear duplicate indexes
|
//clear duplicate indexes
|
||||||
$keys = ['caseNumber', 'process', 'task', 'limit', 'offset', 'caseTitle', 'delegateFrom', 'delegateTo', 'filterCases', 'sort', 'sendBy'];
|
$keys = ['caseNumber', 'category', 'process', 'task', 'limit', 'offset', 'caseTitle', 'delegateFrom', 'delegateTo', 'filterCases', 'sort', 'sendBy'];
|
||||||
foreach ($keys as $value) {
|
foreach ($keys as $value) {
|
||||||
unset($customFilters[$value]);
|
unset($customFilters[$value]);
|
||||||
}
|
}
|
||||||
@@ -522,8 +558,10 @@ class Home
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the custom paused cases.
|
* Get the custom paused cases.
|
||||||
|
*
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @param int $caseNumber
|
* @param int $caseNumber
|
||||||
|
* @param int $category
|
||||||
* @param int $process
|
* @param int $process
|
||||||
* @param int $task
|
* @param int $task
|
||||||
* @param int $limit
|
* @param int $limit
|
||||||
@@ -535,11 +573,13 @@ class Home
|
|||||||
* @param string $sort
|
* @param string $sort
|
||||||
* @param string $sendBy
|
* @param string $sendBy
|
||||||
* @param array $customFilters
|
* @param array $customFilters
|
||||||
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getCustomPaused(
|
public function getCustomPaused(
|
||||||
int $id,
|
int $id,
|
||||||
int $caseNumber = 0,
|
int $caseNumber = 0,
|
||||||
|
int $category = 0,
|
||||||
int $process = 0,
|
int $process = 0,
|
||||||
int $task = 0,
|
int $task = 0,
|
||||||
int $limit = 15,
|
int $limit = 15,
|
||||||
@@ -555,6 +595,7 @@ class Home
|
|||||||
{
|
{
|
||||||
$arguments = [
|
$arguments = [
|
||||||
$caseNumber,
|
$caseNumber,
|
||||||
|
$category,
|
||||||
$process,
|
$process,
|
||||||
$task,
|
$task,
|
||||||
$limit,
|
$limit,
|
||||||
@@ -568,7 +609,7 @@ class Home
|
|||||||
];
|
];
|
||||||
|
|
||||||
//clear duplicate indexes
|
//clear duplicate indexes
|
||||||
$keys = ['caseNumber', 'process', 'task', 'limit', 'offset', 'caseTitle', 'delegateFrom', 'delegateTo', 'filterCases', 'sort', 'sendBy'];
|
$keys = ['caseNumber', 'category', 'process', 'task', 'limit', 'offset', 'caseTitle', 'delegateFrom', 'delegateTo', 'filterCases', 'sort', 'sendBy'];
|
||||||
foreach ($keys as $value) {
|
foreach ($keys as $value) {
|
||||||
unset($customFilters[$value]);
|
unset($customFilters[$value]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ use ProcessMaker\Model\Application;
|
|||||||
use ProcessMaker\Model\CaseList;
|
use ProcessMaker\Model\CaseList;
|
||||||
use ProcessMaker\Model\Delegation;
|
use ProcessMaker\Model\Delegation;
|
||||||
use ProcessMaker\Model\Task;
|
use ProcessMaker\Model\Task;
|
||||||
|
use ProcessMaker\Model\ProcessCategory;
|
||||||
use ProcessMaker\Model\User;
|
use ProcessMaker\Model\User;
|
||||||
|
|
||||||
class Inbox extends AbstractCases
|
class Inbox extends AbstractCases
|
||||||
@@ -16,6 +17,7 @@ class Inbox extends AbstractCases
|
|||||||
// Columns view in the cases list
|
// Columns view in the cases list
|
||||||
'APP_DELEGATION.APP_NUMBER', // Case #
|
'APP_DELEGATION.APP_NUMBER', // Case #
|
||||||
'APP_DELEGATION.DEL_TITLE', // Case Title
|
'APP_DELEGATION.DEL_TITLE', // Case Title
|
||||||
|
'PROCESS.CATEGORY_ID', // Category
|
||||||
'PROCESS.PRO_TITLE', // Process
|
'PROCESS.PRO_TITLE', // Process
|
||||||
'TASK.TAS_TITLE', // Task
|
'TASK.TAS_TITLE', // Task
|
||||||
'USERS.USR_USERNAME', // Current UserName
|
'USERS.USR_USERNAME', // Current UserName
|
||||||
@@ -70,6 +72,10 @@ class Inbox extends AbstractCases
|
|||||||
if (!empty($this->getCaseTitle())) {
|
if (!empty($this->getCaseTitle())) {
|
||||||
$query->title($this->getCaseTitle());
|
$query->title($this->getCaseTitle());
|
||||||
}
|
}
|
||||||
|
// Specific category
|
||||||
|
if ($this->getCategoryId()) {
|
||||||
|
$query->categoryId($this->getCategoryId());
|
||||||
|
}
|
||||||
// Specific process
|
// Specific process
|
||||||
if ($this->getProcessId()) {
|
if ($this->getProcessId()) {
|
||||||
$query->processId($this->getProcessId());
|
$query->processId($this->getProcessId());
|
||||||
@@ -131,6 +137,9 @@ class Inbox extends AbstractCases
|
|||||||
$results = $query->get();
|
$results = $query->get();
|
||||||
// Prepare the result
|
// Prepare the result
|
||||||
$results->transform(function ($item, $key) {
|
$results->transform(function ($item, $key) {
|
||||||
|
// Get the category
|
||||||
|
$category = !empty($item['CATEGORY_ID']) ? ProcessCategory::getCategory($item['CATEGORY_ID']) : '';
|
||||||
|
$item['CATEGORY'] = !empty($category) ? $category : G::LoadTranslation('ID_PROCESS_NONE_CATEGORY');
|
||||||
// Get priority label
|
// Get priority label
|
||||||
$priorityLabel = self::PRIORITIES[$item['DEL_PRIORITY']];
|
$priorityLabel = self::PRIORITIES[$item['DEL_PRIORITY']];
|
||||||
$item['DEL_PRIORITY_LABEL'] = G::LoadTranslation("ID_PRIORITY_{$priorityLabel}");
|
$item['DEL_PRIORITY_LABEL'] = G::LoadTranslation("ID_PRIORITY_{$priorityLabel}");
|
||||||
@@ -216,6 +225,11 @@ class Inbox extends AbstractCases
|
|||||||
$query = Delegation::query()->select();
|
$query = Delegation::query()->select();
|
||||||
// Scope that sets the queries for List Inbox
|
// Scope that sets the queries for List Inbox
|
||||||
$query->inbox($this->getUserId());
|
$query->inbox($this->getUserId());
|
||||||
|
// Check if the category was defined
|
||||||
|
if ($this->getCategoryId()) {
|
||||||
|
// Join with process if the filter with category exist
|
||||||
|
$query->joinProcess();
|
||||||
|
}
|
||||||
// Apply filters
|
// Apply filters
|
||||||
$this->filters($query);
|
$this->filters($query);
|
||||||
// Return the number of rows
|
// Return the number of rows
|
||||||
|
|||||||
@@ -2,10 +2,12 @@
|
|||||||
|
|
||||||
namespace ProcessMaker\BusinessModel\Cases;
|
namespace ProcessMaker\BusinessModel\Cases;
|
||||||
|
|
||||||
|
use G;
|
||||||
use ProcessMaker\Model\Application;
|
use ProcessMaker\Model\Application;
|
||||||
use ProcessMaker\Model\AppNotes;
|
use ProcessMaker\Model\AppNotes;
|
||||||
use ProcessMaker\Model\Delegation;
|
use ProcessMaker\Model\Delegation;
|
||||||
use ProcessMaker\Model\Task;
|
use ProcessMaker\Model\Task;
|
||||||
|
use ProcessMaker\Model\ProcessCategory;
|
||||||
use ProcessMaker\Model\User;
|
use ProcessMaker\Model\User;
|
||||||
|
|
||||||
class Participated extends AbstractCases
|
class Participated extends AbstractCases
|
||||||
@@ -15,6 +17,7 @@ class Participated extends AbstractCases
|
|||||||
// Columns view in the cases list
|
// Columns view in the cases list
|
||||||
'APP_DELEGATION.APP_NUMBER', // Case #
|
'APP_DELEGATION.APP_NUMBER', // Case #
|
||||||
'APP_DELEGATION.DEL_TITLE', // Case Title
|
'APP_DELEGATION.DEL_TITLE', // Case Title
|
||||||
|
'PROCESS.CATEGORY_ID', // Category
|
||||||
'PROCESS.PRO_TITLE', // Process Name
|
'PROCESS.PRO_TITLE', // Process Name
|
||||||
'TASK.TAS_TITLE', // Pending Task
|
'TASK.TAS_TITLE', // Pending Task
|
||||||
'TASK.TAS_ASSIGN_TYPE', // Task assign rule
|
'TASK.TAS_ASSIGN_TYPE', // Task assign rule
|
||||||
@@ -72,6 +75,10 @@ class Participated extends AbstractCases
|
|||||||
// Add the filter
|
// Add the filter
|
||||||
$query->specificCases($result);
|
$query->specificCases($result);
|
||||||
}
|
}
|
||||||
|
// Specific category
|
||||||
|
if ($this->getCategoryId()) {
|
||||||
|
$query->categoryId($this->getCategoryId());
|
||||||
|
}
|
||||||
// Scope to search for an specific process
|
// Scope to search for an specific process
|
||||||
if ($this->getProcessId()) {
|
if ($this->getProcessId()) {
|
||||||
$query->processId($this->getProcessId());
|
$query->processId($this->getProcessId());
|
||||||
@@ -168,6 +175,9 @@ class Participated extends AbstractCases
|
|||||||
$results = $query->get();
|
$results = $query->get();
|
||||||
// Prepare the result
|
// Prepare the result
|
||||||
$results->transform(function ($item, $key) use ($filter) {
|
$results->transform(function ($item, $key) use ($filter) {
|
||||||
|
// Get the category
|
||||||
|
$category = !empty($item['CATEGORY_ID']) ? ProcessCategory::getCategory($item['CATEGORY_ID']) : '';
|
||||||
|
$item['CATEGORY'] = !empty($category) ? $category : G::LoadTranslation('ID_PROCESS_NONE_CATEGORY');
|
||||||
// Apply the date format defined in environment
|
// Apply the date format defined in environment
|
||||||
$item['APP_CREATE_DATE_LABEL'] = !empty($item['APP_CREATE_DATE']) ? applyMaskDateEnvironment($item['APP_CREATE_DATE']): null;
|
$item['APP_CREATE_DATE_LABEL'] = !empty($item['APP_CREATE_DATE']) ? applyMaskDateEnvironment($item['APP_CREATE_DATE']): null;
|
||||||
$item['APP_FINISH_DATE_LABEL'] = !empty($item['APP_FINISH_DATE']) ? applyMaskDateEnvironment($item['APP_FINISH_DATE']): null;
|
$item['APP_FINISH_DATE_LABEL'] = !empty($item['APP_FINISH_DATE']) ? applyMaskDateEnvironment($item['APP_FINISH_DATE']): null;
|
||||||
@@ -367,6 +377,11 @@ class Participated extends AbstractCases
|
|||||||
$query->lastThread();
|
$query->lastThread();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// Check if the category was defined
|
||||||
|
if ($this->getCategoryId()) {
|
||||||
|
// Join with process if the filter with category exist
|
||||||
|
$query->joinProcess();
|
||||||
|
}
|
||||||
// Apply filters
|
// Apply filters
|
||||||
$this->filters($query);
|
$this->filters($query);
|
||||||
// Return the number of rows
|
// Return the number of rows
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ use G;
|
|||||||
use ProcessMaker\Model\CaseList;
|
use ProcessMaker\Model\CaseList;
|
||||||
use ProcessMaker\Model\Delegation;
|
use ProcessMaker\Model\Delegation;
|
||||||
use ProcessMaker\Model\Task;
|
use ProcessMaker\Model\Task;
|
||||||
|
use ProcessMaker\Model\ProcessCategory;
|
||||||
use ProcessMaker\Model\User;
|
use ProcessMaker\Model\User;
|
||||||
|
|
||||||
class Paused extends AbstractCases
|
class Paused extends AbstractCases
|
||||||
@@ -15,6 +16,7 @@ class Paused extends AbstractCases
|
|||||||
// Columns view in the cases list
|
// Columns view in the cases list
|
||||||
'APP_DELEGATION.APP_NUMBER', // Case #
|
'APP_DELEGATION.APP_NUMBER', // Case #
|
||||||
'APP_DELEGATION.DEL_TITLE', // Case Title
|
'APP_DELEGATION.DEL_TITLE', // Case Title
|
||||||
|
'PROCESS.CATEGORY_ID', // Category
|
||||||
'PROCESS.PRO_TITLE', // Process
|
'PROCESS.PRO_TITLE', // Process
|
||||||
'TASK.TAS_TITLE', // Task
|
'TASK.TAS_TITLE', // Task
|
||||||
'USERS.USR_USERNAME', // Current UserName
|
'USERS.USR_USERNAME', // Current UserName
|
||||||
@@ -125,6 +127,9 @@ class Paused extends AbstractCases
|
|||||||
$results = $query->get();
|
$results = $query->get();
|
||||||
// Prepare the result
|
// Prepare the result
|
||||||
$results->transform(function ($item, $key) {
|
$results->transform(function ($item, $key) {
|
||||||
|
// Get the category
|
||||||
|
$category = !empty($item['CATEGORY_ID']) ? ProcessCategory::getCategory($item['CATEGORY_ID']) : '';
|
||||||
|
$item['CATEGORY'] = !empty($category) ? $category : G::LoadTranslation('ID_PROCESS_NONE_CATEGORY');
|
||||||
// Get priority label
|
// Get priority label
|
||||||
$priorityLabel = self::PRIORITIES[$item['DEL_PRIORITY']];
|
$priorityLabel = self::PRIORITIES[$item['DEL_PRIORITY']];
|
||||||
$item['DEL_PRIORITY_LABEL'] = G::LoadTranslation("ID_PRIORITY_{$priorityLabel}");
|
$item['DEL_PRIORITY_LABEL'] = G::LoadTranslation("ID_PRIORITY_{$priorityLabel}");
|
||||||
@@ -210,6 +215,11 @@ class Paused extends AbstractCases
|
|||||||
$query = Delegation::query()->select();
|
$query = Delegation::query()->select();
|
||||||
// Scope that set the paused cases
|
// Scope that set the paused cases
|
||||||
$query->paused($this->getUserId());
|
$query->paused($this->getUserId());
|
||||||
|
// Check if the category was defined
|
||||||
|
if ($this->getCategoryId()) {
|
||||||
|
// Join with process if the filter with category exist
|
||||||
|
$query->joinProcess();
|
||||||
|
}
|
||||||
// Apply filters
|
// Apply filters
|
||||||
$this->filters($query);
|
$this->filters($query);
|
||||||
// Return the number of rows
|
// Return the number of rows
|
||||||
|
|||||||
@@ -2,9 +2,11 @@
|
|||||||
|
|
||||||
namespace ProcessMaker\BusinessModel\Cases;
|
namespace ProcessMaker\BusinessModel\Cases;
|
||||||
|
|
||||||
|
use G;
|
||||||
use ProcessMaker\Model\AppNotes;
|
use ProcessMaker\Model\AppNotes;
|
||||||
use ProcessMaker\Model\Delegation;
|
use ProcessMaker\Model\Delegation;
|
||||||
use ProcessMaker\Model\ProcessUser;
|
use ProcessMaker\Model\ProcessUser;
|
||||||
|
use ProcessMaker\Model\ProcessCategory;
|
||||||
use ProcessMaker\Model\User;
|
use ProcessMaker\Model\User;
|
||||||
|
|
||||||
class Supervising extends AbstractCases
|
class Supervising extends AbstractCases
|
||||||
@@ -14,6 +16,7 @@ class Supervising extends AbstractCases
|
|||||||
// Columns view in the cases list
|
// Columns view in the cases list
|
||||||
'APP_DELEGATION.APP_NUMBER', // Case #
|
'APP_DELEGATION.APP_NUMBER', // Case #
|
||||||
'APP_DELEGATION.DEL_TITLE', // Case Title
|
'APP_DELEGATION.DEL_TITLE', // Case Title
|
||||||
|
'PROCESS.CATEGORY_ID', // Category
|
||||||
'PROCESS.PRO_TITLE', // Process Name
|
'PROCESS.PRO_TITLE', // Process Name
|
||||||
'TASK.TAS_TITLE', // Pending Task
|
'TASK.TAS_TITLE', // Pending Task
|
||||||
'APPLICATION.APP_STATUS', // Status
|
'APPLICATION.APP_STATUS', // Status
|
||||||
@@ -70,6 +73,10 @@ class Supervising extends AbstractCases
|
|||||||
// Add the filter
|
// Add the filter
|
||||||
$query->specificCases($result);
|
$query->specificCases($result);
|
||||||
}
|
}
|
||||||
|
// Specific category
|
||||||
|
if ($this->getCategoryId()) {
|
||||||
|
$query->categoryId($this->getCategoryId());
|
||||||
|
}
|
||||||
// Scope to search for an specific process
|
// Scope to search for an specific process
|
||||||
if ($this->getProcessId()) {
|
if ($this->getProcessId()) {
|
||||||
$query->processId($this->getProcessId());
|
$query->processId($this->getProcessId());
|
||||||
@@ -144,6 +151,9 @@ class Supervising extends AbstractCases
|
|||||||
$results = $query->get();
|
$results = $query->get();
|
||||||
// Prepare the result
|
// Prepare the result
|
||||||
$results->transform(function ($item, $key) {
|
$results->transform(function ($item, $key) {
|
||||||
|
// Get the category
|
||||||
|
$category = !empty($item['CATEGORY_ID']) ? ProcessCategory::getCategory($item['CATEGORY_ID']) : '';
|
||||||
|
$item['CATEGORY'] = !empty($category) ? $category : G::LoadTranslation('ID_PROCESS_NONE_CATEGORY');
|
||||||
// Get task color label
|
// Get task color label
|
||||||
$item['TAS_COLOR'] = $this->getTaskColor($item['DEL_TASK_DUE_DATE']);
|
$item['TAS_COLOR'] = $this->getTaskColor($item['DEL_TASK_DUE_DATE']);
|
||||||
$item['TAS_COLOR_LABEL'] = self::TASK_COLORS[$item['TAS_COLOR']];
|
$item['TAS_COLOR_LABEL'] = self::TASK_COLORS[$item['TAS_COLOR']];
|
||||||
@@ -243,6 +253,11 @@ class Supervising extends AbstractCases
|
|||||||
$processes = ProcessUser::getProcessesOfSupervisor($this->getUserUid());
|
$processes = ProcessUser::getProcessesOfSupervisor($this->getUserUid());
|
||||||
// Scope the specific array of processes supervising
|
// Scope the specific array of processes supervising
|
||||||
$query->processInList($processes);
|
$query->processInList($processes);
|
||||||
|
// Check if the category was defined
|
||||||
|
if ($this->getCategoryId()) {
|
||||||
|
// Join with process if the filter with category exist
|
||||||
|
$query->joinProcess();
|
||||||
|
}
|
||||||
// Apply filters
|
// Apply filters
|
||||||
$this->filters($query);
|
$this->filters($query);
|
||||||
// Return the number of rows
|
// Return the number of rows
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ use ProcessMaker\Model\Application;
|
|||||||
use ProcessMaker\Model\CaseList;
|
use ProcessMaker\Model\CaseList;
|
||||||
use ProcessMaker\Model\Delegation;
|
use ProcessMaker\Model\Delegation;
|
||||||
use ProcessMaker\Model\Task;
|
use ProcessMaker\Model\Task;
|
||||||
|
use ProcessMaker\Model\ProcessCategory;
|
||||||
use ProcessMaker\Model\User;
|
use ProcessMaker\Model\User;
|
||||||
|
|
||||||
class Unassigned extends AbstractCases
|
class Unassigned extends AbstractCases
|
||||||
@@ -16,6 +17,7 @@ class Unassigned extends AbstractCases
|
|||||||
// Columns view in the cases list
|
// Columns view in the cases list
|
||||||
'APP_DELEGATION.APP_NUMBER', // Case #
|
'APP_DELEGATION.APP_NUMBER', // Case #
|
||||||
'APP_DELEGATION.DEL_TITLE', // Case Title
|
'APP_DELEGATION.DEL_TITLE', // Case Title
|
||||||
|
'PROCESS.CATEGORY_ID', // Category
|
||||||
'PROCESS.PRO_TITLE', // Process
|
'PROCESS.PRO_TITLE', // Process
|
||||||
'TASK.TAS_TITLE', // Task
|
'TASK.TAS_TITLE', // Task
|
||||||
'USERS.USR_USERNAME', // Current UserName
|
'USERS.USR_USERNAME', // Current UserName
|
||||||
@@ -70,6 +72,10 @@ class Unassigned extends AbstractCases
|
|||||||
if ($this->getCaseTitle()) {
|
if ($this->getCaseTitle()) {
|
||||||
$query->title($this->getCaseTitle());
|
$query->title($this->getCaseTitle());
|
||||||
}
|
}
|
||||||
|
// Specific category
|
||||||
|
if ($this->getCategoryId()) {
|
||||||
|
$query->categoryId($this->getCategoryId());
|
||||||
|
}
|
||||||
// Specific process
|
// Specific process
|
||||||
if ($this->getProcessId()) {
|
if ($this->getProcessId()) {
|
||||||
$query->processId($this->getProcessId());
|
$query->processId($this->getProcessId());
|
||||||
@@ -134,6 +140,9 @@ class Unassigned extends AbstractCases
|
|||||||
$results = $query->get();
|
$results = $query->get();
|
||||||
// Prepare the result
|
// Prepare the result
|
||||||
$results->transform(function ($item, $key) {
|
$results->transform(function ($item, $key) {
|
||||||
|
// Get the category
|
||||||
|
$category = !empty($item['CATEGORY_ID']) ? ProcessCategory::getCategory($item['CATEGORY_ID']) : '';
|
||||||
|
$item['CATEGORY'] = !empty($category) ? $category : G::LoadTranslation('ID_PROCESS_NONE_CATEGORY');
|
||||||
// Get priority label
|
// Get priority label
|
||||||
$priorityLabel = self::PRIORITIES[$item['DEL_PRIORITY']];
|
$priorityLabel = self::PRIORITIES[$item['DEL_PRIORITY']];
|
||||||
$item['DEL_PRIORITY_LABEL'] = G::LoadTranslation("ID_PRIORITY_{$priorityLabel}");
|
$item['DEL_PRIORITY_LABEL'] = G::LoadTranslation("ID_PRIORITY_{$priorityLabel}");
|
||||||
@@ -219,6 +228,11 @@ class Unassigned extends AbstractCases
|
|||||||
$query = Delegation::query()->select();
|
$query = Delegation::query()->select();
|
||||||
// Add the initial scope for self-service cases
|
// Add the initial scope for self-service cases
|
||||||
$query->selfService($this->getUserUid());
|
$query->selfService($this->getUserUid());
|
||||||
|
// Check if the category was defined
|
||||||
|
if ($this->getCategoryId()) {
|
||||||
|
// Join with process if the filter with category exist
|
||||||
|
$query->joinProcess();
|
||||||
|
}
|
||||||
// Apply filters
|
// Apply filters
|
||||||
$this->filters($query);
|
$this->filters($query);
|
||||||
// Return the number of rows
|
// Return the number of rows
|
||||||
|
|||||||
@@ -17,6 +17,18 @@ class ProcessCategory extends Model
|
|||||||
|
|
||||||
public $timestamps = false;
|
public $timestamps = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Scope a query to specific category id
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||||
|
* @param int $category
|
||||||
|
* @return \Illuminate\Database\Eloquent\Builder
|
||||||
|
*/
|
||||||
|
public function scopeCategory($query, $category)
|
||||||
|
{
|
||||||
|
return $query->where('CATEGORY_ID', $category);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scope a query to specific category name
|
* Scope a query to specific category name
|
||||||
*
|
*
|
||||||
@@ -92,4 +104,22 @@ class ProcessCategory extends Model
|
|||||||
return $query->first()->CATEGORY_ID;
|
return $query->first()->CATEGORY_ID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get category name
|
||||||
|
*
|
||||||
|
* @param int $category
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getCategory(int $category)
|
||||||
|
{
|
||||||
|
$query = ProcessCategory::query()->select(['CATEGORY_NAME']);
|
||||||
|
$query->category($category);
|
||||||
|
if ($query->first()) {
|
||||||
|
return $query->first()->CATEGORY_NAME;
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ class Home extends Api
|
|||||||
* @url GET /draft
|
* @url GET /draft
|
||||||
*
|
*
|
||||||
* @param int $caseNumber
|
* @param int $caseNumber
|
||||||
|
* @param int $category
|
||||||
* @param int $process
|
* @param int $process
|
||||||
* @param int $task
|
* @param int $task
|
||||||
* @param int $limit
|
* @param int $limit
|
||||||
@@ -68,6 +69,7 @@ class Home extends Api
|
|||||||
*/
|
*/
|
||||||
public function doGetDraftCases(
|
public function doGetDraftCases(
|
||||||
int $caseNumber = 0,
|
int $caseNumber = 0,
|
||||||
|
int $category = 0,
|
||||||
int $process = 0,
|
int $process = 0,
|
||||||
int $task = 0,
|
int $task = 0,
|
||||||
int $limit = 15,
|
int $limit = 15,
|
||||||
@@ -81,6 +83,7 @@ class Home extends Api
|
|||||||
$bmHome = new BMHome($this->getUserId());
|
$bmHome = new BMHome($this->getUserId());
|
||||||
return $bmHome->getDraft(
|
return $bmHome->getDraft(
|
||||||
$caseNumber,
|
$caseNumber,
|
||||||
|
$category,
|
||||||
$process,
|
$process,
|
||||||
$task,
|
$task,
|
||||||
$limit,
|
$limit,
|
||||||
@@ -101,6 +104,7 @@ class Home extends Api
|
|||||||
* @url GET /todo [This is kept for compatibility should not be used 'todo', the reason is to only handle the same verb (inbox) for all 'normal case list' and 'custom case list']
|
* @url GET /todo [This is kept for compatibility should not be used 'todo', the reason is to only handle the same verb (inbox) for all 'normal case list' and 'custom case list']
|
||||||
*
|
*
|
||||||
* @param int $caseNumber
|
* @param int $caseNumber
|
||||||
|
* @param int $category
|
||||||
* @param int $process
|
* @param int $process
|
||||||
* @param int $task
|
* @param int $task
|
||||||
* @param int $limit
|
* @param int $limit
|
||||||
@@ -121,6 +125,7 @@ class Home extends Api
|
|||||||
*/
|
*/
|
||||||
public function doGetTodoCases(
|
public function doGetTodoCases(
|
||||||
int $caseNumber = 0,
|
int $caseNumber = 0,
|
||||||
|
int $category = 0,
|
||||||
int $process = 0,
|
int $process = 0,
|
||||||
int $task = 0,
|
int $task = 0,
|
||||||
int $limit = 15,
|
int $limit = 15,
|
||||||
@@ -137,6 +142,7 @@ class Home extends Api
|
|||||||
$bmHome = new BMHome($this->getUserId());
|
$bmHome = new BMHome($this->getUserId());
|
||||||
return $bmHome->getInbox(
|
return $bmHome->getInbox(
|
||||||
$caseNumber,
|
$caseNumber,
|
||||||
|
$category,
|
||||||
$process,
|
$process,
|
||||||
$task,
|
$task,
|
||||||
$limit,
|
$limit,
|
||||||
@@ -159,6 +165,7 @@ class Home extends Api
|
|||||||
* @url GET /unassigned
|
* @url GET /unassigned
|
||||||
*
|
*
|
||||||
* @param int $caseNumber
|
* @param int $caseNumber
|
||||||
|
* @param int $category
|
||||||
* @param int $process
|
* @param int $process
|
||||||
* @param int $task
|
* @param int $task
|
||||||
* @param int $limit
|
* @param int $limit
|
||||||
@@ -179,6 +186,7 @@ class Home extends Api
|
|||||||
*/
|
*/
|
||||||
public function doGetUnassignedCases(
|
public function doGetUnassignedCases(
|
||||||
int $caseNumber = 0,
|
int $caseNumber = 0,
|
||||||
|
int $category = 0,
|
||||||
int $process = 0,
|
int $process = 0,
|
||||||
int $task = 0,
|
int $task = 0,
|
||||||
int $limit = 15,
|
int $limit = 15,
|
||||||
@@ -195,6 +203,7 @@ class Home extends Api
|
|||||||
$bmHome = new BMHome($this->getUserId());
|
$bmHome = new BMHome($this->getUserId());
|
||||||
return $bmHome->getUnassigned(
|
return $bmHome->getUnassigned(
|
||||||
$caseNumber,
|
$caseNumber,
|
||||||
|
$category,
|
||||||
$process,
|
$process,
|
||||||
$task,
|
$task,
|
||||||
$limit,
|
$limit,
|
||||||
@@ -217,6 +226,7 @@ class Home extends Api
|
|||||||
* @url GET /paused
|
* @url GET /paused
|
||||||
*
|
*
|
||||||
* @param int $caseNumber
|
* @param int $caseNumber
|
||||||
|
* @param int $category
|
||||||
* @param int $process
|
* @param int $process
|
||||||
* @param int $task
|
* @param int $task
|
||||||
* @param int $limit
|
* @param int $limit
|
||||||
@@ -237,6 +247,7 @@ class Home extends Api
|
|||||||
*/
|
*/
|
||||||
public function doGetPausedCases(
|
public function doGetPausedCases(
|
||||||
int $caseNumber = 0,
|
int $caseNumber = 0,
|
||||||
|
int $category = 0,
|
||||||
int $process = 0,
|
int $process = 0,
|
||||||
int $task = 0,
|
int $task = 0,
|
||||||
int $limit = 15,
|
int $limit = 15,
|
||||||
@@ -253,6 +264,7 @@ class Home extends Api
|
|||||||
$bmHome = new BMHome($this->getUserId());
|
$bmHome = new BMHome($this->getUserId());
|
||||||
return $bmHome->getPaused(
|
return $bmHome->getPaused(
|
||||||
$caseNumber,
|
$caseNumber,
|
||||||
|
$category,
|
||||||
$process,
|
$process,
|
||||||
$task,
|
$task,
|
||||||
$limit,
|
$limit,
|
||||||
@@ -274,6 +286,7 @@ class Home extends Api
|
|||||||
* @url POST /draft/:id
|
* @url POST /draft/:id
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @param int $caseNumber
|
* @param int $caseNumber
|
||||||
|
* @param int $category
|
||||||
* @param int $process
|
* @param int $process
|
||||||
* @param int $task
|
* @param int $task
|
||||||
* @param int $limit
|
* @param int $limit
|
||||||
@@ -290,6 +303,7 @@ class Home extends Api
|
|||||||
public function doGetCustomDraftCases(
|
public function doGetCustomDraftCases(
|
||||||
int $id,
|
int $id,
|
||||||
int $caseNumber = 0,
|
int $caseNumber = 0,
|
||||||
|
int $category = 0,
|
||||||
int $process = 0,
|
int $process = 0,
|
||||||
int $task = 0,
|
int $task = 0,
|
||||||
int $limit = 15,
|
int $limit = 15,
|
||||||
@@ -305,6 +319,7 @@ class Home extends Api
|
|||||||
return $bmHome->getCustomDraft(
|
return $bmHome->getCustomDraft(
|
||||||
$id,
|
$id,
|
||||||
$caseNumber,
|
$caseNumber,
|
||||||
|
$category,
|
||||||
$process,
|
$process,
|
||||||
$task,
|
$task,
|
||||||
$limit,
|
$limit,
|
||||||
@@ -324,6 +339,7 @@ class Home extends Api
|
|||||||
* @url POST /inbox/:id
|
* @url POST /inbox/:id
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @param int $caseNumber
|
* @param int $caseNumber
|
||||||
|
* @param int $category
|
||||||
* @param int $process
|
* @param int $process
|
||||||
* @param int $task
|
* @param int $task
|
||||||
* @param int $limit
|
* @param int $limit
|
||||||
@@ -343,6 +359,7 @@ class Home extends Api
|
|||||||
public function doGetCustomInboxCases(
|
public function doGetCustomInboxCases(
|
||||||
int $id,
|
int $id,
|
||||||
int $caseNumber = 0,
|
int $caseNumber = 0,
|
||||||
|
int $category = 0,
|
||||||
int $process = 0,
|
int $process = 0,
|
||||||
int $task = 0,
|
int $task = 0,
|
||||||
int $limit = 15,
|
int $limit = 15,
|
||||||
@@ -361,6 +378,7 @@ class Home extends Api
|
|||||||
return $bmHome->getCustomInbox(
|
return $bmHome->getCustomInbox(
|
||||||
$id,
|
$id,
|
||||||
$caseNumber,
|
$caseNumber,
|
||||||
|
$category,
|
||||||
$process,
|
$process,
|
||||||
$task,
|
$task,
|
||||||
$limit,
|
$limit,
|
||||||
@@ -383,6 +401,7 @@ class Home extends Api
|
|||||||
* @url POST /unassigned/:id
|
* @url POST /unassigned/:id
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @param int $caseNumber
|
* @param int $caseNumber
|
||||||
|
* @param int $category
|
||||||
* @param int $process
|
* @param int $process
|
||||||
* @param int $task
|
* @param int $task
|
||||||
* @param int $limit
|
* @param int $limit
|
||||||
@@ -402,6 +421,7 @@ class Home extends Api
|
|||||||
public function doGetCustomUnassignedCases(
|
public function doGetCustomUnassignedCases(
|
||||||
int $id,
|
int $id,
|
||||||
int $caseNumber = 0,
|
int $caseNumber = 0,
|
||||||
|
int $category = 0,
|
||||||
int $process = 0,
|
int $process = 0,
|
||||||
int $task = 0,
|
int $task = 0,
|
||||||
int $limit = 15,
|
int $limit = 15,
|
||||||
@@ -420,6 +440,7 @@ class Home extends Api
|
|||||||
return $bmHome->getCustomUnassigned(
|
return $bmHome->getCustomUnassigned(
|
||||||
$id,
|
$id,
|
||||||
$caseNumber,
|
$caseNumber,
|
||||||
|
$category,
|
||||||
$process,
|
$process,
|
||||||
$task,
|
$task,
|
||||||
$limit,
|
$limit,
|
||||||
@@ -442,6 +463,7 @@ class Home extends Api
|
|||||||
* @url POST /paused/:id
|
* @url POST /paused/:id
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @param int $caseNumber
|
* @param int $caseNumber
|
||||||
|
* @param int $category
|
||||||
* @param int $process
|
* @param int $process
|
||||||
* @param int $task
|
* @param int $task
|
||||||
* @param int $limit
|
* @param int $limit
|
||||||
@@ -461,6 +483,7 @@ class Home extends Api
|
|||||||
public function doGetCustomPausedCases(
|
public function doGetCustomPausedCases(
|
||||||
int $id,
|
int $id,
|
||||||
int $caseNumber = 0,
|
int $caseNumber = 0,
|
||||||
|
int $category = 0,
|
||||||
int $process = 0,
|
int $process = 0,
|
||||||
int $task = 0,
|
int $task = 0,
|
||||||
int $limit = 15,
|
int $limit = 15,
|
||||||
@@ -479,6 +502,7 @@ class Home extends Api
|
|||||||
return $bmHome->getCustomPaused(
|
return $bmHome->getCustomPaused(
|
||||||
$id,
|
$id,
|
||||||
$caseNumber,
|
$caseNumber,
|
||||||
|
$category,
|
||||||
$process,
|
$process,
|
||||||
$task,
|
$task,
|
||||||
$limit,
|
$limit,
|
||||||
@@ -502,6 +526,7 @@ class Home extends Api
|
|||||||
* @url GET /mycases
|
* @url GET /mycases
|
||||||
*
|
*
|
||||||
* @param int $caseNumber
|
* @param int $caseNumber
|
||||||
|
* @param int $category
|
||||||
* @param int $process
|
* @param int $process
|
||||||
* @param int $task
|
* @param int $task
|
||||||
* @param int $limit
|
* @param int $limit
|
||||||
@@ -525,6 +550,7 @@ class Home extends Api
|
|||||||
*/
|
*/
|
||||||
public function doGetMyCases(
|
public function doGetMyCases(
|
||||||
int $caseNumber = 0,
|
int $caseNumber = 0,
|
||||||
|
int $category = 0,
|
||||||
int $process = 0,
|
int $process = 0,
|
||||||
int $task = 0,
|
int $task = 0,
|
||||||
int $limit = 15,
|
int $limit = 15,
|
||||||
@@ -544,6 +570,7 @@ class Home extends Api
|
|||||||
$properties['caseNumber'] = $caseNumber;
|
$properties['caseNumber'] = $caseNumber;
|
||||||
$properties['caseTitle'] = $caseTitle;
|
$properties['caseTitle'] = $caseTitle;
|
||||||
$properties['filterCases'] = $filterCases;
|
$properties['filterCases'] = $filterCases;
|
||||||
|
$properties['category'] = $category;
|
||||||
$properties['process'] = $process;
|
$properties['process'] = $process;
|
||||||
$properties['task'] = $task;
|
$properties['task'] = $task;
|
||||||
// Get the user that access to the API
|
// Get the user that access to the API
|
||||||
|
|||||||
Reference in New Issue
Block a user