call tracking nav bar correction

This commit is contained in:
venbatechnologies@gmail.com 2019-01-07 14:50:23 +05:30
parent c16768a2a8
commit f509de5748
6 changed files with 89 additions and 27 deletions

View File

@ -156,6 +156,10 @@ class Call_Tracking_Controller extends REST_Controller {
// print_r( $search['searchDate']);
$search['CreatedBranch'] = $this->post('branchId');
// $search['callTrackingaccess'] = $this->post('callTrackingaccess');
// echo $search['callTrackingaccess'];die();
$status=$this->post('status');
// $search['searchMobileNumber'] = $this->post('searchMobileNumber');

View File

@ -269,7 +269,7 @@ class Calltracking_model extends CI_Model {
// $this->db->where('STB.BranchCode',$branchID);
// $this->db->where('LO.ID',$requestedBy);
// }
if(($userType== SUPER_ADMIN)||($CallModuleAccess == '1')){
if(($userType== SUPER_ADMIN)||($userType== ADMIN)||($CallModuleAccess == '1')){
$this->db->where('STB.BranchCode',$branchID);
}
@ -543,7 +543,7 @@ class Calltracking_model extends CI_Model {
$branch = $search['CreatedBranch'];
//echo $branch;die();
// echo $search['requestedDept'] ;die();
// echo $search['requestedDept'] ;die();
$EMPID = '';
@ -583,7 +583,7 @@ class Calltracking_model extends CI_Model {
}
// echo $CallModuleAccess;die();
//echo $CallModuleAccess;die();
@ -605,12 +605,29 @@ class Calltracking_model extends CI_Model {
}
// if (($search['requestedDept'] == EMPLOYEE)||($search['requestedDept'] == TRAINEE)){
if (($CallModuleAccess == '0')&&($search['requestedDept'] != SUPER_ADMIN)){
// if (($CallModuleAccess == '0')&&(($search['requestedDept'] != SUPER_ADMIN)||($search['requestedDept'] != ADMIN))){
// $this->db->where('LT.AssignedTo', $search['requestedBy']);
// }
if($CallModuleAccess == '0')
{
if (($search['requestedDept'] == EMPLOYEE)||($search['requestedDept'] == TRAINEE))
{
$this->db->where('LT.AssignedTo', $search['requestedBy']);
$this->db->where('LT.CreatedBranch', $search['CreatedBranch']);
}
}
$this->db->where('LT.AssignedTo', $search['requestedBy']);
// $this->db->where('LT.CreatedBranch', $search['CreatedBranch']);
}
if($search['searchDate']!='' OR $search['searchDate']!=null){
/* if(sizeof($search['searchDate']) == '1'){
$this->db->where('LTF.FollowupOn <= ', $search['searchDate'][0]);
@ -631,7 +648,7 @@ class Calltracking_model extends CI_Model {
$leadDet=$this->db->get();
// print_r($this->db->last_query());die();
// print_r($this->db->last_query());die();
if($this->db->affected_rows()==0){
$result_array['trackingStatus']=false;
@ -798,11 +815,28 @@ class Calltracking_model extends CI_Model {
}
// if ($search['requestedDept'] == EMPLOYEE
if (($CallModuleAccess == '0')&& ($search['requestedDept'] != SUPER_ADMIN)){
$this->db->where('LT.AssignedTo', $search['requestedBy']);
$this->db->where('LT.CreatedBranch', $search['CreatedBranch']);
// if (($CallModuleAccess == '0')&& ($search['requestedDept'] != SUPER_ADMIN)){
// $this->db->where('LT.AssignedTo', $search['requestedBy']);
// $this->db->where('LT.CreatedBranch', $search['CreatedBranch']);
// }
if($CallModuleAccess == '0')
{
if (($search['requestedDept'] == EMPLOYEE)||($search['requestedDept'] == TRAINEE))
{
$this->db->where('LT.AssignedTo', $search['requestedBy']);
$this->db->where('LT.CreatedBranch', $search['CreatedBranch']);
}
}
}
if(($search['searchDate']!='' OR $search['searchDate']!=null) AND sizeof($search['searchDate']) == '1'){
// $this->db->where('LTF.FollowupOn <= ', $search['searchDate'][0]);
@ -1012,17 +1046,32 @@ class Calltracking_model extends CI_Model {
// if ($trackingID['requestedDept'] == EMPLOYEE){
if (($CallModuleAccess == '0')&& ($trackingID['requestedDept'] != SUPER_ADMIN)){
// if (($CallModuleAccess == '0')&& ($trackingID['requestedDept'] != SUPER_ADMIN)){
// $this->db->where('LT.AssignedTo', $trackingID['UpdatedBy']);
// $this->db->where('LT.CreatedBranch', $trackingID['CreatedBranch']);
// }
if($CallModuleAccess == '0')
{
if (($trackingID['requestedDept'] == EMPLOYEE)||($trackingID['requestedDept'] == TRAINEE))
{
$this->db->where('LT.AssignedTo', $trackingID['UpdatedBy']);
$this->db->where('LT.CreatedBranch', $trackingID['CreatedBranch']);
}
}
$this->db->where('LT.AssignedTo', $trackingID['UpdatedBy']);
$this->db->where('LT.CreatedBranch', $trackingID['CreatedBranch']);
}
$leadDet=$this->db->get();
// print_r($this->db->last_query());die();
// print_r($this->db->last_query());die();
//print_r($leadDet->result());die();

View File

@ -490,6 +490,7 @@ $scope.trackingTodayno=0;
requestedDept: JSON.parse(localStorage.getItem('localObj')).localType,
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
searchDate: $scope.finalSearchArry,
callTrackingaccess : JSON.parse(localStorage.getItem('localObj')).is_CalltrackApproval_Access,
status: $scope.status
}
};

View File

@ -140,7 +140,7 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
$scope.univ = response.data.univ;
$scope.fyr = response.data.fyr;
console.log($scope.branch);
// console.log($scope.branch);
} else {
$scope.message = response.data.message;
@ -836,7 +836,7 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
}
};
console.log(JSON.parse(localStorage.getItem('localObj')).localType);
// console.log(JSON.parse(localStorage.getItem('localObj')).localType);
$http(fpending).then(function (response) {
if (response.data.lList == true) {
@ -859,7 +859,7 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
}
else {
$scope.Dt_fpending = $scope.fpending;
console.log($scope.Dt_fpending);
// console.log($scope.Dt_fpending);
// console.log('else');
}
} else {
@ -1108,7 +1108,7 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
for (var i = 0; i < $scope.fout.length; i++)
// $scope.fout[i].Sl_No = i + 1;
$scope.fo = false;
console.log($scope.fout);
//console.log($scope.fout);
} else {
$scope.fo = true;
$scope.message = response.data.message;
@ -1204,8 +1204,8 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
}
};
console.log($scope.filters.fout_year);
console.log(JSON.parse(localStorage.getItem('localObj')).localBranchID);
// console.log($scope.filters.fout_year);
//console.log(JSON.parse(localStorage.getItem('localObj')).localBranchID);
$http(admissionYear).then(function (response) {
if (response.data.lList == true) {
$scope.adYear = response.data.l_data;

View File

@ -202,20 +202,25 @@ app.controller('topnavCtrl', ["$scope", "$http", "API_POINTS", "$localStorage",
});
};
$scope.upDateLocalBran = function (Id, listCode, financeAccess,calltrackAccess) {
//console.log(calltrackAccess);return false;
var call = calltrackAccess;
//alert(call)
localDetail.localBranchID = Id;
localDetails.localBranchID = Id;
localDetail.localType = listCode;
localDetails.localType = listCode;
localDetail.is_DayBookApproval_Access = financeAccess;
localDetails.is_DayBookApproval_Access = financeAccess;
localDetails.is_CalltrackApproval_Access = calltrackAccess;
localDetail.is_CalltrackApproval_Access = call;
localDetails.is_CalltrackApproval_Access = call;
ipCookie('cookiechk', localDetails, { expires: 21 });
localStorage.setItem('localObj', JSON.stringify(localDetail));
$window.location.reload();
// alert(JSON.stringify(localDetail));
//alert(JSON.stringify(localDetail));
}
}]);

View File

@ -3,6 +3,8 @@
<!-- start: Super Admin -->
<!-- <ul style="text-transform: uppercase;" class="main-navigation-menu" ng-if="getLoginDash == 'superAdmin'"> -->
<ul class="main-navigation-menu" ng-if="getLoginDash == 'superAdmin'">
<li ui-sref-active="active">
<a ui-sref="app.dashboard">
@ -1641,7 +1643,6 @@
</ul>
<!-- start: Trainee -->
<ul class="main-navigation-menu" ng-if="getLoginDash == 'trainee'">
@ -1756,6 +1757,8 @@
</li>
-->
<li ui-sref-active="active" ng-if="is_active_CallTrackAccess == '1'">
<a ui-sref="app.call.pending" ng-click="checkAdmin()">
<span class="title" translate="sidebar.nav.tracking.pending"> PENDING DETAILS </span>