public function getActionOptions() { $APP_UID = $_SESSION['APPLICATION']; $c = new Criteria('workflow'); $c->clearSelectColumns(); $c->addSelectColumn(AppThreadPeer::APP_THREAD_PARENT); $c->add(AppThreadPeer::APP_UID, $APP_UID); $c->add(AppThreadPeer::APP_THREAD_STATUS, 'OPEN'); $cant = AppThreadPeer::doCount($c); $oCase = new Cases(); $aFields = $oCase->loadCase($_SESSION['APPLICATION'], $_SESSION['INDEX']); global $RBAC; $options = array(); switch ($aFields['APP_STATUS']) { case 'DRAFT': if (!AppDelay::isPaused($_SESSION['APPLICATION'], $_SESSION['INDEX'])) { $options[] = array('text' => G::LoadTranslation('ID_PAUSED_CASE'), 'fn' => 'setUnpauseCaseDate'); } else { $options[] = array('text' => G::LoadTranslation('ID_UNPAUSE'), 'fn' => 'unpauseCase'); } $options[] = array('text' => G::LoadTranslation('ID_DELETE'), 'fn' => 'deleteCase'); if ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1) { $options[] = array('text' => G::LoadTranslation('ID_REASSIGN'), 'fn' => 'getUsersToReassign'); } break; case 'TO_DO': if (!AppDelay::isPaused($_SESSION['APPLICATION'], $_SESSION['INDEX'])) { $options[] = array('text' => G::LoadTranslation('ID_PAUSED_CASE'), 'fn' => 'setUnpauseCaseDate'); if ($cant == 1) { if ($RBAC->userCanAccess('PM_CANCELCASE') == 1) { $options[] = array('text' => G::LoadTranslation('ID_CANCEL'), 'fn' => 'cancelCase'); } else { $options[] = array('text' => G::LoadTranslation('ID_CANCEL'), 'fn' => 'cancelCase', 'hide' => 'hiden'); } } } else { $options[] = array('text' => G::LoadTranslation('ID_UNPAUSE'), 'fn' => 'unpauseCase'); } if ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1) { $options[] = array('text' => G::LoadTranslation('ID_REASSIGN'), 'fn' => 'getUsersToReassign'); } break; case 'CANCELLED': $options[] = array('text' => G::LoadTranslation('ID_REACTIVATE'), 'fn' => 'reactivateCase'); break; } if ($_SESSION['TASK'] != '-1') { $oTask = new Task(); $aTask = $oTask->load($_SESSION['TASK']); if ($aTask['TAS_TYPE'] == 'ADHOC') { $options[] = array('text' => G::LoadTranslation('ID_ADHOC_ASSIGNMENT'), 'fn' => 'adhocAssignmentUsers'); } } return $options; }
* * For more information, contact Colosa Inc, 2566 Le Jeune Rd., * Coral Gables, FL, 33134, USA, or email info@colosa.com. * */ require_once 'classes/model/AppThread.php'; require_once 'classes/model/AppDelay.php'; G::LoadClass('tree'); G::LoadClass('case'); $APP_UID = $_SESSION['APPLICATION']; $c = new Criteria('workflow'); $c->clearSelectColumns(); $c->addSelectColumn(AppThreadPeer::APP_THREAD_PARENT); $c->add(AppThreadPeer::APP_UID, $APP_UID); $c->add(AppThreadPeer::APP_THREAD_STATUS, 'OPEN'); $cant = AppThreadPeer::doCount($c); $oTree = new Tree(); $oTree->nodeType = "blank"; $oTree->name = 'Actions'; $oTree->showSign = false; $oCase = new Cases(); $aFields = $oCase->loadCase($_SESSION['APPLICATION'], $_SESSION['INDEX']); $oCriteria = new Criteria('workflow'); $oCriteria->add(AppDelayPeer::APP_UID, $_SESSION['APPLICATION']); $oCriteria->add(AppDelayPeer::APP_DEL_INDEX, $_SESSION['INDEX']); $oCriteria->add(AppDelayPeer::APP_TYPE, 'PAUSE'); $oCriteria->add(AppDelayPeer::APP_DISABLE_ACTION_USER, null); $oDataset = AppDelayPeer::doSelectRS($oCriteria); $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC); $oDataset->next(); $aRow = $oDataset->getRow();