Merge remote-tracking branch 'origin/master'

This commit is contained in:
gandhimathi 2018-04-19 16:14:37 +05:30
commit a46103d4ad
3 changed files with 28 additions and 16 deletions

View File

@ -104,18 +104,19 @@ class Employee_model extends CI_Model
$responseDetails->BranchCode = 'All';
$result['details'] = $responseDetails;
// print_r($result['details']);exit();
$this->db->select('t3.BranchCode, t3.BranchName');
$this->db->from('' . STAFF_BRANCH . ' as t2');
$this->db->where('t2.StaffID', $EmpId);
$this->db->where('t2.IsActive', 1);
$this->db->join('' . BRANCH . ' as t3', 't2.BranchCode = t3.BranchCode', 'LEFT');
$this->db->where('t3.IsActive', 1);
// $this->db->join('T_StaffDetails as t2', 't1.StaffID = t2.StaffID', 'LEFT');
$this->db->select('t1.BranchCode, t1.BranchName, t2.ListCode, t3.ListName');
// $this->db->from('' . STAFF_BRANCH . ' as t2');
// $this->db->where('t2.StaffID', $EmpId);
// $this->db->where('t2.IsActive', 1);
$this->db->from('' . BRANCH . ' as t1');
// $this->db->where('t3.IsActive', 1);
$this->db->join(''.LOGIN.' as t2', 't2.ID = t1.CreatedBy', 'LEFT');
$this->db->join('' . PICK_LIST_DETAILS . ' as t3', 't3.ListCode = t2.ListCode', 'LEFT');
$branchDetails = $this->db->get();
$getArrs = $branchDetails->result();
$SS['BranchCode'] = 'All';
$SS['BranchName'] = 'All';
array_push($getArrs, $SS);
$SS['ListCode'] = $responseDetails->ListCode;
$SS['ListName'] = '';
// array_push($getArrs, $SS);
// print_r($getArrs);exit();
$result['branchStatus'] = true;
$result['branch_details'] = $getArrs;

View File

@ -25,7 +25,7 @@ class Login_model extends CI_Model
$this->db->select('t1.MobileNumber, t1.Password,t1.ListCode');
$this->db->from('' . LOGIN . ' as t1');
$this->db->where('t1.MobileNumber', $mobile);
// $this->db->join('' . STAFF . ' as t2', 't1.StaffID = t2.StaffID', 'LEFT');
// $this->db->join('' . STAFF . ' as t2', 't1.StaffID = t2.StaffID', 'LEFT');
$this->db->where('t1.IsActive', 1);
//$this->db->where('t2.IsActive', 1);
$loginDetails = $this->db->get(LOGIN)->first_row();
@ -44,10 +44,22 @@ class Login_model extends CI_Model
$responseDetails = $this->db->get()->first_row();
if($responseDetails){
if ($responseDetails->ListCode == SUPER_ADMIN) {
// For First time Super admin login, will set all branch detail
$result['loginStatus'] = true;
$responseDetails->BranchCode = 'All';
$result['details'] = $responseDetails;
$this->db->select('t1.BranchCode');
$this->db->from('' . BRANCH . ' as t1');
$this->db->order_by('t1.CreatedOn', 'ASC');
$this->db->limit(1);
$getBranch = $this->db->get()->first_row();
if($getBranch){
// For First time Super admin login, will set all branch detail
$result['loginStatus'] = true;
$responseDetails->BranchCode = $getBranch->BranchCode;
$result['details'] = $responseDetails;
}else {
// For First time Super admin login, will set all branch detail
$result['loginStatus'] = true;
$responseDetails->BranchCode = 'All';
$result['details'] = $responseDetails;
}
} else {
$result['loginStatus'] = true;
$result['details'] = $responseDetails;

View File

@ -4,7 +4,6 @@
<a class="sidebar-mobile-toggler pull-left hidden-md hidden-lg" ng-click="toggle('sidebar')" class="btn btn-navbar sidebar-toggle">
<i class="ti-align-justify"></i>
</a>
<a class="navbar-brand" ui-sref="app.dashboard" ng-if="getLoginDash != 'student'">
<img style=" width: 120px;background-color: white;" ng-src="{{app.layout.logo}}" alt="{{app.name}}"/>
</a>