course details changes done
This commit is contained in:
parent
691218a543
commit
deeb99f8bc
@ -294,7 +294,9 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
|
||||
};
|
||||
$rootScope.loadFollowupDetails(localStorage.getItem('trackID'));
|
||||
};
|
||||
|
||||
/*
|
||||
* used to get tracking list
|
||||
* */
|
||||
$rootScope.next = function(trackID){
|
||||
$scope.ListOfTracks=JSON.parse(localStorage.getItem('trackingList'));
|
||||
|
||||
@ -315,6 +317,33 @@ app.controller('callTrackingCtrl2', ["$scope","$rootScope","toaster", "$filter",
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* get previous tracking id
|
||||
* */
|
||||
|
||||
$rootScope.previous = function(trackID){
|
||||
$scope.ListOfTracksForPre=JSON.parse(localStorage.getItem('trackingList'));
|
||||
|
||||
angular.forEach($scope.ListOfTracksForPre,function (value,key) {
|
||||
|
||||
if(value.TrackingID==trackID){
|
||||
$scope.prevTrack=$scope.ListOfTracksForPre[key-1];
|
||||
if($scope.prevTrack!='' && $scope.prevTrack!=undefined){
|
||||
$rootScope.loadFollowupDetails($scope.prevTrack.TrackingID);
|
||||
|
||||
}
|
||||
else{
|
||||
console.log($scope.ListOfTracksForPre.length);
|
||||
$rootScope.loadFollowupDetails($scope.ListOfTracksForPre[$scope.ListOfTracksForPre.length-1].TrackingID);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* update the follow up details
|
||||
|
||||
Loading…
Reference in New Issue
Block a user