employee list changes for super admin : kdk
This commit is contained in:
parent
ecabc61026
commit
2f5b8230fe
@ -164,6 +164,7 @@ class Employee_model extends CI_Model
|
||||
// echo $loginUserId, $loginUserBranchId, $loginUserType; exit();
|
||||
if ($loginUserType == SUPER_ADMIN) {
|
||||
// list for super admin
|
||||
// echo $loginUserBranchId;exit();
|
||||
if ($loginUserBranchId == 'All') {
|
||||
// for getting all branch details
|
||||
$staffId = $this->selfGetEmpId($loginUserId);
|
||||
@ -187,16 +188,16 @@ class Employee_model extends CI_Model
|
||||
} else {
|
||||
$staffId = $this->selfGetEmpId($loginUserId);
|
||||
$this->db->select('t2.*');
|
||||
$this->db->from('' . STAFF_BRANCH . ' as t1');
|
||||
|
||||
$this->db->join('' . STAFF . ' as t2', 't2.StaffID = t1.StaffID', 'LEFT');
|
||||
$this->db->from('' . STAFF_BRANCH . ' as t1');
|
||||
|
||||
// not for SuperAdmin and Student Role code
|
||||
$this->db->where_not_in('t1.StaffID', $staffId);
|
||||
$this->db->group_by('t1.StaffID');
|
||||
$this->db->where('t1.BranchCode', $loginUserBranchId);
|
||||
$this->db->where('t1.ListCode', EMPLOYEE);
|
||||
$this->db->order_by('t1.CreatedOn', 'DESC');
|
||||
$this->db->join('' . STAFF . ' as t2', 't2.StaffID = t1.StaffID', 'LEFT');
|
||||
|
||||
// not for SuperAdmin and Student Role code
|
||||
$this->db->where_not_in('t1.StaffID', $staffId);
|
||||
$this->db->group_by('t1.StaffID');
|
||||
$this->db->where('t1.BranchCode', $loginUserBranchId);
|
||||
// $this->db->where('t1.ListCode', EMPLOYEE);
|
||||
$this->db->order_by('t1.CreatedOn', 'DESC');
|
||||
$empDetails = $this->db->get();
|
||||
$checkArr = $empDetails->result();
|
||||
if (count($checkArr) > 0) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user