PMCORE-514

This commit is contained in:
Paula Quispe
2021-08-02 13:06:17 -04:00
parent f6770eff24
commit 2077edb64b
11 changed files with 393 additions and 279 deletions

View File

@@ -173,18 +173,6 @@ class Delegation extends Model
return $query->where('DEL_INDEX', '=', 1);
}
/**
* Scope a query to get the in-progress
*
* @param \Illuminate\Database\Eloquent\Builder $query
*
* @return \Illuminate\Database\Eloquent\Builder
*/
public function scopeCaseInProgress($query)
{
return $query->statusIds([Application::STATUS_DRAFT, Application::STATUS_TODO]);
}
/**
* Scope a query to get the to_do cases
*
@@ -777,19 +765,6 @@ class Delegation extends Model
return $query->whereIn('APP_DELEGATION.PRO_ID', $processes);
}
/**
* Scope where in processes
*
* @param \Illuminate\Database\Eloquent\Builder $query
* @param array $processes
*
* @return \Illuminate\Database\Eloquent\Builder
*/
public function scopeInProcesses($query, array $processes)
{
return $query->whereIn('PROCESS.PRO_ID', $processes);
}
/**
* Scope the Inbox cases
*
@@ -812,26 +787,6 @@ class Delegation extends Model
return $query;
}
/**
* Scope the Inbox cases
*
* @param \Illuminate\Database\Eloquent\Builder $query
*
* @return \Illuminate\Database\Eloquent\Builder
*/
public function scopeInboxWithoutUser($query)
{
// This scope is for the join with the APP_DELEGATION table
$query->joinApplication();
$query->status(Application::STATUS_TODO);
// Scope for the restriction of the task that must not be searched for
$query->excludeTaskTypes(Task::DUMMY_TASKS);
// Scope that establish that the DEL_THREAD_STATUS must be OPEN
$query->threadOpen();
return $query;
}
/**
* Scope a self service cases
*
@@ -1417,7 +1372,7 @@ class Delegation extends Model
* @param string $appUid
* @return array
*
* @see \ProcessMaker\BusinessModel\Cases:getStatusInfo()
* @see \ProcessMaker\BusinessModel\Cases::getStatusInfo()
*/
public static function getParticipatedInfo($appUid)
{