diff --git a/Apollo/assets/js/controllers/batchCtrl.js b/Apollo/assets/js/controllers/batchCtrl.js index a5337005..b47492be 100755 --- a/Apollo/assets/js/controllers/batchCtrl.js +++ b/Apollo/assets/js/controllers/batchCtrl.js @@ -18,10 +18,25 @@ app.controller('batchCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTabl * created by subaram * */ $scope.editId = -1; - $scope.setEditId = function (pid) { + $scope.setEditId = function (pid,p) { + $scope.localUniversityDetails=""; + $scope.localUniversityDetails = JSON.parse(localStorage.getItem('localUniversityDetails')); + $scope.editId = pid; $scope.viewId = -1; + + // get inactive university id + + + var result = $filter('filter')($scope.localUniversityDetails, {'UniversityID':p.UniversityID}) ; + + if(result.length==0){ + $scope.localUniversityDetails.push({ + "UniversityID":p.UniversityID, + "UniversityName":p.UniversityName, + }); + } }; /* @@ -174,6 +189,7 @@ app.controller('batchCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTabl $scope.emptyData=''; $rootScope.init = function () { + localStorage.setItem('localUniversityDetails', ''); var getBranch = { method: 'POST', @@ -204,6 +220,8 @@ app.controller('batchCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTabl $scope.university=response.data.universityDetails; } + localStorage.setItem('localUniversityDetails', JSON.stringify($scope.university)); + }); };