course details changes done
This commit is contained in:
parent
94a6828578
commit
c95968eb93
@ -1080,7 +1080,6 @@ app.controller('callTrackingPendingCtrl', ["$scope","$rootScope","toaster", "$fi
|
||||
}]);
|
||||
|
||||
app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", function ($scope,$rootScope,toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state) {
|
||||
|
||||
$scope.userType=JSON.parse(localStorage.getItem('localObj')).localType;
|
||||
|
||||
$scope.afterRefresh = function () {
|
||||
@ -1516,6 +1515,7 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
|
||||
if (response.data.status==200 && response.data.followupStatus) {
|
||||
$rootScope.followupDetails=response.data.trackingDetails[0];
|
||||
$rootScope.myModel1.status=$rootScope.followupDetails.StatusCode;
|
||||
|
||||
$rootScope.currentDate1=new Date().getFullYear() + '-' + ('0' + (new Date().getMonth() + 1)).slice(-2) + '-' + ('0' + new Date().getDate()).slice(-2);
|
||||
|
||||
$rootScope.myModel1.date=$rootScope.followupDetails.followupDetails[0].FollowupOn;
|
||||
@ -1526,17 +1526,87 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
|
||||
// $rootScope.myModel1.status=$rootScope.followupDetails.StatusCode;
|
||||
$rootScope.trackingStatus=response.data.statusDetails;
|
||||
$rootScope.myModel1.branch=$rootScope.followupDetails.CreatedBranch;
|
||||
|
||||
$rootScope.myModel1.assignStaff=$rootScope.followupDetails.AssignedTo;
|
||||
$rootScope.staffArray='';
|
||||
$rootScope.staffDetails=response.data.staffDetails;
|
||||
angular.forEach($rootScope.staffDetails, function(item) {
|
||||
if(item.BranchCode==$rootScope.myModel1.branch){
|
||||
$rootScope.staffArray = item.staffDetails;
|
||||
if($scope.userType =='R004'){
|
||||
// get deactive branch list
|
||||
$scope.checkBranchData = {
|
||||
BranchCode: $rootScope.followupDetails.CreatedBranch,
|
||||
BranchName: $rootScope.followupDetails.CreatedBranchName +'-'+$rootScope.followupDetails.CreatedBranch
|
||||
};
|
||||
var branchresult = $filter('filter')($rootScope.staffDetails, $scope.checkBranchData);
|
||||
if(branchresult.length==0){
|
||||
|
||||
$rootScope.staffDetails.push($scope.checkBranchData);
|
||||
}
|
||||
|
||||
// end deactive branch
|
||||
|
||||
angular.forEach($rootScope.staffDetails, function(item) {
|
||||
if(item.BranchCode==$rootScope.myModel1.branch){
|
||||
$rootScope.staffArray = item.staffDetails;
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// get deactive staff details list
|
||||
$scope.checkEmpData = {
|
||||
loginId: $rootScope.followupDetails.AssignedTo,
|
||||
staffName: $rootScope.followupDetails.Firstname +'-'+$rootScope.followupDetails.StaffID
|
||||
};
|
||||
|
||||
if($rootScope.staffArray){
|
||||
var empresult = $filter('filter')($rootScope.staffArray, $scope.checkEmpData);
|
||||
if(empresult.length==0){
|
||||
|
||||
$rootScope.staffArray.push($scope.checkEmpData);
|
||||
}
|
||||
}
|
||||
else{
|
||||
$rootScope.staffArray=[];
|
||||
$rootScope.staffArray.push($scope.checkEmpData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
else{
|
||||
// get deactive staff details list
|
||||
$scope.checkEmpData = {
|
||||
loginId: $rootScope.followupDetails.AssignedTo,
|
||||
staffName: $rootScope.followupDetails.Firstname +'-'+$rootScope.followupDetails.StaffID
|
||||
};
|
||||
|
||||
if($rootScope.staffDetails){
|
||||
var empresult = $filter('filter')($rootScope.staffDetails, $scope.checkEmpData);
|
||||
if(empresult.length==0){
|
||||
|
||||
$rootScope.staffDetails.push($scope.checkEmpData);
|
||||
}
|
||||
}
|
||||
else{
|
||||
$rootScope.staffDetails=[];
|
||||
$rootScope.staffDetails.push($scope.checkEmpData);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// get deactive status list
|
||||
$scope.checkStatusData = {
|
||||
ListCode: $rootScope.followupDetails.StatusCode,
|
||||
ListName: $rootScope.followupDetails.statusName
|
||||
};
|
||||
var statusresult = $filter('filter')($rootScope.trackingStatus, $scope.checkStatusData);
|
||||
if(statusresult.length==0){
|
||||
|
||||
$rootScope.trackingStatus.push($scope.checkStatusData);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user