course details changes done

This commit is contained in:
gandhimathi 2018-02-14 10:30:46 +05:30
parent 64ea7dfc40
commit 6960ef8623

View File

@ -33,7 +33,12 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
* */ * */
$rootScope.updateMoreItems = []; $rootScope.updateMoreItems = [];
$scope.editId = -1; $scope.editId = -1;
$rootScope.setEditId = function (pid,p) { $scope.setEditId = function (pid,p) {
$scope.localSubjectDetails="";
$scope.localSubjectDetails = JSON.parse(localStorage.getItem('localSubjectDetails'));
// getUniversity_FeesDetails();
$rootScope.myModelRegular1=""; $rootScope.myModelRegular1="";
$rootScope.myModelLateral1=""; $rootScope.myModelLateral1="";
$rootScope.updateMoreItems=[]; $rootScope.updateMoreItems=[];
@ -101,21 +106,19 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
// get exist subject details // get exist subject details
$scope.editSubject = []; $scope.editSubject = [];
angular.forEach(p.existSubjects, function (values, keys) { angular.forEach(p.existSubjects, function (values, keys) {
var subresult = $filter('filter')($scope.subjectDetails, values); $scope.getDeactiveSub = {
if(subresult.length==0){ SubjectID: values.SubjectID,
$scope.subjectDetails.push({ SubjectName: values.SubjectCode +'-'+values.SubjectName
"SubjectID":values.SubjectID,
"SubjectName":values.SubjectCode +'-'+values.SubjectName,
});
} }
$scope.editSubject.push(values.SubjectID); $scope.editSubject.push(values.SubjectID);
var subresult = $filter('filter')($scope.localSubjectDetails, $scope.getDeactiveSub);
if(subresult.length==0){
$scope.localSubjectDetails.push($scope.getDeactiveSub);
}
}); });
$scope.viewSubject = { $scope.viewSubject = {
list: $scope.editSubject, list: $scope.editSubject,
} }
@ -439,7 +442,8 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
SubjectName: values.SubjectCode +'-'+values.SubjectName SubjectName: values.SubjectCode +'-'+values.SubjectName
}; };
$scope.subjectDetails.push($scope.subData); $scope.subjectDetails.push($scope.subData);
}) });
// single sitting regular course details in model // single sitting regular course details in model
$scope.myModelRegular = { $scope.myModelRegular = {
@ -490,7 +494,10 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
$scope.myModel.programListName=$scope.myModel.ListName.programType[0].ListCode; $scope.myModel.programListName=$scope.myModel.ListName.programType[0].ListCode;
} }
localStorage.setItem('localSubjectDetails', JSON.stringify($scope.subjectDetails));
}); });
} }
/* /*