course details changes done

This commit is contained in:
gandhimathi 2018-01-22 17:53:29 +05:30
parent 9466c106f9
commit d56a872d7a

View File

@ -1057,9 +1057,11 @@ $scope.myUnivSearch = "";
$scope.editId = -1;
$scope.editCourseId = -1;
$scope.studentViewPage=-1;
$scope.setEditId = function (id) {
$scope.editId = id;
$scope.editCourseId = -1;
$scope.studentViewPage=-1;
}
$scope.setEditCourseId = function (id) {
@ -1069,6 +1071,20 @@ $scope.myUnivSearch = "";
// $scope.getStudentCourseDetails(id);
$scope.editCourseId = id;
$scope.editId = -1;
$scope.studentViewPage=-1;
$scope.courseEditLoading = true;
}
/*
* view student page
* created by kms
* */
$scope.viewStudentPage = function (id) {
$scope.list = false;
$scope.getStudentPageDetails(id);
$scope.currentStudentId = id;
$scope.studentViewPage = id;
$scope.editId = -1;
$scope.editCourseId = -1;
$scope.courseEditLoading = true;
}
@ -1076,6 +1092,7 @@ $scope.myUnivSearch = "";
$scope.getStudentList();
$scope.editId = -1;
$scope.editCourseId = -1;
$scope.studentViewPage = -1;
}
$scope.cancelCourseDetails = function () {
@ -1779,6 +1796,40 @@ $scope.myUnivSearch = "";
}
}
}
/*
* get student view details in management
* created by kms
*
* */
$scope.getStudentPageDetails = function (id) {
var getcourse = {
method: 'POST',
url: apiPoint.url + 'getStudentBasicInfo/',
headers: {
'Content-Type': 'application/json'
},
data: {
requestedBy :id,
requestedFrom: 1
}
};
$http(getcourse).then(function (response) {
if (response.data.status == 200 && response.data.studentStatus== true) {
$scope.courseEditLoading = false;
$scope.studentDetails = response.data.studentDetails;
$scope.courseDetails = response.data.courseDetails;
} else {
$scope.courseEditLoading = false;
$scope.studentDetails = "";
$scope.courseDetails = "";
}
});
};
}]);
@ -1813,6 +1864,81 @@ app.directive('fileUploadEdit', function () {
scope.$emit("fileSelectedEdit", { file: files[i] });
}
});
}
};
}
};
});
/*modal controller
* */
app.controller('FeesModalDemoCtrl', ["$scope", "$modal", "$log", function ($scope, $modal, $log) {
//Tooltip for print button
$scope.dynamicTooltip = 'Click to View Bill Details';
// $scope.items = ['item1', 'item2', 'item3'];
$scope.FeesName="" ;
$scope.open = function (values) {
$scope.FeesName = values;
var modalInstance = $modal.open({
templateUrl: 'myModalContent.html',
controller: 'ModalInstanceCtrl',
// size: size,
resolve: {
items: function () {
return $scope.FeesName;
}
}
});
modalInstance.result.then(function (selectedItem) {
$scope.selected = selectedItem;
}, function () {
$log.info('Modal dismissed at: ' + new Date());
});
};
}]);
// Please note that $modalInstance represents a modal window (instance) dependency.
// It is not the same as the $modal service used above.
app.controller('ModalInstanceCtrl', ["$scope", "$modalInstance", "items","WordsService", function ($scope, $modalInstance, items,WordsService) {
$scope.items = items;
$scope.selected = {
item: $scope.items[0]
};
$scope.ok = function () {
$modalInstance.close($scope.selected.item);
};
$scope.cancel = function () {
$modalInstance.dismiss('cancel');
};
}]);
app.filter('unique', function() {
return function(collection, primaryKey, secondaryKey) { //optional secondary key
var output = [],
keys = [];
angular.forEach(collection, function(item) {
var key;
secondaryKey === undefined ? key = item[primaryKey] : key = item[primaryKey][secondaryKey];
if(keys.indexOf(key) === -1) {
keys.push(key);
output.push(item);
}
});
return output;
};
});