changes in course

This commit is contained in:
gandhimathi 2017-11-29 12:49:54 +05:30
parent b71a52f22d
commit 86c6b95daf

View File

@ -157,7 +157,6 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
* created by kms * created by kms
* */ * */
$scope.updateCourse = function (myModel, form, loading) { $scope.updateCourse = function (myModel, form, loading) {
console.log(form);
var firstError = null; var firstError = null;
if (form.$invalid) { if (form.$invalid) {
var field = null, firstError = null; var field = null, firstError = null;
@ -223,7 +222,7 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
$rootScope.init = function () { $rootScope.init = function () {
$scope.loader=''; $scope.loader='';
var getBranch = { var getCourse = {
method: 'POST', method: 'POST',
url: apiPoint.url + 'getCourseDetails/', url: apiPoint.url + 'getCourseDetails/',
headers: { headers: {
@ -233,7 +232,7 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
} }
}; };
$http(getBranch).then(function (response) { $http(getCourse).then(function (response) {
if (response.data.status==200 && response.data.courseStatus) { if (response.data.status==200 && response.data.courseStatus) {
$scope.emptyData=true; $scope.emptyData=true;
$scope.loader=true; $scope.loader=true;
@ -246,9 +245,13 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
} else { } else {
$scope.emptyData=false; $scope.emptyData=false;
$scope.loader=false; $scope.loader=true;
$scope.university=response.data.universityDetails; $scope.university=response.data.universityDetails;
$scope.feesDetails=response.data.feesDetails;
$scope.myModel.ListName=$scope.feesDetails[0];
$scope.myModel.programListName=$scope.myModel.ListName.programType[0].ListCode;
} }
}); });