PMCORE-4135

This commit is contained in:
Paula Quispe
2023-01-20 10:54:14 -04:00
parent 09fd9cb7e4
commit 24bd2b4cdf

View File

@@ -80,7 +80,6 @@ foreach ($_GET as $k => $v) {
/**
* @todo, the action over the case from Open Case, Case Link and jump to needs to work similar, we need to have a PRD
*/
$case = $caseInstance->loadCase($appUid, $delIndex);
$canClaimCase = false;
$caseCanBeReview = false;
@@ -96,7 +95,7 @@ if (isset($_GET['action'])) {
break;
case 'to_reassign': //Reassign
// From reassign: Review if the user can be claim the case
if ($caseInstance->isSelfService($_SESSION['USER_LOGGED'], $case['TAS_UID'], $appUid)) {
if (empty($case['CURRENT_USER_UID']) && $caseInstance->isSelfService($_SESSION['USER_LOGGED'], $case['TAS_UID'], $appUid)) {
$canClaimCase = true;
}
break;
@@ -111,7 +110,7 @@ if (isset($_GET['action'])) {
$caseCanBeReview = $proSupervisor->reviewCaseStatusForSupervisor($appUid, $delIndex);
}
// From Unassigned: Review if the user can be claim the case
if ($caseInstance->isSelfService($_SESSION['USER_LOGGED'], $case['TAS_UID'], $appUid)) {
if (empty($case['CURRENT_USER_UID']) && $caseInstance->isSelfService($_SESSION['USER_LOGGED'], $case['TAS_UID'], $appUid)) {
$canClaimCase = true;
}
// From Paused: Get the last index OPEN or CLOSED (by Paused cases)