Ejemplo n.º 1
0
 public function getconfiglinemanagersAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserRole = $auth->getStorage()->read()->emprole;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     $line1_id = $this->_getParam('line1_id', null);
     $init_id = $this->_getParam('init_id', null);
     $employeeids = $this->_getParam('employee_ids', null);
     $businessunit_id = $this->_getParam('businessunit_id', null);
     $department_id = $this->_getParam('department_id', null);
     $selected_val = $this->_getParam('selected_val', null);
     $app_init_model = new Default_Model_Appraisalinit();
     $managers_data = $app_init_model->getRepManagers_report($line1_id, $init_id, $employeeids, $businessunit_id, $department_id);
     $managers_html = '<option value="">Select L1 Manager</option>';
     if (isset($managers_data)) {
         foreach ($managers_data as $data) {
             $managers_html .= "<option value='" . $data['user_id'] . "' " . (!empty($selected_val) ? $selected_val == $data['user_id'] ? 'selected=\\"selected\\"' : '' : '') . " >" . $data['userfullname'] . "</option>";
         }
     }
     $this->_helper->json($managers_html);
 }
Ejemplo n.º 2
0
 public function displayreportmanagersAction()
 {
     $line1_data = array();
     $line_managers = array();
     $type = $this->_getParam('type', null);
     $levels = $this->_getParam('levels', null);
     $init_id = $this->_getParam('init_id', null);
     $line1_id = $this->_getParam('line1_id', null);
     $call_type = $this->_getParam('call_type', null);
     $context = $this->_getParam('context', 'add');
     $employeeids = $this->_getParam('employeeids');
     $businessunit_id = $this->_getParam('businessunit_id', null);
     $department_id = $this->_getParam('department_id', null);
     $app_init_model = new Default_Model_Appraisalinit();
     $managers = $app_init_model->getRepManagers_report($line1_id, $init_id, $employeeids, $businessunit_id, $department_id);
     if ($context == 'edit') {
         $emp_model = new Default_Model_Employee();
         $line1_data = $emp_model->getEmp_from_summary($line1_id);
         $line_managers = $app_init_model->getLineManagers($init_id, $line1_id);
         $line_managers = array_filter($line_managers);
     }
     $this->view->levels = $levels;
     $this->view->managers = $managers;
     $this->view->init_id = $init_id;
     $this->view->context = $context;
     $this->view->line1_data = $line1_data;
     $this->view->line_managers = $line_managers;
     $this->view->line1_id = $line1_id;
     $this->view->call_type = $call_type;
     $this->render('displayreportmanagers');
 }