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