This commit is contained in:
Paula Quispe
2017-07-18 15:40:31 -04:00
parent a74e750ff3
commit d160585122
2 changed files with 38 additions and 4 deletions

View File

@@ -109,12 +109,14 @@ if( isset($_GET['action']) && ($_GET['action'] == 'jump') ) {
}
if(isset($_GET['actionFromList']) && ($_GET['actionFromList'] === 'to_revise') ){
$oApp = new Application;
$oApp->Load($appUid);
//If the case is completed can not update the information from supervisor/review
if($oApp->getAppStatus() === 'COMPLETED') {
$oSupervisor = new \ProcessMaker\BusinessModel\ProcessSupervisor();
$caseCanBeReview = $oSupervisor->reviewCaseStatusForSupervisor($appUid, $delIndex);
//Check if the case has the correct status for update the information from supervisor/review
if (!$caseCanBeReview) {
//The supervisor can not edit the information
$script = 'cases_Open?';
} else {
//The supervisor can edit the information, the case are in TO_DO
$script = 'cases_OpenToRevise?APP_UID=' . $appUid . '&DEL_INDEX=' . $delIndex . '&TAS_UID=' . $tasUid;
$oHeadPublisher->assign( 'treeToReviseTitle', G::loadtranslation( 'ID_STEP_LIST' ) );
$casesPanelUrl = 'casesToReviseTreeContent?APP_UID=' . $appUid . '&DEL_INDEX=' . $delIndex;