From d56a872d7a81b106d0683957e57d28b9d82bc019 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Mon, 22 Jan 2018 17:53:29 +0530 Subject: [PATCH] course details changes done --- Apollo/assets/js/controllers/studentCtrl.js | 130 +++++++++++++++++++- 1 file changed, 128 insertions(+), 2 deletions(-) diff --git a/Apollo/assets/js/controllers/studentCtrl.js b/Apollo/assets/js/controllers/studentCtrl.js index b8fad21b..c3bc61a9 100755 --- a/Apollo/assets/js/controllers/studentCtrl.js +++ b/Apollo/assets/js/controllers/studentCtrl.js @@ -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; + }; +}); \ No newline at end of file