course details changes done

This commit is contained in:
gandhimathi 2018-02-14 13:30:26 +05:30
parent 5a87d20b5d
commit 5ef6fa4d27

View File

@ -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));
});
};